diff --git a/.github/workflows/npm.yml b/.github/workflows/npm.yml new file mode 100644 index 0000000..2978cdd --- /dev/null +++ b/.github/workflows/npm.yml @@ -0,0 +1,18 @@ +name: Publish Package to npmjs +on: + release: + types: [created] +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + # Setup .npmrc file to publish to npm + - uses: actions/setup-node@v3 + with: + node-version: '16.x' + registry-url: 'https://registry.npmjs.org' + - run: npm ci + - run: npm publish --access public + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/README.md b/README.md index d588dc4..44c1303 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,10 @@ ## A npm module for Lightning Node Connect +## Install + +`npm i @lightninglabs/lnc-web` + ## API Design #### Set-up and connection @@ -62,7 +66,7 @@ lnc.disconnect(); #### Base functions -All of the services (lnd, loop, pool, faraday) will be objects under the main lnc object. Each services’ sub-services will be underneath each service object, and each sub-service function below that (except in the case of faraday which only has one service - its functions will live directly under it). All service names and function names will be camel-cased. +All of the services (lnd, loop, pool, faraday) will be objects under the main lnc object. Each services’ sub-services will be underneath each service object, and each sub-service function below that (except in the case of faraday which only has one service - its functions will live directly under it). All service, function, and param names will be camel-cased. ``` const { lnd, loop, pool, faraday } = lnc; @@ -70,12 +74,15 @@ const { lnd, loop, pool, faraday } = lnc; // all functions on the base object should have proper types // sub-servers exist as objects on each main service lnd.lightning.listInvoices(); -lnd.lightning.connectPeer(‘03aa49c1e98ff4f216d886c09da9961c516aca22812c108af1b187896ded89807e@m3keajflswtfq3bw4kzvxtbru7r4z4cp5stlreppdllhp5a7vuvjzqyd.onion:9735’); +lnd.lightning.connectPeer({ addr: ‘03aa49c1e98ff4f216d886c09da9961c516aca22812c108af1b187896ded89807e@m3keajflswtfq3bw4kzvxtbru7r4z4cp5stlreppdllhp5a7vuvjzqyd.onion:9735’ }); const signature = lnd.signer.signMessage({...params}); const swaps = await loop.swapClient.listSwaps(); -const poolAccount = await pool.trader.initAccount(100000000, 1000); +const poolAccount = await pool.trader.initAccount({ + accountValue: 100000000, + relativeHeight: 1000 + }); const insights = await faraday.channelInsights(); ``` @@ -123,3 +130,7 @@ npm run update-protos # format schemas npm run generate ``` + +## Further documentation + +- https://docs.lightning.engineering/lightning-network-tools/lightning-terminal/lnc-npm diff --git a/demos/connect-demo/README.md b/demos/connect-demo/README.md index 280215d..debe2c7 100644 --- a/demos/connect-demo/README.md +++ b/demos/connect-demo/README.md @@ -21,8 +21,104 @@ accessible that you can obtain a pairing phrase from. ```sh $ npm start ``` - Your browser should open to http://localhost:3000 and you should see the home page - below + Your browser should open to http://localhost:3000 and you will see the home page. + +## LNC Relevant Code + +The `LNC` object in this app can be access from any component via the custom React hook +[useLNC](https://github.com/lightninglabs/lnc-web/blob/main/demos/connect-demo/src/hooks/useLNC.ts). +This hook returns three variables. + +- `lnc` - the global `LNC` instance with full access to all of the `litd` RPC endpoints + ```ts + const lnc = new LNC({}); + ``` +- `connect` - a helper function that sets the `pairingPhrase` on the `lnc` object, then + attempts to connect to the node. If the connections is successful (`listChannels` + succeeds), then it will set the `password` on the `lnc` object which encrypts and stores + the keys in the browser's `localStorage`. + ```ts + const connect = useCallback(async (pairingPhrase: string, password: string) => { + lnc.credentials.pairingPhrase = pairingPhrase; + await lnc.connect(); + // verify we can fetch data + await lnc.lnd.lightning.listChannels(); + // set the password after confirming the connection works + lnc.credentials.password = password; + }, []); + ``` +- `login` - a helper function that sets the `password` on the `lnc` object, which is used + to decrypt the data stored in `localStorage`. If the password is valid, the connection + is made. + ```ts + const login = useCallback(async (password: string) => { + lnc.credentials.password = password; + await lnc.connect(); + }, []); + ``` + +On the [Home](./src/pages/Home.tsx) page, we can detect if the user has connected to the +node via the `isConnected` field. + +```ts +const { lnc } = useLNC(); + +return ( + +

Welcome to lnc-web

+

+ {lnc.isConnected + ? 'You are now connected to your Lightning node.' + : 'Connect or Login to view your Lightning node info.'} +

+ +
+); +``` + +In the [Page](./src/components/Page.tsx) component that displays the navbar, we can detect +whether to display a button to Connect, Login, or Logout based on the `lnc.isConnected` +and `lnc.credentials.isPaired` fields. + +```ts + +``` + +In the [GetInfo](./src/components/GetInfo.tsx) component, we call the +`lnc.lnd.lightning.GetInfo` RPC to fetch the node's information if the user has connected. +Once the info is set, it is rendered in the table. + +```ts +const { lnc } = useLNC(); +const [info, setInfo] = useState(); + +useEffect(() => { + if (lnc.isConnected) { + const sendRequest = async () => { + const res = await lnc.lnd.lightning.getInfo(); + setInfo(res); + }; + sendRequest(); + } +}, [lnc.isConnected, lnc.lnd.lightning]); +``` ## Screenshots diff --git a/demos/connect-demo/package-lock.json b/demos/connect-demo/package-lock.json index d3a7567..6eabb37 100644 --- a/demos/connect-demo/package-lock.json +++ b/demos/connect-demo/package-lock.json @@ -8,6 +8,7 @@ "name": "connect-demo", "version": "0.1.0", "dependencies": { + "@lightninglabs/lnc-web": "^0.0.1-alpha.rc1", "@testing-library/jest-dom": "^5.16.4", "@testing-library/react": "^13.3.0", "@testing-library/user-event": "^13.5.0", @@ -15,6 +16,7 @@ "@types/node": "^16.11.39", "@types/react": "^18.0.12", "@types/react-dom": "^18.0.5", + "bootstrap": "^4.6.1", "react": "^18.1.0", "react-bootstrap": "^2.4.0", "react-dom": "^18.1.0", @@ -2178,6 +2180,17 @@ "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz", "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==" }, + "node_modules/@improbable-eng/grpc-web": { + "version": "0.15.0", + "resolved": "https://registry.npmjs.org/@improbable-eng/grpc-web/-/grpc-web-0.15.0.tgz", + "integrity": "sha512-ERft9/0/8CmYalqOVnJnpdDry28q+j+nAlFFARdjyxXDJ+Mhgv9+F600QC8BR9ygOfrXRlAk6CvST2j+JCpQPg==", + "dependencies": { + "browser-headers": "^0.4.1" + }, + "peerDependencies": { + "google-protobuf": "^3.14.0" + } + }, "node_modules/@istanbuljs/load-nyc-config": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", @@ -2910,6 +2923,34 @@ "resolved": "https://registry.npmjs.org/@leichtgewicht/ip-codec/-/ip-codec-2.0.4.tgz", "integrity": "sha512-Hcv+nVC0kZnQ3tD9GVu5xSMR4VVYOteQIr/hwFPVEvPdlXqgGEuRjiheChHgdM+JyqdgNcmzZOX/tnl0JOiI7A==" }, + "node_modules/@lightninglabs/lnc-web": { + "version": "0.0.1-alpha.rc1", + "resolved": "https://registry.npmjs.org/@lightninglabs/lnc-web/-/lnc-web-0.0.1-alpha.rc1.tgz", + "integrity": "sha512-QWQRYp+DideNpbOsi3fbMdjKqXa11Jl7EW9oCJSrJ87x6Ghptec9hCspc/xtJOTdtvoyh7I3CVvkx+pxa4KjyQ==", + "dependencies": { + "@improbable-eng/grpc-web": "0.15.0", + "@types/big.js": "6.1.2", + "@types/google-protobuf": "3.15.5", + "big.js": "6.1.1", + "crypto-js": "4.1.1", + "google-protobuf": "3.19.4", + "lodash": "4.17.21", + "node-polyfill-webpack-plugin": "1.1.4", + "ts-protoc-gen": "0.15.0" + } + }, + "node_modules/@lightninglabs/lnc-web/node_modules/big.js": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/big.js/-/big.js-6.1.1.tgz", + "integrity": "sha512-1vObw81a8ylZO5ePrtMay0n018TcftpTA5HFKDaSuiUDBo8biRBtjIobw60OpwuvrGk+FsxKamqN4cnmj/eXdg==", + "engines": { + "node": "*" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/bigjs" + } + }, "node_modules/@nodelib/fs.scandir": { "version": "2.1.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", @@ -3630,6 +3671,11 @@ "@babel/types": "^7.3.0" } }, + "node_modules/@types/big.js": { + "version": "6.1.2", + "resolved": "https://registry.npmjs.org/@types/big.js/-/big.js-6.1.2.tgz", + "integrity": "sha512-h24JIZ52rvSvi2jkpYDk2yLH99VzZoCJiSfDWwjst7TwJVuXN61XVCUlPCzRl7mxKEMsGf8z42Q+J4TZwU3z2w==" + }, "node_modules/@types/body-parser": { "version": "1.19.2", "resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.2.tgz", @@ -3708,6 +3754,11 @@ "@types/range-parser": "*" } }, + "node_modules/@types/google-protobuf": { + "version": "3.15.5", + "resolved": "https://registry.npmjs.org/@types/google-protobuf/-/google-protobuf-3.15.5.tgz", + "integrity": "sha512-6bgv24B+A2bo9AfzReeg5StdiijKzwwnRflA8RLd1V4Yv995LeTmo0z69/MPbBDFSiZWdZHQygLo/ccXhMEDgw==" + }, "node_modules/@types/graceful-fs": { "version": "4.1.5", "resolved": "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.5.tgz", @@ -4629,6 +4680,33 @@ "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz", "integrity": "sha512-BSHWgDSAiKs50o2Re8ppvp3seVHXSRM44cdSsT9FfNEUUZLOGWVCsiWaRPWM1Znn+mqZ1OfVZ3z3DWEzSp7hRA==" }, + "node_modules/asn1.js": { + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-5.4.1.tgz", + "integrity": "sha512-+I//4cYPccV8LdmBLiX8CYvf9Sp3vQsrqu2QNXRcrbiWvcx/UdlFiqUJJzxRQxgsZmvhXhn4cSKeSmoFjVdupA==", + "dependencies": { + "bn.js": "^4.0.0", + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0", + "safer-buffer": "^2.1.0" + } + }, + "node_modules/asn1.js/node_modules/bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" + }, + "node_modules/assert": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/assert/-/assert-2.0.0.tgz", + "integrity": "sha512-se5Cd+js9dXJnu6Ag2JFc00t+HmHOen+8Q+L7O9zI0PqQXr20uk2J0XQqMxZEeo5U50o8Nvmmx7dZrl+Ufr35A==", + "dependencies": { + "es6-object-assign": "^1.1.0", + "is-nan": "^1.2.1", + "object-is": "^1.0.1", + "util": "^0.12.0" + } + }, "node_modules/ast-types-flow": { "version": "0.0.7", "resolved": "https://registry.npmjs.org/ast-types-flow/-/ast-types-flow-0.0.7.tgz", @@ -4695,6 +4773,17 @@ "postcss": "^8.1.0" } }, + "node_modules/available-typed-arrays": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz", + "integrity": "sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/axe-core": { "version": "4.4.2", "resolved": "https://registry.npmjs.org/axe-core/-/axe-core-4.4.2.tgz", @@ -5001,6 +5090,25 @@ "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" }, + "node_modules/base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, "node_modules/batch": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/batch/-/batch-0.6.1.tgz", @@ -5041,6 +5149,11 @@ "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz", "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==" }, + "node_modules/bn.js": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", + "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==" + }, "node_modules/body-parser": { "version": "1.20.0", "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.0.tgz", @@ -5112,6 +5225,19 @@ "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", "integrity": "sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==" }, + "node_modules/bootstrap": { + "version": "4.6.1", + "resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-4.6.1.tgz", + "integrity": "sha512-0dj+VgI9Ecom+rvvpNZ4MUZJz8dcX7WCX+eTID9+/8HgOkv3dsRzi8BGeZJCQU6flWQVYxwTQnEZFrmJSEO7og==", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/bootstrap" + }, + "peerDependencies": { + "jquery": "1.9.1 - 3", + "popper.js": "^1.16.1" + } + }, "node_modules/brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -5132,11 +5258,107 @@ "node": ">=8" } }, + "node_modules/brorand": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", + "integrity": "sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w==" + }, + "node_modules/browser-headers": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/browser-headers/-/browser-headers-0.4.1.tgz", + "integrity": "sha512-CA9hsySZVo9371qEHjHZtYxV2cFtVj5Wj/ZHi8ooEsrtm4vOnl9Y9HmyYWk9q+05d7K3rdoAE0j3MVEFVvtQtg==" + }, "node_modules/browser-process-hrtime": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/browser-process-hrtime/-/browser-process-hrtime-1.0.0.tgz", "integrity": "sha512-9o5UecI3GhkpM6DrXr69PblIuWxPKk9Y0jHBRhdocZ2y7YECBFCsHm79Pr3OyR2AvjhDkabFJaDJMYRazHgsow==" }, + "node_modules/browserify-aes": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz", + "integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==", + "dependencies": { + "buffer-xor": "^1.0.3", + "cipher-base": "^1.0.0", + "create-hash": "^1.1.0", + "evp_bytestokey": "^1.0.3", + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "node_modules/browserify-cipher": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/browserify-cipher/-/browserify-cipher-1.0.1.tgz", + "integrity": "sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w==", + "dependencies": { + "browserify-aes": "^1.0.4", + "browserify-des": "^1.0.0", + "evp_bytestokey": "^1.0.0" + } + }, + "node_modules/browserify-des": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/browserify-des/-/browserify-des-1.0.2.tgz", + "integrity": "sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A==", + "dependencies": { + "cipher-base": "^1.0.1", + "des.js": "^1.0.0", + "inherits": "^2.0.1", + "safe-buffer": "^5.1.2" + } + }, + "node_modules/browserify-rsa": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.1.0.tgz", + "integrity": "sha512-AdEER0Hkspgno2aR97SAf6vi0y0k8NuOpGnVH3O99rcA5Q6sh8QxcngtHuJ6uXwnfAXNM4Gn1Gb7/MV1+Ymbog==", + "dependencies": { + "bn.js": "^5.0.0", + "randombytes": "^2.0.1" + } + }, + "node_modules/browserify-sign": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.2.1.tgz", + "integrity": "sha512-/vrA5fguVAKKAVTNJjgSm1tRQDHUU6DbwO9IROu/0WAzC8PKhucDSh18J0RMvVeHAn5puMd+QHC2erPRNf8lmg==", + "dependencies": { + "bn.js": "^5.1.1", + "browserify-rsa": "^4.0.1", + "create-hash": "^1.2.0", + "create-hmac": "^1.1.7", + "elliptic": "^6.5.3", + "inherits": "^2.0.4", + "parse-asn1": "^5.1.5", + "readable-stream": "^3.6.0", + "safe-buffer": "^5.2.0" + } + }, + "node_modules/browserify-sign/node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/browserify-zlib": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/browserify-zlib/-/browserify-zlib-0.2.0.tgz", + "integrity": "sha512-Z942RysHXmJrhqk88FmKBVq/v5tqmSkDz7p54G/MGyjMnCFFnC79XWNbg+Vta8W6Wb2qtSZTSxIGkJrRpCFEiA==", + "dependencies": { + "pako": "~1.0.5" + } + }, "node_modules/browserslist": { "version": "4.20.4", "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.20.4.tgz", @@ -5173,11 +5395,39 @@ "node-int64": "^0.4.0" } }, + "node_modules/buffer": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", + "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.2.1" + } + }, "node_modules/buffer-from": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==" }, + "node_modules/buffer-xor": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz", + "integrity": "sha512-571s0T7nZWK6vB67HI5dyUF7wXiNcfaPPPTl6zYCNApANjIvYJTg7hlud/+cJpdAhS7dVzqMLmfhfHR3rAcOjQ==" + }, "node_modules/builtin-modules": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-3.3.0.tgz", @@ -5189,6 +5439,11 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/builtin-status-codes": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz", + "integrity": "sha512-HpGFw18DgFWlncDfjTa2rcQ4W88O1mC8e8yZ2AvQY5KDaktSTwo+KRf6nHK6FRI5FyRyb/5T6+TSxfP7QyGsmQ==" + }, "node_modules/bytes": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz", @@ -5363,6 +5618,15 @@ "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.3.1.tgz", "integrity": "sha512-SXgeMX9VwDe7iFFaEWkA5AstuER9YKqy4EhHqr4DVqkwmD9rpVimkMKWHdjn30Ja45txyjhSn63lVX69eVCckg==" }, + "node_modules/cipher-base": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz", + "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==", + "dependencies": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, "node_modules/cjs-module-lexer": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-1.2.2.tgz", @@ -5548,6 +5812,16 @@ "node": ">=0.8" } }, + "node_modules/console-browserify": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.2.0.tgz", + "integrity": "sha512-ZMkYO/LkF17QvCPqM0gxw8yUzigAOZOSWSHg91FH6orS7vcEj5dVZTidN2fQ14yBSdg97RqhSNwLUXInd52OTA==" + }, + "node_modules/constants-browserify": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/constants-browserify/-/constants-browserify-1.0.0.tgz", + "integrity": "sha512-xFxOwqIzR/e1k1gLiWEophSCMqXcwVHIH7akf7b/vxcUeGunlj3hvZaaqxwHsTgn+IndtkQJgSztIDWeumWJDQ==" + }, "node_modules/content-disposition": { "version": "0.5.4", "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", @@ -5668,6 +5942,45 @@ "node": ">=10" } }, + "node_modules/create-ecdh": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.4.tgz", + "integrity": "sha512-mf+TCx8wWc9VpuxfP2ht0iSISLZnt0JgWlrOKZiNqyUZWnjIaCIVNQArMHnCZKfEYRg6IM7A+NeJoN8gf/Ws0A==", + "dependencies": { + "bn.js": "^4.1.0", + "elliptic": "^6.5.3" + } + }, + "node_modules/create-ecdh/node_modules/bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" + }, + "node_modules/create-hash": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz", + "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==", + "dependencies": { + "cipher-base": "^1.0.1", + "inherits": "^2.0.1", + "md5.js": "^1.3.4", + "ripemd160": "^2.0.1", + "sha.js": "^2.4.0" + } + }, + "node_modules/create-hmac": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz", + "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==", + "dependencies": { + "cipher-base": "^1.0.3", + "create-hash": "^1.1.0", + "inherits": "^2.0.1", + "ripemd160": "^2.0.0", + "safe-buffer": "^5.0.1", + "sha.js": "^2.4.8" + } + }, "node_modules/cross-spawn": { "version": "7.0.3", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", @@ -5681,6 +5994,32 @@ "node": ">= 8" } }, + "node_modules/crypto-browserify": { + "version": "3.12.0", + "resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.12.0.tgz", + "integrity": "sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg==", + "dependencies": { + "browserify-cipher": "^1.0.0", + "browserify-sign": "^4.0.0", + "create-ecdh": "^4.0.0", + "create-hash": "^1.1.0", + "create-hmac": "^1.1.0", + "diffie-hellman": "^5.0.0", + "inherits": "^2.0.1", + "pbkdf2": "^3.0.3", + "public-encrypt": "^4.0.0", + "randombytes": "^2.0.0", + "randomfill": "^1.0.3" + }, + "engines": { + "node": "*" + } + }, + "node_modules/crypto-js": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-4.1.1.tgz", + "integrity": "sha512-o2JlM7ydqd3Qk9CA0L4NL6mTzU2sdx96a+oOfPu8Mkl/PK51vSyoi8/rQ8NknZtk44vq15lmhAj9CIAGwgeWKw==" + }, "node_modules/crypto-random-string": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-2.0.0.tgz", @@ -6224,6 +6563,15 @@ "node": ">=6" } }, + "node_modules/des.js": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.0.1.tgz", + "integrity": "sha512-Q0I4pfFrv2VPd34/vfLrFOoRmlYj3OV50i7fskps1jZWK1kApMWWT9G6RRUeYedLcBDIhnSDaUvJMb3AhUlaEA==", + "dependencies": { + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0" + } + }, "node_modules/destroy": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", @@ -6304,6 +6652,21 @@ "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" } }, + "node_modules/diffie-hellman": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz", + "integrity": "sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==", + "dependencies": { + "bn.js": "^4.1.0", + "miller-rabin": "^4.0.0", + "randombytes": "^2.0.0" + } + }, + "node_modules/diffie-hellman/node_modules/bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" + }, "node_modules/dir-glob": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", @@ -6382,6 +6745,17 @@ "url": "https://github.com/cheeriojs/dom-serializer?sponsor=1" } }, + "node_modules/domain-browser": { + "version": "4.22.0", + "resolved": "https://registry.npmjs.org/domain-browser/-/domain-browser-4.22.0.tgz", + "integrity": "sha512-IGBwjF7tNk3cwypFNH/7bfzBcgSCbaMOD3GsaY1AU/JRrnHnYgEM0+9kQt52iZxjNsjBtJYtao146V+f8jFZNw==", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://bevry.me/fund" + } + }, "node_modules/domelementtype": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.3.0.tgz", @@ -6490,6 +6864,25 @@ "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.149.tgz", "integrity": "sha512-SR6ZQ8gfXX7LIS3UTDXu1CbFMUnluP3TS+jP7QwDwOnoH5CcHbejFdaaaEnGxR6I76E55eFnUV9mxI8GKufkEg==" }, + "node_modules/elliptic": { + "version": "6.5.4", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.4.tgz", + "integrity": "sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ==", + "dependencies": { + "bn.js": "^4.11.9", + "brorand": "^1.1.0", + "hash.js": "^1.0.0", + "hmac-drbg": "^1.0.1", + "inherits": "^2.0.4", + "minimalistic-assert": "^1.0.1", + "minimalistic-crypto-utils": "^1.0.1" + } + }, + "node_modules/elliptic/node_modules/bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" + }, "node_modules/emittery": { "version": "0.8.1", "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.8.1.tgz", @@ -6628,6 +7021,11 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/es6-object-assign": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/es6-object-assign/-/es6-object-assign-1.1.0.tgz", + "integrity": "sha512-MEl9uirslVwqQU369iHNWZXsI8yaZYGg/D65aOgZkeyFJwHYSxilf7rQzXKI7DdDuBPrBXbfk3sl9hJhmd5AUw==" + }, "node_modules/escalade": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", @@ -7374,6 +7772,15 @@ "node": ">=0.8.x" } }, + "node_modules/evp_bytestokey": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz", + "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==", + "dependencies": { + "md5.js": "^1.3.4", + "safe-buffer": "^5.1.1" + } + }, "node_modules/execa": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", @@ -7640,6 +8047,14 @@ "node": ">=8" } }, + "node_modules/filter-obj": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/filter-obj/-/filter-obj-2.0.2.tgz", + "integrity": "sha512-lO3ttPjHZRfjMcxWKb1j1eDhTFsu4meeR3lnMcnBFhk6RuLhvEiuALu2TlfL310ph4lCYYwgF/ElIjdP739tdg==", + "engines": { + "node": ">=8" + } + }, "node_modules/finalhandler": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.2.0.tgz", @@ -7737,6 +8152,14 @@ } } }, + "node_modules/for-each": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", + "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", + "dependencies": { + "is-callable": "^1.1.3" + } + }, "node_modules/fork-ts-checker-webpack-plugin": { "version": "6.5.2", "resolved": "https://registry.npmjs.org/fork-ts-checker-webpack-plugin/-/fork-ts-checker-webpack-plugin-6.5.2.tgz", @@ -8170,6 +8593,11 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/google-protobuf": { + "version": "3.19.4", + "resolved": "https://registry.npmjs.org/google-protobuf/-/google-protobuf-3.19.4.tgz", + "integrity": "sha512-OIPNCxsG2lkIvf+P5FNfJ/Km95CsXOBecS9ZcAU6m2Rq3svc0Apl9nB3GMDNKfQ9asNv4KjyAqGwPQFrVle3Yg==" + }, "node_modules/graceful-fs": { "version": "4.2.10", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz", @@ -8262,6 +8690,47 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/hash-base": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.1.0.tgz", + "integrity": "sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA==", + "dependencies": { + "inherits": "^2.0.4", + "readable-stream": "^3.6.0", + "safe-buffer": "^5.2.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/hash-base/node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/hash.js": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz", + "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", + "dependencies": { + "inherits": "^2.0.3", + "minimalistic-assert": "^1.0.1" + } + }, "node_modules/he": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", @@ -8278,6 +8747,16 @@ "@babel/runtime": "^7.7.6" } }, + "node_modules/hmac-drbg": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", + "integrity": "sha512-Tti3gMqLdZfhOQY1Mzf/AanLiqh1WTiJgEj26ZuYQ9fbkLomzGchCws4FyrSd4VkpBfiNhaE1On+lOz894jvXg==", + "dependencies": { + "hash.js": "^1.0.3", + "minimalistic-assert": "^1.0.0", + "minimalistic-crypto-utils": "^1.0.1" + } + }, "node_modules/hoopy": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/hoopy/-/hoopy-0.1.4.tgz", @@ -8474,6 +8953,11 @@ } } }, + "node_modules/https-browserify": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/https-browserify/-/https-browserify-1.0.0.tgz", + "integrity": "sha512-J+FkSdyD+0mA0N+81tMotaRMfSL9SGi+xpD3T6YApKsc3bGSXJlfXri3VyFOeYkfLRQisDk1W+jIFFKBeUBbBg==" + }, "node_modules/https-proxy-agent": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", @@ -8532,6 +9016,25 @@ "node": ">=4" } }, + "node_modules/ieee754": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, "node_modules/ignore": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.0.tgz", @@ -8654,6 +9157,21 @@ "node": ">= 10" } }, + "node_modules/is-arguments": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.1.1.tgz", + "integrity": "sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA==", + "dependencies": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-arrayish": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", @@ -8770,6 +9288,20 @@ "node": ">=6" } }, + "node_modules/is-generator-function": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.0.10.tgz", + "integrity": "sha512-jsEjy9l3yiXEQ+PsXdmBwEPcOxaXWLspKdplFUVI9vq1iZgIekeC0L167qeu86czQaxed3q/Uzuw0swL0irL8A==", + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-glob": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", @@ -8786,6 +9318,21 @@ "resolved": "https://registry.npmjs.org/is-module/-/is-module-1.0.0.tgz", "integrity": "sha512-51ypPSPCoTEIN9dy5Oy+h4pShgJmPCygKfyRCISBI+JoWT/2oJvK8QPxmwv7b/p239jXrm9M1mlQbyKJ5A152g==" }, + "node_modules/is-nan": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/is-nan/-/is-nan-1.3.2.tgz", + "integrity": "sha512-E+zBKpQ2t6MEo1VsonYmluk9NxGrbzpeeLC2xIViuO2EjU2xsXsBPwTr3Ykv9l08UYEVEdWeRZNouaZqF6RN0w==", + "dependencies": { + "call-bind": "^1.0.0", + "define-properties": "^1.1.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-negative-zero": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.2.tgz", @@ -8924,6 +9471,24 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/is-typed-array": { + "version": "1.1.9", + "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.9.tgz", + "integrity": "sha512-kfrlnTTn8pZkfpJMUgYD7YZ3qzeJgWUn8XfVYBARc4wnmNOmLbmuuaAs3q5fvB0UJOn6yHAKaGTPM7d6ezoD/A==", + "dependencies": { + "available-typed-arrays": "^1.0.5", + "call-bind": "^1.0.2", + "es-abstract": "^1.20.0", + "for-each": "^0.3.3", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-typedarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", @@ -11015,6 +11580,12 @@ "url": "https://github.com/chalk/supports-color?sponsor=1" } }, + "node_modules/jquery": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/jquery/-/jquery-3.6.0.tgz", + "integrity": "sha512-JVzAR/AjBvVt2BmYhxRCSYysDsPcssdmTFnzyLEts9qNwmjmu4JTAMYubEfwVOSwpQ1I1sKKFcxhZCI2buerfw==", + "peer": true + }, "node_modules/js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", @@ -11361,6 +11932,16 @@ "tmpl": "1.0.5" } }, + "node_modules/md5.js": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz", + "integrity": "sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==", + "dependencies": { + "hash-base": "^3.0.0", + "inherits": "^2.0.1", + "safe-buffer": "^5.1.2" + } + }, "node_modules/mdn-data": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.4.tgz", @@ -11423,6 +12004,23 @@ "node": ">=8.6" } }, + "node_modules/miller-rabin": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/miller-rabin/-/miller-rabin-4.0.1.tgz", + "integrity": "sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA==", + "dependencies": { + "bn.js": "^4.0.0", + "brorand": "^1.0.1" + }, + "bin": { + "miller-rabin": "bin/miller-rabin" + } + }, + "node_modules/miller-rabin/node_modules/bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" + }, "node_modules/mime": { "version": "1.6.0", "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", @@ -11541,6 +12139,11 @@ "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==" }, + "node_modules/minimalistic-crypto-utils": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", + "integrity": "sha512-JIYlbt6g8i5jKfJ3xz7rF0LXmv2TkDxBLUkiBeZ7bAx4GnnNMr8xFpGnOxn6GhTEHx3SjRrZEoU+j04prX1ktg==" + }, "node_modules/minimatch": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", @@ -11636,6 +12239,43 @@ "resolved": "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz", "integrity": "sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw==" }, + "node_modules/node-polyfill-webpack-plugin": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/node-polyfill-webpack-plugin/-/node-polyfill-webpack-plugin-1.1.4.tgz", + "integrity": "sha512-Z0XTKj1wRWO8o/Vjobsw5iOJCN+Sua3EZEUc2Ziy9CyVvmHKu6o+t4gUH9GOE0czyPR94LI6ZCV/PpcM8b5yow==", + "dependencies": { + "assert": "^2.0.0", + "browserify-zlib": "^0.2.0", + "buffer": "^6.0.3", + "console-browserify": "^1.2.0", + "constants-browserify": "^1.0.0", + "crypto-browserify": "^3.12.0", + "domain-browser": "^4.19.0", + "events": "^3.3.0", + "filter-obj": "^2.0.2", + "https-browserify": "^1.0.0", + "os-browserify": "^0.3.0", + "path-browserify": "^1.0.1", + "process": "^0.11.10", + "punycode": "^2.1.1", + "querystring-es3": "^0.2.1", + "readable-stream": "^3.6.0", + "stream-browserify": "^3.0.0", + "stream-http": "^3.2.0", + "string_decoder": "^1.3.0", + "timers-browserify": "^2.0.12", + "tty-browserify": "^0.0.1", + "url": "^0.11.0", + "util": "^0.12.4", + "vm-browserify": "^1.1.2" + }, + "engines": { + "node": ">=10" + }, + "peerDependencies": { + "webpack": ">=5" + } + }, "node_modules/node-releases": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.5.tgz", @@ -11719,6 +12359,21 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/object-is": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/object-is/-/object-is-1.1.5.tgz", + "integrity": "sha512-3cyDsyHgtmi7I7DfSSI2LDp6SK2lwvtbg0p0R1e0RvTqF5ceGx+K2dfSjm1bKDMVCFEDAQvy+o8c6a7VujOddw==", + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/object-keys": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", @@ -11896,6 +12551,11 @@ "node": ">= 0.8.0" } }, + "node_modules/os-browserify": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/os-browserify/-/os-browserify-0.3.0.tgz", + "integrity": "sha512-gjcpUc3clBf9+210TRaDWbf+rZZZEshZ+DlXMRCeAjp0xhTrnQsKHypIy1J3d5hKdUzj69t708EHtU8P6bUn0A==" + }, "node_modules/p-limit": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", @@ -11944,6 +12604,11 @@ "node": ">=6" } }, + "node_modules/pako": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz", + "integrity": "sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==" + }, "node_modules/param-case": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/param-case/-/param-case-3.0.4.tgz", @@ -11964,6 +12629,18 @@ "node": ">=6" } }, + "node_modules/parse-asn1": { + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.6.tgz", + "integrity": "sha512-RnZRo1EPU6JBnra2vGHj0yhp6ebyjBZpmUCLHWiFhxlzvBCCpAuZ7elsBp1PVAbQN0/04VD/19rfzlBSwLstMw==", + "dependencies": { + "asn1.js": "^5.2.0", + "browserify-aes": "^1.0.0", + "evp_bytestokey": "^1.0.0", + "pbkdf2": "^3.0.3", + "safe-buffer": "^5.1.1" + } + }, "node_modules/parse-json": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", @@ -12003,6 +12680,11 @@ "tslib": "^2.0.3" } }, + "node_modules/path-browserify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-1.0.1.tgz", + "integrity": "sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==" + }, "node_modules/path-exists": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", @@ -12045,6 +12727,21 @@ "node": ">=8" } }, + "node_modules/pbkdf2": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.1.2.tgz", + "integrity": "sha512-iuh7L6jA7JEGu2WxDwtQP1ddOpaJNC4KlDEFfdQajSGgGPNi4OyDc2R7QnbY2bR9QjBVGwgvTdNJZoE7RaxUMA==", + "dependencies": { + "create-hash": "^1.1.2", + "create-hmac": "^1.1.4", + "ripemd160": "^2.0.1", + "safe-buffer": "^5.0.1", + "sha.js": "^2.4.8" + }, + "engines": { + "node": ">=0.12" + } + }, "node_modules/performance-now": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", @@ -12200,6 +12897,17 @@ "node": ">=4" } }, + "node_modules/popper.js": { + "version": "1.16.1", + "resolved": "https://registry.npmjs.org/popper.js/-/popper.js-1.16.1.tgz", + "integrity": "sha512-Wb4p1J4zyFTbM+u6WuO4XstYx4Ky9Cewe4DWrel7B0w6VVICvPwdOpotjzcf6eD8TsckVnIMNONQyPIUFOUbCQ==", + "deprecated": "You can find the new Popper v2 at @popperjs/core, this package is dedicated to the legacy v1", + "peer": true, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/popperjs" + } + }, "node_modules/postcss": { "version": "8.4.14", "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.14.tgz", @@ -13378,6 +14086,14 @@ "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, + "node_modules/process": { + "version": "0.11.10", + "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", + "integrity": "sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==", + "engines": { + "node": ">= 0.6.0" + } + }, "node_modules/process-nextick-args": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", @@ -13460,6 +14176,24 @@ "resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz", "integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ==" }, + "node_modules/public-encrypt": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.3.tgz", + "integrity": "sha512-zVpa8oKZSz5bTMTFClc1fQOnyyEzpl5ozpi1B5YcvBrdohMjH2rfsBtyXcuNuwjsDIXmBYlF2N5FlJYhR29t8Q==", + "dependencies": { + "bn.js": "^4.1.0", + "browserify-rsa": "^4.0.0", + "create-hash": "^1.1.0", + "parse-asn1": "^5.0.0", + "randombytes": "^2.0.1", + "safe-buffer": "^5.1.2" + } + }, + "node_modules/public-encrypt/node_modules/bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" + }, "node_modules/punycode": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", @@ -13491,6 +14225,23 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/querystring": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", + "integrity": "sha512-X/xY82scca2tau62i9mDyU9K+I+djTMUsvwf7xnUX5GLvVzgJybOJf4Y6o9Zx3oJK/LSXg5tTZBjwzqVPaPO2g==", + "deprecated": "The querystring API is considered Legacy. new code should use the URLSearchParams API instead.", + "engines": { + "node": ">=0.4.x" + } + }, + "node_modules/querystring-es3": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/querystring-es3/-/querystring-es3-0.2.1.tgz", + "integrity": "sha512-773xhDQnZBMFobEiztv8LIl70ch5MSF/jUQVlhwFyBILqq96anmoctVIYz+ZRp0qbCKATTn6ev02M3r7Ga5vqA==", + "engines": { + "node": ">=0.4.x" + } + }, "node_modules/queue-microtask": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", @@ -13537,6 +14288,15 @@ "safe-buffer": "^5.1.0" } }, + "node_modules/randomfill": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/randomfill/-/randomfill-1.0.4.tgz", + "integrity": "sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw==", + "dependencies": { + "randombytes": "^2.0.5", + "safe-buffer": "^5.1.0" + } + }, "node_modules/range-parser": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", @@ -14227,6 +14987,15 @@ "url": "https://github.com/sponsors/isaacs" } }, + "node_modules/ripemd160": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz", + "integrity": "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==", + "dependencies": { + "hash-base": "^3.0.0", + "inherits": "^2.0.1" + } + }, "node_modules/rollup": { "version": "2.75.6", "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.75.6.tgz", @@ -14573,11 +15342,28 @@ "node": ">= 0.8.0" } }, + "node_modules/setimmediate": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", + "integrity": "sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA==" + }, "node_modules/setprototypeof": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==" }, + "node_modules/sha.js": { + "version": "2.4.11", + "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", + "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", + "dependencies": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + }, + "bin": { + "sha.js": "bin.js" + } + }, "node_modules/shebang-command": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", @@ -14786,6 +15572,26 @@ "node": ">= 0.8" } }, + "node_modules/stream-browserify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-3.0.0.tgz", + "integrity": "sha512-H73RAHsVBapbim0tU2JwwOiXUj+fikfiaoYAKHF3VJfA0pe2BCzkhAHBlLG6REzE+2WNZcxOXjK7lkso+9euLA==", + "dependencies": { + "inherits": "~2.0.4", + "readable-stream": "^3.5.0" + } + }, + "node_modules/stream-http": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/stream-http/-/stream-http-3.2.0.tgz", + "integrity": "sha512-Oq1bLqisTyK3TSCXpPbT4sdeYNdmyZJv1LxpEm2vu1ZhK89kSE5YXwZc3cWk0MagGaKriBh9mCFbVGtO+vY29A==", + "dependencies": { + "builtin-status-codes": "^3.0.0", + "inherits": "^2.0.4", + "readable-stream": "^3.6.0", + "xtend": "^4.0.2" + } + }, "node_modules/string_decoder": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", @@ -15320,6 +16126,17 @@ "resolved": "https://registry.npmjs.org/thunky/-/thunky-1.1.0.tgz", "integrity": "sha512-eHY7nBftgThBqOyHGVN+l8gF0BucP09fMo0oO/Lb0w1OF80dJv+lDVpXG60WMQvkcxAkNybKsrEIE3ZtKGmPrA==" }, + "node_modules/timers-browserify": { + "version": "2.0.12", + "resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-2.0.12.tgz", + "integrity": "sha512-9phl76Cqm6FhSX9Xe1ZUAMLtm1BLkKj2Qd5ApyWkXzsMRaA7dgr81kf4wJmQf/hAvg8EEyJxDo3du/0KlhPiKQ==", + "dependencies": { + "setimmediate": "^1.0.4" + }, + "engines": { + "node": ">=0.6.0" + } + }, "node_modules/tmpl": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/tmpl/-/tmpl-1.0.5.tgz", @@ -15389,6 +16206,17 @@ "resolved": "https://registry.npmjs.org/tryer/-/tryer-1.0.1.tgz", "integrity": "sha512-c3zayb8/kWWpycWYg87P71E1S1ZL6b6IJxfb5fvsUgsf0S2MVGaDhDXXjDMpdCpfWXqptc+4mXwmiy1ypXqRAA==" }, + "node_modules/ts-protoc-gen": { + "version": "0.15.0", + "resolved": "https://registry.npmjs.org/ts-protoc-gen/-/ts-protoc-gen-0.15.0.tgz", + "integrity": "sha512-TycnzEyrdVDlATJ3bWFTtra3SCiEP0W0vySXReAuEygXCUr1j2uaVyL0DhzjwuUdQoW5oXPwk6oZWeA0955V+g==", + "dependencies": { + "google-protobuf": "^3.15.5" + }, + "bin": { + "protoc-gen-ts": "bin/protoc-gen-ts" + } + }, "node_modules/tsconfig-paths": { "version": "3.14.1", "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.14.1.tgz", @@ -15443,6 +16271,11 @@ "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" }, + "node_modules/tty-browserify": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.1.tgz", + "integrity": "sha512-C3TaO7K81YvjCgQH9Q1S3R3P3BtN3RIM8n+OvX4il1K1zgE8ZhI0op7kClgkxtutIE8hQrcrHBXvIheqKUUCxw==" + }, "node_modules/type-check": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", @@ -15618,6 +16451,33 @@ "punycode": "^2.1.0" } }, + "node_modules/url": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/url/-/url-0.11.0.tgz", + "integrity": "sha512-kbailJa29QrtXnxgq+DdCEGlbTeYM2eJUxsz6vjZavrCYPMIFHMKQmSKYAIuUK2i7hgPm28a8piX5NTUtM/LKQ==", + "dependencies": { + "punycode": "1.3.2", + "querystring": "0.2.0" + } + }, + "node_modules/url/node_modules/punycode": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz", + "integrity": "sha512-RofWgt/7fL5wP1Y7fxE7/EmTLzQVnB0ycyibJ0OOHIlJqTNzglYFxVwETOcIoJqJmpDXJ9xImDv+Fq34F/d4Dw==" + }, + "node_modules/util": { + "version": "0.12.4", + "resolved": "https://registry.npmjs.org/util/-/util-0.12.4.tgz", + "integrity": "sha512-bxZ9qtSlGUWSOy9Qa9Xgk11kSslpuZwaxCg4sNIDj6FLucDab2JxnHwyNTCpHMtK1MjoQiWQ6DiUMZYbSrO+Sw==", + "dependencies": { + "inherits": "^2.0.3", + "is-arguments": "^1.0.4", + "is-generator-function": "^1.0.7", + "is-typed-array": "^1.1.3", + "safe-buffer": "^5.1.2", + "which-typed-array": "^1.1.2" + } + }, "node_modules/util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", @@ -15684,6 +16544,11 @@ "node": ">= 0.8" } }, + "node_modules/vm-browserify": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-1.1.2.tgz", + "integrity": "sha512-2ham8XPWTONajOR0ohOKOHXkm3+gaBmGut3SRuu75xLd/RRaY6vqgh8NBYYk7+RW3u5AtzPQZG8F10LHkl0lAQ==" + }, "node_modules/w3c-hr-time": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/w3c-hr-time/-/w3c-hr-time-1.0.2.tgz", @@ -16143,6 +17008,25 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/which-typed-array": { + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.8.tgz", + "integrity": "sha512-Jn4e5PItbcAHyLoRDwvPj1ypu27DJbtdYXUa5zsinrUx77Uvfb0cXwwnGMTn7cjUfhhqgVQnVJCwF+7cgU7tpw==", + "dependencies": { + "available-typed-arrays": "^1.0.5", + "call-bind": "^1.0.2", + "es-abstract": "^1.20.0", + "for-each": "^0.3.3", + "has-tostringtag": "^1.0.0", + "is-typed-array": "^1.1.9" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/word-wrap": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", @@ -18020,6 +18904,14 @@ "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz", "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==" }, + "@improbable-eng/grpc-web": { + "version": "0.15.0", + "resolved": "https://registry.npmjs.org/@improbable-eng/grpc-web/-/grpc-web-0.15.0.tgz", + "integrity": "sha512-ERft9/0/8CmYalqOVnJnpdDry28q+j+nAlFFARdjyxXDJ+Mhgv9+F600QC8BR9ygOfrXRlAk6CvST2j+JCpQPg==", + "requires": { + "browser-headers": "^0.4.1" + } + }, "@istanbuljs/load-nyc-config": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", @@ -18566,6 +19458,29 @@ "resolved": "https://registry.npmjs.org/@leichtgewicht/ip-codec/-/ip-codec-2.0.4.tgz", "integrity": "sha512-Hcv+nVC0kZnQ3tD9GVu5xSMR4VVYOteQIr/hwFPVEvPdlXqgGEuRjiheChHgdM+JyqdgNcmzZOX/tnl0JOiI7A==" }, + "@lightninglabs/lnc-web": { + "version": "0.0.1-alpha.rc1", + "resolved": "https://registry.npmjs.org/@lightninglabs/lnc-web/-/lnc-web-0.0.1-alpha.rc1.tgz", + "integrity": "sha512-QWQRYp+DideNpbOsi3fbMdjKqXa11Jl7EW9oCJSrJ87x6Ghptec9hCspc/xtJOTdtvoyh7I3CVvkx+pxa4KjyQ==", + "requires": { + "@improbable-eng/grpc-web": "0.15.0", + "@types/big.js": "6.1.2", + "@types/google-protobuf": "3.15.5", + "big.js": "6.1.1", + "crypto-js": "4.1.1", + "google-protobuf": "3.19.4", + "lodash": "4.17.21", + "node-polyfill-webpack-plugin": "1.1.4", + "ts-protoc-gen": "0.15.0" + }, + "dependencies": { + "big.js": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/big.js/-/big.js-6.1.1.tgz", + "integrity": "sha512-1vObw81a8ylZO5ePrtMay0n018TcftpTA5HFKDaSuiUDBo8biRBtjIobw60OpwuvrGk+FsxKamqN4cnmj/eXdg==" + } + } + }, "@nodelib/fs.scandir": { "version": "2.1.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", @@ -19037,6 +19952,11 @@ "@babel/types": "^7.3.0" } }, + "@types/big.js": { + "version": "6.1.2", + "resolved": "https://registry.npmjs.org/@types/big.js/-/big.js-6.1.2.tgz", + "integrity": "sha512-h24JIZ52rvSvi2jkpYDk2yLH99VzZoCJiSfDWwjst7TwJVuXN61XVCUlPCzRl7mxKEMsGf8z42Q+J4TZwU3z2w==" + }, "@types/body-parser": { "version": "1.19.2", "resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.2.tgz", @@ -19115,6 +20035,11 @@ "@types/range-parser": "*" } }, + "@types/google-protobuf": { + "version": "3.15.5", + "resolved": "https://registry.npmjs.org/@types/google-protobuf/-/google-protobuf-3.15.5.tgz", + "integrity": "sha512-6bgv24B+A2bo9AfzReeg5StdiijKzwwnRflA8RLd1V4Yv995LeTmo0z69/MPbBDFSiZWdZHQygLo/ccXhMEDgw==" + }, "@types/graceful-fs": { "version": "4.1.5", "resolved": "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.5.tgz", @@ -19833,6 +20758,35 @@ "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz", "integrity": "sha512-BSHWgDSAiKs50o2Re8ppvp3seVHXSRM44cdSsT9FfNEUUZLOGWVCsiWaRPWM1Znn+mqZ1OfVZ3z3DWEzSp7hRA==" }, + "asn1.js": { + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-5.4.1.tgz", + "integrity": "sha512-+I//4cYPccV8LdmBLiX8CYvf9Sp3vQsrqu2QNXRcrbiWvcx/UdlFiqUJJzxRQxgsZmvhXhn4cSKeSmoFjVdupA==", + "requires": { + "bn.js": "^4.0.0", + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0", + "safer-buffer": "^2.1.0" + }, + "dependencies": { + "bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" + } + } + }, + "assert": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/assert/-/assert-2.0.0.tgz", + "integrity": "sha512-se5Cd+js9dXJnu6Ag2JFc00t+HmHOen+8Q+L7O9zI0PqQXr20uk2J0XQqMxZEeo5U50o8Nvmmx7dZrl+Ufr35A==", + "requires": { + "es6-object-assign": "^1.1.0", + "is-nan": "^1.2.1", + "object-is": "^1.0.1", + "util": "^0.12.0" + } + }, "ast-types-flow": { "version": "0.0.7", "resolved": "https://registry.npmjs.org/ast-types-flow/-/ast-types-flow-0.0.7.tgz", @@ -19871,6 +20825,11 @@ "postcss-value-parser": "^4.2.0" } }, + "available-typed-arrays": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz", + "integrity": "sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==" + }, "axe-core": { "version": "4.4.2", "resolved": "https://registry.npmjs.org/axe-core/-/axe-core-4.4.2.tgz", @@ -20106,6 +21065,11 @@ "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" }, + "base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==" + }, "batch": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/batch/-/batch-0.6.1.tgz", @@ -20137,6 +21101,11 @@ "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz", "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==" }, + "bn.js": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", + "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==" + }, "body-parser": { "version": "1.20.0", "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.0.tgz", @@ -20200,6 +21169,12 @@ "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", "integrity": "sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==" }, + "bootstrap": { + "version": "4.6.1", + "resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-4.6.1.tgz", + "integrity": "sha512-0dj+VgI9Ecom+rvvpNZ4MUZJz8dcX7WCX+eTID9+/8HgOkv3dsRzi8BGeZJCQU6flWQVYxwTQnEZFrmJSEO7og==", + "requires": {} + }, "brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -20217,11 +21192,95 @@ "fill-range": "^7.0.1" } }, + "brorand": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", + "integrity": "sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w==" + }, + "browser-headers": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/browser-headers/-/browser-headers-0.4.1.tgz", + "integrity": "sha512-CA9hsySZVo9371qEHjHZtYxV2cFtVj5Wj/ZHi8ooEsrtm4vOnl9Y9HmyYWk9q+05d7K3rdoAE0j3MVEFVvtQtg==" + }, "browser-process-hrtime": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/browser-process-hrtime/-/browser-process-hrtime-1.0.0.tgz", "integrity": "sha512-9o5UecI3GhkpM6DrXr69PblIuWxPKk9Y0jHBRhdocZ2y7YECBFCsHm79Pr3OyR2AvjhDkabFJaDJMYRazHgsow==" }, + "browserify-aes": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz", + "integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==", + "requires": { + "buffer-xor": "^1.0.3", + "cipher-base": "^1.0.0", + "create-hash": "^1.1.0", + "evp_bytestokey": "^1.0.3", + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "browserify-cipher": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/browserify-cipher/-/browserify-cipher-1.0.1.tgz", + "integrity": "sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w==", + "requires": { + "browserify-aes": "^1.0.4", + "browserify-des": "^1.0.0", + "evp_bytestokey": "^1.0.0" + } + }, + "browserify-des": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/browserify-des/-/browserify-des-1.0.2.tgz", + "integrity": "sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A==", + "requires": { + "cipher-base": "^1.0.1", + "des.js": "^1.0.0", + "inherits": "^2.0.1", + "safe-buffer": "^5.1.2" + } + }, + "browserify-rsa": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.1.0.tgz", + "integrity": "sha512-AdEER0Hkspgno2aR97SAf6vi0y0k8NuOpGnVH3O99rcA5Q6sh8QxcngtHuJ6uXwnfAXNM4Gn1Gb7/MV1+Ymbog==", + "requires": { + "bn.js": "^5.0.0", + "randombytes": "^2.0.1" + } + }, + "browserify-sign": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.2.1.tgz", + "integrity": "sha512-/vrA5fguVAKKAVTNJjgSm1tRQDHUU6DbwO9IROu/0WAzC8PKhucDSh18J0RMvVeHAn5puMd+QHC2erPRNf8lmg==", + "requires": { + "bn.js": "^5.1.1", + "browserify-rsa": "^4.0.1", + "create-hash": "^1.2.0", + "create-hmac": "^1.1.7", + "elliptic": "^6.5.3", + "inherits": "^2.0.4", + "parse-asn1": "^5.1.5", + "readable-stream": "^3.6.0", + "safe-buffer": "^5.2.0" + }, + "dependencies": { + "safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" + } + } + }, + "browserify-zlib": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/browserify-zlib/-/browserify-zlib-0.2.0.tgz", + "integrity": "sha512-Z942RysHXmJrhqk88FmKBVq/v5tqmSkDz7p54G/MGyjMnCFFnC79XWNbg+Vta8W6Wb2qtSZTSxIGkJrRpCFEiA==", + "requires": { + "pako": "~1.0.5" + } + }, "browserslist": { "version": "4.20.4", "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.20.4.tgz", @@ -20242,16 +21301,35 @@ "node-int64": "^0.4.0" } }, + "buffer": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", + "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", + "requires": { + "base64-js": "^1.3.1", + "ieee754": "^1.2.1" + } + }, "buffer-from": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==" }, + "buffer-xor": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz", + "integrity": "sha512-571s0T7nZWK6vB67HI5dyUF7wXiNcfaPPPTl6zYCNApANjIvYJTg7hlud/+cJpdAhS7dVzqMLmfhfHR3rAcOjQ==" + }, "builtin-modules": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-3.3.0.tgz", "integrity": "sha512-zhaCDicdLuWN5UbN5IMnFqNMhNfo919sH85y2/ea+5Yg9TsTkeZxpL+JLbp6cgYFS4sRLp3YV4S6yDuqVWHYOw==" }, + "builtin-status-codes": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz", + "integrity": "sha512-HpGFw18DgFWlncDfjTa2rcQ4W88O1mC8e8yZ2AvQY5KDaktSTwo+KRf6nHK6FRI5FyRyb/5T6+TSxfP7QyGsmQ==" + }, "bytes": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz", @@ -20371,6 +21449,15 @@ "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.3.1.tgz", "integrity": "sha512-SXgeMX9VwDe7iFFaEWkA5AstuER9YKqy4EhHqr4DVqkwmD9rpVimkMKWHdjn30Ja45txyjhSn63lVX69eVCckg==" }, + "cipher-base": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz", + "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==", + "requires": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, "cjs-module-lexer": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-1.2.2.tgz", @@ -20529,6 +21616,16 @@ "resolved": "https://registry.npmjs.org/connect-history-api-fallback/-/connect-history-api-fallback-1.6.0.tgz", "integrity": "sha512-e54B99q/OUoH64zYYRf3HBP5z24G38h5D3qXu23JGRoigpX5Ss4r9ZnDk3g0Z8uQC2x2lPaJ+UlWBc1ZWBWdLg==" }, + "console-browserify": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.2.0.tgz", + "integrity": "sha512-ZMkYO/LkF17QvCPqM0gxw8yUzigAOZOSWSHg91FH6orS7vcEj5dVZTidN2fQ14yBSdg97RqhSNwLUXInd52OTA==" + }, + "constants-browserify": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/constants-browserify/-/constants-browserify-1.0.0.tgz", + "integrity": "sha512-xFxOwqIzR/e1k1gLiWEophSCMqXcwVHIH7akf7b/vxcUeGunlj3hvZaaqxwHsTgn+IndtkQJgSztIDWeumWJDQ==" + }, "content-disposition": { "version": "0.5.4", "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", @@ -20610,6 +21707,47 @@ "yaml": "^1.10.0" } }, + "create-ecdh": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.4.tgz", + "integrity": "sha512-mf+TCx8wWc9VpuxfP2ht0iSISLZnt0JgWlrOKZiNqyUZWnjIaCIVNQArMHnCZKfEYRg6IM7A+NeJoN8gf/Ws0A==", + "requires": { + "bn.js": "^4.1.0", + "elliptic": "^6.5.3" + }, + "dependencies": { + "bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" + } + } + }, + "create-hash": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz", + "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==", + "requires": { + "cipher-base": "^1.0.1", + "inherits": "^2.0.1", + "md5.js": "^1.3.4", + "ripemd160": "^2.0.1", + "sha.js": "^2.4.0" + } + }, + "create-hmac": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz", + "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==", + "requires": { + "cipher-base": "^1.0.3", + "create-hash": "^1.1.0", + "inherits": "^2.0.1", + "ripemd160": "^2.0.0", + "safe-buffer": "^5.0.1", + "sha.js": "^2.4.8" + } + }, "cross-spawn": { "version": "7.0.3", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", @@ -20620,6 +21758,29 @@ "which": "^2.0.1" } }, + "crypto-browserify": { + "version": "3.12.0", + "resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.12.0.tgz", + "integrity": "sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg==", + "requires": { + "browserify-cipher": "^1.0.0", + "browserify-sign": "^4.0.0", + "create-ecdh": "^4.0.0", + "create-hash": "^1.1.0", + "create-hmac": "^1.1.0", + "diffie-hellman": "^5.0.0", + "inherits": "^2.0.1", + "pbkdf2": "^3.0.3", + "public-encrypt": "^4.0.0", + "randombytes": "^2.0.0", + "randomfill": "^1.0.3" + } + }, + "crypto-js": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-4.1.1.tgz", + "integrity": "sha512-o2JlM7ydqd3Qk9CA0L4NL6mTzU2sdx96a+oOfPu8Mkl/PK51vSyoi8/rQ8NknZtk44vq15lmhAj9CIAGwgeWKw==" + }, "crypto-random-string": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-2.0.0.tgz", @@ -20989,6 +22150,15 @@ "resolved": "https://registry.npmjs.org/dequal/-/dequal-2.0.2.tgz", "integrity": "sha512-q9K8BlJVxK7hQYqa6XISGmBZbtQQWVXSrRrWreHC94rMt1QL/Impruc+7p2CYSYuVIUr+YCt6hjrs1kkdJRTug==" }, + "des.js": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.0.1.tgz", + "integrity": "sha512-Q0I4pfFrv2VPd34/vfLrFOoRmlYj3OV50i7fskps1jZWK1kApMWWT9G6RRUeYedLcBDIhnSDaUvJMb3AhUlaEA==", + "requires": { + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0" + } + }, "destroy": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", @@ -21048,6 +22218,23 @@ "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-27.5.1.tgz", "integrity": "sha512-k1gCAXAsNgLwEL+Y8Wvl+M6oEFj5bgazfZULpS5CneoPPXRaCCW7dm+q21Ky2VEE5X+VeRDBVg1Pcvvsr4TtNQ==" }, + "diffie-hellman": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz", + "integrity": "sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==", + "requires": { + "bn.js": "^4.1.0", + "miller-rabin": "^4.0.0", + "randombytes": "^2.0.0" + }, + "dependencies": { + "bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" + } + } + }, "dir-glob": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", @@ -21114,6 +22301,11 @@ "entities": "^2.0.0" } }, + "domain-browser": { + "version": "4.22.0", + "resolved": "https://registry.npmjs.org/domain-browser/-/domain-browser-4.22.0.tgz", + "integrity": "sha512-IGBwjF7tNk3cwypFNH/7bfzBcgSCbaMOD3GsaY1AU/JRrnHnYgEM0+9kQt52iZxjNsjBtJYtao146V+f8jFZNw==" + }, "domelementtype": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.3.0.tgz", @@ -21194,6 +22386,27 @@ "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.149.tgz", "integrity": "sha512-SR6ZQ8gfXX7LIS3UTDXu1CbFMUnluP3TS+jP7QwDwOnoH5CcHbejFdaaaEnGxR6I76E55eFnUV9mxI8GKufkEg==" }, + "elliptic": { + "version": "6.5.4", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.4.tgz", + "integrity": "sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ==", + "requires": { + "bn.js": "^4.11.9", + "brorand": "^1.1.0", + "hash.js": "^1.0.0", + "hmac-drbg": "^1.0.1", + "inherits": "^2.0.4", + "minimalistic-assert": "^1.0.1", + "minimalistic-crypto-utils": "^1.0.1" + }, + "dependencies": { + "bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" + } + } + }, "emittery": { "version": "0.8.1", "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.8.1.tgz", @@ -21302,6 +22515,11 @@ "is-symbol": "^1.0.2" } }, + "es6-object-assign": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/es6-object-assign/-/es6-object-assign-1.1.0.tgz", + "integrity": "sha512-MEl9uirslVwqQU369iHNWZXsI8yaZYGg/D65aOgZkeyFJwHYSxilf7rQzXKI7DdDuBPrBXbfk3sl9hJhmd5AUw==" + }, "escalade": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", @@ -21832,6 +23050,15 @@ "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==" }, + "evp_bytestokey": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz", + "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==", + "requires": { + "md5.js": "^1.3.4", + "safe-buffer": "^5.1.1" + } + }, "execa": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", @@ -22044,6 +23271,11 @@ "to-regex-range": "^5.0.1" } }, + "filter-obj": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/filter-obj/-/filter-obj-2.0.2.tgz", + "integrity": "sha512-lO3ttPjHZRfjMcxWKb1j1eDhTFsu4meeR3lnMcnBFhk6RuLhvEiuALu2TlfL310ph4lCYYwgF/ElIjdP739tdg==" + }, "finalhandler": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.2.0.tgz", @@ -22111,6 +23343,14 @@ "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.1.tgz", "integrity": "sha512-yLAMQs+k0b2m7cVxpS1VKJVvoz7SS9Td1zss3XRwXj+ZDH00RJgnuLx7E44wx02kQLrdM3aOOy+FpzS7+8OizA==" }, + "for-each": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", + "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", + "requires": { + "is-callable": "^1.1.3" + } + }, "fork-ts-checker-webpack-plugin": { "version": "6.5.2", "resolved": "https://registry.npmjs.org/fork-ts-checker-webpack-plugin/-/fork-ts-checker-webpack-plugin-6.5.2.tgz", @@ -22407,6 +23647,11 @@ "slash": "^3.0.0" } }, + "google-protobuf": { + "version": "3.19.4", + "resolved": "https://registry.npmjs.org/google-protobuf/-/google-protobuf-3.19.4.tgz", + "integrity": "sha512-OIPNCxsG2lkIvf+P5FNfJ/Km95CsXOBecS9ZcAU6m2Rq3svc0Apl9nB3GMDNKfQ9asNv4KjyAqGwPQFrVle3Yg==" + }, "graceful-fs": { "version": "4.2.10", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz", @@ -22469,6 +23714,32 @@ "has-symbols": "^1.0.2" } }, + "hash-base": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.1.0.tgz", + "integrity": "sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA==", + "requires": { + "inherits": "^2.0.4", + "readable-stream": "^3.6.0", + "safe-buffer": "^5.2.0" + }, + "dependencies": { + "safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" + } + } + }, + "hash.js": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz", + "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", + "requires": { + "inherits": "^2.0.3", + "minimalistic-assert": "^1.0.1" + } + }, "he": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", @@ -22482,6 +23753,16 @@ "@babel/runtime": "^7.7.6" } }, + "hmac-drbg": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", + "integrity": "sha512-Tti3gMqLdZfhOQY1Mzf/AanLiqh1WTiJgEj26ZuYQ9fbkLomzGchCws4FyrSd4VkpBfiNhaE1On+lOz894jvXg==", + "requires": { + "hash.js": "^1.0.3", + "minimalistic-assert": "^1.0.0", + "minimalistic-crypto-utils": "^1.0.1" + } + }, "hoopy": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/hoopy/-/hoopy-0.1.4.tgz", @@ -22631,6 +23912,11 @@ "micromatch": "^4.0.2" } }, + "https-browserify": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/https-browserify/-/https-browserify-1.0.0.tgz", + "integrity": "sha512-J+FkSdyD+0mA0N+81tMotaRMfSL9SGi+xpD3T6YApKsc3bGSXJlfXri3VyFOeYkfLRQisDk1W+jIFFKBeUBbBg==" + }, "https-proxy-agent": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", @@ -22672,6 +23958,11 @@ "harmony-reflect": "^1.4.6" } }, + "ieee754": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==" + }, "ignore": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.0.tgz", @@ -22759,6 +24050,15 @@ "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-2.0.1.tgz", "integrity": "sha512-1qTgH9NG+IIJ4yfKs2e6Pp1bZg8wbDbKHT21HrLIeYBTRLgMYKnMTPAuI3Lcs61nfx5h1xlXnbJtH1kX5/d/ng==" }, + "is-arguments": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.1.1.tgz", + "integrity": "sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA==", + "requires": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + } + }, "is-arrayish": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", @@ -22830,6 +24130,14 @@ "resolved": "https://registry.npmjs.org/is-generator-fn/-/is-generator-fn-2.1.0.tgz", "integrity": "sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ==" }, + "is-generator-function": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.0.10.tgz", + "integrity": "sha512-jsEjy9l3yiXEQ+PsXdmBwEPcOxaXWLspKdplFUVI9vq1iZgIekeC0L167qeu86czQaxed3q/Uzuw0swL0irL8A==", + "requires": { + "has-tostringtag": "^1.0.0" + } + }, "is-glob": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", @@ -22843,6 +24151,15 @@ "resolved": "https://registry.npmjs.org/is-module/-/is-module-1.0.0.tgz", "integrity": "sha512-51ypPSPCoTEIN9dy5Oy+h4pShgJmPCygKfyRCISBI+JoWT/2oJvK8QPxmwv7b/p239jXrm9M1mlQbyKJ5A152g==" }, + "is-nan": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/is-nan/-/is-nan-1.3.2.tgz", + "integrity": "sha512-E+zBKpQ2t6MEo1VsonYmluk9NxGrbzpeeLC2xIViuO2EjU2xsXsBPwTr3Ykv9l08UYEVEdWeRZNouaZqF6RN0w==", + "requires": { + "call-bind": "^1.0.0", + "define-properties": "^1.1.3" + } + }, "is-negative-zero": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.2.tgz", @@ -22924,6 +24241,18 @@ "has-symbols": "^1.0.2" } }, + "is-typed-array": { + "version": "1.1.9", + "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.9.tgz", + "integrity": "sha512-kfrlnTTn8pZkfpJMUgYD7YZ3qzeJgWUn8XfVYBARc4wnmNOmLbmuuaAs3q5fvB0UJOn6yHAKaGTPM7d6ezoD/A==", + "requires": { + "available-typed-arrays": "^1.0.5", + "call-bind": "^1.0.2", + "es-abstract": "^1.20.0", + "for-each": "^0.3.3", + "has-tostringtag": "^1.0.0" + } + }, "is-typedarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", @@ -24457,6 +25786,12 @@ } } }, + "jquery": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/jquery/-/jquery-3.6.0.tgz", + "integrity": "sha512-JVzAR/AjBvVt2BmYhxRCSYysDsPcssdmTFnzyLEts9qNwmjmu4JTAMYubEfwVOSwpQ1I1sKKFcxhZCI2buerfw==", + "peer": true + }, "js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", @@ -24723,6 +26058,16 @@ "tmpl": "1.0.5" } }, + "md5.js": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz", + "integrity": "sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==", + "requires": { + "hash-base": "^3.0.0", + "inherits": "^2.0.1", + "safe-buffer": "^5.1.2" + } + }, "mdn-data": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.4.tgz", @@ -24770,6 +26115,22 @@ "picomatch": "^2.3.1" } }, + "miller-rabin": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/miller-rabin/-/miller-rabin-4.0.1.tgz", + "integrity": "sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA==", + "requires": { + "bn.js": "^4.0.0", + "brorand": "^1.0.1" + }, + "dependencies": { + "bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" + } + } + }, "mime": { "version": "1.6.0", "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", @@ -24848,6 +26209,11 @@ "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==" }, + "minimalistic-crypto-utils": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", + "integrity": "sha512-JIYlbt6g8i5jKfJ3xz7rF0LXmv2TkDxBLUkiBeZ7bAx4GnnNMr8xFpGnOxn6GhTEHx3SjRrZEoU+j04prX1ktg==" + }, "minimatch": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", @@ -24922,6 +26288,37 @@ "resolved": "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz", "integrity": "sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw==" }, + "node-polyfill-webpack-plugin": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/node-polyfill-webpack-plugin/-/node-polyfill-webpack-plugin-1.1.4.tgz", + "integrity": "sha512-Z0XTKj1wRWO8o/Vjobsw5iOJCN+Sua3EZEUc2Ziy9CyVvmHKu6o+t4gUH9GOE0czyPR94LI6ZCV/PpcM8b5yow==", + "requires": { + "assert": "^2.0.0", + "browserify-zlib": "^0.2.0", + "buffer": "^6.0.3", + "console-browserify": "^1.2.0", + "constants-browserify": "^1.0.0", + "crypto-browserify": "^3.12.0", + "domain-browser": "^4.19.0", + "events": "^3.3.0", + "filter-obj": "^2.0.2", + "https-browserify": "^1.0.0", + "os-browserify": "^0.3.0", + "path-browserify": "^1.0.1", + "process": "^0.11.10", + "punycode": "^2.1.1", + "querystring-es3": "^0.2.1", + "readable-stream": "^3.6.0", + "stream-browserify": "^3.0.0", + "stream-http": "^3.2.0", + "string_decoder": "^1.3.0", + "timers-browserify": "^2.0.12", + "tty-browserify": "^0.0.1", + "url": "^0.11.0", + "util": "^0.12.4", + "vm-browserify": "^1.1.2" + } + }, "node-releases": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.5.tgz", @@ -24978,6 +26375,15 @@ "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.2.tgz", "integrity": "sha512-z+cPxW0QGUp0mcqcsgQyLVRDoXFQbXOwBaqyF7VIgI4TWNQsDHrBpUQslRmIfAoYWdYzs6UlKJtB2XJpTaNSpQ==" }, + "object-is": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/object-is/-/object-is-1.1.5.tgz", + "integrity": "sha512-3cyDsyHgtmi7I7DfSSI2LDp6SK2lwvtbg0p0R1e0RvTqF5ceGx+K2dfSjm1bKDMVCFEDAQvy+o8c6a7VujOddw==", + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3" + } + }, "object-keys": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", @@ -25101,6 +26507,11 @@ "word-wrap": "^1.2.3" } }, + "os-browserify": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/os-browserify/-/os-browserify-0.3.0.tgz", + "integrity": "sha512-gjcpUc3clBf9+210TRaDWbf+rZZZEshZ+DlXMRCeAjp0xhTrnQsKHypIy1J3d5hKdUzj69t708EHtU8P6bUn0A==" + }, "p-limit": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", @@ -25131,6 +26542,11 @@ "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==" }, + "pako": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz", + "integrity": "sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==" + }, "param-case": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/param-case/-/param-case-3.0.4.tgz", @@ -25148,6 +26564,18 @@ "callsites": "^3.0.0" } }, + "parse-asn1": { + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.6.tgz", + "integrity": "sha512-RnZRo1EPU6JBnra2vGHj0yhp6ebyjBZpmUCLHWiFhxlzvBCCpAuZ7elsBp1PVAbQN0/04VD/19rfzlBSwLstMw==", + "requires": { + "asn1.js": "^5.2.0", + "browserify-aes": "^1.0.0", + "evp_bytestokey": "^1.0.0", + "pbkdf2": "^3.0.3", + "safe-buffer": "^5.1.1" + } + }, "parse-json": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", @@ -25178,6 +26606,11 @@ "tslib": "^2.0.3" } }, + "path-browserify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-1.0.1.tgz", + "integrity": "sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==" + }, "path-exists": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", @@ -25208,6 +26641,18 @@ "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==" }, + "pbkdf2": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.1.2.tgz", + "integrity": "sha512-iuh7L6jA7JEGu2WxDwtQP1ddOpaJNC4KlDEFfdQajSGgGPNi4OyDc2R7QnbY2bR9QjBVGwgvTdNJZoE7RaxUMA==", + "requires": { + "create-hash": "^1.1.2", + "create-hmac": "^1.1.4", + "ripemd160": "^2.0.1", + "safe-buffer": "^5.0.1", + "sha.js": "^2.4.8" + } + }, "performance-now": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", @@ -25319,6 +26764,12 @@ } } }, + "popper.js": { + "version": "1.16.1", + "resolved": "https://registry.npmjs.org/popper.js/-/popper.js-1.16.1.tgz", + "integrity": "sha512-Wb4p1J4zyFTbM+u6WuO4XstYx4Ky9Cewe4DWrel7B0w6VVICvPwdOpotjzcf6eD8TsckVnIMNONQyPIUFOUbCQ==", + "peer": true + }, "postcss": { "version": "8.4.14", "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.14.tgz", @@ -26000,6 +27451,11 @@ } } }, + "process": { + "version": "0.11.10", + "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", + "integrity": "sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==" + }, "process-nextick-args": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", @@ -26076,6 +27532,26 @@ "resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz", "integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ==" }, + "public-encrypt": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.3.tgz", + "integrity": "sha512-zVpa8oKZSz5bTMTFClc1fQOnyyEzpl5ozpi1B5YcvBrdohMjH2rfsBtyXcuNuwjsDIXmBYlF2N5FlJYhR29t8Q==", + "requires": { + "bn.js": "^4.1.0", + "browserify-rsa": "^4.0.0", + "create-hash": "^1.1.0", + "parse-asn1": "^5.0.0", + "randombytes": "^2.0.1", + "safe-buffer": "^5.1.2" + }, + "dependencies": { + "bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" + } + } + }, "punycode": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", @@ -26094,6 +27570,16 @@ "side-channel": "^1.0.4" } }, + "querystring": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", + "integrity": "sha512-X/xY82scca2tau62i9mDyU9K+I+djTMUsvwf7xnUX5GLvVzgJybOJf4Y6o9Zx3oJK/LSXg5tTZBjwzqVPaPO2g==" + }, + "querystring-es3": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/querystring-es3/-/querystring-es3-0.2.1.tgz", + "integrity": "sha512-773xhDQnZBMFobEiztv8LIl70ch5MSF/jUQVlhwFyBILqq96anmoctVIYz+ZRp0qbCKATTn6ev02M3r7Ga5vqA==" + }, "queue-microtask": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", @@ -26120,6 +27606,15 @@ "safe-buffer": "^5.1.0" } }, + "randomfill": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/randomfill/-/randomfill-1.0.4.tgz", + "integrity": "sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw==", + "requires": { + "randombytes": "^2.0.5", + "safe-buffer": "^5.1.0" + } + }, "range-parser": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", @@ -26624,6 +28119,15 @@ "glob": "^7.1.3" } }, + "ripemd160": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz", + "integrity": "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==", + "requires": { + "hash-base": "^3.0.0", + "inherits": "^2.0.1" + } + }, "rollup": { "version": "2.75.6", "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.75.6.tgz", @@ -26881,11 +28385,25 @@ "send": "0.18.0" } }, + "setimmediate": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", + "integrity": "sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA==" + }, "setprototypeof": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==" }, + "sha.js": { + "version": "2.4.11", + "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", + "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", + "requires": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, "shebang-command": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", @@ -27054,6 +28572,26 @@ "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==" }, + "stream-browserify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-3.0.0.tgz", + "integrity": "sha512-H73RAHsVBapbim0tU2JwwOiXUj+fikfiaoYAKHF3VJfA0pe2BCzkhAHBlLG6REzE+2WNZcxOXjK7lkso+9euLA==", + "requires": { + "inherits": "~2.0.4", + "readable-stream": "^3.5.0" + } + }, + "stream-http": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/stream-http/-/stream-http-3.2.0.tgz", + "integrity": "sha512-Oq1bLqisTyK3TSCXpPbT4sdeYNdmyZJv1LxpEm2vu1ZhK89kSE5YXwZc3cWk0MagGaKriBh9mCFbVGtO+vY29A==", + "requires": { + "builtin-status-codes": "^3.0.0", + "inherits": "^2.0.4", + "readable-stream": "^3.6.0", + "xtend": "^4.0.2" + } + }, "string_decoder": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", @@ -27441,6 +28979,14 @@ "resolved": "https://registry.npmjs.org/thunky/-/thunky-1.1.0.tgz", "integrity": "sha512-eHY7nBftgThBqOyHGVN+l8gF0BucP09fMo0oO/Lb0w1OF80dJv+lDVpXG60WMQvkcxAkNybKsrEIE3ZtKGmPrA==" }, + "timers-browserify": { + "version": "2.0.12", + "resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-2.0.12.tgz", + "integrity": "sha512-9phl76Cqm6FhSX9Xe1ZUAMLtm1BLkKj2Qd5ApyWkXzsMRaA7dgr81kf4wJmQf/hAvg8EEyJxDo3du/0KlhPiKQ==", + "requires": { + "setimmediate": "^1.0.4" + } + }, "tmpl": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/tmpl/-/tmpl-1.0.5.tgz", @@ -27494,6 +29040,14 @@ "resolved": "https://registry.npmjs.org/tryer/-/tryer-1.0.1.tgz", "integrity": "sha512-c3zayb8/kWWpycWYg87P71E1S1ZL6b6IJxfb5fvsUgsf0S2MVGaDhDXXjDMpdCpfWXqptc+4mXwmiy1ypXqRAA==" }, + "ts-protoc-gen": { + "version": "0.15.0", + "resolved": "https://registry.npmjs.org/ts-protoc-gen/-/ts-protoc-gen-0.15.0.tgz", + "integrity": "sha512-TycnzEyrdVDlATJ3bWFTtra3SCiEP0W0vySXReAuEygXCUr1j2uaVyL0DhzjwuUdQoW5oXPwk6oZWeA0955V+g==", + "requires": { + "google-protobuf": "^3.15.5" + } + }, "tsconfig-paths": { "version": "3.14.1", "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.14.1.tgz", @@ -27540,6 +29094,11 @@ } } }, + "tty-browserify": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.1.tgz", + "integrity": "sha512-C3TaO7K81YvjCgQH9Q1S3R3P3BtN3RIM8n+OvX4il1K1zgE8ZhI0op7kClgkxtutIE8hQrcrHBXvIheqKUUCxw==" + }, "type-check": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", @@ -27662,6 +29221,35 @@ "punycode": "^2.1.0" } }, + "url": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/url/-/url-0.11.0.tgz", + "integrity": "sha512-kbailJa29QrtXnxgq+DdCEGlbTeYM2eJUxsz6vjZavrCYPMIFHMKQmSKYAIuUK2i7hgPm28a8piX5NTUtM/LKQ==", + "requires": { + "punycode": "1.3.2", + "querystring": "0.2.0" + }, + "dependencies": { + "punycode": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz", + "integrity": "sha512-RofWgt/7fL5wP1Y7fxE7/EmTLzQVnB0ycyibJ0OOHIlJqTNzglYFxVwETOcIoJqJmpDXJ9xImDv+Fq34F/d4Dw==" + } + } + }, + "util": { + "version": "0.12.4", + "resolved": "https://registry.npmjs.org/util/-/util-0.12.4.tgz", + "integrity": "sha512-bxZ9qtSlGUWSOy9Qa9Xgk11kSslpuZwaxCg4sNIDj6FLucDab2JxnHwyNTCpHMtK1MjoQiWQ6DiUMZYbSrO+Sw==", + "requires": { + "inherits": "^2.0.3", + "is-arguments": "^1.0.4", + "is-generator-function": "^1.0.7", + "is-typed-array": "^1.1.3", + "safe-buffer": "^5.1.2", + "which-typed-array": "^1.1.2" + } + }, "util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", @@ -27713,6 +29301,11 @@ "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=" }, + "vm-browserify": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-1.1.2.tgz", + "integrity": "sha512-2ham8XPWTONajOR0ohOKOHXkm3+gaBmGut3SRuu75xLd/RRaY6vqgh8NBYYk7+RW3u5AtzPQZG8F10LHkl0lAQ==" + }, "w3c-hr-time": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/w3c-hr-time/-/w3c-hr-time-1.0.2.tgz", @@ -28050,6 +29643,19 @@ "is-symbol": "^1.0.3" } }, + "which-typed-array": { + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.8.tgz", + "integrity": "sha512-Jn4e5PItbcAHyLoRDwvPj1ypu27DJbtdYXUa5zsinrUx77Uvfb0cXwwnGMTn7cjUfhhqgVQnVJCwF+7cgU7tpw==", + "requires": { + "available-typed-arrays": "^1.0.5", + "call-bind": "^1.0.2", + "es-abstract": "^1.20.0", + "for-each": "^0.3.3", + "has-tostringtag": "^1.0.0", + "is-typed-array": "^1.1.9" + } + }, "word-wrap": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", diff --git a/demos/connect-demo/package.json b/demos/connect-demo/package.json index 3783bea..44c82c4 100644 --- a/demos/connect-demo/package.json +++ b/demos/connect-demo/package.json @@ -3,6 +3,7 @@ "version": "0.1.0", "private": true, "dependencies": { + "@lightninglabs/lnc-web": "^0.0.1-alpha.rc1", "@testing-library/jest-dom": "^5.16.4", "@testing-library/react": "^13.3.0", "@testing-library/user-event": "^13.5.0", @@ -10,6 +11,7 @@ "@types/node": "^16.11.39", "@types/react": "^18.0.12", "@types/react-dom": "^18.0.5", + "bootstrap": "^4.6.1", "react": "^18.1.0", "react-bootstrap": "^2.4.0", "react-dom": "^18.1.0", diff --git a/demos/connect-demo/public/lnc-v0.1.10-alpha.wasm b/demos/connect-demo/public/lnc-v0.1.10-alpha.wasm deleted file mode 100644 index e71326b..0000000 Binary files a/demos/connect-demo/public/lnc-v0.1.10-alpha.wasm and /dev/null differ diff --git a/demos/connect-demo/src/hooks/useLNC.ts b/demos/connect-demo/src/hooks/useLNC.ts index a413ff1..d66b57b 100644 --- a/demos/connect-demo/src/hooks/useLNC.ts +++ b/demos/connect-demo/src/hooks/useLNC.ts @@ -2,10 +2,7 @@ import { useCallback } from 'react'; import LNC from '@lightninglabs/lnc-web'; // create a singleton instance of LNC that will live for the lifetime of the app -const lnc = new LNC({ - // use the LNC wasm file stored in the public dir - wasmClientCode: '/lnc-v0.1.10-alpha.wasm', -}); +const lnc = new LNC({}); /** * A hook that exposes a single LNC instance of LNC to all component that need it. diff --git a/demos/kitchen-sink/package-lock.json b/demos/kitchen-sink/package-lock.json index 1800d08..2f15993 100644 --- a/demos/kitchen-sink/package-lock.json +++ b/demos/kitchen-sink/package-lock.json @@ -8,6 +8,7 @@ "name": "kitchen-sink", "version": "0.0.1", "dependencies": { + "@lightninglabs/lnc-web": "^0.0.1-alpha.rc1", "@testing-library/jest-dom": "5.16.2", "@testing-library/react": "12.1.3", "@testing-library/user-event": "13.5.0", @@ -2056,6 +2057,17 @@ "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz", "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==" }, + "node_modules/@improbable-eng/grpc-web": { + "version": "0.15.0", + "resolved": "https://registry.npmjs.org/@improbable-eng/grpc-web/-/grpc-web-0.15.0.tgz", + "integrity": "sha512-ERft9/0/8CmYalqOVnJnpdDry28q+j+nAlFFARdjyxXDJ+Mhgv9+F600QC8BR9ygOfrXRlAk6CvST2j+JCpQPg==", + "dependencies": { + "browser-headers": "^0.4.1" + }, + "peerDependencies": { + "google-protobuf": "^3.14.0" + } + }, "node_modules/@istanbuljs/load-nyc-config": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", @@ -2730,6 +2742,34 @@ "@jridgewell/sourcemap-codec": "^1.4.10" } }, + "node_modules/@lightninglabs/lnc-web": { + "version": "0.0.1-alpha.rc1", + "resolved": "https://registry.npmjs.org/@lightninglabs/lnc-web/-/lnc-web-0.0.1-alpha.rc1.tgz", + "integrity": "sha512-QWQRYp+DideNpbOsi3fbMdjKqXa11Jl7EW9oCJSrJ87x6Ghptec9hCspc/xtJOTdtvoyh7I3CVvkx+pxa4KjyQ==", + "dependencies": { + "@improbable-eng/grpc-web": "0.15.0", + "@types/big.js": "6.1.2", + "@types/google-protobuf": "3.15.5", + "big.js": "6.1.1", + "crypto-js": "4.1.1", + "google-protobuf": "3.19.4", + "lodash": "4.17.21", + "node-polyfill-webpack-plugin": "1.1.4", + "ts-protoc-gen": "0.15.0" + } + }, + "node_modules/@lightninglabs/lnc-web/node_modules/big.js": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/big.js/-/big.js-6.1.1.tgz", + "integrity": "sha512-1vObw81a8ylZO5ePrtMay0n018TcftpTA5HFKDaSuiUDBo8biRBtjIobw60OpwuvrGk+FsxKamqN4cnmj/eXdg==", + "engines": { + "node": "*" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/bigjs" + } + }, "node_modules/@nodelib/fs.scandir": { "version": "2.1.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", @@ -3402,6 +3442,11 @@ "@babel/types": "^7.3.0" } }, + "node_modules/@types/big.js": { + "version": "6.1.2", + "resolved": "https://registry.npmjs.org/@types/big.js/-/big.js-6.1.2.tgz", + "integrity": "sha512-h24JIZ52rvSvi2jkpYDk2yLH99VzZoCJiSfDWwjst7TwJVuXN61XVCUlPCzRl7mxKEMsGf8z42Q+J4TZwU3z2w==" + }, "node_modules/@types/body-parser": { "version": "1.19.2", "resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.2.tgz", @@ -3480,6 +3525,11 @@ "@types/range-parser": "*" } }, + "node_modules/@types/google-protobuf": { + "version": "3.15.5", + "resolved": "https://registry.npmjs.org/@types/google-protobuf/-/google-protobuf-3.15.5.tgz", + "integrity": "sha512-6bgv24B+A2bo9AfzReeg5StdiijKzwwnRflA8RLd1V4Yv995LeTmo0z69/MPbBDFSiZWdZHQygLo/ccXhMEDgw==" + }, "node_modules/@types/graceful-fs": { "version": "4.1.5", "resolved": "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.5.tgz", @@ -4380,6 +4430,33 @@ "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz", "integrity": "sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY=" }, + "node_modules/asn1.js": { + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-5.4.1.tgz", + "integrity": "sha512-+I//4cYPccV8LdmBLiX8CYvf9Sp3vQsrqu2QNXRcrbiWvcx/UdlFiqUJJzxRQxgsZmvhXhn4cSKeSmoFjVdupA==", + "dependencies": { + "bn.js": "^4.0.0", + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0", + "safer-buffer": "^2.1.0" + } + }, + "node_modules/asn1.js/node_modules/bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" + }, + "node_modules/assert": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/assert/-/assert-2.0.0.tgz", + "integrity": "sha512-se5Cd+js9dXJnu6Ag2JFc00t+HmHOen+8Q+L7O9zI0PqQXr20uk2J0XQqMxZEeo5U50o8Nvmmx7dZrl+Ufr35A==", + "dependencies": { + "es6-object-assign": "^1.1.0", + "is-nan": "^1.2.1", + "object-is": "^1.0.1", + "util": "^0.12.0" + } + }, "node_modules/ast-types-flow": { "version": "0.0.7", "resolved": "https://registry.npmjs.org/ast-types-flow/-/ast-types-flow-0.0.7.tgz", @@ -4443,6 +4520,17 @@ "postcss": "^8.1.0" } }, + "node_modules/available-typed-arrays": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz", + "integrity": "sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/axe-core": { "version": "4.4.1", "resolved": "https://registry.npmjs.org/axe-core/-/axe-core-4.4.1.tgz", @@ -4773,6 +4861,25 @@ "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" }, + "node_modules/base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, "node_modules/batch": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/batch/-/batch-0.6.1.tgz", @@ -4813,6 +4920,11 @@ "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz", "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==" }, + "node_modules/bn.js": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", + "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==" + }, "node_modules/body-parser": { "version": "1.19.2", "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.19.2.tgz", @@ -4903,11 +5015,107 @@ "node": ">=8" } }, + "node_modules/brorand": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", + "integrity": "sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w==" + }, + "node_modules/browser-headers": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/browser-headers/-/browser-headers-0.4.1.tgz", + "integrity": "sha512-CA9hsySZVo9371qEHjHZtYxV2cFtVj5Wj/ZHi8ooEsrtm4vOnl9Y9HmyYWk9q+05d7K3rdoAE0j3MVEFVvtQtg==" + }, "node_modules/browser-process-hrtime": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/browser-process-hrtime/-/browser-process-hrtime-1.0.0.tgz", "integrity": "sha512-9o5UecI3GhkpM6DrXr69PblIuWxPKk9Y0jHBRhdocZ2y7YECBFCsHm79Pr3OyR2AvjhDkabFJaDJMYRazHgsow==" }, + "node_modules/browserify-aes": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz", + "integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==", + "dependencies": { + "buffer-xor": "^1.0.3", + "cipher-base": "^1.0.0", + "create-hash": "^1.1.0", + "evp_bytestokey": "^1.0.3", + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "node_modules/browserify-cipher": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/browserify-cipher/-/browserify-cipher-1.0.1.tgz", + "integrity": "sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w==", + "dependencies": { + "browserify-aes": "^1.0.4", + "browserify-des": "^1.0.0", + "evp_bytestokey": "^1.0.0" + } + }, + "node_modules/browserify-des": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/browserify-des/-/browserify-des-1.0.2.tgz", + "integrity": "sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A==", + "dependencies": { + "cipher-base": "^1.0.1", + "des.js": "^1.0.0", + "inherits": "^2.0.1", + "safe-buffer": "^5.1.2" + } + }, + "node_modules/browserify-rsa": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.1.0.tgz", + "integrity": "sha512-AdEER0Hkspgno2aR97SAf6vi0y0k8NuOpGnVH3O99rcA5Q6sh8QxcngtHuJ6uXwnfAXNM4Gn1Gb7/MV1+Ymbog==", + "dependencies": { + "bn.js": "^5.0.0", + "randombytes": "^2.0.1" + } + }, + "node_modules/browserify-sign": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.2.1.tgz", + "integrity": "sha512-/vrA5fguVAKKAVTNJjgSm1tRQDHUU6DbwO9IROu/0WAzC8PKhucDSh18J0RMvVeHAn5puMd+QHC2erPRNf8lmg==", + "dependencies": { + "bn.js": "^5.1.1", + "browserify-rsa": "^4.0.1", + "create-hash": "^1.2.0", + "create-hmac": "^1.1.7", + "elliptic": "^6.5.3", + "inherits": "^2.0.4", + "parse-asn1": "^5.1.5", + "readable-stream": "^3.6.0", + "safe-buffer": "^5.2.0" + } + }, + "node_modules/browserify-sign/node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/browserify-zlib": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/browserify-zlib/-/browserify-zlib-0.2.0.tgz", + "integrity": "sha512-Z942RysHXmJrhqk88FmKBVq/v5tqmSkDz7p54G/MGyjMnCFFnC79XWNbg+Vta8W6Wb2qtSZTSxIGkJrRpCFEiA==", + "dependencies": { + "pako": "~1.0.5" + } + }, "node_modules/browserslist": { "version": "4.19.3", "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.19.3.tgz", @@ -4938,6 +5146,29 @@ "node-int64": "^0.4.0" } }, + "node_modules/buffer": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", + "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.2.1" + } + }, "node_modules/buffer-from": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", @@ -4948,6 +5179,11 @@ "resolved": "https://registry.npmjs.org/buffer-indexof/-/buffer-indexof-1.1.1.tgz", "integrity": "sha512-4/rOEg86jivtPTeOUUT61jJO1Ya1TrR/OkqCSZDyq84WJh3LuuiphBYJN+fm5xufIk4XAFcEwte/8WzC8If/1g==" }, + "node_modules/buffer-xor": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz", + "integrity": "sha512-571s0T7nZWK6vB67HI5dyUF7wXiNcfaPPPTl6zYCNApANjIvYJTg7hlud/+cJpdAhS7dVzqMLmfhfHR3rAcOjQ==" + }, "node_modules/builtin-modules": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-3.2.0.tgz", @@ -4959,6 +5195,11 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/builtin-status-codes": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz", + "integrity": "sha512-HpGFw18DgFWlncDfjTa2rcQ4W88O1mC8e8yZ2AvQY5KDaktSTwo+KRf6nHK6FRI5FyRyb/5T6+TSxfP7QyGsmQ==" + }, "node_modules/bytes": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz", @@ -5127,6 +5368,15 @@ "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.3.0.tgz", "integrity": "sha512-riT/3vI5YpVH6/qomlDnJow6TBee2PBKSEpx3O32EGPYbWGIRsIlGRms3Sm74wYE1JMo8RnO04Hb12+v1J5ICw==" }, + "node_modules/cipher-base": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz", + "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==", + "dependencies": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, "node_modules/cjs-module-lexer": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-1.2.2.tgz", @@ -5315,6 +5565,16 @@ "node": ">=0.8" } }, + "node_modules/console-browserify": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.2.0.tgz", + "integrity": "sha512-ZMkYO/LkF17QvCPqM0gxw8yUzigAOZOSWSHg91FH6orS7vcEj5dVZTidN2fQ14yBSdg97RqhSNwLUXInd52OTA==" + }, + "node_modules/constants-browserify": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/constants-browserify/-/constants-browserify-1.0.0.tgz", + "integrity": "sha512-xFxOwqIzR/e1k1gLiWEophSCMqXcwVHIH7akf7b/vxcUeGunlj3hvZaaqxwHsTgn+IndtkQJgSztIDWeumWJDQ==" + }, "node_modules/content-disposition": { "version": "0.5.4", "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", @@ -5435,6 +5695,45 @@ "node": ">=10" } }, + "node_modules/create-ecdh": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.4.tgz", + "integrity": "sha512-mf+TCx8wWc9VpuxfP2ht0iSISLZnt0JgWlrOKZiNqyUZWnjIaCIVNQArMHnCZKfEYRg6IM7A+NeJoN8gf/Ws0A==", + "dependencies": { + "bn.js": "^4.1.0", + "elliptic": "^6.5.3" + } + }, + "node_modules/create-ecdh/node_modules/bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" + }, + "node_modules/create-hash": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz", + "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==", + "dependencies": { + "cipher-base": "^1.0.1", + "inherits": "^2.0.1", + "md5.js": "^1.3.4", + "ripemd160": "^2.0.1", + "sha.js": "^2.4.0" + } + }, + "node_modules/create-hmac": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz", + "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==", + "dependencies": { + "cipher-base": "^1.0.3", + "create-hash": "^1.1.0", + "inherits": "^2.0.1", + "ripemd160": "^2.0.0", + "safe-buffer": "^5.0.1", + "sha.js": "^2.4.8" + } + }, "node_modules/cross-spawn": { "version": "7.0.3", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", @@ -5448,6 +5747,32 @@ "node": ">= 8" } }, + "node_modules/crypto-browserify": { + "version": "3.12.0", + "resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.12.0.tgz", + "integrity": "sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg==", + "dependencies": { + "browserify-cipher": "^1.0.0", + "browserify-sign": "^4.0.0", + "create-ecdh": "^4.0.0", + "create-hash": "^1.1.0", + "create-hmac": "^1.1.0", + "diffie-hellman": "^5.0.0", + "inherits": "^2.0.1", + "pbkdf2": "^3.0.3", + "public-encrypt": "^4.0.0", + "randombytes": "^2.0.0", + "randomfill": "^1.0.3" + }, + "engines": { + "node": "*" + } + }, + "node_modules/crypto-js": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-4.1.1.tgz", + "integrity": "sha512-o2JlM7ydqd3Qk9CA0L4NL6mTzU2sdx96a+oOfPu8Mkl/PK51vSyoi8/rQ8NknZtk44vq15lmhAj9CIAGwgeWKw==" + }, "node_modules/crypto-random-string": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-2.0.0.tgz", @@ -5963,14 +6288,18 @@ } }, "node_modules/define-properties": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", - "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.4.tgz", + "integrity": "sha512-uckOqKcfaVvtBdsVkdPv3XjveQJsNQqmhXgRi8uhvWWuPYZCNlzT8qAyblUgNoXdHdjMTzAqeGjAoli8f+bzPA==", "dependencies": { - "object-keys": "^1.0.12" + "has-property-descriptors": "^1.0.0", + "object-keys": "^1.1.1" }, "engines": { "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, "node_modules/defined": { @@ -6015,6 +6344,15 @@ "node": ">= 0.6" } }, + "node_modules/des.js": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.0.1.tgz", + "integrity": "sha512-Q0I4pfFrv2VPd34/vfLrFOoRmlYj3OV50i7fskps1jZWK1kApMWWT9G6RRUeYedLcBDIhnSDaUvJMb3AhUlaEA==", + "dependencies": { + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0" + } + }, "node_modules/destroy": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz", @@ -6091,6 +6429,21 @@ "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" } }, + "node_modules/diffie-hellman": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz", + "integrity": "sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==", + "dependencies": { + "bn.js": "^4.1.0", + "miller-rabin": "^4.0.0", + "randombytes": "^2.0.0" + } + }, + "node_modules/diffie-hellman/node_modules/bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" + }, "node_modules/dir-glob": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", @@ -6166,6 +6519,17 @@ "url": "https://github.com/cheeriojs/dom-serializer?sponsor=1" } }, + "node_modules/domain-browser": { + "version": "4.22.0", + "resolved": "https://registry.npmjs.org/domain-browser/-/domain-browser-4.22.0.tgz", + "integrity": "sha512-IGBwjF7tNk3cwypFNH/7bfzBcgSCbaMOD3GsaY1AU/JRrnHnYgEM0+9kQt52iZxjNsjBtJYtao146V+f8jFZNw==", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://bevry.me/fund" + } + }, "node_modules/domelementtype": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.2.0.tgz", @@ -6274,6 +6638,25 @@ "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.71.tgz", "integrity": "sha512-Hk61vXXKRb2cd3znPE9F+2pLWdIOmP7GjiTj45y6L3W/lO+hSnUSUhq+6lEaERWBdZOHbk2s3YV5c9xVl3boVw==" }, + "node_modules/elliptic": { + "version": "6.5.4", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.4.tgz", + "integrity": "sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ==", + "dependencies": { + "bn.js": "^4.11.9", + "brorand": "^1.1.0", + "hash.js": "^1.0.0", + "hmac-drbg": "^1.0.1", + "inherits": "^2.0.4", + "minimalistic-assert": "^1.0.1", + "minimalistic-crypto-utils": "^1.0.1" + } + }, + "node_modules/elliptic/node_modules/bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" + }, "node_modules/emittery": { "version": "0.8.1", "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.8.1.tgz", @@ -6343,30 +6726,33 @@ } }, "node_modules/es-abstract": { - "version": "1.19.1", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.19.1.tgz", - "integrity": "sha512-2vJ6tjA/UfqLm2MPs7jxVybLoB8i1t1Jd9R3kISld20sIxPcTbLuggQOUxeWeAvIUkduv/CfMjuh4WmiXr2v9w==", + "version": "1.20.1", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.20.1.tgz", + "integrity": "sha512-WEm2oBhfoI2sImeM4OF2zE2V3BYdSF+KnSi9Sidz51fQHd7+JuF8Xgcj9/0o+OWeIeIS/MiuNnlruQrJf16GQA==", "dependencies": { "call-bind": "^1.0.2", "es-to-primitive": "^1.2.1", "function-bind": "^1.1.1", + "function.prototype.name": "^1.1.5", "get-intrinsic": "^1.1.1", "get-symbol-description": "^1.0.0", "has": "^1.0.3", - "has-symbols": "^1.0.2", + "has-property-descriptors": "^1.0.0", + "has-symbols": "^1.0.3", "internal-slot": "^1.0.3", "is-callable": "^1.2.4", - "is-negative-zero": "^2.0.1", + "is-negative-zero": "^2.0.2", "is-regex": "^1.1.4", - "is-shared-array-buffer": "^1.0.1", + "is-shared-array-buffer": "^1.0.2", "is-string": "^1.0.7", - "is-weakref": "^1.0.1", - "object-inspect": "^1.11.0", + "is-weakref": "^1.0.2", + "object-inspect": "^1.12.0", "object-keys": "^1.1.1", "object.assign": "^4.1.2", - "string.prototype.trimend": "^1.0.4", - "string.prototype.trimstart": "^1.0.4", - "unbox-primitive": "^1.0.1" + "regexp.prototype.flags": "^1.4.3", + "string.prototype.trimend": "^1.0.5", + "string.prototype.trimstart": "^1.0.5", + "unbox-primitive": "^1.0.2" }, "engines": { "node": ">= 0.4" @@ -6396,6 +6782,11 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/es6-object-assign": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/es6-object-assign/-/es6-object-assign-1.1.0.tgz", + "integrity": "sha512-MEl9uirslVwqQU369iHNWZXsI8yaZYGg/D65aOgZkeyFJwHYSxilf7rQzXKI7DdDuBPrBXbfk3sl9hJhmd5AUw==" + }, "node_modules/escalade": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", @@ -7142,6 +7533,15 @@ "node": ">=0.8.x" } }, + "node_modules/evp_bytestokey": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz", + "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==", + "dependencies": { + "md5.js": "^1.3.4", + "safe-buffer": "^5.1.1" + } + }, "node_modules/execa": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", @@ -7388,6 +7788,14 @@ "node": ">=8" } }, + "node_modules/filter-obj": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/filter-obj/-/filter-obj-2.0.2.tgz", + "integrity": "sha512-lO3ttPjHZRfjMcxWKb1j1eDhTFsu4meeR3lnMcnBFhk6RuLhvEiuALu2TlfL310ph4lCYYwgF/ElIjdP739tdg==", + "engines": { + "node": ">=8" + } + }, "node_modules/finalhandler": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.2.tgz", @@ -7485,6 +7893,14 @@ } } }, + "node_modules/for-each": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", + "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", + "dependencies": { + "is-callable": "^1.1.3" + } + }, "node_modules/fork-ts-checker-webpack-plugin": { "version": "6.5.0", "resolved": "https://registry.npmjs.org/fork-ts-checker-webpack-plugin/-/fork-ts-checker-webpack-plugin-6.5.0.tgz", @@ -7723,11 +8139,36 @@ "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" }, + "node_modules/function.prototype.name": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.5.tgz", + "integrity": "sha512-uN7m/BzVKQnCUF/iW8jYea67v++2u7m5UgENbHRtdDVclOUP+FMPlCNdmk0h/ysGyo2tavMJEDqJAkJdRa1vMA==", + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3", + "es-abstract": "^1.19.0", + "functions-have-names": "^1.2.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/functional-red-black-tree": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=" }, + "node_modules/functions-have-names": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", + "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/gensync": { "version": "1.0.0-beta.2", "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", @@ -7893,6 +8334,11 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/google-protobuf": { + "version": "3.19.4", + "resolved": "https://registry.npmjs.org/google-protobuf/-/google-protobuf-3.19.4.tgz", + "integrity": "sha512-OIPNCxsG2lkIvf+P5FNfJ/Km95CsXOBecS9ZcAU6m2Rq3svc0Apl9nB3GMDNKfQ9asNv4KjyAqGwPQFrVle3Yg==" + }, "node_modules/graceful-fs": { "version": "4.2.9", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.9.tgz", @@ -7934,9 +8380,9 @@ } }, "node_modules/has-bigints": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.1.tgz", - "integrity": "sha512-LSBS2LjbNBTf6287JEbEzvJgftkF5qFkmCo9hDRpAzKhUOlJ+hx8dd4USs00SgsUNwc4617J9ki5YtEClM2ffA==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz", + "integrity": "sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==", "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -7949,10 +8395,21 @@ "node": ">=4" } }, + "node_modules/has-property-descriptors": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz", + "integrity": "sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==", + "dependencies": { + "get-intrinsic": "^1.1.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/has-symbols": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.2.tgz", - "integrity": "sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", "engines": { "node": ">= 0.4" }, @@ -7974,6 +8431,47 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/hash-base": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.1.0.tgz", + "integrity": "sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA==", + "dependencies": { + "inherits": "^2.0.4", + "readable-stream": "^3.6.0", + "safe-buffer": "^5.2.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/hash-base/node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/hash.js": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz", + "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", + "dependencies": { + "inherits": "^2.0.3", + "minimalistic-assert": "^1.0.1" + } + }, "node_modules/he": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", @@ -7982,6 +8480,16 @@ "he": "bin/he" } }, + "node_modules/hmac-drbg": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", + "integrity": "sha512-Tti3gMqLdZfhOQY1Mzf/AanLiqh1WTiJgEj26ZuYQ9fbkLomzGchCws4FyrSd4VkpBfiNhaE1On+lOz894jvXg==", + "dependencies": { + "hash.js": "^1.0.3", + "minimalistic-assert": "^1.0.0", + "minimalistic-crypto-utils": "^1.0.1" + } + }, "node_modules/hoopy": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/hoopy/-/hoopy-0.1.4.tgz", @@ -8178,6 +8686,11 @@ } } }, + "node_modules/https-browserify": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/https-browserify/-/https-browserify-1.0.0.tgz", + "integrity": "sha512-J+FkSdyD+0mA0N+81tMotaRMfSL9SGi+xpD3T6YApKsc3bGSXJlfXri3VyFOeYkfLRQisDk1W+jIFFKBeUBbBg==" + }, "node_modules/https-proxy-agent": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.0.tgz", @@ -8236,6 +8749,25 @@ "node": ">=4" } }, + "node_modules/ieee754": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, "node_modules/ignore": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.0.tgz", @@ -8486,6 +9018,20 @@ "node": ">=6" } }, + "node_modules/is-generator-function": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.0.10.tgz", + "integrity": "sha512-jsEjy9l3yiXEQ+PsXdmBwEPcOxaXWLspKdplFUVI9vq1iZgIekeC0L167qeu86czQaxed3q/Uzuw0swL0irL8A==", + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-glob": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", @@ -8502,6 +9048,21 @@ "resolved": "https://registry.npmjs.org/is-module/-/is-module-1.0.0.tgz", "integrity": "sha1-Mlj7afeMFNW4FdZkM2tM/7ZEFZE=" }, + "node_modules/is-nan": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/is-nan/-/is-nan-1.3.2.tgz", + "integrity": "sha512-E+zBKpQ2t6MEo1VsonYmluk9NxGrbzpeeLC2xIViuO2EjU2xsXsBPwTr3Ykv9l08UYEVEdWeRZNouaZqF6RN0w==", + "dependencies": { + "call-bind": "^1.0.0", + "define-properties": "^1.1.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-negative-zero": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.2.tgz", @@ -8522,9 +9083,9 @@ } }, "node_modules/is-number-object": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.6.tgz", - "integrity": "sha512-bEVOqiRcvo3zO1+G2lVMy+gkkEm9Yh7cDMRusKKu5ZJKPUYSJwICTKZrNKHA2EbSP0Tu0+6B/emsYNHZyn6K8g==", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.7.tgz", + "integrity": "sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==", "dependencies": { "has-tostringtag": "^1.0.0" }, @@ -8607,9 +9168,12 @@ } }, "node_modules/is-shared-array-buffer": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.1.tgz", - "integrity": "sha512-IU0NmyknYZN0rChcKhRO1X8LYz5Isj/Fsqh8NJOSf+N/hCOTwy29F32Ik7a+QszE63IdvmwdTPDd6cZ5pg4cwA==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz", + "integrity": "sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA==", + "dependencies": { + "call-bind": "^1.0.2" + }, "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -8653,6 +9217,24 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/is-typed-array": { + "version": "1.1.9", + "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.9.tgz", + "integrity": "sha512-kfrlnTTn8pZkfpJMUgYD7YZ3qzeJgWUn8XfVYBARc4wnmNOmLbmuuaAs3q5fvB0UJOn6yHAKaGTPM7d6ezoD/A==", + "dependencies": { + "available-typed-arrays": "^1.0.5", + "call-bind": "^1.0.2", + "es-abstract": "^1.20.0", + "for-each": "^0.3.3", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-typedarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", @@ -10844,6 +11426,16 @@ "tmpl": "1.0.5" } }, + "node_modules/md5.js": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz", + "integrity": "sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==", + "dependencies": { + "hash-base": "^3.0.0", + "inherits": "^2.0.1", + "safe-buffer": "^5.1.2" + } + }, "node_modules/mdn-data": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.4.tgz", @@ -10906,6 +11498,23 @@ "node": ">=8.6" } }, + "node_modules/miller-rabin": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/miller-rabin/-/miller-rabin-4.0.1.tgz", + "integrity": "sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA==", + "dependencies": { + "bn.js": "^4.0.0", + "brorand": "^1.0.1" + }, + "bin": { + "miller-rabin": "bin/miller-rabin" + } + }, + "node_modules/miller-rabin/node_modules/bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" + }, "node_modules/mime": { "version": "1.6.0", "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", @@ -11024,6 +11633,11 @@ "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==" }, + "node_modules/minimalistic-crypto-utils": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", + "integrity": "sha512-JIYlbt6g8i5jKfJ3xz7rF0LXmv2TkDxBLUkiBeZ7bAx4GnnNMr8xFpGnOxn6GhTEHx3SjRrZEoU+j04prX1ktg==" + }, "node_modules/minimatch": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", @@ -11124,6 +11738,43 @@ "resolved": "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz", "integrity": "sha1-h6kGXNs1XTGC2PlM4RGIuCXGijs=" }, + "node_modules/node-polyfill-webpack-plugin": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/node-polyfill-webpack-plugin/-/node-polyfill-webpack-plugin-1.1.4.tgz", + "integrity": "sha512-Z0XTKj1wRWO8o/Vjobsw5iOJCN+Sua3EZEUc2Ziy9CyVvmHKu6o+t4gUH9GOE0czyPR94LI6ZCV/PpcM8b5yow==", + "dependencies": { + "assert": "^2.0.0", + "browserify-zlib": "^0.2.0", + "buffer": "^6.0.3", + "console-browserify": "^1.2.0", + "constants-browserify": "^1.0.0", + "crypto-browserify": "^3.12.0", + "domain-browser": "^4.19.0", + "events": "^3.3.0", + "filter-obj": "^2.0.2", + "https-browserify": "^1.0.0", + "os-browserify": "^0.3.0", + "path-browserify": "^1.0.1", + "process": "^0.11.10", + "punycode": "^2.1.1", + "querystring-es3": "^0.2.1", + "readable-stream": "^3.6.0", + "stream-browserify": "^3.0.0", + "stream-http": "^3.2.0", + "string_decoder": "^1.3.0", + "timers-browserify": "^2.0.12", + "tty-browserify": "^0.0.1", + "url": "^0.11.0", + "util": "^0.12.4", + "vm-browserify": "^1.1.2" + }, + "engines": { + "node": ">=10" + }, + "peerDependencies": { + "webpack": ">=5" + } + }, "node_modules/node-releases": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.2.tgz", @@ -11398,6 +12049,11 @@ "node": ">= 0.8.0" } }, + "node_modules/os-browserify": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/os-browserify/-/os-browserify-0.3.0.tgz", + "integrity": "sha512-gjcpUc3clBf9+210TRaDWbf+rZZZEshZ+DlXMRCeAjp0xhTrnQsKHypIy1J3d5hKdUzj69t708EHtU8P6bUn0A==" + }, "node_modules/p-limit": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", @@ -11460,6 +12116,11 @@ "node": ">=6" } }, + "node_modules/pako": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz", + "integrity": "sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==" + }, "node_modules/param-case": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/param-case/-/param-case-3.0.4.tgz", @@ -11480,6 +12141,18 @@ "node": ">=6" } }, + "node_modules/parse-asn1": { + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.6.tgz", + "integrity": "sha512-RnZRo1EPU6JBnra2vGHj0yhp6ebyjBZpmUCLHWiFhxlzvBCCpAuZ7elsBp1PVAbQN0/04VD/19rfzlBSwLstMw==", + "dependencies": { + "asn1.js": "^5.2.0", + "browserify-aes": "^1.0.0", + "evp_bytestokey": "^1.0.0", + "pbkdf2": "^3.0.3", + "safe-buffer": "^5.1.1" + } + }, "node_modules/parse-json": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", @@ -11519,6 +12192,11 @@ "tslib": "^2.0.3" } }, + "node_modules/path-browserify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-1.0.1.tgz", + "integrity": "sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==" + }, "node_modules/path-exists": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", @@ -11561,6 +12239,21 @@ "node": ">=8" } }, + "node_modules/pbkdf2": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.1.2.tgz", + "integrity": "sha512-iuh7L6jA7JEGu2WxDwtQP1ddOpaJNC4KlDEFfdQajSGgGPNi4OyDc2R7QnbY2bR9QjBVGwgvTdNJZoE7RaxUMA==", + "dependencies": { + "create-hash": "^1.1.2", + "create-hmac": "^1.1.4", + "ripemd160": "^2.0.1", + "safe-buffer": "^5.0.1", + "sha.js": "^2.4.8" + }, + "engines": { + "node": ">=0.12" + } + }, "node_modules/performance-now": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", @@ -12834,6 +13527,14 @@ "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, + "node_modules/process": { + "version": "0.11.10", + "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", + "integrity": "sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==", + "engines": { + "node": ">= 0.6.0" + } + }, "node_modules/process-nextick-args": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", @@ -12899,6 +13600,24 @@ "resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz", "integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ==" }, + "node_modules/public-encrypt": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.3.tgz", + "integrity": "sha512-zVpa8oKZSz5bTMTFClc1fQOnyyEzpl5ozpi1B5YcvBrdohMjH2rfsBtyXcuNuwjsDIXmBYlF2N5FlJYhR29t8Q==", + "dependencies": { + "bn.js": "^4.1.0", + "browserify-rsa": "^4.0.0", + "create-hash": "^1.1.0", + "parse-asn1": "^5.0.0", + "randombytes": "^2.0.1", + "safe-buffer": "^5.1.2" + } + }, + "node_modules/public-encrypt/node_modules/bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" + }, "node_modules/punycode": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", @@ -12927,6 +13646,23 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/querystring": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", + "integrity": "sha512-X/xY82scca2tau62i9mDyU9K+I+djTMUsvwf7xnUX5GLvVzgJybOJf4Y6o9Zx3oJK/LSXg5tTZBjwzqVPaPO2g==", + "deprecated": "The querystring API is considered Legacy. new code should use the URLSearchParams API instead.", + "engines": { + "node": ">=0.4.x" + } + }, + "node_modules/querystring-es3": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/querystring-es3/-/querystring-es3-0.2.1.tgz", + "integrity": "sha512-773xhDQnZBMFobEiztv8LIl70ch5MSF/jUQVlhwFyBILqq96anmoctVIYz+ZRp0qbCKATTn6ev02M3r7Ga5vqA==", + "engines": { + "node": ">=0.4.x" + } + }, "node_modules/queue-microtask": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", @@ -12973,6 +13709,15 @@ "safe-buffer": "^5.1.0" } }, + "node_modules/randomfill": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/randomfill/-/randomfill-1.0.4.tgz", + "integrity": "sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw==", + "dependencies": { + "randombytes": "^2.0.5", + "safe-buffer": "^5.1.0" + } + }, "node_modules/range-parser": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", @@ -13355,12 +14100,13 @@ "integrity": "sha512-jbD/FT0+9MBU2XAZluI7w2OBs1RBi6p9M83nkoZayQXXU9e8Robt69FcZc7wU4eJD/YFTjn1JdCk3rbMJajz8Q==" }, "node_modules/regexp.prototype.flags": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.4.1.tgz", - "integrity": "sha512-pMR7hBVUUGI7PMA37m2ofIdQCsomVnas+Jn5UPGAHQ+/LlwKm/aTLJHdasmHRzlfeZwHiAOaRSo2rbBDm3nNUQ==", + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.4.3.tgz", + "integrity": "sha512-fjggEOO3slI6Wvgjwflkc4NFRCTZAu5CnNfBd5qOMYhWdn67nJBBu34/TkD++eeFmd8C9r9jfXJ27+nSiRkSUA==", "dependencies": { "call-bind": "^1.0.2", - "define-properties": "^1.1.3" + "define-properties": "^1.1.3", + "functions-have-names": "^1.2.2" }, "engines": { "node": ">= 0.4" @@ -13591,6 +14337,15 @@ "url": "https://github.com/sponsors/isaacs" } }, + "node_modules/ripemd160": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz", + "integrity": "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==", + "dependencies": { + "hash-base": "^3.0.0", + "inherits": "^2.0.1" + } + }, "node_modules/rollup": { "version": "2.67.3", "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.67.3.tgz", @@ -13922,11 +14677,28 @@ "node": ">= 0.8.0" } }, + "node_modules/setimmediate": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", + "integrity": "sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA==" + }, "node_modules/setprototypeof": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==" }, + "node_modules/sha.js": { + "version": "2.4.11", + "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", + "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", + "dependencies": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + }, + "bin": { + "sha.js": "bin.js" + } + }, "node_modules/shebang-command": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", @@ -14141,6 +14913,26 @@ "node": ">= 0.6" } }, + "node_modules/stream-browserify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-3.0.0.tgz", + "integrity": "sha512-H73RAHsVBapbim0tU2JwwOiXUj+fikfiaoYAKHF3VJfA0pe2BCzkhAHBlLG6REzE+2WNZcxOXjK7lkso+9euLA==", + "dependencies": { + "inherits": "~2.0.4", + "readable-stream": "^3.5.0" + } + }, + "node_modules/stream-http": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/stream-http/-/stream-http-3.2.0.tgz", + "integrity": "sha512-Oq1bLqisTyK3TSCXpPbT4sdeYNdmyZJv1LxpEm2vu1ZhK89kSE5YXwZc3cWk0MagGaKriBh9mCFbVGtO+vY29A==", + "dependencies": { + "builtin-status-codes": "^3.0.0", + "inherits": "^2.0.4", + "readable-stream": "^3.6.0", + "xtend": "^4.0.2" + } + }, "node_modules/string_decoder": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", @@ -14222,24 +15014,26 @@ } }, "node_modules/string.prototype.trimend": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.4.tgz", - "integrity": "sha512-y9xCjw1P23Awk8EvTpcyL2NIr1j7wJ39f+k6lvRnSMz+mz9CGz9NYPelDk42kOz6+ql8xjfK8oYzy3jAP5QU5A==", + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.5.tgz", + "integrity": "sha512-I7RGvmjV4pJ7O3kdf+LXFpVfdNOxtCW/2C8f6jNiW4+PQchwxkCDzlk1/7p+Wl4bqFIZeF47qAHXLuHHWKAxog==", "dependencies": { "call-bind": "^1.0.2", - "define-properties": "^1.1.3" + "define-properties": "^1.1.4", + "es-abstract": "^1.19.5" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/string.prototype.trimstart": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.4.tgz", - "integrity": "sha512-jh6e984OBfvxS50tdY2nRZnoC5/mLFKOREQfw8t5yytkoUsJRNxvI/E39qu1sD0OtWI3OC0XgKSmcWwziwYuZw==", + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.5.tgz", + "integrity": "sha512-THx16TJCGlsN0o6dl2o6ncWUsdgnLRSA23rRE5pyGBw/mLr3Ej/R2LaqCtgP8VNMGZsvMWnf9ooZPyY2bHvUFg==", "dependencies": { "call-bind": "^1.0.2", - "define-properties": "^1.1.3" + "define-properties": "^1.1.4", + "es-abstract": "^1.19.5" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -14749,6 +15543,17 @@ "resolved": "https://registry.npmjs.org/thunky/-/thunky-1.1.0.tgz", "integrity": "sha512-eHY7nBftgThBqOyHGVN+l8gF0BucP09fMo0oO/Lb0w1OF80dJv+lDVpXG60WMQvkcxAkNybKsrEIE3ZtKGmPrA==" }, + "node_modules/timers-browserify": { + "version": "2.0.12", + "resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-2.0.12.tgz", + "integrity": "sha512-9phl76Cqm6FhSX9Xe1ZUAMLtm1BLkKj2Qd5ApyWkXzsMRaA7dgr81kf4wJmQf/hAvg8EEyJxDo3du/0KlhPiKQ==", + "dependencies": { + "setimmediate": "^1.0.4" + }, + "engines": { + "node": ">=0.6.0" + } + }, "node_modules/timsort": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/timsort/-/timsort-0.3.0.tgz", @@ -14823,6 +15628,17 @@ "resolved": "https://registry.npmjs.org/tryer/-/tryer-1.0.1.tgz", "integrity": "sha512-c3zayb8/kWWpycWYg87P71E1S1ZL6b6IJxfb5fvsUgsf0S2MVGaDhDXXjDMpdCpfWXqptc+4mXwmiy1ypXqRAA==" }, + "node_modules/ts-protoc-gen": { + "version": "0.15.0", + "resolved": "https://registry.npmjs.org/ts-protoc-gen/-/ts-protoc-gen-0.15.0.tgz", + "integrity": "sha512-TycnzEyrdVDlATJ3bWFTtra3SCiEP0W0vySXReAuEygXCUr1j2uaVyL0DhzjwuUdQoW5oXPwk6oZWeA0955V+g==", + "dependencies": { + "google-protobuf": "^3.15.5" + }, + "bin": { + "protoc-gen-ts": "bin/protoc-gen-ts" + } + }, "node_modules/tsconfig-paths": { "version": "3.12.0", "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.12.0.tgz", @@ -14877,6 +15693,11 @@ "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" }, + "node_modules/tty-browserify": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.1.tgz", + "integrity": "sha512-C3TaO7K81YvjCgQH9Q1S3R3P3BtN3RIM8n+OvX4il1K1zgE8ZhI0op7kClgkxtutIE8hQrcrHBXvIheqKUUCxw==" + }, "node_modules/type-check": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", @@ -14941,13 +15762,13 @@ } }, "node_modules/unbox-primitive": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.1.tgz", - "integrity": "sha512-tZU/3NqK3dA5gpE1KtyiJUrEB0lxnGkMFHptJ7q6ewdZ8s12QrODwNbhIJStmJkd1QDXa1NRA8aF2A1zk/Ypyw==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.2.tgz", + "integrity": "sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==", "dependencies": { - "function-bind": "^1.1.1", - "has-bigints": "^1.0.1", - "has-symbols": "^1.0.2", + "call-bind": "^1.0.2", + "has-bigints": "^1.0.2", + "has-symbols": "^1.0.3", "which-boxed-primitive": "^1.0.2" }, "funding": { @@ -15039,6 +15860,33 @@ "punycode": "^2.1.0" } }, + "node_modules/url": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/url/-/url-0.11.0.tgz", + "integrity": "sha512-kbailJa29QrtXnxgq+DdCEGlbTeYM2eJUxsz6vjZavrCYPMIFHMKQmSKYAIuUK2i7hgPm28a8piX5NTUtM/LKQ==", + "dependencies": { + "punycode": "1.3.2", + "querystring": "0.2.0" + } + }, + "node_modules/url/node_modules/punycode": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz", + "integrity": "sha512-RofWgt/7fL5wP1Y7fxE7/EmTLzQVnB0ycyibJ0OOHIlJqTNzglYFxVwETOcIoJqJmpDXJ9xImDv+Fq34F/d4Dw==" + }, + "node_modules/util": { + "version": "0.12.4", + "resolved": "https://registry.npmjs.org/util/-/util-0.12.4.tgz", + "integrity": "sha512-bxZ9qtSlGUWSOy9Qa9Xgk11kSslpuZwaxCg4sNIDj6FLucDab2JxnHwyNTCpHMtK1MjoQiWQ6DiUMZYbSrO+Sw==", + "dependencies": { + "inherits": "^2.0.3", + "is-arguments": "^1.0.4", + "is-generator-function": "^1.0.7", + "is-typed-array": "^1.1.3", + "safe-buffer": "^5.1.2", + "which-typed-array": "^1.1.2" + } + }, "node_modules/util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", @@ -15113,6 +15961,11 @@ "node": ">= 0.8" } }, + "node_modules/vm-browserify": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-1.1.2.tgz", + "integrity": "sha512-2ham8XPWTONajOR0ohOKOHXkm3+gaBmGut3SRuu75xLd/RRaY6vqgh8NBYYk7+RW3u5AtzPQZG8F10LHkl0lAQ==" + }, "node_modules/w3c-hr-time": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/w3c-hr-time/-/w3c-hr-time-1.0.2.tgz", @@ -15590,6 +16443,25 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/which-typed-array": { + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.8.tgz", + "integrity": "sha512-Jn4e5PItbcAHyLoRDwvPj1ypu27DJbtdYXUa5zsinrUx77Uvfb0cXwwnGMTn7cjUfhhqgVQnVJCwF+7cgU7tpw==", + "dependencies": { + "available-typed-arrays": "^1.0.5", + "call-bind": "^1.0.2", + "es-abstract": "^1.20.0", + "for-each": "^0.3.3", + "has-tostringtag": "^1.0.0", + "is-typed-array": "^1.1.9" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/word-wrap": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", @@ -17423,6 +18295,14 @@ "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz", "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==" }, + "@improbable-eng/grpc-web": { + "version": "0.15.0", + "resolved": "https://registry.npmjs.org/@improbable-eng/grpc-web/-/grpc-web-0.15.0.tgz", + "integrity": "sha512-ERft9/0/8CmYalqOVnJnpdDry28q+j+nAlFFARdjyxXDJ+Mhgv9+F600QC8BR9ygOfrXRlAk6CvST2j+JCpQPg==", + "requires": { + "browser-headers": "^0.4.1" + } + }, "@istanbuljs/load-nyc-config": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", @@ -17921,6 +18801,29 @@ "@jridgewell/sourcemap-codec": "^1.4.10" } }, + "@lightninglabs/lnc-web": { + "version": "0.0.1-alpha.rc1", + "resolved": "https://registry.npmjs.org/@lightninglabs/lnc-web/-/lnc-web-0.0.1-alpha.rc1.tgz", + "integrity": "sha512-QWQRYp+DideNpbOsi3fbMdjKqXa11Jl7EW9oCJSrJ87x6Ghptec9hCspc/xtJOTdtvoyh7I3CVvkx+pxa4KjyQ==", + "requires": { + "@improbable-eng/grpc-web": "0.15.0", + "@types/big.js": "6.1.2", + "@types/google-protobuf": "3.15.5", + "big.js": "6.1.1", + "crypto-js": "4.1.1", + "google-protobuf": "3.19.4", + "lodash": "4.17.21", + "node-polyfill-webpack-plugin": "1.1.4", + "ts-protoc-gen": "0.15.0" + }, + "dependencies": { + "big.js": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/big.js/-/big.js-6.1.1.tgz", + "integrity": "sha512-1vObw81a8ylZO5ePrtMay0n018TcftpTA5HFKDaSuiUDBo8biRBtjIobw60OpwuvrGk+FsxKamqN4cnmj/eXdg==" + } + } + }, "@nodelib/fs.scandir": { "version": "2.1.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", @@ -18357,6 +19260,11 @@ "@babel/types": "^7.3.0" } }, + "@types/big.js": { + "version": "6.1.2", + "resolved": "https://registry.npmjs.org/@types/big.js/-/big.js-6.1.2.tgz", + "integrity": "sha512-h24JIZ52rvSvi2jkpYDk2yLH99VzZoCJiSfDWwjst7TwJVuXN61XVCUlPCzRl7mxKEMsGf8z42Q+J4TZwU3z2w==" + }, "@types/body-parser": { "version": "1.19.2", "resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.2.tgz", @@ -18435,6 +19343,11 @@ "@types/range-parser": "*" } }, + "@types/google-protobuf": { + "version": "3.15.5", + "resolved": "https://registry.npmjs.org/@types/google-protobuf/-/google-protobuf-3.15.5.tgz", + "integrity": "sha512-6bgv24B+A2bo9AfzReeg5StdiijKzwwnRflA8RLd1V4Yv995LeTmo0z69/MPbBDFSiZWdZHQygLo/ccXhMEDgw==" + }, "@types/graceful-fs": { "version": "4.1.5", "resolved": "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.5.tgz", @@ -19135,6 +20048,35 @@ "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz", "integrity": "sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY=" }, + "asn1.js": { + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-5.4.1.tgz", + "integrity": "sha512-+I//4cYPccV8LdmBLiX8CYvf9Sp3vQsrqu2QNXRcrbiWvcx/UdlFiqUJJzxRQxgsZmvhXhn4cSKeSmoFjVdupA==", + "requires": { + "bn.js": "^4.0.0", + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0", + "safer-buffer": "^2.1.0" + }, + "dependencies": { + "bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" + } + } + }, + "assert": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/assert/-/assert-2.0.0.tgz", + "integrity": "sha512-se5Cd+js9dXJnu6Ag2JFc00t+HmHOen+8Q+L7O9zI0PqQXr20uk2J0XQqMxZEeo5U50o8Nvmmx7dZrl+Ufr35A==", + "requires": { + "es6-object-assign": "^1.1.0", + "is-nan": "^1.2.1", + "object-is": "^1.0.1", + "util": "^0.12.0" + } + }, "ast-types-flow": { "version": "0.0.7", "resolved": "https://registry.npmjs.org/ast-types-flow/-/ast-types-flow-0.0.7.tgz", @@ -19176,6 +20118,11 @@ "postcss-value-parser": "^4.2.0" } }, + "available-typed-arrays": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz", + "integrity": "sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==" + }, "axe-core": { "version": "4.4.1", "resolved": "https://registry.npmjs.org/axe-core/-/axe-core-4.4.1.tgz", @@ -19429,6 +20376,11 @@ "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" }, + "base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==" + }, "batch": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/batch/-/batch-0.6.1.tgz", @@ -19460,6 +20412,11 @@ "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz", "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==" }, + "bn.js": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", + "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==" + }, "body-parser": { "version": "1.19.2", "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.19.2.tgz", @@ -19540,11 +20497,95 @@ "fill-range": "^7.0.1" } }, + "brorand": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", + "integrity": "sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w==" + }, + "browser-headers": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/browser-headers/-/browser-headers-0.4.1.tgz", + "integrity": "sha512-CA9hsySZVo9371qEHjHZtYxV2cFtVj5Wj/ZHi8ooEsrtm4vOnl9Y9HmyYWk9q+05d7K3rdoAE0j3MVEFVvtQtg==" + }, "browser-process-hrtime": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/browser-process-hrtime/-/browser-process-hrtime-1.0.0.tgz", "integrity": "sha512-9o5UecI3GhkpM6DrXr69PblIuWxPKk9Y0jHBRhdocZ2y7YECBFCsHm79Pr3OyR2AvjhDkabFJaDJMYRazHgsow==" }, + "browserify-aes": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz", + "integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==", + "requires": { + "buffer-xor": "^1.0.3", + "cipher-base": "^1.0.0", + "create-hash": "^1.1.0", + "evp_bytestokey": "^1.0.3", + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "browserify-cipher": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/browserify-cipher/-/browserify-cipher-1.0.1.tgz", + "integrity": "sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w==", + "requires": { + "browserify-aes": "^1.0.4", + "browserify-des": "^1.0.0", + "evp_bytestokey": "^1.0.0" + } + }, + "browserify-des": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/browserify-des/-/browserify-des-1.0.2.tgz", + "integrity": "sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A==", + "requires": { + "cipher-base": "^1.0.1", + "des.js": "^1.0.0", + "inherits": "^2.0.1", + "safe-buffer": "^5.1.2" + } + }, + "browserify-rsa": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.1.0.tgz", + "integrity": "sha512-AdEER0Hkspgno2aR97SAf6vi0y0k8NuOpGnVH3O99rcA5Q6sh8QxcngtHuJ6uXwnfAXNM4Gn1Gb7/MV1+Ymbog==", + "requires": { + "bn.js": "^5.0.0", + "randombytes": "^2.0.1" + } + }, + "browserify-sign": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.2.1.tgz", + "integrity": "sha512-/vrA5fguVAKKAVTNJjgSm1tRQDHUU6DbwO9IROu/0WAzC8PKhucDSh18J0RMvVeHAn5puMd+QHC2erPRNf8lmg==", + "requires": { + "bn.js": "^5.1.1", + "browserify-rsa": "^4.0.1", + "create-hash": "^1.2.0", + "create-hmac": "^1.1.7", + "elliptic": "^6.5.3", + "inherits": "^2.0.4", + "parse-asn1": "^5.1.5", + "readable-stream": "^3.6.0", + "safe-buffer": "^5.2.0" + }, + "dependencies": { + "safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" + } + } + }, + "browserify-zlib": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/browserify-zlib/-/browserify-zlib-0.2.0.tgz", + "integrity": "sha512-Z942RysHXmJrhqk88FmKBVq/v5tqmSkDz7p54G/MGyjMnCFFnC79XWNbg+Vta8W6Wb2qtSZTSxIGkJrRpCFEiA==", + "requires": { + "pako": "~1.0.5" + } + }, "browserslist": { "version": "4.19.3", "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.19.3.tgz", @@ -19565,6 +20606,15 @@ "node-int64": "^0.4.0" } }, + "buffer": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", + "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", + "requires": { + "base64-js": "^1.3.1", + "ieee754": "^1.2.1" + } + }, "buffer-from": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", @@ -19575,11 +20625,21 @@ "resolved": "https://registry.npmjs.org/buffer-indexof/-/buffer-indexof-1.1.1.tgz", "integrity": "sha512-4/rOEg86jivtPTeOUUT61jJO1Ya1TrR/OkqCSZDyq84WJh3LuuiphBYJN+fm5xufIk4XAFcEwte/8WzC8If/1g==" }, + "buffer-xor": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz", + "integrity": "sha512-571s0T7nZWK6vB67HI5dyUF7wXiNcfaPPPTl6zYCNApANjIvYJTg7hlud/+cJpdAhS7dVzqMLmfhfHR3rAcOjQ==" + }, "builtin-modules": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-3.2.0.tgz", "integrity": "sha512-lGzLKcioL90C7wMczpkY0n/oART3MbBa8R9OFGE1rJxoVI86u4WAGfEk8Wjv10eKSyTHVGkSo3bvBylCEtk7LA==" }, + "builtin-status-codes": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz", + "integrity": "sha512-HpGFw18DgFWlncDfjTa2rcQ4W88O1mC8e8yZ2AvQY5KDaktSTwo+KRf6nHK6FRI5FyRyb/5T6+TSxfP7QyGsmQ==" + }, "bytes": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz", @@ -19699,6 +20759,15 @@ "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.3.0.tgz", "integrity": "sha512-riT/3vI5YpVH6/qomlDnJow6TBee2PBKSEpx3O32EGPYbWGIRsIlGRms3Sm74wYE1JMo8RnO04Hb12+v1J5ICw==" }, + "cipher-base": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz", + "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==", + "requires": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, "cjs-module-lexer": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-1.2.2.tgz", @@ -19857,6 +20926,16 @@ "resolved": "https://registry.npmjs.org/connect-history-api-fallback/-/connect-history-api-fallback-1.6.0.tgz", "integrity": "sha512-e54B99q/OUoH64zYYRf3HBP5z24G38h5D3qXu23JGRoigpX5Ss4r9ZnDk3g0Z8uQC2x2lPaJ+UlWBc1ZWBWdLg==" }, + "console-browserify": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.2.0.tgz", + "integrity": "sha512-ZMkYO/LkF17QvCPqM0gxw8yUzigAOZOSWSHg91FH6orS7vcEj5dVZTidN2fQ14yBSdg97RqhSNwLUXInd52OTA==" + }, + "constants-browserify": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/constants-browserify/-/constants-browserify-1.0.0.tgz", + "integrity": "sha512-xFxOwqIzR/e1k1gLiWEophSCMqXcwVHIH7akf7b/vxcUeGunlj3hvZaaqxwHsTgn+IndtkQJgSztIDWeumWJDQ==" + }, "content-disposition": { "version": "0.5.4", "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", @@ -19938,6 +21017,47 @@ "yaml": "^1.10.0" } }, + "create-ecdh": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.4.tgz", + "integrity": "sha512-mf+TCx8wWc9VpuxfP2ht0iSISLZnt0JgWlrOKZiNqyUZWnjIaCIVNQArMHnCZKfEYRg6IM7A+NeJoN8gf/Ws0A==", + "requires": { + "bn.js": "^4.1.0", + "elliptic": "^6.5.3" + }, + "dependencies": { + "bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" + } + } + }, + "create-hash": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz", + "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==", + "requires": { + "cipher-base": "^1.0.1", + "inherits": "^2.0.1", + "md5.js": "^1.3.4", + "ripemd160": "^2.0.1", + "sha.js": "^2.4.0" + } + }, + "create-hmac": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz", + "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==", + "requires": { + "cipher-base": "^1.0.3", + "create-hash": "^1.1.0", + "inherits": "^2.0.1", + "ripemd160": "^2.0.0", + "safe-buffer": "^5.0.1", + "sha.js": "^2.4.8" + } + }, "cross-spawn": { "version": "7.0.3", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", @@ -19948,6 +21068,29 @@ "which": "^2.0.1" } }, + "crypto-browserify": { + "version": "3.12.0", + "resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.12.0.tgz", + "integrity": "sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg==", + "requires": { + "browserify-cipher": "^1.0.0", + "browserify-sign": "^4.0.0", + "create-ecdh": "^4.0.0", + "create-hash": "^1.1.0", + "create-hmac": "^1.1.0", + "diffie-hellman": "^5.0.0", + "inherits": "^2.0.1", + "pbkdf2": "^3.0.3", + "public-encrypt": "^4.0.0", + "randombytes": "^2.0.0", + "randomfill": "^1.0.3" + } + }, + "crypto-js": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-4.1.1.tgz", + "integrity": "sha512-o2JlM7ydqd3Qk9CA0L4NL6mTzU2sdx96a+oOfPu8Mkl/PK51vSyoi8/rQ8NknZtk44vq15lmhAj9CIAGwgeWKw==" + }, "crypto-random-string": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-2.0.0.tgz", @@ -20304,11 +21447,12 @@ "integrity": "sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og==" }, "define-properties": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", - "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.4.tgz", + "integrity": "sha512-uckOqKcfaVvtBdsVkdPv3XjveQJsNQqmhXgRi8uhvWWuPYZCNlzT8qAyblUgNoXdHdjMTzAqeGjAoli8f+bzPA==", "requires": { - "object-keys": "^1.0.12" + "has-property-descriptors": "^1.0.0", + "object-keys": "^1.1.1" } }, "defined": { @@ -20341,6 +21485,15 @@ "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=" }, + "des.js": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.0.1.tgz", + "integrity": "sha512-Q0I4pfFrv2VPd34/vfLrFOoRmlYj3OV50i7fskps1jZWK1kApMWWT9G6RRUeYedLcBDIhnSDaUvJMb3AhUlaEA==", + "requires": { + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0" + } + }, "destroy": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz", @@ -20400,6 +21553,23 @@ "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-27.5.1.tgz", "integrity": "sha512-k1gCAXAsNgLwEL+Y8Wvl+M6oEFj5bgazfZULpS5CneoPPXRaCCW7dm+q21Ky2VEE5X+VeRDBVg1Pcvvsr4TtNQ==" }, + "diffie-hellman": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz", + "integrity": "sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==", + "requires": { + "bn.js": "^4.1.0", + "miller-rabin": "^4.0.0", + "randombytes": "^2.0.0" + }, + "dependencies": { + "bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" + } + } + }, "dir-glob": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", @@ -20466,6 +21636,11 @@ "entities": "^2.0.0" } }, + "domain-browser": { + "version": "4.22.0", + "resolved": "https://registry.npmjs.org/domain-browser/-/domain-browser-4.22.0.tgz", + "integrity": "sha512-IGBwjF7tNk3cwypFNH/7bfzBcgSCbaMOD3GsaY1AU/JRrnHnYgEM0+9kQt52iZxjNsjBtJYtao146V+f8jFZNw==" + }, "domelementtype": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.2.0.tgz", @@ -20546,6 +21721,27 @@ "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.71.tgz", "integrity": "sha512-Hk61vXXKRb2cd3znPE9F+2pLWdIOmP7GjiTj45y6L3W/lO+hSnUSUhq+6lEaERWBdZOHbk2s3YV5c9xVl3boVw==" }, + "elliptic": { + "version": "6.5.4", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.4.tgz", + "integrity": "sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ==", + "requires": { + "bn.js": "^4.11.9", + "brorand": "^1.1.0", + "hash.js": "^1.0.0", + "hmac-drbg": "^1.0.1", + "inherits": "^2.0.4", + "minimalistic-assert": "^1.0.1", + "minimalistic-crypto-utils": "^1.0.1" + }, + "dependencies": { + "bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" + } + } + }, "emittery": { "version": "0.8.1", "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.8.1.tgz", @@ -20597,30 +21793,33 @@ } }, "es-abstract": { - "version": "1.19.1", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.19.1.tgz", - "integrity": "sha512-2vJ6tjA/UfqLm2MPs7jxVybLoB8i1t1Jd9R3kISld20sIxPcTbLuggQOUxeWeAvIUkduv/CfMjuh4WmiXr2v9w==", + "version": "1.20.1", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.20.1.tgz", + "integrity": "sha512-WEm2oBhfoI2sImeM4OF2zE2V3BYdSF+KnSi9Sidz51fQHd7+JuF8Xgcj9/0o+OWeIeIS/MiuNnlruQrJf16GQA==", "requires": { "call-bind": "^1.0.2", "es-to-primitive": "^1.2.1", "function-bind": "^1.1.1", + "function.prototype.name": "^1.1.5", "get-intrinsic": "^1.1.1", "get-symbol-description": "^1.0.0", "has": "^1.0.3", - "has-symbols": "^1.0.2", + "has-property-descriptors": "^1.0.0", + "has-symbols": "^1.0.3", "internal-slot": "^1.0.3", "is-callable": "^1.2.4", - "is-negative-zero": "^2.0.1", + "is-negative-zero": "^2.0.2", "is-regex": "^1.1.4", - "is-shared-array-buffer": "^1.0.1", + "is-shared-array-buffer": "^1.0.2", "is-string": "^1.0.7", - "is-weakref": "^1.0.1", - "object-inspect": "^1.11.0", + "is-weakref": "^1.0.2", + "object-inspect": "^1.12.0", "object-keys": "^1.1.1", "object.assign": "^4.1.2", - "string.prototype.trimend": "^1.0.4", - "string.prototype.trimstart": "^1.0.4", - "unbox-primitive": "^1.0.1" + "regexp.prototype.flags": "^1.4.3", + "string.prototype.trimend": "^1.0.5", + "string.prototype.trimstart": "^1.0.5", + "unbox-primitive": "^1.0.2" } }, "es-module-lexer": { @@ -20638,6 +21837,11 @@ "is-symbol": "^1.0.2" } }, + "es6-object-assign": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/es6-object-assign/-/es6-object-assign-1.1.0.tgz", + "integrity": "sha512-MEl9uirslVwqQU369iHNWZXsI8yaZYGg/D65aOgZkeyFJwHYSxilf7rQzXKI7DdDuBPrBXbfk3sl9hJhmd5AUw==" + }, "escalade": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", @@ -21168,6 +22372,15 @@ "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==" }, + "evp_bytestokey": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz", + "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==", + "requires": { + "md5.js": "^1.3.4", + "safe-buffer": "^5.1.1" + } + }, "execa": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", @@ -21361,6 +22574,11 @@ "to-regex-range": "^5.0.1" } }, + "filter-obj": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/filter-obj/-/filter-obj-2.0.2.tgz", + "integrity": "sha512-lO3ttPjHZRfjMcxWKb1j1eDhTFsu4meeR3lnMcnBFhk6RuLhvEiuALu2TlfL310ph4lCYYwgF/ElIjdP739tdg==" + }, "finalhandler": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.2.tgz", @@ -21428,6 +22646,14 @@ "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.9.tgz", "integrity": "sha512-MQDfihBQYMcyy5dhRDJUHcw7lb2Pv/TuE6xP1vyraLukNDHKbDxDNaOE3NbCAdKQApno+GPRyo1YAp89yCjK4w==" }, + "for-each": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", + "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", + "requires": { + "is-callable": "^1.1.3" + } + }, "fork-ts-checker-webpack-plugin": { "version": "6.5.0", "resolved": "https://registry.npmjs.org/fork-ts-checker-webpack-plugin/-/fork-ts-checker-webpack-plugin-6.5.0.tgz", @@ -21587,11 +22813,27 @@ "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" }, + "function.prototype.name": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.5.tgz", + "integrity": "sha512-uN7m/BzVKQnCUF/iW8jYea67v++2u7m5UgENbHRtdDVclOUP+FMPlCNdmk0h/ysGyo2tavMJEDqJAkJdRa1vMA==", + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3", + "es-abstract": "^1.19.0", + "functions-have-names": "^1.2.2" + } + }, "functional-red-black-tree": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=" }, + "functions-have-names": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", + "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==" + }, "gensync": { "version": "1.0.0-beta.2", "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", @@ -21708,6 +22950,11 @@ "slash": "^3.0.0" } }, + "google-protobuf": { + "version": "3.19.4", + "resolved": "https://registry.npmjs.org/google-protobuf/-/google-protobuf-3.19.4.tgz", + "integrity": "sha512-OIPNCxsG2lkIvf+P5FNfJ/Km95CsXOBecS9ZcAU6m2Rq3svc0Apl9nB3GMDNKfQ9asNv4KjyAqGwPQFrVle3Yg==" + }, "graceful-fs": { "version": "4.2.9", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.9.tgz", @@ -21740,19 +22987,27 @@ } }, "has-bigints": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.1.tgz", - "integrity": "sha512-LSBS2LjbNBTf6287JEbEzvJgftkF5qFkmCo9hDRpAzKhUOlJ+hx8dd4USs00SgsUNwc4617J9ki5YtEClM2ffA==" + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz", + "integrity": "sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==" }, "has-flag": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=" }, + "has-property-descriptors": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz", + "integrity": "sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==", + "requires": { + "get-intrinsic": "^1.1.1" + } + }, "has-symbols": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.2.tgz", - "integrity": "sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw==" + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==" }, "has-tostringtag": { "version": "1.0.0", @@ -21762,11 +23017,47 @@ "has-symbols": "^1.0.2" } }, + "hash-base": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.1.0.tgz", + "integrity": "sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA==", + "requires": { + "inherits": "^2.0.4", + "readable-stream": "^3.6.0", + "safe-buffer": "^5.2.0" + }, + "dependencies": { + "safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" + } + } + }, + "hash.js": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz", + "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", + "requires": { + "inherits": "^2.0.3", + "minimalistic-assert": "^1.0.1" + } + }, "he": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==" }, + "hmac-drbg": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", + "integrity": "sha512-Tti3gMqLdZfhOQY1Mzf/AanLiqh1WTiJgEj26ZuYQ9fbkLomzGchCws4FyrSd4VkpBfiNhaE1On+lOz894jvXg==", + "requires": { + "hash.js": "^1.0.3", + "minimalistic-assert": "^1.0.0", + "minimalistic-crypto-utils": "^1.0.1" + } + }, "hoopy": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/hoopy/-/hoopy-0.1.4.tgz", @@ -21916,6 +23207,11 @@ "micromatch": "^4.0.2" } }, + "https-browserify": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/https-browserify/-/https-browserify-1.0.0.tgz", + "integrity": "sha512-J+FkSdyD+0mA0N+81tMotaRMfSL9SGi+xpD3T6YApKsc3bGSXJlfXri3VyFOeYkfLRQisDk1W+jIFFKBeUBbBg==" + }, "https-proxy-agent": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.0.tgz", @@ -21957,6 +23253,11 @@ "harmony-reflect": "^1.4.6" } }, + "ieee754": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==" + }, "ignore": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.0.tgz", @@ -22121,6 +23422,14 @@ "resolved": "https://registry.npmjs.org/is-generator-fn/-/is-generator-fn-2.1.0.tgz", "integrity": "sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ==" }, + "is-generator-function": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.0.10.tgz", + "integrity": "sha512-jsEjy9l3yiXEQ+PsXdmBwEPcOxaXWLspKdplFUVI9vq1iZgIekeC0L167qeu86czQaxed3q/Uzuw0swL0irL8A==", + "requires": { + "has-tostringtag": "^1.0.0" + } + }, "is-glob": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", @@ -22134,6 +23443,15 @@ "resolved": "https://registry.npmjs.org/is-module/-/is-module-1.0.0.tgz", "integrity": "sha1-Mlj7afeMFNW4FdZkM2tM/7ZEFZE=" }, + "is-nan": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/is-nan/-/is-nan-1.3.2.tgz", + "integrity": "sha512-E+zBKpQ2t6MEo1VsonYmluk9NxGrbzpeeLC2xIViuO2EjU2xsXsBPwTr3Ykv9l08UYEVEdWeRZNouaZqF6RN0w==", + "requires": { + "call-bind": "^1.0.0", + "define-properties": "^1.1.3" + } + }, "is-negative-zero": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.2.tgz", @@ -22145,9 +23463,9 @@ "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==" }, "is-number-object": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.6.tgz", - "integrity": "sha512-bEVOqiRcvo3zO1+G2lVMy+gkkEm9Yh7cDMRusKKu5ZJKPUYSJwICTKZrNKHA2EbSP0Tu0+6B/emsYNHZyn6K8g==", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.7.tgz", + "integrity": "sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==", "requires": { "has-tostringtag": "^1.0.0" } @@ -22197,9 +23515,12 @@ "integrity": "sha512-AGOriNp96vNBd3HtU+RzFEc75FfR5ymiYv8E553I71SCeXBiMsVDUtdio1OEFvrPyLIQ9tVR5RxXIFe5PUFjMg==" }, "is-shared-array-buffer": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.1.tgz", - "integrity": "sha512-IU0NmyknYZN0rChcKhRO1X8LYz5Isj/Fsqh8NJOSf+N/hCOTwy29F32Ik7a+QszE63IdvmwdTPDd6cZ5pg4cwA==" + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz", + "integrity": "sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA==", + "requires": { + "call-bind": "^1.0.2" + } }, "is-stream": { "version": "2.0.1", @@ -22222,6 +23543,18 @@ "has-symbols": "^1.0.2" } }, + "is-typed-array": { + "version": "1.1.9", + "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.9.tgz", + "integrity": "sha512-kfrlnTTn8pZkfpJMUgYD7YZ3qzeJgWUn8XfVYBARc4wnmNOmLbmuuaAs3q5fvB0UJOn6yHAKaGTPM7d6ezoD/A==", + "requires": { + "available-typed-arrays": "^1.0.5", + "call-bind": "^1.0.2", + "es-abstract": "^1.20.0", + "for-each": "^0.3.3", + "has-tostringtag": "^1.0.0" + } + }, "is-typedarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", @@ -23832,6 +25165,16 @@ "tmpl": "1.0.5" } }, + "md5.js": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz", + "integrity": "sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==", + "requires": { + "hash-base": "^3.0.0", + "inherits": "^2.0.1", + "safe-buffer": "^5.1.2" + } + }, "mdn-data": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.4.tgz", @@ -23879,6 +25222,22 @@ "picomatch": "^2.2.3" } }, + "miller-rabin": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/miller-rabin/-/miller-rabin-4.0.1.tgz", + "integrity": "sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA==", + "requires": { + "bn.js": "^4.0.0", + "brorand": "^1.0.1" + }, + "dependencies": { + "bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" + } + } + }, "mime": { "version": "1.6.0", "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", @@ -23957,6 +25316,11 @@ "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==" }, + "minimalistic-crypto-utils": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", + "integrity": "sha512-JIYlbt6g8i5jKfJ3xz7rF0LXmv2TkDxBLUkiBeZ7bAx4GnnNMr8xFpGnOxn6GhTEHx3SjRrZEoU+j04prX1ktg==" + }, "minimatch": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", @@ -24036,6 +25400,37 @@ "resolved": "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz", "integrity": "sha1-h6kGXNs1XTGC2PlM4RGIuCXGijs=" }, + "node-polyfill-webpack-plugin": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/node-polyfill-webpack-plugin/-/node-polyfill-webpack-plugin-1.1.4.tgz", + "integrity": "sha512-Z0XTKj1wRWO8o/Vjobsw5iOJCN+Sua3EZEUc2Ziy9CyVvmHKu6o+t4gUH9GOE0czyPR94LI6ZCV/PpcM8b5yow==", + "requires": { + "assert": "^2.0.0", + "browserify-zlib": "^0.2.0", + "buffer": "^6.0.3", + "console-browserify": "^1.2.0", + "constants-browserify": "^1.0.0", + "crypto-browserify": "^3.12.0", + "domain-browser": "^4.19.0", + "events": "^3.3.0", + "filter-obj": "^2.0.2", + "https-browserify": "^1.0.0", + "os-browserify": "^0.3.0", + "path-browserify": "^1.0.1", + "process": "^0.11.10", + "punycode": "^2.1.1", + "querystring-es3": "^0.2.1", + "readable-stream": "^3.6.0", + "stream-browserify": "^3.0.0", + "stream-http": "^3.2.0", + "string_decoder": "^1.3.0", + "timers-browserify": "^2.0.12", + "tty-browserify": "^0.0.1", + "url": "^0.11.0", + "util": "^0.12.4", + "vm-browserify": "^1.1.2" + } + }, "node-releases": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.2.tgz", @@ -24223,6 +25618,11 @@ "word-wrap": "^1.2.3" } }, + "os-browserify": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/os-browserify/-/os-browserify-0.3.0.tgz", + "integrity": "sha512-gjcpUc3clBf9+210TRaDWbf+rZZZEshZ+DlXMRCeAjp0xhTrnQsKHypIy1J3d5hKdUzj69t708EHtU8P6bUn0A==" + }, "p-limit": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", @@ -24261,6 +25661,11 @@ "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==" }, + "pako": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz", + "integrity": "sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==" + }, "param-case": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/param-case/-/param-case-3.0.4.tgz", @@ -24278,6 +25683,18 @@ "callsites": "^3.0.0" } }, + "parse-asn1": { + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.6.tgz", + "integrity": "sha512-RnZRo1EPU6JBnra2vGHj0yhp6ebyjBZpmUCLHWiFhxlzvBCCpAuZ7elsBp1PVAbQN0/04VD/19rfzlBSwLstMw==", + "requires": { + "asn1.js": "^5.2.0", + "browserify-aes": "^1.0.0", + "evp_bytestokey": "^1.0.0", + "pbkdf2": "^3.0.3", + "safe-buffer": "^5.1.1" + } + }, "parse-json": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", @@ -24308,6 +25725,11 @@ "tslib": "^2.0.3" } }, + "path-browserify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-1.0.1.tgz", + "integrity": "sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==" + }, "path-exists": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", @@ -24338,6 +25760,18 @@ "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==" }, + "pbkdf2": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.1.2.tgz", + "integrity": "sha512-iuh7L6jA7JEGu2WxDwtQP1ddOpaJNC4KlDEFfdQajSGgGPNi4OyDc2R7QnbY2bR9QjBVGwgvTdNJZoE7RaxUMA==", + "requires": { + "create-hash": "^1.1.2", + "create-hmac": "^1.1.4", + "ripemd160": "^2.0.1", + "safe-buffer": "^5.0.1", + "sha.js": "^2.4.8" + } + }, "performance-now": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", @@ -25135,6 +26569,11 @@ } } }, + "process": { + "version": "0.11.10", + "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", + "integrity": "sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==" + }, "process-nextick-args": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", @@ -25195,6 +26634,26 @@ "resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz", "integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ==" }, + "public-encrypt": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.3.tgz", + "integrity": "sha512-zVpa8oKZSz5bTMTFClc1fQOnyyEzpl5ozpi1B5YcvBrdohMjH2rfsBtyXcuNuwjsDIXmBYlF2N5FlJYhR29t8Q==", + "requires": { + "bn.js": "^4.1.0", + "browserify-rsa": "^4.0.0", + "create-hash": "^1.1.0", + "parse-asn1": "^5.0.0", + "randombytes": "^2.0.1", + "safe-buffer": "^5.1.2" + }, + "dependencies": { + "bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" + } + } + }, "punycode": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", @@ -25210,6 +26669,16 @@ "resolved": "https://registry.npmjs.org/qs/-/qs-6.9.7.tgz", "integrity": "sha512-IhMFgUmuNpyRfxA90umL7ByLlgRXu6tIfKPpF5TmcfRLlLCckfP/g3IQmju6jjpu+Hh8rA+2p6A27ZSPOOHdKw==" }, + "querystring": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", + "integrity": "sha512-X/xY82scca2tau62i9mDyU9K+I+djTMUsvwf7xnUX5GLvVzgJybOJf4Y6o9Zx3oJK/LSXg5tTZBjwzqVPaPO2g==" + }, + "querystring-es3": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/querystring-es3/-/querystring-es3-0.2.1.tgz", + "integrity": "sha512-773xhDQnZBMFobEiztv8LIl70ch5MSF/jUQVlhwFyBILqq96anmoctVIYz+ZRp0qbCKATTn6ev02M3r7Ga5vqA==" + }, "queue-microtask": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", @@ -25236,6 +26705,15 @@ "safe-buffer": "^5.1.0" } }, + "randomfill": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/randomfill/-/randomfill-1.0.4.tgz", + "integrity": "sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw==", + "requires": { + "randombytes": "^2.0.5", + "safe-buffer": "^5.1.0" + } + }, "range-parser": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", @@ -25532,12 +27010,13 @@ "integrity": "sha512-jbD/FT0+9MBU2XAZluI7w2OBs1RBi6p9M83nkoZayQXXU9e8Robt69FcZc7wU4eJD/YFTjn1JdCk3rbMJajz8Q==" }, "regexp.prototype.flags": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.4.1.tgz", - "integrity": "sha512-pMR7hBVUUGI7PMA37m2ofIdQCsomVnas+Jn5UPGAHQ+/LlwKm/aTLJHdasmHRzlfeZwHiAOaRSo2rbBDm3nNUQ==", + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.4.3.tgz", + "integrity": "sha512-fjggEOO3slI6Wvgjwflkc4NFRCTZAu5CnNfBd5qOMYhWdn67nJBBu34/TkD++eeFmd8C9r9jfXJ27+nSiRkSUA==", "requires": { "call-bind": "^1.0.2", - "define-properties": "^1.1.3" + "define-properties": "^1.1.3", + "functions-have-names": "^1.2.2" } }, "regexpp": { @@ -25689,6 +27168,15 @@ "glob": "^7.1.3" } }, + "ripemd160": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz", + "integrity": "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==", + "requires": { + "hash-base": "^3.0.0", + "inherits": "^2.0.1" + } + }, "rollup": { "version": "2.67.3", "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.67.3.tgz", @@ -25937,11 +27425,25 @@ "send": "0.17.2" } }, + "setimmediate": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", + "integrity": "sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA==" + }, "setprototypeof": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==" }, + "sha.js": { + "version": "2.4.11", + "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", + "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", + "requires": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, "shebang-command": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", @@ -26115,6 +27617,26 @@ "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=" }, + "stream-browserify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-3.0.0.tgz", + "integrity": "sha512-H73RAHsVBapbim0tU2JwwOiXUj+fikfiaoYAKHF3VJfA0pe2BCzkhAHBlLG6REzE+2WNZcxOXjK7lkso+9euLA==", + "requires": { + "inherits": "~2.0.4", + "readable-stream": "^3.5.0" + } + }, + "stream-http": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/stream-http/-/stream-http-3.2.0.tgz", + "integrity": "sha512-Oq1bLqisTyK3TSCXpPbT4sdeYNdmyZJv1LxpEm2vu1ZhK89kSE5YXwZc3cWk0MagGaKriBh9mCFbVGtO+vY29A==", + "requires": { + "builtin-status-codes": "^3.0.0", + "inherits": "^2.0.4", + "readable-stream": "^3.6.0", + "xtend": "^4.0.2" + } + }, "string_decoder": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", @@ -26177,21 +27699,23 @@ } }, "string.prototype.trimend": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.4.tgz", - "integrity": "sha512-y9xCjw1P23Awk8EvTpcyL2NIr1j7wJ39f+k6lvRnSMz+mz9CGz9NYPelDk42kOz6+ql8xjfK8oYzy3jAP5QU5A==", + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.5.tgz", + "integrity": "sha512-I7RGvmjV4pJ7O3kdf+LXFpVfdNOxtCW/2C8f6jNiW4+PQchwxkCDzlk1/7p+Wl4bqFIZeF47qAHXLuHHWKAxog==", "requires": { "call-bind": "^1.0.2", - "define-properties": "^1.1.3" + "define-properties": "^1.1.4", + "es-abstract": "^1.19.5" } }, "string.prototype.trimstart": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.4.tgz", - "integrity": "sha512-jh6e984OBfvxS50tdY2nRZnoC5/mLFKOREQfw8t5yytkoUsJRNxvI/E39qu1sD0OtWI3OC0XgKSmcWwziwYuZw==", + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.5.tgz", + "integrity": "sha512-THx16TJCGlsN0o6dl2o6ncWUsdgnLRSA23rRE5pyGBw/mLr3Ej/R2LaqCtgP8VNMGZsvMWnf9ooZPyY2bHvUFg==", "requires": { "call-bind": "^1.0.2", - "define-properties": "^1.1.3" + "define-properties": "^1.1.4", + "es-abstract": "^1.19.5" } }, "stringify-object": { @@ -26550,6 +28074,14 @@ "resolved": "https://registry.npmjs.org/thunky/-/thunky-1.1.0.tgz", "integrity": "sha512-eHY7nBftgThBqOyHGVN+l8gF0BucP09fMo0oO/Lb0w1OF80dJv+lDVpXG60WMQvkcxAkNybKsrEIE3ZtKGmPrA==" }, + "timers-browserify": { + "version": "2.0.12", + "resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-2.0.12.tgz", + "integrity": "sha512-9phl76Cqm6FhSX9Xe1ZUAMLtm1BLkKj2Qd5ApyWkXzsMRaA7dgr81kf4wJmQf/hAvg8EEyJxDo3du/0KlhPiKQ==", + "requires": { + "setimmediate": "^1.0.4" + } + }, "timsort": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/timsort/-/timsort-0.3.0.tgz", @@ -26608,6 +28140,14 @@ "resolved": "https://registry.npmjs.org/tryer/-/tryer-1.0.1.tgz", "integrity": "sha512-c3zayb8/kWWpycWYg87P71E1S1ZL6b6IJxfb5fvsUgsf0S2MVGaDhDXXjDMpdCpfWXqptc+4mXwmiy1ypXqRAA==" }, + "ts-protoc-gen": { + "version": "0.15.0", + "resolved": "https://registry.npmjs.org/ts-protoc-gen/-/ts-protoc-gen-0.15.0.tgz", + "integrity": "sha512-TycnzEyrdVDlATJ3bWFTtra3SCiEP0W0vySXReAuEygXCUr1j2uaVyL0DhzjwuUdQoW5oXPwk6oZWeA0955V+g==", + "requires": { + "google-protobuf": "^3.15.5" + } + }, "tsconfig-paths": { "version": "3.12.0", "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.12.0.tgz", @@ -26654,6 +28194,11 @@ } } }, + "tty-browserify": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.1.tgz", + "integrity": "sha512-C3TaO7K81YvjCgQH9Q1S3R3P3BtN3RIM8n+OvX4il1K1zgE8ZhI0op7kClgkxtutIE8hQrcrHBXvIheqKUUCxw==" + }, "type-check": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", @@ -26696,13 +28241,13 @@ "peer": true }, "unbox-primitive": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.1.tgz", - "integrity": "sha512-tZU/3NqK3dA5gpE1KtyiJUrEB0lxnGkMFHptJ7q6ewdZ8s12QrODwNbhIJStmJkd1QDXa1NRA8aF2A1zk/Ypyw==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.2.tgz", + "integrity": "sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==", "requires": { - "function-bind": "^1.1.1", - "has-bigints": "^1.0.1", - "has-symbols": "^1.0.2", + "call-bind": "^1.0.2", + "has-bigints": "^1.0.2", + "has-symbols": "^1.0.3", "which-boxed-primitive": "^1.0.2" } }, @@ -26766,6 +28311,35 @@ "punycode": "^2.1.0" } }, + "url": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/url/-/url-0.11.0.tgz", + "integrity": "sha512-kbailJa29QrtXnxgq+DdCEGlbTeYM2eJUxsz6vjZavrCYPMIFHMKQmSKYAIuUK2i7hgPm28a8piX5NTUtM/LKQ==", + "requires": { + "punycode": "1.3.2", + "querystring": "0.2.0" + }, + "dependencies": { + "punycode": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz", + "integrity": "sha512-RofWgt/7fL5wP1Y7fxE7/EmTLzQVnB0ycyibJ0OOHIlJqTNzglYFxVwETOcIoJqJmpDXJ9xImDv+Fq34F/d4Dw==" + } + } + }, + "util": { + "version": "0.12.4", + "resolved": "https://registry.npmjs.org/util/-/util-0.12.4.tgz", + "integrity": "sha512-bxZ9qtSlGUWSOy9Qa9Xgk11kSslpuZwaxCg4sNIDj6FLucDab2JxnHwyNTCpHMtK1MjoQiWQ6DiUMZYbSrO+Sw==", + "requires": { + "inherits": "^2.0.3", + "is-arguments": "^1.0.4", + "is-generator-function": "^1.0.7", + "is-typed-array": "^1.1.3", + "safe-buffer": "^5.1.2", + "which-typed-array": "^1.1.2" + } + }, "util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", @@ -26824,6 +28398,11 @@ "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=" }, + "vm-browserify": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-1.1.2.tgz", + "integrity": "sha512-2ham8XPWTONajOR0ohOKOHXkm3+gaBmGut3SRuu75xLd/RRaY6vqgh8NBYYk7+RW3u5AtzPQZG8F10LHkl0lAQ==" + }, "w3c-hr-time": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/w3c-hr-time/-/w3c-hr-time-1.0.2.tgz", @@ -27167,6 +28746,19 @@ "is-symbol": "^1.0.3" } }, + "which-typed-array": { + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.8.tgz", + "integrity": "sha512-Jn4e5PItbcAHyLoRDwvPj1ypu27DJbtdYXUa5zsinrUx77Uvfb0cXwwnGMTn7cjUfhhqgVQnVJCwF+7cgU7tpw==", + "requires": { + "available-typed-arrays": "^1.0.5", + "call-bind": "^1.0.2", + "es-abstract": "^1.20.0", + "for-each": "^0.3.3", + "has-tostringtag": "^1.0.0", + "is-typed-array": "^1.1.9" + } + }, "word-wrap": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", diff --git a/demos/kitchen-sink/package.json b/demos/kitchen-sink/package.json index 85d1c3c..aa75c70 100644 --- a/demos/kitchen-sink/package.json +++ b/demos/kitchen-sink/package.json @@ -3,6 +3,7 @@ "version": "0.0.1", "private": true, "dependencies": { + "@lightninglabs/lnc-web": "^0.0.1-alpha.rc1", "@testing-library/jest-dom": "5.16.2", "@testing-library/react": "12.1.3", "@testing-library/user-event": "13.5.0", diff --git a/lib/api/base.ts b/lib/api/base.ts deleted file mode 100644 index eb995cb..0000000 --- a/lib/api/base.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { EventMap } from '../types/emitter'; -import BaseEmitter from '../util/BaseEmitter'; - -/** - * A shared base class containing logic for storing the API credentials - */ -class BaseApi extends BaseEmitter { - private _credentials = ''; - - /** - * Returns a metadata object containing authorization info that was - * previous set if any - */ - protected get _meta() { - return this._credentials - ? { authorization: `Basic ${this._credentials}` } - : undefined; - } - - /** - * Sets the credentials to use for all API requests - * @param credentials the base64 encoded password - */ - setCredentials(credentials: string) { - this._credentials = credentials; - } -} - -export default BaseApi; diff --git a/lib/api/createRpc.ts b/lib/api/createRpc.ts index a0f253a..cdb7628 100644 --- a/lib/api/createRpc.ts +++ b/lib/api/createRpc.ts @@ -1,35 +1,38 @@ -import WasmClient from './../index'; -import { capitalize } from '../util/strings'; +import LNC from '../lnc'; +import { subscriptionMethods } from '../types/proto/schema'; + +// capitalize the first letter in the string +const capitalize = (s: string) => s && s[0].toUpperCase() + s.slice(1); /** - * An API wrapper to communicate with the LND node via GRPC + * Creates a typed Proxy object which calls the WASM request or + * subscribe methods depending on which function is called on the object */ -function createRpc( - wasm: WasmClient, - service: any, - subscriptions?: any -): any { - return new Proxy(service, { +export function createRpc(packageName: string, lnc: LNC): T { + const rpc = {}; + return new Proxy(rpc, { get(target, key, c) { - // make sure funcs are camelcased - const requestName = capitalize(key.toString()); + const methodName = capitalize(key.toString()); + // the full name of the method (ex: lnrpc.Lightning.OpenChannel) + const method = `${packageName}.${methodName}`; - const call = service[requestName]; - if (call.responseStream) { - if (subscriptions && subscriptions[key]) - return subscriptions[key]; - return (request: any): any => { - const res = wasm.request(call, request); - return res; + if (subscriptionMethods.includes(method)) { + // call subscribe for streaming methods + return ( + request: object, + callback: (msg: object) => void, + errCallback?: (err: Error) => void + ): void => { + lnc.subscribe(method, request, callback, errCallback); }; } else { - return async (request: any): Promise => { - const res = await wasm.request(call, request); - return res.toObject(); + // call request for unary methods + return async (request: object): Promise => { + return await lnc.request(method, request); }; } } - }); + }) as T; } export default createRpc; diff --git a/lib/api/faraday.ts b/lib/api/faraday.ts new file mode 100644 index 0000000..0a67cbd --- /dev/null +++ b/lib/api/faraday.ts @@ -0,0 +1,17 @@ +import LNC from '../lnc'; +import { FaradayServer } from '../types/proto/faraday/faraday'; +import { serviceNames as sn } from '../types/proto/schema'; +import { createRpc } from './createRpc'; + +/** + * An API wrapper to communicate with the Faraday node via GRPC + */ +class FaradayApi { + faradayServer: FaradayServer; + + constructor(lnc: LNC) { + this.faradayServer = createRpc(sn.frdrpc.FaradayServer, lnc); + } +} + +export default FaradayApi; diff --git a/lib/api/faraday/index.ts b/lib/api/faraday/index.ts deleted file mode 100644 index fe4210e..0000000 --- a/lib/api/faraday/index.ts +++ /dev/null @@ -1,25 +0,0 @@ -import * as FARADAY from '../../types/generated/faraday_pb'; - -import { FaradayServer } from '../../types/generated/faraday_pb_service'; - -import WasmClient from './../../index'; -import BaseApi from './../base'; - -import createRpc from './../createRpc'; - -/** - * An API wrapper to communicate with the Faraday node via GRPC - */ -class FaradayApi extends BaseApi<{}> { - _wasm: WasmClient; - // sub-services - faradayServer: any; - - constructor(wasm: WasmClient) { - super(); - this._wasm = wasm; - this.faradayServer = createRpc(wasm, FaradayServer); - } -} - -export default FaradayApi; diff --git a/lib/api/grpc.ts b/lib/api/grpc.ts deleted file mode 100644 index 88f1bb5..0000000 --- a/lib/api/grpc.ts +++ /dev/null @@ -1,107 +0,0 @@ -import { grpc } from '@improbable-eng/grpc-web'; -import { ProtobufMessage } from '@improbable-eng/grpc-web/dist/typings/message'; -import { Metadata } from '@improbable-eng/grpc-web/dist/typings/metadata'; -import { - MethodDefinition, - UnaryMethodDefinition -} from '@improbable-eng/grpc-web/dist/typings/service'; -import { AuthenticationError } from '../util/errors'; -import { grpcLog as log } from '../util/log'; -import { sampleApiResponses } from '../util/tests/sampleData'; - -const DEV_HOST = 'localhost'; - -class GrpcClient { - /** - * Indicates if the API should return sample data instead of making real GRPC requests - */ - useSampleData = false; - - /** - * Executes a single GRPC request and returns a promise which will resolve with the response - * @param methodDescriptor the GRPC method to call on the service - * @param request The GRPC request message to send - * @param metadata headers to include with the request - */ - request( - methodDescriptor: UnaryMethodDefinition, - request: TReq, - metadata?: Metadata.ConstructorArg - ): Promise { - return new Promise((resolve, reject) => { - if (this.useSampleData) { - const endpoint = `${methodDescriptor.service.serviceName}.${methodDescriptor.methodName}`; - const data = sampleApiResponses[endpoint]; - // the calling function expects the return value to have a `toObject` function - const response: any = { toObject: () => data }; - resolve(response); - return; - } - - const method = `${methodDescriptor.methodName}`; - log.debug(`${method} request`, request.toObject()); - grpc.unary(methodDescriptor, { - host: DEV_HOST, - request, - metadata, - onEnd: ({ - status, - statusMessage, - headers, - message, - trailers - }) => { - log.debug(`${method} status`, status, statusMessage); - log.debug(`${method} headers`, headers); - if (status === grpc.Code.OK && message) { - log.debug(`${method} message`, message.toObject()); - resolve(message as TRes); - } else if (status === grpc.Code.Unauthenticated) { - reject(new AuthenticationError(statusMessage)); - } else { - reject(new Error(statusMessage)); - } - log.debug(`${method} trailers`, trailers); - } - }); - }); - } - - /** - * Subscribes to a GRPC server-streaming endpoint and executes the `onMessage` handler - * when a new message is received from the server - * @param methodDescriptor the GRPC method to call on the service - * @param request the GRPC request message to send - * @param onMessage the callback function to execute when a new message is received - * @param metadata headers to include with the request - */ - subscribe( - methodDescriptor: MethodDefinition, - request: TReq, - onMessage: (res: TRes) => void, - metadata?: Metadata.ConstructorArg - ) { - if (this.useSampleData) return; - - const method = `${methodDescriptor.methodName}`; - const client = grpc.client(methodDescriptor, { - host: DEV_HOST, - transport: grpc.WebsocketTransport() - }); - client.onHeaders((headers) => { - log.debug(`${method} - headers`, headers); - }); - client.onMessage((message) => { - log.debug(`${method} - message`, message.toObject()); - onMessage(message as TRes); - }); - client.onEnd((status, statusMessage, trailers) => { - log.debug(`${method} - status`, status, statusMessage); - log.debug(`${method} - trailers`, trailers); - }); - client.start(metadata); - client.send(request); - } -} - -export default GrpcClient; diff --git a/lib/api/index.ts b/lib/api/index.ts index abcad06..67baf93 100644 --- a/lib/api/index.ts +++ b/lib/api/index.ts @@ -1,4 +1,3 @@ -export { default as GrpcClient } from './grpc'; export { default as LndApi } from './lnd'; export { default as LoopApi } from './loop'; export { default as PoolApi } from './pool'; diff --git a/lib/api/lnd.ts b/lib/api/lnd.ts new file mode 100644 index 0000000..a9b8d7f --- /dev/null +++ b/lib/api/lnd.ts @@ -0,0 +1,44 @@ +import LNC from '../lnc'; +import { Autopilot } from '../types/proto/lnd/autopilotrpc/autopilot'; +import { ChainNotifier } from '../types/proto/lnd/chainrpc/chainnotifier'; +import { Invoices } from '../types/proto/lnd/invoicesrpc/invoices'; +import { Lightning } from '../types/proto/lnd/lightning'; +import { Router } from '../types/proto/lnd/routerrpc/router'; +import { Signer } from '../types/proto/lnd/signrpc/signer'; +import { WalletKit } from '../types/proto/lnd/walletrpc/walletkit'; +import { WalletUnlocker } from '../types/proto/lnd/walletunlocker'; +import { Watchtower } from '../types/proto/lnd/watchtowerrpc/watchtower'; +import { WatchtowerClient } from '../types/proto/lnd/wtclientrpc/wtclient'; +import { serviceNames as sn } from '../types/proto/schema'; +import { createRpc } from './createRpc'; + +/** + * An API wrapper to communicate with the LND node via GRPC + */ +class LndApi { + autopilot: Autopilot; + chainNotifier: ChainNotifier; + invoices: Invoices; + lightning: Lightning; + router: Router; + signer: Signer; + walletKit: WalletKit; + walletUnlocker: WalletUnlocker; + watchtower: Watchtower; + watchtowerClient: WatchtowerClient; + + constructor(lnc: LNC) { + this.autopilot = createRpc(sn.autopilotrpc.Autopilot, lnc); + this.chainNotifier = createRpc(sn.chainrpc.ChainNotifier, lnc); + this.invoices = createRpc(sn.invoicesrpc.Invoices, lnc); + this.lightning = createRpc(sn.lnrpc.Lightning, lnc); + this.router = createRpc(sn.routerrpc.Router, lnc); + this.signer = createRpc(sn.signrpc.Signer, lnc); + this.walletKit = createRpc(sn.walletrpc.WalletKit, lnc); + this.walletUnlocker = createRpc(sn.lnrpc.WalletUnlocker, lnc); + this.watchtower = createRpc(sn.watchtowerrpc.Watchtower, lnc); + this.watchtowerClient = createRpc(sn.wtclientrpc.WatchtowerClient, lnc); + } +} + +export default LndApi; diff --git a/lib/api/lnd/index.ts b/lib/api/lnd/index.ts deleted file mode 100644 index 988ba81..0000000 --- a/lib/api/lnd/index.ts +++ /dev/null @@ -1,229 +0,0 @@ -import * as LND from '../../types/generated/lightning_pb'; - -import { Lightning } from '../../types/generated/lightning_pb_service'; -import { WalletUnlocker } from '../../types/generated/walletunlocker_pb_service'; - -import { Autopilot } from '../../types/generated/autopilotrpc/autopilot_pb_service'; -import { ChainNotifier } from '../../types/generated/chainrpc/chainnotifier_pb_service'; -import { Invoices } from '../../types/generated/invoicesrpc/invoices_pb_service'; -import { Router } from '../../types/generated/routerrpc/router_pb_service'; -import { Signer } from '../../types/generated/signrpc/signer_pb_service'; -import { WalletKit } from '../../types/generated/walletrpc/walletkit_pb_service'; -import { Watchtower } from '../../types/generated/watchtowerrpc/watchtower_pb_service'; -import { WatchtowerClient } from '../../types/generated/wtclientrpc/wtclient_pb_service'; - -import WasmClient from './../../index'; -import BaseApi from './../base'; - -import createRpc from './../createRpc'; - -/** the names and argument types for the subscription events */ -interface LndEvents { - channel: LND.ChannelEventUpdate.AsObject; - channelBackupSnapshot: LND.ChanBackupSnapshot.AsObject; - customMessage: LND.CustomMessage.AsObject; - graphTopologyUpdate: LND.GraphTopologyUpdate.AsObject; - invoice: LND.Invoice.AsObject; - peerEvent: LND.PeerEvent.AsObject; - transaction: LND.Transaction.AsObject; -} - -/** - * An API wrapper to communicate with the LND node via GRPC - */ -class LndApi extends BaseApi { - _wasm: WasmClient; - // sub-services - autopilot: any; - chainNotifier: any; - invoices: any; - lightning: any; - router: any; - signer: any; - walletKit: any; - walletUnlocker: any; - watchtower: any; - watchtowerClient: any; - - constructor(wasm: WasmClient) { - super(); - - this._wasm = wasm; - - const invoicesSubscriptions = { - subscribeSingleInvoice: ( - request: any, - callback: (data: any) => void, - errCallback?: (data: any) => void - ): void => { - this.subscribe( - Invoices.SubscribeSingleInvoice, - request, - callback, - errCallback - ); - } - }; - - const lightningSubscriptions = { - closeChannel: ( - request: any, - callback: (data: any) => void, - errCallback?: (data: any) => void - ): void => { - this.subscribe( - Lightning.CloseChannel, - request, - callback, - errCallback - ); - }, - subscribeChannelBackups: ( - request: any, - callback: (data: any) => void, - errCallback?: (data: any) => void - ): void => { - this.subscribe( - Lightning.SubscribeChannelBackups, - request, - callback, - errCallback - ); - }, - subscribeChannelEvents: ( - request: any, - callback: (data: any) => void, - errCallback?: (data: any) => void - ): void => { - this.subscribe( - Lightning.SubscribeChannelEvents, - request, - callback, - errCallback - ); - }, - subscribeChannelGraph: ( - request: any, - callback: (data: any) => void, - errCallback?: (data: any) => void - ): void => { - this.subscribe( - Lightning.SubscribeChannelGraph, - request, - callback, - errCallback - ); - }, - subscribeCustomMessages: ( - request: any, - callback: (data: any) => void, - errCallback?: (data: any) => void - ): void => { - this.subscribe( - Lightning.SubscribeCustomMessages, - request, - callback, - errCallback - ); - }, - subscribeInvoices: ( - request: any, - callback: (data: any) => void, - errCallback?: (data: any) => void - ): void => { - this.subscribe( - Lightning.SubscribeInvoices, - request, - callback, - errCallback - ); - }, - subscribePeerEvents: ( - request: any, - callback: (data: any) => void, - errCallback?: (data: any) => void - ): void => { - this.subscribe( - Lightning.SubscribePeerEvents, - request, - callback, - errCallback - ); - }, - subscribeTransactions: ( - request: any, - callback: (data: any) => void, - errCallback?: (data: any) => void - ): void => { - this.subscribe( - Lightning.SubscribeTransactions, - request, - callback, - errCallback - ); - } - }; - - const routerSubscriptions = { - subscribeHtlcEvents: ( - request: any, - callback: (data: any) => void, - errCallback?: (data: any) => void - ): void => { - this.subscribe( - Router.SubscribeHtlcEvents, - request, - callback, - errCallback - ); - } - }; - - this.autopilot = createRpc(wasm, Autopilot); - this.chainNotifier = createRpc(wasm, ChainNotifier); - this.invoices = createRpc(wasm, Invoices, invoicesSubscriptions); - this.lightning = createRpc(wasm, Lightning, lightningSubscriptions); - this.router = createRpc(wasm, Router, routerSubscriptions); - this.signer = createRpc(wasm, Signer); - this.walletKit = createRpc(wasm, WalletKit); - this.walletUnlocker = createRpc(wasm, WalletUnlocker); - this.watchtower = createRpc(wasm, Watchtower); - this.watchtowerClient = createRpc(wasm, WatchtowerClient); - } - - /** - * Connect to the LND streaming endpoints - */ - connectStreams() { - this.subscribe( - Lightning.SubscribeTransactions, - {}, - (transaction: any) => - this.emit('transaction', transaction.toObject()) - ); - this.subscribe( - Lightning.SubscribeChannelEvents, - {}, - (channelEvent: any) => this.emit('channel', channelEvent.toObject()) - ); - this.subscribe(Lightning.SubscribeInvoices, {}, (invoiceEvent: any) => - this.emit('invoice', invoiceEvent.toObject()) - ); - } - - subscribe( - call: any, - request: any, - callback?: (data: any) => void, - errCallback?: (data: any) => void - ) { - this._wasm.subscribe( - call, - request, - (event) => callback && callback(event.toObject()), - (event) => errCallback && errCallback(event) - ); - } -} - -export default LndApi; diff --git a/lib/api/loop.ts b/lib/api/loop.ts new file mode 100644 index 0000000..dfe12f6 --- /dev/null +++ b/lib/api/loop.ts @@ -0,0 +1,20 @@ +import LNC from '../lnc'; +import { SwapClient } from '../types/proto/loop/client'; +import { Debug } from '../types/proto/loop/debug'; +import { serviceNames as sn } from '../types/proto/schema'; +import { createRpc } from './createRpc'; + +/** + * An API wrapper to communicate with the Loop node via GRPC + */ +class LoopApi { + swapClient: SwapClient; + debug: Debug; + + constructor(lnc: LNC) { + this.swapClient = createRpc(sn.looprpc.SwapClient, lnc); + this.debug = createRpc(sn.looprpc.Debug, lnc); + } +} + +export default LoopApi; diff --git a/lib/api/loop/index.ts b/lib/api/loop/index.ts deleted file mode 100644 index abdf029..0000000 --- a/lib/api/loop/index.ts +++ /dev/null @@ -1,75 +0,0 @@ -import * as LOOP from '../../types/generated/client_pb'; - -import { SwapClient } from '../../types/generated/client_pb_service'; -import { Debug } from '../../types/generated/debug_pb_service'; - -import WasmClient from './../../index'; -import BaseApi from './../base'; - -import createRpc from './../createRpc'; - -/** the names and argument types for the subscription events */ -interface LoopEvents { - status: LOOP.SwapStatus.AsObject; -} - -/** - * An API wrapper to communicate with the Loop node via GRPC - */ -class LoopApi extends BaseApi { - _wasm: WasmClient; - // sub-services - swapClient: any; - debug: any; - - constructor(wasm: WasmClient) { - super(); - - this._wasm = wasm; - - const swapSubscriptions = { - monitor: ( - request: any, - callback: (data: any) => void, - errCallback?: (data: any) => void - ): void => { - this.subscribe( - SwapClient.Monitor, - request, - callback, - errCallback - ); - } - }; - - this.swapClient = createRpc(wasm, SwapClient, swapSubscriptions); - this.debug = createRpc(wasm, Debug); - } - - /** - * Connect to the Loop streaming endpoint - */ - connectStreams() { - this.subscribe( - SwapClient.Monitor, - {}, - (swapStatus: any) => this.emit('status', swapStatus.toObject()) - ); - } - - subscribe( - call: any, - request: any, - callback?: (data: any) => void, - errCallback?: (data: any) => void - ) { - this._wasm.subscribe( - call, - request, - (event) => callback && callback(event.toObject()), - (event) => errCallback && errCallback(event) - ); - } -} - -export default LoopApi; diff --git a/lib/api/pool.ts b/lib/api/pool.ts new file mode 100644 index 0000000..5f584a4 --- /dev/null +++ b/lib/api/pool.ts @@ -0,0 +1,23 @@ +import LNC from '../lnc'; +import { ChannelAuctioneer } from '../types/proto/pool/auctioneerrpc/auctioneer'; +import { HashMail } from '../types/proto/pool/auctioneerrpc/hashmail'; +import { Trader } from '../types/proto/pool/trader'; +import { serviceNames as sn } from '../types/proto/schema'; +import { createRpc } from './createRpc'; + +/** + * An API wrapper to communicate with the Pool node via GRPC + */ +class PoolApi { + trader: Trader; + channelAuctioneer: ChannelAuctioneer; + hashmail: HashMail; + + constructor(lnc: LNC) { + this.trader = createRpc(sn.poolrpc.Trader, lnc); + this.channelAuctioneer = createRpc(sn.poolrpc.ChannelAuctioneer, lnc); + this.hashmail = createRpc(sn.poolrpc.HashMail, lnc); + } +} + +export default PoolApi; diff --git a/lib/api/pool/index.ts b/lib/api/pool/index.ts deleted file mode 100644 index 10a891b..0000000 --- a/lib/api/pool/index.ts +++ /dev/null @@ -1,64 +0,0 @@ -import * as POOL from '../../types/generated/trader_pb'; -import * as AUCTIONEER from '../../types/generated/auctioneerrpc/auctioneer_pb'; -import * as HASHMAIL from '../../types/generated/auctioneerrpc/hashmail_pb'; - -import { Trader } from '../../types/generated/trader_pb_service'; -import { ChannelAuctioneer } from '../../types/generated/auctioneerrpc/auctioneer_pb_service'; -import { HashMail } from '../../types/generated/auctioneerrpc/hashmail_pb_service'; - -import WasmClient from './../../index'; -import BaseApi from './../base'; - -import createRpc from './../createRpc'; - -/** the names and argument types for the subscription events */ -interface PoolEvents { - cipherBox: HASHMAIL.CipherBox.AsObject; -} - -/** - * An API wrapper to communicate with the Pool node via GRPC - */ -class PoolApi extends BaseApi { - _wasm: WasmClient; - // sub-services - trader: any; - channelAuctioneer: any; - hashmail: any; - - constructor(wasm: WasmClient) { - super(); - - this._wasm = wasm; - - const hashmailSubscriptions = { - recvStream: ( - request: any, - callback: (data: any) => void, - errCallback?: (data: any) => void - ): void => { - this.subscribe(HashMail.RecvStream, request, callback, errCallback); - } - }; - - this.trader = createRpc(wasm, Trader); - this.channelAuctioneer = createRpc(wasm, ChannelAuctioneer); - this.hashmail = createRpc(wasm, HashMail, hashmailSubscriptions); - } - - subscribe( - call: any, - request: any, - callback?: (data: any) => void, - errCallback?: (data: any) => void - ) { - this._wasm.subscribe( - call, - request, - (event) => callback && callback(event.toObject()), - (event) => errCallback && errCallback(event) - ); - } -} - -export default PoolApi; diff --git a/lib/config.ts b/lib/config.ts deleted file mode 100644 index 6a92fef..0000000 --- a/lib/config.ts +++ /dev/null @@ -1,15 +0,0 @@ -// flag to check if the app is running in a local development environment -export const IS_DEV = process.env.NODE_ENV === 'development'; - -// flag to check if the app is running in a a production environment -export const IS_PROD = process.env.NODE_ENV === 'production'; - -// flag to check if the app is running in a a test environment -export const IS_TEST = process.env.NODE_ENV === 'test'; - -// TODO handle DEV_HOST -// detect the host currently serving the app files -// const { protocol, hostname, port } = window.location; -// const host = `${protocol}//${hostname}:${port}`; -// // the GRPC server to make requests to -// export const DEV_HOST = process.env.REACT_APP_DEV_HOST || host; diff --git a/lib/index.ts b/lib/index.ts index e69bacf..4b4b83b 100644 --- a/lib/index.ts +++ b/lib/index.ts @@ -12,5 +12,6 @@ if (!WebAssembly.instantiateStreaming) { } export type { LncConfig, CredentialStore } from './types/lnc'; +export * from './types/proto'; export default LNC; diff --git a/lib/lnc.ts b/lib/lnc.ts index d6ef260..87c78a4 100644 --- a/lib/lnc.ts +++ b/lib/lnc.ts @@ -1,15 +1,8 @@ -import { ProtobufMessage } from '@improbable-eng/grpc-web/dist/typings/message'; -import { - MethodDefinition, - UnaryMethodDefinition, -} from '@improbable-eng/grpc-web/dist/typings/service'; -import isPlainObject from 'lodash/isPlainObject'; import { FaradayApi, LndApi, LoopApi, PoolApi } from './api'; import { CredentialStore, LncConfig, WasmGlobal } from './types/lnc'; import LncCredentialStore from './util/credentialStore'; import { wasmLog as log } from './util/log'; -import { camelKeysToSnake, isObject, snakeKeysToCamel } from './util/objects'; -import { JS_RESERVED_WORDS } from './util/reservedWords'; +import { snakeKeysToCamel } from './util/objects'; /** The default values for the LncConfig options */ const DEFAULT_CONFIG = { @@ -34,7 +27,7 @@ export default class LNC { pool: PoolApi; faraday: FaradayApi; - constructor(lncConfig: LncConfig) { + constructor(lncConfig?: LncConfig) { // merge the passed in config with the defaults const config = Object.assign({}, DEFAULT_CONFIG, lncConfig); @@ -213,38 +206,28 @@ export default class LNC { /** * Emulates a GRPC request but uses the WASM client instead to communicate with the LND node - * @param methodDescriptor the GRPC method to call on the service + * @param method the GRPC method to call on the service * @param request The GRPC request message to send */ - request( - methodDescriptor: UnaryMethodDefinition, - request: any - ): Promise { + request(method: string, request?: object): Promise { return new Promise((resolve, reject) => { - const method = `${methodDescriptor.service.serviceName}.${methodDescriptor.methodName}`; - - const hackedReq = request ? this.hackRequest(request) : {}; - const reqJSON = JSON.stringify(hackedReq); - + log.debug(`${method} request`, request); + const reqJSON = JSON.stringify(request || {}); this.wasm.wasmClientInvokeRPC( method, reqJSON, (response: string) => { - let rawRes: any; try { - rawRes = JSON.parse(response); + const rawRes = JSON.parse(response); + // log.debug(`${method} raw response`, rawRes); + const res = snakeKeysToCamel(rawRes); + log.debug(`${method} response`, res); + resolve(res as TRes); } catch (error) { log.debug(`${method} raw response`, response); reject(new Error(response)); return; } - const res = snakeKeysToCamel(rawRes); - const hackedRes = this.hackListsAndMaps(res); - log.debug(`${method} response`, res); - const msg = { - toObject: () => hackedRes - }; - resolve(msg as TRes); } ); }); @@ -253,34 +236,25 @@ export default class LNC { /** * Subscribes to a GRPC server-streaming endpoint and executes the `onMessage` handler * when a new message is received from the server - * @param methodDescriptor the GRPC method to call on the service + * @param method the GRPC method to call on the service * @param request the GRPC request message to send * @param onMessage the callback function to execute when a new message is received * @param onError the callback function to execute when an error is received */ - subscribe( - methodDescriptor: MethodDefinition, - request: TReq, - onMessage: (res: TRes) => void, + subscribe( + method: string, + request?: object, + onMessage?: (res: TRes) => void, onError?: (res: Error) => void ) { - const method = `${methodDescriptor.service.serviceName}.${methodDescriptor.methodName}`; log.debug(`${method} request`, request); - const hackedReq = this.hackRequest(request || {}); - log.debug(`${method} hacked request`, hackedReq); - const reqJSON = JSON.stringify(hackedReq); + const reqJSON = JSON.stringify(request || {}); this.wasm.wasmClientInvokeRPC(method, reqJSON, (response: string) => { - log.debug(`${method} raw response`, response); - let rawRes: any; try { - rawRes = JSON.parse(response); + const rawRes = JSON.parse(response); const res = snakeKeysToCamel(rawRes); - const hackedRes = this.hackListsAndMaps(res); log.debug(`${method} response`, res); - const msg = { - toObject: () => hackedRes - }; - onMessage(msg as TRes); + if (onMessage) onMessage(res as TRes); } catch (error) { log.debug(`${method} error`, error); const err = new Error(response); @@ -288,88 +262,4 @@ export default class LNC { } }); } - - /** the names of keys in RPC responses that should have the 'Map' suffix */ - mapKeys: string[] = [ - 'leaseDurationBuckets', // poolrpc.Trader.LeaseDurations - 'leaseDurations', // poolrpc.Trader.LeaseDurations - 'matchedMarkets' // poolrpc.Trader.BatchSnapshot - ]; - - /** - * HACK: fixes an mismatch between GRPC types and the responses returned from the WASM client. - * Specifically, the List and Map values - * @param response the RPC response from the WASM client - */ - hackListsAndMaps(response: any) { - const o: Record = {}; - return Object.entries(response).reduce((updated, [key, value]) => { - if (this.mapKeys.includes(key)) { - // convert Maps from an object to an array of arrays - // leaseDurationBuckets: { 2016: "MARKET_OPEN", 4032: "MARKET_OPEN" } - // leaseDurationBucketsMap: [ [2016, 3], [4032, 3] ] - updated[`${key}Map`] = Object.entries(value).reduce( - (all, [k, v]) => { - const j = isNaN(parseInt(k, 10)) ? k : parseInt(k, 10); - all.push([ - j, - isObject(v) ? this.hackListsAndMaps(v) : v - ]); - return all; - }, - [] as any[] - ); - } else if (Array.isArray(value)) { - updated[`${key}List`] = (value as any[]).map((v) => - isObject(v) ? this.hackListsAndMaps(v) : v - ); - } else if (JS_RESERVED_WORDS.includes(key)) { - // add the 'pb_' prefix for keys that are a JS reserved word - updated[`pb_${key}`] = value; - } else if (isObject(value)) { - // recurse into nested objects - updated[key] = this.hackListsAndMaps(value); - } else { - updated[key] = value; - } - return updated; - }, o); - } - - /** - * HACK: Modifies a GRPC request object to be compatible with the WASM client. - * This will need to be fixed in the TC proto compilation - */ - hackRequest(request: any) { - const o: Record = {}; - return Object.entries(request).reduce((updated, [key, value]) => { - if (Array.isArray(value) && value.length === 0) { - // omit empty arrays before checking for Lists & Maps - } else if (key.endsWith('List')) { - const newKey = key.substring(0, key.length - 'List'.length); - updated[newKey] = value; - } else if (key.endsWith('Map')) { - const newKey = key.substring(0, key.length - 'Map'.length); - updated[newKey] = value; - } else if (key.startsWith('pb_')) { - // fields that are JS keywords are generated with the 'pb_' prefix by protoc - // ex: pb_private - const newKey = key.substring('pb_'.length); - updated[newKey] = value; - } else if (typeof value === 'number' && value === 0) { - // omit numeric fields who's value is zero - } else if ( - typeof value === 'string' && - (value === '' || value === '0') - ) { - // omit string fields who's value is empty or zero - } else if (isPlainObject(value)) { - // also hack nested objects - updated[key] = this.hackRequest(value); - } else { - updated[key] = value; - } - return camelKeysToSnake(updated); - }, o); - } } diff --git a/lib/types/emitter.ts b/lib/types/emitter.ts deleted file mode 100644 index fe3ea64..0000000 --- a/lib/types/emitter.ts +++ /dev/null @@ -1,13 +0,0 @@ -export type EventMap = Record; -export type EventKey = string & keyof T; -export type EventReceiver = (params: T) => void; - -/** Generic interface to represent a type-safe pubsub Emitter object */ -export interface Emitter { - on>(eventName: K, handler: EventReceiver): void; - off>( - eventName: K, - handler: EventReceiver - ): void; - emit>(eventName: K, params: T[K]): void; -} diff --git a/lib/types/generated/auctioneerrpc/auctioneer_pb.d.ts b/lib/types/generated/auctioneerrpc/auctioneer_pb.d.ts deleted file mode 100644 index 2d24c97..0000000 --- a/lib/types/generated/auctioneerrpc/auctioneer_pb.d.ts +++ /dev/null @@ -1,2154 +0,0 @@ -// package: poolrpc -// file: auctioneerrpc/auctioneer.proto - -import * as jspb from "google-protobuf"; - -export class ReserveAccountRequest extends jspb.Message { - getAccountValue(): number; - setAccountValue(value: number): void; - - getAccountExpiry(): number; - setAccountExpiry(value: number): void; - - getTraderKey(): Uint8Array | string; - getTraderKey_asU8(): Uint8Array; - getTraderKey_asB64(): string; - setTraderKey(value: Uint8Array | string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ReserveAccountRequest.AsObject; - static toObject(includeInstance: boolean, msg: ReserveAccountRequest): ReserveAccountRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ReserveAccountRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ReserveAccountRequest; - static deserializeBinaryFromReader(message: ReserveAccountRequest, reader: jspb.BinaryReader): ReserveAccountRequest; -} - -export namespace ReserveAccountRequest { - export type AsObject = { - accountValue: number, - accountExpiry: number, - traderKey: Uint8Array | string, - } -} - -export class ReserveAccountResponse extends jspb.Message { - getAuctioneerKey(): Uint8Array | string; - getAuctioneerKey_asU8(): Uint8Array; - getAuctioneerKey_asB64(): string; - setAuctioneerKey(value: Uint8Array | string): void; - - getInitialBatchKey(): Uint8Array | string; - getInitialBatchKey_asU8(): Uint8Array; - getInitialBatchKey_asB64(): string; - setInitialBatchKey(value: Uint8Array | string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ReserveAccountResponse.AsObject; - static toObject(includeInstance: boolean, msg: ReserveAccountResponse): ReserveAccountResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ReserveAccountResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ReserveAccountResponse; - static deserializeBinaryFromReader(message: ReserveAccountResponse, reader: jspb.BinaryReader): ReserveAccountResponse; -} - -export namespace ReserveAccountResponse { - export type AsObject = { - auctioneerKey: Uint8Array | string, - initialBatchKey: Uint8Array | string, - } -} - -export class ServerInitAccountRequest extends jspb.Message { - hasAccountPoint(): boolean; - clearAccountPoint(): void; - getAccountPoint(): OutPoint | undefined; - setAccountPoint(value?: OutPoint): void; - - getAccountScript(): Uint8Array | string; - getAccountScript_asU8(): Uint8Array; - getAccountScript_asB64(): string; - setAccountScript(value: Uint8Array | string): void; - - getAccountValue(): number; - setAccountValue(value: number): void; - - getAccountExpiry(): number; - setAccountExpiry(value: number): void; - - getTraderKey(): Uint8Array | string; - getTraderKey_asU8(): Uint8Array; - getTraderKey_asB64(): string; - setTraderKey(value: Uint8Array | string): void; - - getUserAgent(): string; - setUserAgent(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ServerInitAccountRequest.AsObject; - static toObject(includeInstance: boolean, msg: ServerInitAccountRequest): ServerInitAccountRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ServerInitAccountRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ServerInitAccountRequest; - static deserializeBinaryFromReader(message: ServerInitAccountRequest, reader: jspb.BinaryReader): ServerInitAccountRequest; -} - -export namespace ServerInitAccountRequest { - export type AsObject = { - accountPoint?: OutPoint.AsObject, - accountScript: Uint8Array | string, - accountValue: number, - accountExpiry: number, - traderKey: Uint8Array | string, - userAgent: string, - } -} - -export class ServerInitAccountResponse extends jspb.Message { - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ServerInitAccountResponse.AsObject; - static toObject(includeInstance: boolean, msg: ServerInitAccountResponse): ServerInitAccountResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ServerInitAccountResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ServerInitAccountResponse; - static deserializeBinaryFromReader(message: ServerInitAccountResponse, reader: jspb.BinaryReader): ServerInitAccountResponse; -} - -export namespace ServerInitAccountResponse { - export type AsObject = { - } -} - -export class ServerSubmitOrderRequest extends jspb.Message { - hasAsk(): boolean; - clearAsk(): void; - getAsk(): ServerAsk | undefined; - setAsk(value?: ServerAsk): void; - - hasBid(): boolean; - clearBid(): void; - getBid(): ServerBid | undefined; - setBid(value?: ServerBid): void; - - getUserAgent(): string; - setUserAgent(value: string): void; - - getDetailsCase(): ServerSubmitOrderRequest.DetailsCase; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ServerSubmitOrderRequest.AsObject; - static toObject(includeInstance: boolean, msg: ServerSubmitOrderRequest): ServerSubmitOrderRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ServerSubmitOrderRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ServerSubmitOrderRequest; - static deserializeBinaryFromReader(message: ServerSubmitOrderRequest, reader: jspb.BinaryReader): ServerSubmitOrderRequest; -} - -export namespace ServerSubmitOrderRequest { - export type AsObject = { - ask?: ServerAsk.AsObject, - bid?: ServerBid.AsObject, - userAgent: string, - } - - export enum DetailsCase { - DETAILS_NOT_SET = 0, - ASK = 1, - BID = 2, - } -} - -export class ServerSubmitOrderResponse extends jspb.Message { - hasInvalidOrder(): boolean; - clearInvalidOrder(): void; - getInvalidOrder(): InvalidOrder | undefined; - setInvalidOrder(value?: InvalidOrder): void; - - hasAccepted(): boolean; - clearAccepted(): void; - getAccepted(): boolean; - setAccepted(value: boolean): void; - - getDetailsCase(): ServerSubmitOrderResponse.DetailsCase; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ServerSubmitOrderResponse.AsObject; - static toObject(includeInstance: boolean, msg: ServerSubmitOrderResponse): ServerSubmitOrderResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ServerSubmitOrderResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ServerSubmitOrderResponse; - static deserializeBinaryFromReader(message: ServerSubmitOrderResponse, reader: jspb.BinaryReader): ServerSubmitOrderResponse; -} - -export namespace ServerSubmitOrderResponse { - export type AsObject = { - invalidOrder?: InvalidOrder.AsObject, - accepted: boolean, - } - - export enum DetailsCase { - DETAILS_NOT_SET = 0, - INVALID_ORDER = 1, - ACCEPTED = 2, - } -} - -export class ServerCancelOrderRequest extends jspb.Message { - getOrderNoncePreimage(): Uint8Array | string; - getOrderNoncePreimage_asU8(): Uint8Array; - getOrderNoncePreimage_asB64(): string; - setOrderNoncePreimage(value: Uint8Array | string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ServerCancelOrderRequest.AsObject; - static toObject(includeInstance: boolean, msg: ServerCancelOrderRequest): ServerCancelOrderRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ServerCancelOrderRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ServerCancelOrderRequest; - static deserializeBinaryFromReader(message: ServerCancelOrderRequest, reader: jspb.BinaryReader): ServerCancelOrderRequest; -} - -export namespace ServerCancelOrderRequest { - export type AsObject = { - orderNoncePreimage: Uint8Array | string, - } -} - -export class ServerCancelOrderResponse extends jspb.Message { - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ServerCancelOrderResponse.AsObject; - static toObject(includeInstance: boolean, msg: ServerCancelOrderResponse): ServerCancelOrderResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ServerCancelOrderResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ServerCancelOrderResponse; - static deserializeBinaryFromReader(message: ServerCancelOrderResponse, reader: jspb.BinaryReader): ServerCancelOrderResponse; -} - -export namespace ServerCancelOrderResponse { - export type AsObject = { - } -} - -export class ClientAuctionMessage extends jspb.Message { - hasCommit(): boolean; - clearCommit(): void; - getCommit(): AccountCommitment | undefined; - setCommit(value?: AccountCommitment): void; - - hasSubscribe(): boolean; - clearSubscribe(): void; - getSubscribe(): AccountSubscription | undefined; - setSubscribe(value?: AccountSubscription): void; - - hasAccept(): boolean; - clearAccept(): void; - getAccept(): OrderMatchAccept | undefined; - setAccept(value?: OrderMatchAccept): void; - - hasReject(): boolean; - clearReject(): void; - getReject(): OrderMatchReject | undefined; - setReject(value?: OrderMatchReject): void; - - hasSign(): boolean; - clearSign(): void; - getSign(): OrderMatchSign | undefined; - setSign(value?: OrderMatchSign): void; - - hasRecover(): boolean; - clearRecover(): void; - getRecover(): AccountRecovery | undefined; - setRecover(value?: AccountRecovery): void; - - getMsgCase(): ClientAuctionMessage.MsgCase; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ClientAuctionMessage.AsObject; - static toObject(includeInstance: boolean, msg: ClientAuctionMessage): ClientAuctionMessage.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ClientAuctionMessage, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ClientAuctionMessage; - static deserializeBinaryFromReader(message: ClientAuctionMessage, reader: jspb.BinaryReader): ClientAuctionMessage; -} - -export namespace ClientAuctionMessage { - export type AsObject = { - commit?: AccountCommitment.AsObject, - subscribe?: AccountSubscription.AsObject, - accept?: OrderMatchAccept.AsObject, - reject?: OrderMatchReject.AsObject, - sign?: OrderMatchSign.AsObject, - recover?: AccountRecovery.AsObject, - } - - export enum MsgCase { - MSG_NOT_SET = 0, - COMMIT = 1, - SUBSCRIBE = 2, - ACCEPT = 3, - REJECT = 4, - SIGN = 5, - RECOVER = 6, - } -} - -export class AccountCommitment extends jspb.Message { - getCommitHash(): Uint8Array | string; - getCommitHash_asU8(): Uint8Array; - getCommitHash_asB64(): string; - setCommitHash(value: Uint8Array | string): void; - - getBatchVersion(): number; - setBatchVersion(value: number): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): AccountCommitment.AsObject; - static toObject(includeInstance: boolean, msg: AccountCommitment): AccountCommitment.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: AccountCommitment, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): AccountCommitment; - static deserializeBinaryFromReader(message: AccountCommitment, reader: jspb.BinaryReader): AccountCommitment; -} - -export namespace AccountCommitment { - export type AsObject = { - commitHash: Uint8Array | string, - batchVersion: number, - } -} - -export class AccountSubscription extends jspb.Message { - getTraderKey(): Uint8Array | string; - getTraderKey_asU8(): Uint8Array; - getTraderKey_asB64(): string; - setTraderKey(value: Uint8Array | string): void; - - getCommitNonce(): Uint8Array | string; - getCommitNonce_asU8(): Uint8Array; - getCommitNonce_asB64(): string; - setCommitNonce(value: Uint8Array | string): void; - - getAuthSig(): Uint8Array | string; - getAuthSig_asU8(): Uint8Array; - getAuthSig_asB64(): string; - setAuthSig(value: Uint8Array | string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): AccountSubscription.AsObject; - static toObject(includeInstance: boolean, msg: AccountSubscription): AccountSubscription.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: AccountSubscription, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): AccountSubscription; - static deserializeBinaryFromReader(message: AccountSubscription, reader: jspb.BinaryReader): AccountSubscription; -} - -export namespace AccountSubscription { - export type AsObject = { - traderKey: Uint8Array | string, - commitNonce: Uint8Array | string, - authSig: Uint8Array | string, - } -} - -export class OrderMatchAccept extends jspb.Message { - getBatchId(): Uint8Array | string; - getBatchId_asU8(): Uint8Array; - getBatchId_asB64(): string; - setBatchId(value: Uint8Array | string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): OrderMatchAccept.AsObject; - static toObject(includeInstance: boolean, msg: OrderMatchAccept): OrderMatchAccept.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: OrderMatchAccept, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): OrderMatchAccept; - static deserializeBinaryFromReader(message: OrderMatchAccept, reader: jspb.BinaryReader): OrderMatchAccept; -} - -export namespace OrderMatchAccept { - export type AsObject = { - batchId: Uint8Array | string, - } -} - -export class OrderMatchReject extends jspb.Message { - getBatchId(): Uint8Array | string; - getBatchId_asU8(): Uint8Array; - getBatchId_asB64(): string; - setBatchId(value: Uint8Array | string): void; - - getReason(): string; - setReason(value: string): void; - - getReasonCode(): OrderMatchReject.RejectReasonMap[keyof OrderMatchReject.RejectReasonMap]; - setReasonCode(value: OrderMatchReject.RejectReasonMap[keyof OrderMatchReject.RejectReasonMap]): void; - - getRejectedOrdersMap(): jspb.Map; - clearRejectedOrdersMap(): void; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): OrderMatchReject.AsObject; - static toObject(includeInstance: boolean, msg: OrderMatchReject): OrderMatchReject.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: OrderMatchReject, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): OrderMatchReject; - static deserializeBinaryFromReader(message: OrderMatchReject, reader: jspb.BinaryReader): OrderMatchReject; -} - -export namespace OrderMatchReject { - export type AsObject = { - batchId: Uint8Array | string, - reason: string, - reasonCode: OrderMatchReject.RejectReasonMap[keyof OrderMatchReject.RejectReasonMap], - rejectedOrders: Array<[string, OrderReject.AsObject]>, - } - - export interface RejectReasonMap { - UNKNOWN: 0; - SERVER_MISBEHAVIOR: 1; - BATCH_VERSION_MISMATCH: 2; - PARTIAL_REJECT: 3; - } - - export const RejectReason: RejectReasonMap; -} - -export class OrderReject extends jspb.Message { - getReason(): string; - setReason(value: string): void; - - getReasonCode(): OrderReject.OrderRejectReasonMap[keyof OrderReject.OrderRejectReasonMap]; - setReasonCode(value: OrderReject.OrderRejectReasonMap[keyof OrderReject.OrderRejectReasonMap]): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): OrderReject.AsObject; - static toObject(includeInstance: boolean, msg: OrderReject): OrderReject.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: OrderReject, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): OrderReject; - static deserializeBinaryFromReader(message: OrderReject, reader: jspb.BinaryReader): OrderReject; -} - -export namespace OrderReject { - export type AsObject = { - reason: string, - reasonCode: OrderReject.OrderRejectReasonMap[keyof OrderReject.OrderRejectReasonMap], - } - - export interface OrderRejectReasonMap { - DUPLICATE_PEER: 0; - CHANNEL_FUNDING_FAILED: 1; - } - - export const OrderRejectReason: OrderRejectReasonMap; -} - -export class ChannelInfo extends jspb.Message { - getType(): ChannelTypeMap[keyof ChannelTypeMap]; - setType(value: ChannelTypeMap[keyof ChannelTypeMap]): void; - - getLocalNodeKey(): Uint8Array | string; - getLocalNodeKey_asU8(): Uint8Array; - getLocalNodeKey_asB64(): string; - setLocalNodeKey(value: Uint8Array | string): void; - - getRemoteNodeKey(): Uint8Array | string; - getRemoteNodeKey_asU8(): Uint8Array; - getRemoteNodeKey_asB64(): string; - setRemoteNodeKey(value: Uint8Array | string): void; - - getLocalPaymentBasePoint(): Uint8Array | string; - getLocalPaymentBasePoint_asU8(): Uint8Array; - getLocalPaymentBasePoint_asB64(): string; - setLocalPaymentBasePoint(value: Uint8Array | string): void; - - getRemotePaymentBasePoint(): Uint8Array | string; - getRemotePaymentBasePoint_asU8(): Uint8Array; - getRemotePaymentBasePoint_asB64(): string; - setRemotePaymentBasePoint(value: Uint8Array | string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ChannelInfo.AsObject; - static toObject(includeInstance: boolean, msg: ChannelInfo): ChannelInfo.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ChannelInfo, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ChannelInfo; - static deserializeBinaryFromReader(message: ChannelInfo, reader: jspb.BinaryReader): ChannelInfo; -} - -export namespace ChannelInfo { - export type AsObject = { - type: ChannelTypeMap[keyof ChannelTypeMap], - localNodeKey: Uint8Array | string, - remoteNodeKey: Uint8Array | string, - localPaymentBasePoint: Uint8Array | string, - remotePaymentBasePoint: Uint8Array | string, - } -} - -export class OrderMatchSign extends jspb.Message { - getBatchId(): Uint8Array | string; - getBatchId_asU8(): Uint8Array; - getBatchId_asB64(): string; - setBatchId(value: Uint8Array | string): void; - - getAccountSigsMap(): jspb.Map; - clearAccountSigsMap(): void; - getChannelInfosMap(): jspb.Map; - clearChannelInfosMap(): void; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): OrderMatchSign.AsObject; - static toObject(includeInstance: boolean, msg: OrderMatchSign): OrderMatchSign.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: OrderMatchSign, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): OrderMatchSign; - static deserializeBinaryFromReader(message: OrderMatchSign, reader: jspb.BinaryReader): OrderMatchSign; -} - -export namespace OrderMatchSign { - export type AsObject = { - batchId: Uint8Array | string, - accountSigs: Array<[string, Uint8Array | string]>, - channelInfos: Array<[string, ChannelInfo.AsObject]>, - } -} - -export class AccountRecovery extends jspb.Message { - getTraderKey(): Uint8Array | string; - getTraderKey_asU8(): Uint8Array; - getTraderKey_asB64(): string; - setTraderKey(value: Uint8Array | string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): AccountRecovery.AsObject; - static toObject(includeInstance: boolean, msg: AccountRecovery): AccountRecovery.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: AccountRecovery, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): AccountRecovery; - static deserializeBinaryFromReader(message: AccountRecovery, reader: jspb.BinaryReader): AccountRecovery; -} - -export namespace AccountRecovery { - export type AsObject = { - traderKey: Uint8Array | string, - } -} - -export class ServerAuctionMessage extends jspb.Message { - hasChallenge(): boolean; - clearChallenge(): void; - getChallenge(): ServerChallenge | undefined; - setChallenge(value?: ServerChallenge): void; - - hasSuccess(): boolean; - clearSuccess(): void; - getSuccess(): SubscribeSuccess | undefined; - setSuccess(value?: SubscribeSuccess): void; - - hasError(): boolean; - clearError(): void; - getError(): SubscribeError | undefined; - setError(value?: SubscribeError): void; - - hasPrepare(): boolean; - clearPrepare(): void; - getPrepare(): OrderMatchPrepare | undefined; - setPrepare(value?: OrderMatchPrepare): void; - - hasSign(): boolean; - clearSign(): void; - getSign(): OrderMatchSignBegin | undefined; - setSign(value?: OrderMatchSignBegin): void; - - hasFinalize(): boolean; - clearFinalize(): void; - getFinalize(): OrderMatchFinalize | undefined; - setFinalize(value?: OrderMatchFinalize): void; - - hasAccount(): boolean; - clearAccount(): void; - getAccount(): AuctionAccount | undefined; - setAccount(value?: AuctionAccount): void; - - getMsgCase(): ServerAuctionMessage.MsgCase; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ServerAuctionMessage.AsObject; - static toObject(includeInstance: boolean, msg: ServerAuctionMessage): ServerAuctionMessage.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ServerAuctionMessage, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ServerAuctionMessage; - static deserializeBinaryFromReader(message: ServerAuctionMessage, reader: jspb.BinaryReader): ServerAuctionMessage; -} - -export namespace ServerAuctionMessage { - export type AsObject = { - challenge?: ServerChallenge.AsObject, - success?: SubscribeSuccess.AsObject, - error?: SubscribeError.AsObject, - prepare?: OrderMatchPrepare.AsObject, - sign?: OrderMatchSignBegin.AsObject, - finalize?: OrderMatchFinalize.AsObject, - account?: AuctionAccount.AsObject, - } - - export enum MsgCase { - MSG_NOT_SET = 0, - CHALLENGE = 1, - SUCCESS = 2, - ERROR = 3, - PREPARE = 4, - SIGN = 5, - FINALIZE = 6, - ACCOUNT = 7, - } -} - -export class ServerChallenge extends jspb.Message { - getChallenge(): Uint8Array | string; - getChallenge_asU8(): Uint8Array; - getChallenge_asB64(): string; - setChallenge(value: Uint8Array | string): void; - - getCommitHash(): Uint8Array | string; - getCommitHash_asU8(): Uint8Array; - getCommitHash_asB64(): string; - setCommitHash(value: Uint8Array | string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ServerChallenge.AsObject; - static toObject(includeInstance: boolean, msg: ServerChallenge): ServerChallenge.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ServerChallenge, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ServerChallenge; - static deserializeBinaryFromReader(message: ServerChallenge, reader: jspb.BinaryReader): ServerChallenge; -} - -export namespace ServerChallenge { - export type AsObject = { - challenge: Uint8Array | string, - commitHash: Uint8Array | string, - } -} - -export class SubscribeSuccess extends jspb.Message { - getTraderKey(): Uint8Array | string; - getTraderKey_asU8(): Uint8Array; - getTraderKey_asB64(): string; - setTraderKey(value: Uint8Array | string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): SubscribeSuccess.AsObject; - static toObject(includeInstance: boolean, msg: SubscribeSuccess): SubscribeSuccess.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: SubscribeSuccess, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): SubscribeSuccess; - static deserializeBinaryFromReader(message: SubscribeSuccess, reader: jspb.BinaryReader): SubscribeSuccess; -} - -export namespace SubscribeSuccess { - export type AsObject = { - traderKey: Uint8Array | string, - } -} - -export class MatchedMarket extends jspb.Message { - getMatchedOrdersMap(): jspb.Map; - clearMatchedOrdersMap(): void; - getClearingPriceRate(): number; - setClearingPriceRate(value: number): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): MatchedMarket.AsObject; - static toObject(includeInstance: boolean, msg: MatchedMarket): MatchedMarket.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: MatchedMarket, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): MatchedMarket; - static deserializeBinaryFromReader(message: MatchedMarket, reader: jspb.BinaryReader): MatchedMarket; -} - -export namespace MatchedMarket { - export type AsObject = { - matchedOrders: Array<[string, MatchedOrder.AsObject]>, - clearingPriceRate: number, - } -} - -export class OrderMatchPrepare extends jspb.Message { - getMatchedOrdersMap(): jspb.Map; - clearMatchedOrdersMap(): void; - getClearingPriceRate(): number; - setClearingPriceRate(value: number): void; - - clearChargedAccountsList(): void; - getChargedAccountsList(): Array; - setChargedAccountsList(value: Array): void; - addChargedAccounts(value?: AccountDiff, index?: number): AccountDiff; - - hasExecutionFee(): boolean; - clearExecutionFee(): void; - getExecutionFee(): ExecutionFee | undefined; - setExecutionFee(value?: ExecutionFee): void; - - getBatchTransaction(): Uint8Array | string; - getBatchTransaction_asU8(): Uint8Array; - getBatchTransaction_asB64(): string; - setBatchTransaction(value: Uint8Array | string): void; - - getFeeRateSatPerKw(): number; - setFeeRateSatPerKw(value: number): void; - - getFeeRebateSat(): number; - setFeeRebateSat(value: number): void; - - getBatchId(): Uint8Array | string; - getBatchId_asU8(): Uint8Array; - getBatchId_asB64(): string; - setBatchId(value: Uint8Array | string): void; - - getBatchVersion(): number; - setBatchVersion(value: number): void; - - getMatchedMarketsMap(): jspb.Map; - clearMatchedMarketsMap(): void; - getBatchHeightHint(): number; - setBatchHeightHint(value: number): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): OrderMatchPrepare.AsObject; - static toObject(includeInstance: boolean, msg: OrderMatchPrepare): OrderMatchPrepare.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: OrderMatchPrepare, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): OrderMatchPrepare; - static deserializeBinaryFromReader(message: OrderMatchPrepare, reader: jspb.BinaryReader): OrderMatchPrepare; -} - -export namespace OrderMatchPrepare { - export type AsObject = { - matchedOrders: Array<[string, MatchedOrder.AsObject]>, - clearingPriceRate: number, - chargedAccounts: Array, - executionFee?: ExecutionFee.AsObject, - batchTransaction: Uint8Array | string, - feeRateSatPerKw: number, - feeRebateSat: number, - batchId: Uint8Array | string, - batchVersion: number, - matchedMarkets: Array<[number, MatchedMarket.AsObject]>, - batchHeightHint: number, - } -} - -export class OrderMatchSignBegin extends jspb.Message { - getBatchId(): Uint8Array | string; - getBatchId_asU8(): Uint8Array; - getBatchId_asB64(): string; - setBatchId(value: Uint8Array | string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): OrderMatchSignBegin.AsObject; - static toObject(includeInstance: boolean, msg: OrderMatchSignBegin): OrderMatchSignBegin.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: OrderMatchSignBegin, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): OrderMatchSignBegin; - static deserializeBinaryFromReader(message: OrderMatchSignBegin, reader: jspb.BinaryReader): OrderMatchSignBegin; -} - -export namespace OrderMatchSignBegin { - export type AsObject = { - batchId: Uint8Array | string, - } -} - -export class OrderMatchFinalize extends jspb.Message { - getBatchId(): Uint8Array | string; - getBatchId_asU8(): Uint8Array; - getBatchId_asB64(): string; - setBatchId(value: Uint8Array | string): void; - - getBatchTxid(): Uint8Array | string; - getBatchTxid_asU8(): Uint8Array; - getBatchTxid_asB64(): string; - setBatchTxid(value: Uint8Array | string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): OrderMatchFinalize.AsObject; - static toObject(includeInstance: boolean, msg: OrderMatchFinalize): OrderMatchFinalize.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: OrderMatchFinalize, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): OrderMatchFinalize; - static deserializeBinaryFromReader(message: OrderMatchFinalize, reader: jspb.BinaryReader): OrderMatchFinalize; -} - -export namespace OrderMatchFinalize { - export type AsObject = { - batchId: Uint8Array | string, - batchTxid: Uint8Array | string, - } -} - -export class SubscribeError extends jspb.Message { - getError(): string; - setError(value: string): void; - - getErrorCode(): SubscribeError.ErrorMap[keyof SubscribeError.ErrorMap]; - setErrorCode(value: SubscribeError.ErrorMap[keyof SubscribeError.ErrorMap]): void; - - getTraderKey(): Uint8Array | string; - getTraderKey_asU8(): Uint8Array; - getTraderKey_asB64(): string; - setTraderKey(value: Uint8Array | string): void; - - hasAccountReservation(): boolean; - clearAccountReservation(): void; - getAccountReservation(): AuctionAccount | undefined; - setAccountReservation(value?: AuctionAccount): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): SubscribeError.AsObject; - static toObject(includeInstance: boolean, msg: SubscribeError): SubscribeError.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: SubscribeError, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): SubscribeError; - static deserializeBinaryFromReader(message: SubscribeError, reader: jspb.BinaryReader): SubscribeError; -} - -export namespace SubscribeError { - export type AsObject = { - error: string, - errorCode: SubscribeError.ErrorMap[keyof SubscribeError.ErrorMap], - traderKey: Uint8Array | string, - accountReservation?: AuctionAccount.AsObject, - } - - export interface ErrorMap { - UNKNOWN: 0; - SERVER_SHUTDOWN: 1; - ACCOUNT_DOES_NOT_EXIST: 2; - INCOMPLETE_ACCOUNT_RESERVATION: 3; - } - - export const Error: ErrorMap; -} - -export class AuctionAccount extends jspb.Message { - getValue(): number; - setValue(value: number): void; - - getExpiry(): number; - setExpiry(value: number): void; - - getTraderKey(): Uint8Array | string; - getTraderKey_asU8(): Uint8Array; - getTraderKey_asB64(): string; - setTraderKey(value: Uint8Array | string): void; - - getAuctioneerKey(): Uint8Array | string; - getAuctioneerKey_asU8(): Uint8Array; - getAuctioneerKey_asB64(): string; - setAuctioneerKey(value: Uint8Array | string): void; - - getBatchKey(): Uint8Array | string; - getBatchKey_asU8(): Uint8Array; - getBatchKey_asB64(): string; - setBatchKey(value: Uint8Array | string): void; - - getState(): AuctionAccountStateMap[keyof AuctionAccountStateMap]; - setState(value: AuctionAccountStateMap[keyof AuctionAccountStateMap]): void; - - getHeightHint(): number; - setHeightHint(value: number): void; - - hasOutpoint(): boolean; - clearOutpoint(): void; - getOutpoint(): OutPoint | undefined; - setOutpoint(value?: OutPoint): void; - - getLatestTx(): Uint8Array | string; - getLatestTx_asU8(): Uint8Array; - getLatestTx_asB64(): string; - setLatestTx(value: Uint8Array | string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): AuctionAccount.AsObject; - static toObject(includeInstance: boolean, msg: AuctionAccount): AuctionAccount.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: AuctionAccount, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): AuctionAccount; - static deserializeBinaryFromReader(message: AuctionAccount, reader: jspb.BinaryReader): AuctionAccount; -} - -export namespace AuctionAccount { - export type AsObject = { - value: number, - expiry: number, - traderKey: Uint8Array | string, - auctioneerKey: Uint8Array | string, - batchKey: Uint8Array | string, - state: AuctionAccountStateMap[keyof AuctionAccountStateMap], - heightHint: number, - outpoint?: OutPoint.AsObject, - latestTx: Uint8Array | string, - } -} - -export class MatchedOrder extends jspb.Message { - clearMatchedBidsList(): void; - getMatchedBidsList(): Array; - setMatchedBidsList(value: Array): void; - addMatchedBids(value?: MatchedBid, index?: number): MatchedBid; - - clearMatchedAsksList(): void; - getMatchedAsksList(): Array; - setMatchedAsksList(value: Array): void; - addMatchedAsks(value?: MatchedAsk, index?: number): MatchedAsk; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): MatchedOrder.AsObject; - static toObject(includeInstance: boolean, msg: MatchedOrder): MatchedOrder.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: MatchedOrder, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): MatchedOrder; - static deserializeBinaryFromReader(message: MatchedOrder, reader: jspb.BinaryReader): MatchedOrder; -} - -export namespace MatchedOrder { - export type AsObject = { - matchedBids: Array, - matchedAsks: Array, - } -} - -export class MatchedAsk extends jspb.Message { - hasAsk(): boolean; - clearAsk(): void; - getAsk(): ServerAsk | undefined; - setAsk(value?: ServerAsk): void; - - getUnitsFilled(): number; - setUnitsFilled(value: number): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): MatchedAsk.AsObject; - static toObject(includeInstance: boolean, msg: MatchedAsk): MatchedAsk.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: MatchedAsk, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): MatchedAsk; - static deserializeBinaryFromReader(message: MatchedAsk, reader: jspb.BinaryReader): MatchedAsk; -} - -export namespace MatchedAsk { - export type AsObject = { - ask?: ServerAsk.AsObject, - unitsFilled: number, - } -} - -export class MatchedBid extends jspb.Message { - hasBid(): boolean; - clearBid(): void; - getBid(): ServerBid | undefined; - setBid(value?: ServerBid): void; - - getUnitsFilled(): number; - setUnitsFilled(value: number): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): MatchedBid.AsObject; - static toObject(includeInstance: boolean, msg: MatchedBid): MatchedBid.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: MatchedBid, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): MatchedBid; - static deserializeBinaryFromReader(message: MatchedBid, reader: jspb.BinaryReader): MatchedBid; -} - -export namespace MatchedBid { - export type AsObject = { - bid?: ServerBid.AsObject, - unitsFilled: number, - } -} - -export class AccountDiff extends jspb.Message { - getEndingBalance(): number; - setEndingBalance(value: number): void; - - getEndingState(): AccountDiff.AccountStateMap[keyof AccountDiff.AccountStateMap]; - setEndingState(value: AccountDiff.AccountStateMap[keyof AccountDiff.AccountStateMap]): void; - - getOutpointIndex(): number; - setOutpointIndex(value: number): void; - - getTraderKey(): Uint8Array | string; - getTraderKey_asU8(): Uint8Array; - getTraderKey_asB64(): string; - setTraderKey(value: Uint8Array | string): void; - - getNewExpiry(): number; - setNewExpiry(value: number): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): AccountDiff.AsObject; - static toObject(includeInstance: boolean, msg: AccountDiff): AccountDiff.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: AccountDiff, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): AccountDiff; - static deserializeBinaryFromReader(message: AccountDiff, reader: jspb.BinaryReader): AccountDiff; -} - -export namespace AccountDiff { - export type AsObject = { - endingBalance: number, - endingState: AccountDiff.AccountStateMap[keyof AccountDiff.AccountStateMap], - outpointIndex: number, - traderKey: Uint8Array | string, - newExpiry: number, - } - - export interface AccountStateMap { - OUTPUT_RECREATED: 0; - OUTPUT_DUST_EXTENDED_OFFCHAIN: 1; - OUTPUT_DUST_ADDED_TO_FEES: 2; - OUTPUT_FULLY_SPENT: 3; - } - - export const AccountState: AccountStateMap; -} - -export class ServerOrder extends jspb.Message { - getTraderKey(): Uint8Array | string; - getTraderKey_asU8(): Uint8Array; - getTraderKey_asB64(): string; - setTraderKey(value: Uint8Array | string): void; - - getRateFixed(): number; - setRateFixed(value: number): void; - - getAmt(): number; - setAmt(value: number): void; - - getMinChanAmt(): number; - setMinChanAmt(value: number): void; - - getOrderNonce(): Uint8Array | string; - getOrderNonce_asU8(): Uint8Array; - getOrderNonce_asB64(): string; - setOrderNonce(value: Uint8Array | string): void; - - getOrderSig(): Uint8Array | string; - getOrderSig_asU8(): Uint8Array; - getOrderSig_asB64(): string; - setOrderSig(value: Uint8Array | string): void; - - getMultiSigKey(): Uint8Array | string; - getMultiSigKey_asU8(): Uint8Array; - getMultiSigKey_asB64(): string; - setMultiSigKey(value: Uint8Array | string): void; - - getNodePub(): Uint8Array | string; - getNodePub_asU8(): Uint8Array; - getNodePub_asB64(): string; - setNodePub(value: Uint8Array | string): void; - - clearNodeAddrList(): void; - getNodeAddrList(): Array; - setNodeAddrList(value: Array): void; - addNodeAddr(value?: NodeAddress, index?: number): NodeAddress; - - getChannelType(): OrderChannelTypeMap[keyof OrderChannelTypeMap]; - setChannelType(value: OrderChannelTypeMap[keyof OrderChannelTypeMap]): void; - - getMaxBatchFeeRateSatPerKw(): number; - setMaxBatchFeeRateSatPerKw(value: number): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ServerOrder.AsObject; - static toObject(includeInstance: boolean, msg: ServerOrder): ServerOrder.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ServerOrder, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ServerOrder; - static deserializeBinaryFromReader(message: ServerOrder, reader: jspb.BinaryReader): ServerOrder; -} - -export namespace ServerOrder { - export type AsObject = { - traderKey: Uint8Array | string, - rateFixed: number, - amt: number, - minChanAmt: number, - orderNonce: Uint8Array | string, - orderSig: Uint8Array | string, - multiSigKey: Uint8Array | string, - nodePub: Uint8Array | string, - nodeAddr: Array, - channelType: OrderChannelTypeMap[keyof OrderChannelTypeMap], - maxBatchFeeRateSatPerKw: number, - } -} - -export class ServerBid extends jspb.Message { - hasDetails(): boolean; - clearDetails(): void; - getDetails(): ServerOrder | undefined; - setDetails(value?: ServerOrder): void; - - getLeaseDurationBlocks(): number; - setLeaseDurationBlocks(value: number): void; - - getVersion(): number; - setVersion(value: number): void; - - getMinNodeTier(): NodeTierMap[keyof NodeTierMap]; - setMinNodeTier(value: NodeTierMap[keyof NodeTierMap]): void; - - getSelfChanBalance(): number; - setSelfChanBalance(value: number): void; - - getIsSidecarChannel(): boolean; - setIsSidecarChannel(value: boolean): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ServerBid.AsObject; - static toObject(includeInstance: boolean, msg: ServerBid): ServerBid.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ServerBid, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ServerBid; - static deserializeBinaryFromReader(message: ServerBid, reader: jspb.BinaryReader): ServerBid; -} - -export namespace ServerBid { - export type AsObject = { - details?: ServerOrder.AsObject, - leaseDurationBlocks: number, - version: number, - minNodeTier: NodeTierMap[keyof NodeTierMap], - selfChanBalance: number, - isSidecarChannel: boolean, - } -} - -export class ServerAsk extends jspb.Message { - hasDetails(): boolean; - clearDetails(): void; - getDetails(): ServerOrder | undefined; - setDetails(value?: ServerOrder): void; - - getLeaseDurationBlocks(): number; - setLeaseDurationBlocks(value: number): void; - - getVersion(): number; - setVersion(value: number): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ServerAsk.AsObject; - static toObject(includeInstance: boolean, msg: ServerAsk): ServerAsk.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ServerAsk, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ServerAsk; - static deserializeBinaryFromReader(message: ServerAsk, reader: jspb.BinaryReader): ServerAsk; -} - -export namespace ServerAsk { - export type AsObject = { - details?: ServerOrder.AsObject, - leaseDurationBlocks: number, - version: number, - } -} - -export class CancelOrder extends jspb.Message { - getOrderNonce(): Uint8Array | string; - getOrderNonce_asU8(): Uint8Array; - getOrderNonce_asB64(): string; - setOrderNonce(value: Uint8Array | string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): CancelOrder.AsObject; - static toObject(includeInstance: boolean, msg: CancelOrder): CancelOrder.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: CancelOrder, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): CancelOrder; - static deserializeBinaryFromReader(message: CancelOrder, reader: jspb.BinaryReader): CancelOrder; -} - -export namespace CancelOrder { - export type AsObject = { - orderNonce: Uint8Array | string, - } -} - -export class InvalidOrder extends jspb.Message { - getOrderNonce(): Uint8Array | string; - getOrderNonce_asU8(): Uint8Array; - getOrderNonce_asB64(): string; - setOrderNonce(value: Uint8Array | string): void; - - getFailReason(): InvalidOrder.FailReasonMap[keyof InvalidOrder.FailReasonMap]; - setFailReason(value: InvalidOrder.FailReasonMap[keyof InvalidOrder.FailReasonMap]): void; - - getFailString(): string; - setFailString(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): InvalidOrder.AsObject; - static toObject(includeInstance: boolean, msg: InvalidOrder): InvalidOrder.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: InvalidOrder, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): InvalidOrder; - static deserializeBinaryFromReader(message: InvalidOrder, reader: jspb.BinaryReader): InvalidOrder; -} - -export namespace InvalidOrder { - export type AsObject = { - orderNonce: Uint8Array | string, - failReason: InvalidOrder.FailReasonMap[keyof InvalidOrder.FailReasonMap], - failString: string, - } - - export interface FailReasonMap { - INVALID_AMT: 0; - } - - export const FailReason: FailReasonMap; -} - -export class ServerInput extends jspb.Message { - hasOutpoint(): boolean; - clearOutpoint(): void; - getOutpoint(): OutPoint | undefined; - setOutpoint(value?: OutPoint): void; - - getSigScript(): Uint8Array | string; - getSigScript_asU8(): Uint8Array; - getSigScript_asB64(): string; - setSigScript(value: Uint8Array | string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ServerInput.AsObject; - static toObject(includeInstance: boolean, msg: ServerInput): ServerInput.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ServerInput, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ServerInput; - static deserializeBinaryFromReader(message: ServerInput, reader: jspb.BinaryReader): ServerInput; -} - -export namespace ServerInput { - export type AsObject = { - outpoint?: OutPoint.AsObject, - sigScript: Uint8Array | string, - } -} - -export class ServerOutput extends jspb.Message { - getValue(): number; - setValue(value: number): void; - - getScript(): Uint8Array | string; - getScript_asU8(): Uint8Array; - getScript_asB64(): string; - setScript(value: Uint8Array | string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ServerOutput.AsObject; - static toObject(includeInstance: boolean, msg: ServerOutput): ServerOutput.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ServerOutput, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ServerOutput; - static deserializeBinaryFromReader(message: ServerOutput, reader: jspb.BinaryReader): ServerOutput; -} - -export namespace ServerOutput { - export type AsObject = { - value: number, - script: Uint8Array | string, - } -} - -export class ServerModifyAccountRequest extends jspb.Message { - getTraderKey(): Uint8Array | string; - getTraderKey_asU8(): Uint8Array; - getTraderKey_asB64(): string; - setTraderKey(value: Uint8Array | string): void; - - clearNewInputsList(): void; - getNewInputsList(): Array; - setNewInputsList(value: Array): void; - addNewInputs(value?: ServerInput, index?: number): ServerInput; - - clearNewOutputsList(): void; - getNewOutputsList(): Array; - setNewOutputsList(value: Array): void; - addNewOutputs(value?: ServerOutput, index?: number): ServerOutput; - - hasNewParams(): boolean; - clearNewParams(): void; - getNewParams(): ServerModifyAccountRequest.NewAccountParameters | undefined; - setNewParams(value?: ServerModifyAccountRequest.NewAccountParameters): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ServerModifyAccountRequest.AsObject; - static toObject(includeInstance: boolean, msg: ServerModifyAccountRequest): ServerModifyAccountRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ServerModifyAccountRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ServerModifyAccountRequest; - static deserializeBinaryFromReader(message: ServerModifyAccountRequest, reader: jspb.BinaryReader): ServerModifyAccountRequest; -} - -export namespace ServerModifyAccountRequest { - export type AsObject = { - traderKey: Uint8Array | string, - newInputs: Array, - newOutputs: Array, - newParams?: ServerModifyAccountRequest.NewAccountParameters.AsObject, - } - - export class NewAccountParameters extends jspb.Message { - getValue(): number; - setValue(value: number): void; - - getExpiry(): number; - setExpiry(value: number): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): NewAccountParameters.AsObject; - static toObject(includeInstance: boolean, msg: NewAccountParameters): NewAccountParameters.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: NewAccountParameters, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): NewAccountParameters; - static deserializeBinaryFromReader(message: NewAccountParameters, reader: jspb.BinaryReader): NewAccountParameters; - } - - export namespace NewAccountParameters { - export type AsObject = { - value: number, - expiry: number, - } - } -} - -export class ServerModifyAccountResponse extends jspb.Message { - getAccountSig(): Uint8Array | string; - getAccountSig_asU8(): Uint8Array; - getAccountSig_asB64(): string; - setAccountSig(value: Uint8Array | string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ServerModifyAccountResponse.AsObject; - static toObject(includeInstance: boolean, msg: ServerModifyAccountResponse): ServerModifyAccountResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ServerModifyAccountResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ServerModifyAccountResponse; - static deserializeBinaryFromReader(message: ServerModifyAccountResponse, reader: jspb.BinaryReader): ServerModifyAccountResponse; -} - -export namespace ServerModifyAccountResponse { - export type AsObject = { - accountSig: Uint8Array | string, - } -} - -export class ServerOrderStateRequest extends jspb.Message { - getOrderNonce(): Uint8Array | string; - getOrderNonce_asU8(): Uint8Array; - getOrderNonce_asB64(): string; - setOrderNonce(value: Uint8Array | string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ServerOrderStateRequest.AsObject; - static toObject(includeInstance: boolean, msg: ServerOrderStateRequest): ServerOrderStateRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ServerOrderStateRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ServerOrderStateRequest; - static deserializeBinaryFromReader(message: ServerOrderStateRequest, reader: jspb.BinaryReader): ServerOrderStateRequest; -} - -export namespace ServerOrderStateRequest { - export type AsObject = { - orderNonce: Uint8Array | string, - } -} - -export class ServerOrderStateResponse extends jspb.Message { - getState(): OrderStateMap[keyof OrderStateMap]; - setState(value: OrderStateMap[keyof OrderStateMap]): void; - - getUnitsUnfulfilled(): number; - setUnitsUnfulfilled(value: number): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ServerOrderStateResponse.AsObject; - static toObject(includeInstance: boolean, msg: ServerOrderStateResponse): ServerOrderStateResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ServerOrderStateResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ServerOrderStateResponse; - static deserializeBinaryFromReader(message: ServerOrderStateResponse, reader: jspb.BinaryReader): ServerOrderStateResponse; -} - -export namespace ServerOrderStateResponse { - export type AsObject = { - state: OrderStateMap[keyof OrderStateMap], - unitsUnfulfilled: number, - } -} - -export class TermsRequest extends jspb.Message { - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): TermsRequest.AsObject; - static toObject(includeInstance: boolean, msg: TermsRequest): TermsRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: TermsRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): TermsRequest; - static deserializeBinaryFromReader(message: TermsRequest, reader: jspb.BinaryReader): TermsRequest; -} - -export namespace TermsRequest { - export type AsObject = { - } -} - -export class TermsResponse extends jspb.Message { - getMaxAccountValue(): number; - setMaxAccountValue(value: number): void; - - getMaxOrderDurationBlocks(): number; - setMaxOrderDurationBlocks(value: number): void; - - hasExecutionFee(): boolean; - clearExecutionFee(): void; - getExecutionFee(): ExecutionFee | undefined; - setExecutionFee(value?: ExecutionFee): void; - - getLeaseDurationsMap(): jspb.Map; - clearLeaseDurationsMap(): void; - getNextBatchConfTarget(): number; - setNextBatchConfTarget(value: number): void; - - getNextBatchFeeRateSatPerKw(): number; - setNextBatchFeeRateSatPerKw(value: number): void; - - getNextBatchClearTimestamp(): number; - setNextBatchClearTimestamp(value: number): void; - - getLeaseDurationBucketsMap(): jspb.Map; - clearLeaseDurationBucketsMap(): void; - getAutoRenewExtensionBlocks(): number; - setAutoRenewExtensionBlocks(value: number): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): TermsResponse.AsObject; - static toObject(includeInstance: boolean, msg: TermsResponse): TermsResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: TermsResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): TermsResponse; - static deserializeBinaryFromReader(message: TermsResponse, reader: jspb.BinaryReader): TermsResponse; -} - -export namespace TermsResponse { - export type AsObject = { - maxAccountValue: number, - maxOrderDurationBlocks: number, - executionFee?: ExecutionFee.AsObject, - leaseDurations: Array<[number, boolean]>, - nextBatchConfTarget: number, - nextBatchFeeRateSatPerKw: number, - nextBatchClearTimestamp: number, - leaseDurationBuckets: Array<[number, DurationBucketStateMap[keyof DurationBucketStateMap]]>, - autoRenewExtensionBlocks: number, - } -} - -export class RelevantBatchRequest extends jspb.Message { - getId(): Uint8Array | string; - getId_asU8(): Uint8Array; - getId_asB64(): string; - setId(value: Uint8Array | string): void; - - clearAccountsList(): void; - getAccountsList(): Array; - getAccountsList_asU8(): Array; - getAccountsList_asB64(): Array; - setAccountsList(value: Array): void; - addAccounts(value: Uint8Array | string, index?: number): Uint8Array | string; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): RelevantBatchRequest.AsObject; - static toObject(includeInstance: boolean, msg: RelevantBatchRequest): RelevantBatchRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: RelevantBatchRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): RelevantBatchRequest; - static deserializeBinaryFromReader(message: RelevantBatchRequest, reader: jspb.BinaryReader): RelevantBatchRequest; -} - -export namespace RelevantBatchRequest { - export type AsObject = { - id: Uint8Array | string, - accounts: Array, - } -} - -export class RelevantBatch extends jspb.Message { - getVersion(): number; - setVersion(value: number): void; - - getId(): Uint8Array | string; - getId_asU8(): Uint8Array; - getId_asB64(): string; - setId(value: Uint8Array | string): void; - - clearChargedAccountsList(): void; - getChargedAccountsList(): Array; - setChargedAccountsList(value: Array): void; - addChargedAccounts(value?: AccountDiff, index?: number): AccountDiff; - - getMatchedOrdersMap(): jspb.Map; - clearMatchedOrdersMap(): void; - getClearingPriceRate(): number; - setClearingPriceRate(value: number): void; - - hasExecutionFee(): boolean; - clearExecutionFee(): void; - getExecutionFee(): ExecutionFee | undefined; - setExecutionFee(value?: ExecutionFee): void; - - getTransaction(): Uint8Array | string; - getTransaction_asU8(): Uint8Array; - getTransaction_asB64(): string; - setTransaction(value: Uint8Array | string): void; - - getFeeRateSatPerKw(): number; - setFeeRateSatPerKw(value: number): void; - - getCreationTimestampNs(): number; - setCreationTimestampNs(value: number): void; - - getMatchedMarketsMap(): jspb.Map; - clearMatchedMarketsMap(): void; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): RelevantBatch.AsObject; - static toObject(includeInstance: boolean, msg: RelevantBatch): RelevantBatch.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: RelevantBatch, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): RelevantBatch; - static deserializeBinaryFromReader(message: RelevantBatch, reader: jspb.BinaryReader): RelevantBatch; -} - -export namespace RelevantBatch { - export type AsObject = { - version: number, - id: Uint8Array | string, - chargedAccounts: Array, - matchedOrders: Array<[string, MatchedOrder.AsObject]>, - clearingPriceRate: number, - executionFee?: ExecutionFee.AsObject, - transaction: Uint8Array | string, - feeRateSatPerKw: number, - creationTimestampNs: number, - matchedMarkets: Array<[number, MatchedMarket.AsObject]>, - } -} - -export class ExecutionFee extends jspb.Message { - getBaseFee(): number; - setBaseFee(value: number): void; - - getFeeRate(): number; - setFeeRate(value: number): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ExecutionFee.AsObject; - static toObject(includeInstance: boolean, msg: ExecutionFee): ExecutionFee.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ExecutionFee, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ExecutionFee; - static deserializeBinaryFromReader(message: ExecutionFee, reader: jspb.BinaryReader): ExecutionFee; -} - -export namespace ExecutionFee { - export type AsObject = { - baseFee: number, - feeRate: number, - } -} - -export class NodeAddress extends jspb.Message { - getNetwork(): string; - setNetwork(value: string): void; - - getAddr(): string; - setAddr(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): NodeAddress.AsObject; - static toObject(includeInstance: boolean, msg: NodeAddress): NodeAddress.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: NodeAddress, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): NodeAddress; - static deserializeBinaryFromReader(message: NodeAddress, reader: jspb.BinaryReader): NodeAddress; -} - -export namespace NodeAddress { - export type AsObject = { - network: string, - addr: string, - } -} - -export class OutPoint extends jspb.Message { - getTxid(): Uint8Array | string; - getTxid_asU8(): Uint8Array; - getTxid_asB64(): string; - setTxid(value: Uint8Array | string): void; - - getOutputIndex(): number; - setOutputIndex(value: number): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): OutPoint.AsObject; - static toObject(includeInstance: boolean, msg: OutPoint): OutPoint.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: OutPoint, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): OutPoint; - static deserializeBinaryFromReader(message: OutPoint, reader: jspb.BinaryReader): OutPoint; -} - -export namespace OutPoint { - export type AsObject = { - txid: Uint8Array | string, - outputIndex: number, - } -} - -export class AskSnapshot extends jspb.Message { - getVersion(): number; - setVersion(value: number): void; - - getLeaseDurationBlocks(): number; - setLeaseDurationBlocks(value: number): void; - - getRateFixed(): number; - setRateFixed(value: number): void; - - getChanType(): OrderChannelTypeMap[keyof OrderChannelTypeMap]; - setChanType(value: OrderChannelTypeMap[keyof OrderChannelTypeMap]): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): AskSnapshot.AsObject; - static toObject(includeInstance: boolean, msg: AskSnapshot): AskSnapshot.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: AskSnapshot, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): AskSnapshot; - static deserializeBinaryFromReader(message: AskSnapshot, reader: jspb.BinaryReader): AskSnapshot; -} - -export namespace AskSnapshot { - export type AsObject = { - version: number, - leaseDurationBlocks: number, - rateFixed: number, - chanType: OrderChannelTypeMap[keyof OrderChannelTypeMap], - } -} - -export class BidSnapshot extends jspb.Message { - getVersion(): number; - setVersion(value: number): void; - - getLeaseDurationBlocks(): number; - setLeaseDurationBlocks(value: number): void; - - getRateFixed(): number; - setRateFixed(value: number): void; - - getChanType(): OrderChannelTypeMap[keyof OrderChannelTypeMap]; - setChanType(value: OrderChannelTypeMap[keyof OrderChannelTypeMap]): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): BidSnapshot.AsObject; - static toObject(includeInstance: boolean, msg: BidSnapshot): BidSnapshot.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: BidSnapshot, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): BidSnapshot; - static deserializeBinaryFromReader(message: BidSnapshot, reader: jspb.BinaryReader): BidSnapshot; -} - -export namespace BidSnapshot { - export type AsObject = { - version: number, - leaseDurationBlocks: number, - rateFixed: number, - chanType: OrderChannelTypeMap[keyof OrderChannelTypeMap], - } -} - -export class MatchedOrderSnapshot extends jspb.Message { - hasAsk(): boolean; - clearAsk(): void; - getAsk(): AskSnapshot | undefined; - setAsk(value?: AskSnapshot): void; - - hasBid(): boolean; - clearBid(): void; - getBid(): BidSnapshot | undefined; - setBid(value?: BidSnapshot): void; - - getMatchingRate(): number; - setMatchingRate(value: number): void; - - getTotalSatsCleared(): number; - setTotalSatsCleared(value: number): void; - - getUnitsMatched(): number; - setUnitsMatched(value: number): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): MatchedOrderSnapshot.AsObject; - static toObject(includeInstance: boolean, msg: MatchedOrderSnapshot): MatchedOrderSnapshot.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: MatchedOrderSnapshot, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): MatchedOrderSnapshot; - static deserializeBinaryFromReader(message: MatchedOrderSnapshot, reader: jspb.BinaryReader): MatchedOrderSnapshot; -} - -export namespace MatchedOrderSnapshot { - export type AsObject = { - ask?: AskSnapshot.AsObject, - bid?: BidSnapshot.AsObject, - matchingRate: number, - totalSatsCleared: number, - unitsMatched: number, - } -} - -export class BatchSnapshotRequest extends jspb.Message { - getBatchId(): Uint8Array | string; - getBatchId_asU8(): Uint8Array; - getBatchId_asB64(): string; - setBatchId(value: Uint8Array | string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): BatchSnapshotRequest.AsObject; - static toObject(includeInstance: boolean, msg: BatchSnapshotRequest): BatchSnapshotRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: BatchSnapshotRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): BatchSnapshotRequest; - static deserializeBinaryFromReader(message: BatchSnapshotRequest, reader: jspb.BinaryReader): BatchSnapshotRequest; -} - -export namespace BatchSnapshotRequest { - export type AsObject = { - batchId: Uint8Array | string, - } -} - -export class MatchedMarketSnapshot extends jspb.Message { - clearMatchedOrdersList(): void; - getMatchedOrdersList(): Array; - setMatchedOrdersList(value: Array): void; - addMatchedOrders(value?: MatchedOrderSnapshot, index?: number): MatchedOrderSnapshot; - - getClearingPriceRate(): number; - setClearingPriceRate(value: number): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): MatchedMarketSnapshot.AsObject; - static toObject(includeInstance: boolean, msg: MatchedMarketSnapshot): MatchedMarketSnapshot.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: MatchedMarketSnapshot, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): MatchedMarketSnapshot; - static deserializeBinaryFromReader(message: MatchedMarketSnapshot, reader: jspb.BinaryReader): MatchedMarketSnapshot; -} - -export namespace MatchedMarketSnapshot { - export type AsObject = { - matchedOrders: Array, - clearingPriceRate: number, - } -} - -export class BatchSnapshotResponse extends jspb.Message { - getVersion(): number; - setVersion(value: number): void; - - getBatchId(): Uint8Array | string; - getBatchId_asU8(): Uint8Array; - getBatchId_asB64(): string; - setBatchId(value: Uint8Array | string): void; - - getPrevBatchId(): Uint8Array | string; - getPrevBatchId_asU8(): Uint8Array; - getPrevBatchId_asB64(): string; - setPrevBatchId(value: Uint8Array | string): void; - - getClearingPriceRate(): number; - setClearingPriceRate(value: number): void; - - clearMatchedOrdersList(): void; - getMatchedOrdersList(): Array; - setMatchedOrdersList(value: Array): void; - addMatchedOrders(value?: MatchedOrderSnapshot, index?: number): MatchedOrderSnapshot; - - getBatchTxId(): string; - setBatchTxId(value: string): void; - - getBatchTx(): Uint8Array | string; - getBatchTx_asU8(): Uint8Array; - getBatchTx_asB64(): string; - setBatchTx(value: Uint8Array | string): void; - - getBatchTxFeeRateSatPerKw(): number; - setBatchTxFeeRateSatPerKw(value: number): void; - - getCreationTimestampNs(): number; - setCreationTimestampNs(value: number): void; - - getMatchedMarketsMap(): jspb.Map; - clearMatchedMarketsMap(): void; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): BatchSnapshotResponse.AsObject; - static toObject(includeInstance: boolean, msg: BatchSnapshotResponse): BatchSnapshotResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: BatchSnapshotResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): BatchSnapshotResponse; - static deserializeBinaryFromReader(message: BatchSnapshotResponse, reader: jspb.BinaryReader): BatchSnapshotResponse; -} - -export namespace BatchSnapshotResponse { - export type AsObject = { - version: number, - batchId: Uint8Array | string, - prevBatchId: Uint8Array | string, - clearingPriceRate: number, - matchedOrders: Array, - batchTxId: string, - batchTx: Uint8Array | string, - batchTxFeeRateSatPerKw: number, - creationTimestampNs: number, - matchedMarkets: Array<[number, MatchedMarketSnapshot.AsObject]>, - } -} - -export class ServerNodeRatingRequest extends jspb.Message { - clearNodePubkeysList(): void; - getNodePubkeysList(): Array; - getNodePubkeysList_asU8(): Array; - getNodePubkeysList_asB64(): Array; - setNodePubkeysList(value: Array): void; - addNodePubkeys(value: Uint8Array | string, index?: number): Uint8Array | string; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ServerNodeRatingRequest.AsObject; - static toObject(includeInstance: boolean, msg: ServerNodeRatingRequest): ServerNodeRatingRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ServerNodeRatingRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ServerNodeRatingRequest; - static deserializeBinaryFromReader(message: ServerNodeRatingRequest, reader: jspb.BinaryReader): ServerNodeRatingRequest; -} - -export namespace ServerNodeRatingRequest { - export type AsObject = { - nodePubkeys: Array, - } -} - -export class NodeRating extends jspb.Message { - getNodePubkey(): Uint8Array | string; - getNodePubkey_asU8(): Uint8Array; - getNodePubkey_asB64(): string; - setNodePubkey(value: Uint8Array | string): void; - - getNodeTier(): NodeTierMap[keyof NodeTierMap]; - setNodeTier(value: NodeTierMap[keyof NodeTierMap]): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): NodeRating.AsObject; - static toObject(includeInstance: boolean, msg: NodeRating): NodeRating.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: NodeRating, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): NodeRating; - static deserializeBinaryFromReader(message: NodeRating, reader: jspb.BinaryReader): NodeRating; -} - -export namespace NodeRating { - export type AsObject = { - nodePubkey: Uint8Array | string, - nodeTier: NodeTierMap[keyof NodeTierMap], - } -} - -export class ServerNodeRatingResponse extends jspb.Message { - clearNodeRatingsList(): void; - getNodeRatingsList(): Array; - setNodeRatingsList(value: Array): void; - addNodeRatings(value?: NodeRating, index?: number): NodeRating; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ServerNodeRatingResponse.AsObject; - static toObject(includeInstance: boolean, msg: ServerNodeRatingResponse): ServerNodeRatingResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ServerNodeRatingResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ServerNodeRatingResponse; - static deserializeBinaryFromReader(message: ServerNodeRatingResponse, reader: jspb.BinaryReader): ServerNodeRatingResponse; -} - -export namespace ServerNodeRatingResponse { - export type AsObject = { - nodeRatings: Array, - } -} - -export class BatchSnapshotsRequest extends jspb.Message { - getStartBatchId(): Uint8Array | string; - getStartBatchId_asU8(): Uint8Array; - getStartBatchId_asB64(): string; - setStartBatchId(value: Uint8Array | string): void; - - getNumBatchesBack(): number; - setNumBatchesBack(value: number): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): BatchSnapshotsRequest.AsObject; - static toObject(includeInstance: boolean, msg: BatchSnapshotsRequest): BatchSnapshotsRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: BatchSnapshotsRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): BatchSnapshotsRequest; - static deserializeBinaryFromReader(message: BatchSnapshotsRequest, reader: jspb.BinaryReader): BatchSnapshotsRequest; -} - -export namespace BatchSnapshotsRequest { - export type AsObject = { - startBatchId: Uint8Array | string, - numBatchesBack: number, - } -} - -export class BatchSnapshotsResponse extends jspb.Message { - clearBatchesList(): void; - getBatchesList(): Array; - setBatchesList(value: Array): void; - addBatches(value?: BatchSnapshotResponse, index?: number): BatchSnapshotResponse; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): BatchSnapshotsResponse.AsObject; - static toObject(includeInstance: boolean, msg: BatchSnapshotsResponse): BatchSnapshotsResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: BatchSnapshotsResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): BatchSnapshotsResponse; - static deserializeBinaryFromReader(message: BatchSnapshotsResponse, reader: jspb.BinaryReader): BatchSnapshotsResponse; -} - -export namespace BatchSnapshotsResponse { - export type AsObject = { - batches: Array, - } -} - -export class MarketInfoRequest extends jspb.Message { - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): MarketInfoRequest.AsObject; - static toObject(includeInstance: boolean, msg: MarketInfoRequest): MarketInfoRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: MarketInfoRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): MarketInfoRequest; - static deserializeBinaryFromReader(message: MarketInfoRequest, reader: jspb.BinaryReader): MarketInfoRequest; -} - -export namespace MarketInfoRequest { - export type AsObject = { - } -} - -export class MarketInfo extends jspb.Message { - clearNumAsksList(): void; - getNumAsksList(): Array; - setNumAsksList(value: Array): void; - addNumAsks(value?: MarketInfo.TierValue, index?: number): MarketInfo.TierValue; - - clearNumBidsList(): void; - getNumBidsList(): Array; - setNumBidsList(value: Array): void; - addNumBids(value?: MarketInfo.TierValue, index?: number): MarketInfo.TierValue; - - clearAskOpenInterestUnitsList(): void; - getAskOpenInterestUnitsList(): Array; - setAskOpenInterestUnitsList(value: Array): void; - addAskOpenInterestUnits(value?: MarketInfo.TierValue, index?: number): MarketInfo.TierValue; - - clearBidOpenInterestUnitsList(): void; - getBidOpenInterestUnitsList(): Array; - setBidOpenInterestUnitsList(value: Array): void; - addBidOpenInterestUnits(value?: MarketInfo.TierValue, index?: number): MarketInfo.TierValue; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): MarketInfo.AsObject; - static toObject(includeInstance: boolean, msg: MarketInfo): MarketInfo.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: MarketInfo, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): MarketInfo; - static deserializeBinaryFromReader(message: MarketInfo, reader: jspb.BinaryReader): MarketInfo; -} - -export namespace MarketInfo { - export type AsObject = { - numAsks: Array, - numBids: Array, - askOpenInterestUnits: Array, - bidOpenInterestUnits: Array, - } - - export class TierValue extends jspb.Message { - getTier(): NodeTierMap[keyof NodeTierMap]; - setTier(value: NodeTierMap[keyof NodeTierMap]): void; - - getValue(): number; - setValue(value: number): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): TierValue.AsObject; - static toObject(includeInstance: boolean, msg: TierValue): TierValue.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: TierValue, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): TierValue; - static deserializeBinaryFromReader(message: TierValue, reader: jspb.BinaryReader): TierValue; - } - - export namespace TierValue { - export type AsObject = { - tier: NodeTierMap[keyof NodeTierMap], - value: number, - } - } -} - -export class MarketInfoResponse extends jspb.Message { - getMarketsMap(): jspb.Map; - clearMarketsMap(): void; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): MarketInfoResponse.AsObject; - static toObject(includeInstance: boolean, msg: MarketInfoResponse): MarketInfoResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: MarketInfoResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): MarketInfoResponse; - static deserializeBinaryFromReader(message: MarketInfoResponse, reader: jspb.BinaryReader): MarketInfoResponse; -} - -export namespace MarketInfoResponse { - export type AsObject = { - markets: Array<[number, MarketInfo.AsObject]>, - } -} - -export interface ChannelTypeMap { - TWEAKLESS: 0; - ANCHORS: 1; - SCRIPT_ENFORCED_LEASE: 2; -} - -export const ChannelType: ChannelTypeMap; - -export interface AuctionAccountStateMap { - STATE_PENDING_OPEN: 0; - STATE_OPEN: 1; - STATE_EXPIRED: 2; - STATE_PENDING_UPDATE: 3; - STATE_CLOSED: 4; - STATE_PENDING_BATCH: 5; -} - -export const AuctionAccountState: AuctionAccountStateMap; - -export interface OrderChannelTypeMap { - ORDER_CHANNEL_TYPE_UNKNOWN: 0; - ORDER_CHANNEL_TYPE_PEER_DEPENDENT: 1; - ORDER_CHANNEL_TYPE_SCRIPT_ENFORCED: 2; -} - -export const OrderChannelType: OrderChannelTypeMap; - -export interface NodeTierMap { - TIER_DEFAULT: 0; - TIER_0: 1; - TIER_1: 2; -} - -export const NodeTier: NodeTierMap; - -export interface OrderStateMap { - ORDER_SUBMITTED: 0; - ORDER_CLEARED: 1; - ORDER_PARTIALLY_FILLED: 2; - ORDER_EXECUTED: 3; - ORDER_CANCELED: 4; - ORDER_EXPIRED: 5; - ORDER_FAILED: 6; -} - -export const OrderState: OrderStateMap; - -export interface DurationBucketStateMap { - NO_MARKET: 0; - MARKET_CLOSED: 1; - ACCEPTING_ORDERS: 2; - MARKET_OPEN: 3; -} - -export const DurationBucketState: DurationBucketStateMap; - diff --git a/lib/types/generated/auctioneerrpc/auctioneer_pb.js b/lib/types/generated/auctioneerrpc/auctioneer_pb.js deleted file mode 100644 index 668ed09..0000000 --- a/lib/types/generated/auctioneerrpc/auctioneer_pb.js +++ /dev/null @@ -1,16530 +0,0 @@ -// source: auctioneerrpc/auctioneer.proto -/** - * @fileoverview - * @enhanceable - * @suppress {missingRequire} reports error on implicit type usages. - * @suppress {messageConventions} JS Compiler reports an error if a variable or - * field starts with 'MSG_' and isn't a translatable message. - * @public - */ -// GENERATED CODE -- DO NOT EDIT! -/* eslint-disable */ -// @ts-nocheck - -var jspb = require('google-protobuf'); -var goog = jspb; -var global = Function('return this')(); - -goog.exportSymbol('proto.poolrpc.AccountCommitment', null, global); -goog.exportSymbol('proto.poolrpc.AccountDiff', null, global); -goog.exportSymbol('proto.poolrpc.AccountDiff.AccountState', null, global); -goog.exportSymbol('proto.poolrpc.AccountRecovery', null, global); -goog.exportSymbol('proto.poolrpc.AccountSubscription', null, global); -goog.exportSymbol('proto.poolrpc.AskSnapshot', null, global); -goog.exportSymbol('proto.poolrpc.AuctionAccount', null, global); -goog.exportSymbol('proto.poolrpc.AuctionAccountState', null, global); -goog.exportSymbol('proto.poolrpc.BatchSnapshotRequest', null, global); -goog.exportSymbol('proto.poolrpc.BatchSnapshotResponse', null, global); -goog.exportSymbol('proto.poolrpc.BatchSnapshotsRequest', null, global); -goog.exportSymbol('proto.poolrpc.BatchSnapshotsResponse', null, global); -goog.exportSymbol('proto.poolrpc.BidSnapshot', null, global); -goog.exportSymbol('proto.poolrpc.CancelOrder', null, global); -goog.exportSymbol('proto.poolrpc.ChannelInfo', null, global); -goog.exportSymbol('proto.poolrpc.ChannelType', null, global); -goog.exportSymbol('proto.poolrpc.ClientAuctionMessage', null, global); -goog.exportSymbol('proto.poolrpc.ClientAuctionMessage.MsgCase', null, global); -goog.exportSymbol('proto.poolrpc.DurationBucketState', null, global); -goog.exportSymbol('proto.poolrpc.ExecutionFee', null, global); -goog.exportSymbol('proto.poolrpc.InvalidOrder', null, global); -goog.exportSymbol('proto.poolrpc.InvalidOrder.FailReason', null, global); -goog.exportSymbol('proto.poolrpc.MarketInfo', null, global); -goog.exportSymbol('proto.poolrpc.MarketInfo.TierValue', null, global); -goog.exportSymbol('proto.poolrpc.MarketInfoRequest', null, global); -goog.exportSymbol('proto.poolrpc.MarketInfoResponse', null, global); -goog.exportSymbol('proto.poolrpc.MatchedAsk', null, global); -goog.exportSymbol('proto.poolrpc.MatchedBid', null, global); -goog.exportSymbol('proto.poolrpc.MatchedMarket', null, global); -goog.exportSymbol('proto.poolrpc.MatchedMarketSnapshot', null, global); -goog.exportSymbol('proto.poolrpc.MatchedOrder', null, global); -goog.exportSymbol('proto.poolrpc.MatchedOrderSnapshot', null, global); -goog.exportSymbol('proto.poolrpc.NodeAddress', null, global); -goog.exportSymbol('proto.poolrpc.NodeRating', null, global); -goog.exportSymbol('proto.poolrpc.NodeTier', null, global); -goog.exportSymbol('proto.poolrpc.OrderChannelType', null, global); -goog.exportSymbol('proto.poolrpc.OrderMatchAccept', null, global); -goog.exportSymbol('proto.poolrpc.OrderMatchFinalize', null, global); -goog.exportSymbol('proto.poolrpc.OrderMatchPrepare', null, global); -goog.exportSymbol('proto.poolrpc.OrderMatchReject', null, global); -goog.exportSymbol('proto.poolrpc.OrderMatchReject.RejectReason', null, global); -goog.exportSymbol('proto.poolrpc.OrderMatchSign', null, global); -goog.exportSymbol('proto.poolrpc.OrderMatchSignBegin', null, global); -goog.exportSymbol('proto.poolrpc.OrderReject', null, global); -goog.exportSymbol('proto.poolrpc.OrderReject.OrderRejectReason', null, global); -goog.exportSymbol('proto.poolrpc.OrderState', null, global); -goog.exportSymbol('proto.poolrpc.OutPoint', null, global); -goog.exportSymbol('proto.poolrpc.RelevantBatch', null, global); -goog.exportSymbol('proto.poolrpc.RelevantBatchRequest', null, global); -goog.exportSymbol('proto.poolrpc.ReserveAccountRequest', null, global); -goog.exportSymbol('proto.poolrpc.ReserveAccountResponse', null, global); -goog.exportSymbol('proto.poolrpc.ServerAsk', null, global); -goog.exportSymbol('proto.poolrpc.ServerAuctionMessage', null, global); -goog.exportSymbol('proto.poolrpc.ServerAuctionMessage.MsgCase', null, global); -goog.exportSymbol('proto.poolrpc.ServerBid', null, global); -goog.exportSymbol('proto.poolrpc.ServerCancelOrderRequest', null, global); -goog.exportSymbol('proto.poolrpc.ServerCancelOrderResponse', null, global); -goog.exportSymbol('proto.poolrpc.ServerChallenge', null, global); -goog.exportSymbol('proto.poolrpc.ServerInitAccountRequest', null, global); -goog.exportSymbol('proto.poolrpc.ServerInitAccountResponse', null, global); -goog.exportSymbol('proto.poolrpc.ServerInput', null, global); -goog.exportSymbol('proto.poolrpc.ServerModifyAccountRequest', null, global); -goog.exportSymbol('proto.poolrpc.ServerModifyAccountRequest.NewAccountParameters', null, global); -goog.exportSymbol('proto.poolrpc.ServerModifyAccountResponse', null, global); -goog.exportSymbol('proto.poolrpc.ServerNodeRatingRequest', null, global); -goog.exportSymbol('proto.poolrpc.ServerNodeRatingResponse', null, global); -goog.exportSymbol('proto.poolrpc.ServerOrder', null, global); -goog.exportSymbol('proto.poolrpc.ServerOrderStateRequest', null, global); -goog.exportSymbol('proto.poolrpc.ServerOrderStateResponse', null, global); -goog.exportSymbol('proto.poolrpc.ServerOutput', null, global); -goog.exportSymbol('proto.poolrpc.ServerSubmitOrderRequest', null, global); -goog.exportSymbol('proto.poolrpc.ServerSubmitOrderRequest.DetailsCase', null, global); -goog.exportSymbol('proto.poolrpc.ServerSubmitOrderResponse', null, global); -goog.exportSymbol('proto.poolrpc.ServerSubmitOrderResponse.DetailsCase', null, global); -goog.exportSymbol('proto.poolrpc.SubscribeError', null, global); -goog.exportSymbol('proto.poolrpc.SubscribeError.Error', null, global); -goog.exportSymbol('proto.poolrpc.SubscribeSuccess', null, global); -goog.exportSymbol('proto.poolrpc.TermsRequest', null, global); -goog.exportSymbol('proto.poolrpc.TermsResponse', null, global); -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.poolrpc.ReserveAccountRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.poolrpc.ReserveAccountRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.poolrpc.ReserveAccountRequest.displayName = 'proto.poolrpc.ReserveAccountRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.poolrpc.ReserveAccountResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.poolrpc.ReserveAccountResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.poolrpc.ReserveAccountResponse.displayName = 'proto.poolrpc.ReserveAccountResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.poolrpc.ServerInitAccountRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.poolrpc.ServerInitAccountRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.poolrpc.ServerInitAccountRequest.displayName = 'proto.poolrpc.ServerInitAccountRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.poolrpc.ServerInitAccountResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.poolrpc.ServerInitAccountResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.poolrpc.ServerInitAccountResponse.displayName = 'proto.poolrpc.ServerInitAccountResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.poolrpc.ServerSubmitOrderRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.poolrpc.ServerSubmitOrderRequest.oneofGroups_); -}; -goog.inherits(proto.poolrpc.ServerSubmitOrderRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.poolrpc.ServerSubmitOrderRequest.displayName = 'proto.poolrpc.ServerSubmitOrderRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.poolrpc.ServerSubmitOrderResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.poolrpc.ServerSubmitOrderResponse.oneofGroups_); -}; -goog.inherits(proto.poolrpc.ServerSubmitOrderResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.poolrpc.ServerSubmitOrderResponse.displayName = 'proto.poolrpc.ServerSubmitOrderResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.poolrpc.ServerCancelOrderRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.poolrpc.ServerCancelOrderRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.poolrpc.ServerCancelOrderRequest.displayName = 'proto.poolrpc.ServerCancelOrderRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.poolrpc.ServerCancelOrderResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.poolrpc.ServerCancelOrderResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.poolrpc.ServerCancelOrderResponse.displayName = 'proto.poolrpc.ServerCancelOrderResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.poolrpc.ClientAuctionMessage = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.poolrpc.ClientAuctionMessage.oneofGroups_); -}; -goog.inherits(proto.poolrpc.ClientAuctionMessage, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.poolrpc.ClientAuctionMessage.displayName = 'proto.poolrpc.ClientAuctionMessage'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.poolrpc.AccountCommitment = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.poolrpc.AccountCommitment, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.poolrpc.AccountCommitment.displayName = 'proto.poolrpc.AccountCommitment'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.poolrpc.AccountSubscription = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.poolrpc.AccountSubscription, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.poolrpc.AccountSubscription.displayName = 'proto.poolrpc.AccountSubscription'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.poolrpc.OrderMatchAccept = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.poolrpc.OrderMatchAccept, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.poolrpc.OrderMatchAccept.displayName = 'proto.poolrpc.OrderMatchAccept'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.poolrpc.OrderMatchReject = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.poolrpc.OrderMatchReject, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.poolrpc.OrderMatchReject.displayName = 'proto.poolrpc.OrderMatchReject'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.poolrpc.OrderReject = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.poolrpc.OrderReject, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.poolrpc.OrderReject.displayName = 'proto.poolrpc.OrderReject'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.poolrpc.ChannelInfo = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.poolrpc.ChannelInfo, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.poolrpc.ChannelInfo.displayName = 'proto.poolrpc.ChannelInfo'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.poolrpc.OrderMatchSign = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.poolrpc.OrderMatchSign, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.poolrpc.OrderMatchSign.displayName = 'proto.poolrpc.OrderMatchSign'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.poolrpc.AccountRecovery = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.poolrpc.AccountRecovery, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.poolrpc.AccountRecovery.displayName = 'proto.poolrpc.AccountRecovery'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.poolrpc.ServerAuctionMessage = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.poolrpc.ServerAuctionMessage.oneofGroups_); -}; -goog.inherits(proto.poolrpc.ServerAuctionMessage, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.poolrpc.ServerAuctionMessage.displayName = 'proto.poolrpc.ServerAuctionMessage'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.poolrpc.ServerChallenge = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.poolrpc.ServerChallenge, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.poolrpc.ServerChallenge.displayName = 'proto.poolrpc.ServerChallenge'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.poolrpc.SubscribeSuccess = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.poolrpc.SubscribeSuccess, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.poolrpc.SubscribeSuccess.displayName = 'proto.poolrpc.SubscribeSuccess'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.poolrpc.MatchedMarket = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.poolrpc.MatchedMarket, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.poolrpc.MatchedMarket.displayName = 'proto.poolrpc.MatchedMarket'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.poolrpc.OrderMatchPrepare = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.poolrpc.OrderMatchPrepare.repeatedFields_, null); -}; -goog.inherits(proto.poolrpc.OrderMatchPrepare, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.poolrpc.OrderMatchPrepare.displayName = 'proto.poolrpc.OrderMatchPrepare'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.poolrpc.OrderMatchSignBegin = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.poolrpc.OrderMatchSignBegin, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.poolrpc.OrderMatchSignBegin.displayName = 'proto.poolrpc.OrderMatchSignBegin'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.poolrpc.OrderMatchFinalize = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.poolrpc.OrderMatchFinalize, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.poolrpc.OrderMatchFinalize.displayName = 'proto.poolrpc.OrderMatchFinalize'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.poolrpc.SubscribeError = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.poolrpc.SubscribeError, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.poolrpc.SubscribeError.displayName = 'proto.poolrpc.SubscribeError'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.poolrpc.AuctionAccount = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.poolrpc.AuctionAccount, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.poolrpc.AuctionAccount.displayName = 'proto.poolrpc.AuctionAccount'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.poolrpc.MatchedOrder = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.poolrpc.MatchedOrder.repeatedFields_, null); -}; -goog.inherits(proto.poolrpc.MatchedOrder, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.poolrpc.MatchedOrder.displayName = 'proto.poolrpc.MatchedOrder'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.poolrpc.MatchedAsk = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.poolrpc.MatchedAsk, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.poolrpc.MatchedAsk.displayName = 'proto.poolrpc.MatchedAsk'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.poolrpc.MatchedBid = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.poolrpc.MatchedBid, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.poolrpc.MatchedBid.displayName = 'proto.poolrpc.MatchedBid'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.poolrpc.AccountDiff = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.poolrpc.AccountDiff, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.poolrpc.AccountDiff.displayName = 'proto.poolrpc.AccountDiff'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.poolrpc.ServerOrder = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.poolrpc.ServerOrder.repeatedFields_, null); -}; -goog.inherits(proto.poolrpc.ServerOrder, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.poolrpc.ServerOrder.displayName = 'proto.poolrpc.ServerOrder'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.poolrpc.ServerBid = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.poolrpc.ServerBid, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.poolrpc.ServerBid.displayName = 'proto.poolrpc.ServerBid'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.poolrpc.ServerAsk = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.poolrpc.ServerAsk, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.poolrpc.ServerAsk.displayName = 'proto.poolrpc.ServerAsk'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.poolrpc.CancelOrder = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.poolrpc.CancelOrder, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.poolrpc.CancelOrder.displayName = 'proto.poolrpc.CancelOrder'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.poolrpc.InvalidOrder = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.poolrpc.InvalidOrder, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.poolrpc.InvalidOrder.displayName = 'proto.poolrpc.InvalidOrder'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.poolrpc.ServerInput = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.poolrpc.ServerInput, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.poolrpc.ServerInput.displayName = 'proto.poolrpc.ServerInput'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.poolrpc.ServerOutput = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.poolrpc.ServerOutput, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.poolrpc.ServerOutput.displayName = 'proto.poolrpc.ServerOutput'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.poolrpc.ServerModifyAccountRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.poolrpc.ServerModifyAccountRequest.repeatedFields_, null); -}; -goog.inherits(proto.poolrpc.ServerModifyAccountRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.poolrpc.ServerModifyAccountRequest.displayName = 'proto.poolrpc.ServerModifyAccountRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.poolrpc.ServerModifyAccountRequest.NewAccountParameters = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.poolrpc.ServerModifyAccountRequest.NewAccountParameters, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.poolrpc.ServerModifyAccountRequest.NewAccountParameters.displayName = 'proto.poolrpc.ServerModifyAccountRequest.NewAccountParameters'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.poolrpc.ServerModifyAccountResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.poolrpc.ServerModifyAccountResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.poolrpc.ServerModifyAccountResponse.displayName = 'proto.poolrpc.ServerModifyAccountResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.poolrpc.ServerOrderStateRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.poolrpc.ServerOrderStateRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.poolrpc.ServerOrderStateRequest.displayName = 'proto.poolrpc.ServerOrderStateRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.poolrpc.ServerOrderStateResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.poolrpc.ServerOrderStateResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.poolrpc.ServerOrderStateResponse.displayName = 'proto.poolrpc.ServerOrderStateResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.poolrpc.TermsRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.poolrpc.TermsRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.poolrpc.TermsRequest.displayName = 'proto.poolrpc.TermsRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.poolrpc.TermsResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.poolrpc.TermsResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.poolrpc.TermsResponse.displayName = 'proto.poolrpc.TermsResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.poolrpc.RelevantBatchRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.poolrpc.RelevantBatchRequest.repeatedFields_, null); -}; -goog.inherits(proto.poolrpc.RelevantBatchRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.poolrpc.RelevantBatchRequest.displayName = 'proto.poolrpc.RelevantBatchRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.poolrpc.RelevantBatch = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.poolrpc.RelevantBatch.repeatedFields_, null); -}; -goog.inherits(proto.poolrpc.RelevantBatch, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.poolrpc.RelevantBatch.displayName = 'proto.poolrpc.RelevantBatch'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.poolrpc.ExecutionFee = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.poolrpc.ExecutionFee, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.poolrpc.ExecutionFee.displayName = 'proto.poolrpc.ExecutionFee'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.poolrpc.NodeAddress = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.poolrpc.NodeAddress, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.poolrpc.NodeAddress.displayName = 'proto.poolrpc.NodeAddress'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.poolrpc.OutPoint = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.poolrpc.OutPoint, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.poolrpc.OutPoint.displayName = 'proto.poolrpc.OutPoint'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.poolrpc.AskSnapshot = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.poolrpc.AskSnapshot, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.poolrpc.AskSnapshot.displayName = 'proto.poolrpc.AskSnapshot'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.poolrpc.BidSnapshot = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.poolrpc.BidSnapshot, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.poolrpc.BidSnapshot.displayName = 'proto.poolrpc.BidSnapshot'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.poolrpc.MatchedOrderSnapshot = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.poolrpc.MatchedOrderSnapshot, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.poolrpc.MatchedOrderSnapshot.displayName = 'proto.poolrpc.MatchedOrderSnapshot'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.poolrpc.BatchSnapshotRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.poolrpc.BatchSnapshotRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.poolrpc.BatchSnapshotRequest.displayName = 'proto.poolrpc.BatchSnapshotRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.poolrpc.MatchedMarketSnapshot = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.poolrpc.MatchedMarketSnapshot.repeatedFields_, null); -}; -goog.inherits(proto.poolrpc.MatchedMarketSnapshot, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.poolrpc.MatchedMarketSnapshot.displayName = 'proto.poolrpc.MatchedMarketSnapshot'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.poolrpc.BatchSnapshotResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.poolrpc.BatchSnapshotResponse.repeatedFields_, null); -}; -goog.inherits(proto.poolrpc.BatchSnapshotResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.poolrpc.BatchSnapshotResponse.displayName = 'proto.poolrpc.BatchSnapshotResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.poolrpc.ServerNodeRatingRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.poolrpc.ServerNodeRatingRequest.repeatedFields_, null); -}; -goog.inherits(proto.poolrpc.ServerNodeRatingRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.poolrpc.ServerNodeRatingRequest.displayName = 'proto.poolrpc.ServerNodeRatingRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.poolrpc.NodeRating = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.poolrpc.NodeRating, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.poolrpc.NodeRating.displayName = 'proto.poolrpc.NodeRating'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.poolrpc.ServerNodeRatingResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.poolrpc.ServerNodeRatingResponse.repeatedFields_, null); -}; -goog.inherits(proto.poolrpc.ServerNodeRatingResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.poolrpc.ServerNodeRatingResponse.displayName = 'proto.poolrpc.ServerNodeRatingResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.poolrpc.BatchSnapshotsRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.poolrpc.BatchSnapshotsRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.poolrpc.BatchSnapshotsRequest.displayName = 'proto.poolrpc.BatchSnapshotsRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.poolrpc.BatchSnapshotsResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.poolrpc.BatchSnapshotsResponse.repeatedFields_, null); -}; -goog.inherits(proto.poolrpc.BatchSnapshotsResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.poolrpc.BatchSnapshotsResponse.displayName = 'proto.poolrpc.BatchSnapshotsResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.poolrpc.MarketInfoRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.poolrpc.MarketInfoRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.poolrpc.MarketInfoRequest.displayName = 'proto.poolrpc.MarketInfoRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.poolrpc.MarketInfo = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.poolrpc.MarketInfo.repeatedFields_, null); -}; -goog.inherits(proto.poolrpc.MarketInfo, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.poolrpc.MarketInfo.displayName = 'proto.poolrpc.MarketInfo'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.poolrpc.MarketInfo.TierValue = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.poolrpc.MarketInfo.TierValue, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.poolrpc.MarketInfo.TierValue.displayName = 'proto.poolrpc.MarketInfo.TierValue'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.poolrpc.MarketInfoResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.poolrpc.MarketInfoResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.poolrpc.MarketInfoResponse.displayName = 'proto.poolrpc.MarketInfoResponse'; -} - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.poolrpc.ReserveAccountRequest.prototype.toObject = function(opt_includeInstance) { - return proto.poolrpc.ReserveAccountRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.poolrpc.ReserveAccountRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.ReserveAccountRequest.toObject = function(includeInstance, msg) { - var f, obj = { - accountValue: jspb.Message.getFieldWithDefault(msg, 1, 0), - accountExpiry: jspb.Message.getFieldWithDefault(msg, 2, 0), - traderKey: msg.getTraderKey_asB64() - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.poolrpc.ReserveAccountRequest} - */ -proto.poolrpc.ReserveAccountRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.poolrpc.ReserveAccountRequest; - return proto.poolrpc.ReserveAccountRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.poolrpc.ReserveAccountRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.poolrpc.ReserveAccountRequest} - */ -proto.poolrpc.ReserveAccountRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readUint64()); - msg.setAccountValue(value); - break; - case 2: - var value = /** @type {number} */ (reader.readUint32()); - msg.setAccountExpiry(value); - break; - case 3: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setTraderKey(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.poolrpc.ReserveAccountRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.poolrpc.ReserveAccountRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.poolrpc.ReserveAccountRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.ReserveAccountRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getAccountValue(); - if (f !== 0) { - writer.writeUint64( - 1, - f - ); - } - f = message.getAccountExpiry(); - if (f !== 0) { - writer.writeUint32( - 2, - f - ); - } - f = message.getTraderKey_asU8(); - if (f.length > 0) { - writer.writeBytes( - 3, - f - ); - } -}; - - -/** - * optional uint64 account_value = 1; - * @return {number} - */ -proto.poolrpc.ReserveAccountRequest.prototype.getAccountValue = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.poolrpc.ReserveAccountRequest} returns this - */ -proto.poolrpc.ReserveAccountRequest.prototype.setAccountValue = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); -}; - - -/** - * optional uint32 account_expiry = 2; - * @return {number} - */ -proto.poolrpc.ReserveAccountRequest.prototype.getAccountExpiry = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.poolrpc.ReserveAccountRequest} returns this - */ -proto.poolrpc.ReserveAccountRequest.prototype.setAccountExpiry = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * optional bytes trader_key = 3; - * @return {!(string|Uint8Array)} - */ -proto.poolrpc.ReserveAccountRequest.prototype.getTraderKey = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * optional bytes trader_key = 3; - * This is a type-conversion wrapper around `getTraderKey()` - * @return {string} - */ -proto.poolrpc.ReserveAccountRequest.prototype.getTraderKey_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getTraderKey())); -}; - - -/** - * optional bytes trader_key = 3; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getTraderKey()` - * @return {!Uint8Array} - */ -proto.poolrpc.ReserveAccountRequest.prototype.getTraderKey_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getTraderKey())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.poolrpc.ReserveAccountRequest} returns this - */ -proto.poolrpc.ReserveAccountRequest.prototype.setTraderKey = function(value) { - return jspb.Message.setProto3BytesField(this, 3, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.poolrpc.ReserveAccountResponse.prototype.toObject = function(opt_includeInstance) { - return proto.poolrpc.ReserveAccountResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.poolrpc.ReserveAccountResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.ReserveAccountResponse.toObject = function(includeInstance, msg) { - var f, obj = { - auctioneerKey: msg.getAuctioneerKey_asB64(), - initialBatchKey: msg.getInitialBatchKey_asB64() - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.poolrpc.ReserveAccountResponse} - */ -proto.poolrpc.ReserveAccountResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.poolrpc.ReserveAccountResponse; - return proto.poolrpc.ReserveAccountResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.poolrpc.ReserveAccountResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.poolrpc.ReserveAccountResponse} - */ -proto.poolrpc.ReserveAccountResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setAuctioneerKey(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setInitialBatchKey(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.poolrpc.ReserveAccountResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.poolrpc.ReserveAccountResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.poolrpc.ReserveAccountResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.ReserveAccountResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getAuctioneerKey_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getInitialBatchKey_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } -}; - - -/** - * optional bytes auctioneer_key = 1; - * @return {!(string|Uint8Array)} - */ -proto.poolrpc.ReserveAccountResponse.prototype.getAuctioneerKey = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes auctioneer_key = 1; - * This is a type-conversion wrapper around `getAuctioneerKey()` - * @return {string} - */ -proto.poolrpc.ReserveAccountResponse.prototype.getAuctioneerKey_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getAuctioneerKey())); -}; - - -/** - * optional bytes auctioneer_key = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getAuctioneerKey()` - * @return {!Uint8Array} - */ -proto.poolrpc.ReserveAccountResponse.prototype.getAuctioneerKey_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getAuctioneerKey())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.poolrpc.ReserveAccountResponse} returns this - */ -proto.poolrpc.ReserveAccountResponse.prototype.setAuctioneerKey = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional bytes initial_batch_key = 2; - * @return {!(string|Uint8Array)} - */ -proto.poolrpc.ReserveAccountResponse.prototype.getInitialBatchKey = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes initial_batch_key = 2; - * This is a type-conversion wrapper around `getInitialBatchKey()` - * @return {string} - */ -proto.poolrpc.ReserveAccountResponse.prototype.getInitialBatchKey_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getInitialBatchKey())); -}; - - -/** - * optional bytes initial_batch_key = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getInitialBatchKey()` - * @return {!Uint8Array} - */ -proto.poolrpc.ReserveAccountResponse.prototype.getInitialBatchKey_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getInitialBatchKey())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.poolrpc.ReserveAccountResponse} returns this - */ -proto.poolrpc.ReserveAccountResponse.prototype.setInitialBatchKey = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.poolrpc.ServerInitAccountRequest.prototype.toObject = function(opt_includeInstance) { - return proto.poolrpc.ServerInitAccountRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.poolrpc.ServerInitAccountRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.ServerInitAccountRequest.toObject = function(includeInstance, msg) { - var f, obj = { - accountPoint: (f = msg.getAccountPoint()) && proto.poolrpc.OutPoint.toObject(includeInstance, f), - accountScript: msg.getAccountScript_asB64(), - accountValue: jspb.Message.getFieldWithDefault(msg, 3, 0), - accountExpiry: jspb.Message.getFieldWithDefault(msg, 4, 0), - traderKey: msg.getTraderKey_asB64(), - userAgent: jspb.Message.getFieldWithDefault(msg, 6, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.poolrpc.ServerInitAccountRequest} - */ -proto.poolrpc.ServerInitAccountRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.poolrpc.ServerInitAccountRequest; - return proto.poolrpc.ServerInitAccountRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.poolrpc.ServerInitAccountRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.poolrpc.ServerInitAccountRequest} - */ -proto.poolrpc.ServerInitAccountRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.poolrpc.OutPoint; - reader.readMessage(value,proto.poolrpc.OutPoint.deserializeBinaryFromReader); - msg.setAccountPoint(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setAccountScript(value); - break; - case 3: - var value = /** @type {number} */ (reader.readUint64()); - msg.setAccountValue(value); - break; - case 4: - var value = /** @type {number} */ (reader.readUint32()); - msg.setAccountExpiry(value); - break; - case 5: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setTraderKey(value); - break; - case 6: - var value = /** @type {string} */ (reader.readString()); - msg.setUserAgent(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.poolrpc.ServerInitAccountRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.poolrpc.ServerInitAccountRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.poolrpc.ServerInitAccountRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.ServerInitAccountRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getAccountPoint(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.poolrpc.OutPoint.serializeBinaryToWriter - ); - } - f = message.getAccountScript_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } - f = message.getAccountValue(); - if (f !== 0) { - writer.writeUint64( - 3, - f - ); - } - f = message.getAccountExpiry(); - if (f !== 0) { - writer.writeUint32( - 4, - f - ); - } - f = message.getTraderKey_asU8(); - if (f.length > 0) { - writer.writeBytes( - 5, - f - ); - } - f = message.getUserAgent(); - if (f.length > 0) { - writer.writeString( - 6, - f - ); - } -}; - - -/** - * optional OutPoint account_point = 1; - * @return {?proto.poolrpc.OutPoint} - */ -proto.poolrpc.ServerInitAccountRequest.prototype.getAccountPoint = function() { - return /** @type{?proto.poolrpc.OutPoint} */ ( - jspb.Message.getWrapperField(this, proto.poolrpc.OutPoint, 1)); -}; - - -/** - * @param {?proto.poolrpc.OutPoint|undefined} value - * @return {!proto.poolrpc.ServerInitAccountRequest} returns this -*/ -proto.poolrpc.ServerInitAccountRequest.prototype.setAccountPoint = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.poolrpc.ServerInitAccountRequest} returns this - */ -proto.poolrpc.ServerInitAccountRequest.prototype.clearAccountPoint = function() { - return this.setAccountPoint(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.poolrpc.ServerInitAccountRequest.prototype.hasAccountPoint = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional bytes account_script = 2; - * @return {!(string|Uint8Array)} - */ -proto.poolrpc.ServerInitAccountRequest.prototype.getAccountScript = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes account_script = 2; - * This is a type-conversion wrapper around `getAccountScript()` - * @return {string} - */ -proto.poolrpc.ServerInitAccountRequest.prototype.getAccountScript_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getAccountScript())); -}; - - -/** - * optional bytes account_script = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getAccountScript()` - * @return {!Uint8Array} - */ -proto.poolrpc.ServerInitAccountRequest.prototype.getAccountScript_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getAccountScript())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.poolrpc.ServerInitAccountRequest} returns this - */ -proto.poolrpc.ServerInitAccountRequest.prototype.setAccountScript = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); -}; - - -/** - * optional uint64 account_value = 3; - * @return {number} - */ -proto.poolrpc.ServerInitAccountRequest.prototype.getAccountValue = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.poolrpc.ServerInitAccountRequest} returns this - */ -proto.poolrpc.ServerInitAccountRequest.prototype.setAccountValue = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - -/** - * optional uint32 account_expiry = 4; - * @return {number} - */ -proto.poolrpc.ServerInitAccountRequest.prototype.getAccountExpiry = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.poolrpc.ServerInitAccountRequest} returns this - */ -proto.poolrpc.ServerInitAccountRequest.prototype.setAccountExpiry = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); -}; - - -/** - * optional bytes trader_key = 5; - * @return {!(string|Uint8Array)} - */ -proto.poolrpc.ServerInitAccountRequest.prototype.getTraderKey = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 5, "")); -}; - - -/** - * optional bytes trader_key = 5; - * This is a type-conversion wrapper around `getTraderKey()` - * @return {string} - */ -proto.poolrpc.ServerInitAccountRequest.prototype.getTraderKey_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getTraderKey())); -}; - - -/** - * optional bytes trader_key = 5; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getTraderKey()` - * @return {!Uint8Array} - */ -proto.poolrpc.ServerInitAccountRequest.prototype.getTraderKey_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getTraderKey())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.poolrpc.ServerInitAccountRequest} returns this - */ -proto.poolrpc.ServerInitAccountRequest.prototype.setTraderKey = function(value) { - return jspb.Message.setProto3BytesField(this, 5, value); -}; - - -/** - * optional string user_agent = 6; - * @return {string} - */ -proto.poolrpc.ServerInitAccountRequest.prototype.getUserAgent = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); -}; - - -/** - * @param {string} value - * @return {!proto.poolrpc.ServerInitAccountRequest} returns this - */ -proto.poolrpc.ServerInitAccountRequest.prototype.setUserAgent = function(value) { - return jspb.Message.setProto3StringField(this, 6, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.poolrpc.ServerInitAccountResponse.prototype.toObject = function(opt_includeInstance) { - return proto.poolrpc.ServerInitAccountResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.poolrpc.ServerInitAccountResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.ServerInitAccountResponse.toObject = function(includeInstance, msg) { - var f, obj = { - - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.poolrpc.ServerInitAccountResponse} - */ -proto.poolrpc.ServerInitAccountResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.poolrpc.ServerInitAccountResponse; - return proto.poolrpc.ServerInitAccountResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.poolrpc.ServerInitAccountResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.poolrpc.ServerInitAccountResponse} - */ -proto.poolrpc.ServerInitAccountResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.poolrpc.ServerInitAccountResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.poolrpc.ServerInitAccountResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.poolrpc.ServerInitAccountResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.ServerInitAccountResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; -}; - - - -/** - * Oneof group definitions for this message. Each group defines the field - * numbers belonging to that group. When of these fields' value is set, all - * other fields in the group are cleared. During deserialization, if multiple - * fields are encountered for a group, only the last value seen will be kept. - * @private {!Array>} - * @const - */ -proto.poolrpc.ServerSubmitOrderRequest.oneofGroups_ = [[1,2]]; - -/** - * @enum {number} - */ -proto.poolrpc.ServerSubmitOrderRequest.DetailsCase = { - DETAILS_NOT_SET: 0, - ASK: 1, - BID: 2 -}; - -/** - * @return {proto.poolrpc.ServerSubmitOrderRequest.DetailsCase} - */ -proto.poolrpc.ServerSubmitOrderRequest.prototype.getDetailsCase = function() { - return /** @type {proto.poolrpc.ServerSubmitOrderRequest.DetailsCase} */(jspb.Message.computeOneofCase(this, proto.poolrpc.ServerSubmitOrderRequest.oneofGroups_[0])); -}; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.poolrpc.ServerSubmitOrderRequest.prototype.toObject = function(opt_includeInstance) { - return proto.poolrpc.ServerSubmitOrderRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.poolrpc.ServerSubmitOrderRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.ServerSubmitOrderRequest.toObject = function(includeInstance, msg) { - var f, obj = { - ask: (f = msg.getAsk()) && proto.poolrpc.ServerAsk.toObject(includeInstance, f), - bid: (f = msg.getBid()) && proto.poolrpc.ServerBid.toObject(includeInstance, f), - userAgent: jspb.Message.getFieldWithDefault(msg, 3, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.poolrpc.ServerSubmitOrderRequest} - */ -proto.poolrpc.ServerSubmitOrderRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.poolrpc.ServerSubmitOrderRequest; - return proto.poolrpc.ServerSubmitOrderRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.poolrpc.ServerSubmitOrderRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.poolrpc.ServerSubmitOrderRequest} - */ -proto.poolrpc.ServerSubmitOrderRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.poolrpc.ServerAsk; - reader.readMessage(value,proto.poolrpc.ServerAsk.deserializeBinaryFromReader); - msg.setAsk(value); - break; - case 2: - var value = new proto.poolrpc.ServerBid; - reader.readMessage(value,proto.poolrpc.ServerBid.deserializeBinaryFromReader); - msg.setBid(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setUserAgent(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.poolrpc.ServerSubmitOrderRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.poolrpc.ServerSubmitOrderRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.poolrpc.ServerSubmitOrderRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.ServerSubmitOrderRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getAsk(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.poolrpc.ServerAsk.serializeBinaryToWriter - ); - } - f = message.getBid(); - if (f != null) { - writer.writeMessage( - 2, - f, - proto.poolrpc.ServerBid.serializeBinaryToWriter - ); - } - f = message.getUserAgent(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } -}; - - -/** - * optional ServerAsk ask = 1; - * @return {?proto.poolrpc.ServerAsk} - */ -proto.poolrpc.ServerSubmitOrderRequest.prototype.getAsk = function() { - return /** @type{?proto.poolrpc.ServerAsk} */ ( - jspb.Message.getWrapperField(this, proto.poolrpc.ServerAsk, 1)); -}; - - -/** - * @param {?proto.poolrpc.ServerAsk|undefined} value - * @return {!proto.poolrpc.ServerSubmitOrderRequest} returns this -*/ -proto.poolrpc.ServerSubmitOrderRequest.prototype.setAsk = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.poolrpc.ServerSubmitOrderRequest.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.poolrpc.ServerSubmitOrderRequest} returns this - */ -proto.poolrpc.ServerSubmitOrderRequest.prototype.clearAsk = function() { - return this.setAsk(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.poolrpc.ServerSubmitOrderRequest.prototype.hasAsk = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional ServerBid bid = 2; - * @return {?proto.poolrpc.ServerBid} - */ -proto.poolrpc.ServerSubmitOrderRequest.prototype.getBid = function() { - return /** @type{?proto.poolrpc.ServerBid} */ ( - jspb.Message.getWrapperField(this, proto.poolrpc.ServerBid, 2)); -}; - - -/** - * @param {?proto.poolrpc.ServerBid|undefined} value - * @return {!proto.poolrpc.ServerSubmitOrderRequest} returns this -*/ -proto.poolrpc.ServerSubmitOrderRequest.prototype.setBid = function(value) { - return jspb.Message.setOneofWrapperField(this, 2, proto.poolrpc.ServerSubmitOrderRequest.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.poolrpc.ServerSubmitOrderRequest} returns this - */ -proto.poolrpc.ServerSubmitOrderRequest.prototype.clearBid = function() { - return this.setBid(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.poolrpc.ServerSubmitOrderRequest.prototype.hasBid = function() { - return jspb.Message.getField(this, 2) != null; -}; - - -/** - * optional string user_agent = 3; - * @return {string} - */ -proto.poolrpc.ServerSubmitOrderRequest.prototype.getUserAgent = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * @param {string} value - * @return {!proto.poolrpc.ServerSubmitOrderRequest} returns this - */ -proto.poolrpc.ServerSubmitOrderRequest.prototype.setUserAgent = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); -}; - - - -/** - * Oneof group definitions for this message. Each group defines the field - * numbers belonging to that group. When of these fields' value is set, all - * other fields in the group are cleared. During deserialization, if multiple - * fields are encountered for a group, only the last value seen will be kept. - * @private {!Array>} - * @const - */ -proto.poolrpc.ServerSubmitOrderResponse.oneofGroups_ = [[1,2]]; - -/** - * @enum {number} - */ -proto.poolrpc.ServerSubmitOrderResponse.DetailsCase = { - DETAILS_NOT_SET: 0, - INVALID_ORDER: 1, - ACCEPTED: 2 -}; - -/** - * @return {proto.poolrpc.ServerSubmitOrderResponse.DetailsCase} - */ -proto.poolrpc.ServerSubmitOrderResponse.prototype.getDetailsCase = function() { - return /** @type {proto.poolrpc.ServerSubmitOrderResponse.DetailsCase} */(jspb.Message.computeOneofCase(this, proto.poolrpc.ServerSubmitOrderResponse.oneofGroups_[0])); -}; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.poolrpc.ServerSubmitOrderResponse.prototype.toObject = function(opt_includeInstance) { - return proto.poolrpc.ServerSubmitOrderResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.poolrpc.ServerSubmitOrderResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.ServerSubmitOrderResponse.toObject = function(includeInstance, msg) { - var f, obj = { - invalidOrder: (f = msg.getInvalidOrder()) && proto.poolrpc.InvalidOrder.toObject(includeInstance, f), - accepted: jspb.Message.getBooleanFieldWithDefault(msg, 2, false) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.poolrpc.ServerSubmitOrderResponse} - */ -proto.poolrpc.ServerSubmitOrderResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.poolrpc.ServerSubmitOrderResponse; - return proto.poolrpc.ServerSubmitOrderResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.poolrpc.ServerSubmitOrderResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.poolrpc.ServerSubmitOrderResponse} - */ -proto.poolrpc.ServerSubmitOrderResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.poolrpc.InvalidOrder; - reader.readMessage(value,proto.poolrpc.InvalidOrder.deserializeBinaryFromReader); - msg.setInvalidOrder(value); - break; - case 2: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setAccepted(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.poolrpc.ServerSubmitOrderResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.poolrpc.ServerSubmitOrderResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.poolrpc.ServerSubmitOrderResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.ServerSubmitOrderResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getInvalidOrder(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.poolrpc.InvalidOrder.serializeBinaryToWriter - ); - } - f = /** @type {boolean} */ (jspb.Message.getField(message, 2)); - if (f != null) { - writer.writeBool( - 2, - f - ); - } -}; - - -/** - * optional InvalidOrder invalid_order = 1; - * @return {?proto.poolrpc.InvalidOrder} - */ -proto.poolrpc.ServerSubmitOrderResponse.prototype.getInvalidOrder = function() { - return /** @type{?proto.poolrpc.InvalidOrder} */ ( - jspb.Message.getWrapperField(this, proto.poolrpc.InvalidOrder, 1)); -}; - - -/** - * @param {?proto.poolrpc.InvalidOrder|undefined} value - * @return {!proto.poolrpc.ServerSubmitOrderResponse} returns this -*/ -proto.poolrpc.ServerSubmitOrderResponse.prototype.setInvalidOrder = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.poolrpc.ServerSubmitOrderResponse.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.poolrpc.ServerSubmitOrderResponse} returns this - */ -proto.poolrpc.ServerSubmitOrderResponse.prototype.clearInvalidOrder = function() { - return this.setInvalidOrder(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.poolrpc.ServerSubmitOrderResponse.prototype.hasInvalidOrder = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional bool accepted = 2; - * @return {boolean} - */ -proto.poolrpc.ServerSubmitOrderResponse.prototype.getAccepted = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.poolrpc.ServerSubmitOrderResponse} returns this - */ -proto.poolrpc.ServerSubmitOrderResponse.prototype.setAccepted = function(value) { - return jspb.Message.setOneofField(this, 2, proto.poolrpc.ServerSubmitOrderResponse.oneofGroups_[0], value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.poolrpc.ServerSubmitOrderResponse} returns this - */ -proto.poolrpc.ServerSubmitOrderResponse.prototype.clearAccepted = function() { - return jspb.Message.setOneofField(this, 2, proto.poolrpc.ServerSubmitOrderResponse.oneofGroups_[0], undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.poolrpc.ServerSubmitOrderResponse.prototype.hasAccepted = function() { - return jspb.Message.getField(this, 2) != null; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.poolrpc.ServerCancelOrderRequest.prototype.toObject = function(opt_includeInstance) { - return proto.poolrpc.ServerCancelOrderRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.poolrpc.ServerCancelOrderRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.ServerCancelOrderRequest.toObject = function(includeInstance, msg) { - var f, obj = { - orderNoncePreimage: msg.getOrderNoncePreimage_asB64() - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.poolrpc.ServerCancelOrderRequest} - */ -proto.poolrpc.ServerCancelOrderRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.poolrpc.ServerCancelOrderRequest; - return proto.poolrpc.ServerCancelOrderRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.poolrpc.ServerCancelOrderRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.poolrpc.ServerCancelOrderRequest} - */ -proto.poolrpc.ServerCancelOrderRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setOrderNoncePreimage(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.poolrpc.ServerCancelOrderRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.poolrpc.ServerCancelOrderRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.poolrpc.ServerCancelOrderRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.ServerCancelOrderRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getOrderNoncePreimage_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } -}; - - -/** - * optional bytes order_nonce_preimage = 1; - * @return {!(string|Uint8Array)} - */ -proto.poolrpc.ServerCancelOrderRequest.prototype.getOrderNoncePreimage = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes order_nonce_preimage = 1; - * This is a type-conversion wrapper around `getOrderNoncePreimage()` - * @return {string} - */ -proto.poolrpc.ServerCancelOrderRequest.prototype.getOrderNoncePreimage_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getOrderNoncePreimage())); -}; - - -/** - * optional bytes order_nonce_preimage = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getOrderNoncePreimage()` - * @return {!Uint8Array} - */ -proto.poolrpc.ServerCancelOrderRequest.prototype.getOrderNoncePreimage_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getOrderNoncePreimage())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.poolrpc.ServerCancelOrderRequest} returns this - */ -proto.poolrpc.ServerCancelOrderRequest.prototype.setOrderNoncePreimage = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.poolrpc.ServerCancelOrderResponse.prototype.toObject = function(opt_includeInstance) { - return proto.poolrpc.ServerCancelOrderResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.poolrpc.ServerCancelOrderResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.ServerCancelOrderResponse.toObject = function(includeInstance, msg) { - var f, obj = { - - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.poolrpc.ServerCancelOrderResponse} - */ -proto.poolrpc.ServerCancelOrderResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.poolrpc.ServerCancelOrderResponse; - return proto.poolrpc.ServerCancelOrderResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.poolrpc.ServerCancelOrderResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.poolrpc.ServerCancelOrderResponse} - */ -proto.poolrpc.ServerCancelOrderResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.poolrpc.ServerCancelOrderResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.poolrpc.ServerCancelOrderResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.poolrpc.ServerCancelOrderResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.ServerCancelOrderResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; -}; - - - -/** - * Oneof group definitions for this message. Each group defines the field - * numbers belonging to that group. When of these fields' value is set, all - * other fields in the group are cleared. During deserialization, if multiple - * fields are encountered for a group, only the last value seen will be kept. - * @private {!Array>} - * @const - */ -proto.poolrpc.ClientAuctionMessage.oneofGroups_ = [[1,2,3,4,5,6]]; - -/** - * @enum {number} - */ -proto.poolrpc.ClientAuctionMessage.MsgCase = { - MSG_NOT_SET: 0, - COMMIT: 1, - SUBSCRIBE: 2, - ACCEPT: 3, - REJECT: 4, - SIGN: 5, - RECOVER: 6 -}; - -/** - * @return {proto.poolrpc.ClientAuctionMessage.MsgCase} - */ -proto.poolrpc.ClientAuctionMessage.prototype.getMsgCase = function() { - return /** @type {proto.poolrpc.ClientAuctionMessage.MsgCase} */(jspb.Message.computeOneofCase(this, proto.poolrpc.ClientAuctionMessage.oneofGroups_[0])); -}; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.poolrpc.ClientAuctionMessage.prototype.toObject = function(opt_includeInstance) { - return proto.poolrpc.ClientAuctionMessage.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.poolrpc.ClientAuctionMessage} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.ClientAuctionMessage.toObject = function(includeInstance, msg) { - var f, obj = { - commit: (f = msg.getCommit()) && proto.poolrpc.AccountCommitment.toObject(includeInstance, f), - subscribe: (f = msg.getSubscribe()) && proto.poolrpc.AccountSubscription.toObject(includeInstance, f), - accept: (f = msg.getAccept()) && proto.poolrpc.OrderMatchAccept.toObject(includeInstance, f), - reject: (f = msg.getReject()) && proto.poolrpc.OrderMatchReject.toObject(includeInstance, f), - sign: (f = msg.getSign()) && proto.poolrpc.OrderMatchSign.toObject(includeInstance, f), - recover: (f = msg.getRecover()) && proto.poolrpc.AccountRecovery.toObject(includeInstance, f) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.poolrpc.ClientAuctionMessage} - */ -proto.poolrpc.ClientAuctionMessage.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.poolrpc.ClientAuctionMessage; - return proto.poolrpc.ClientAuctionMessage.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.poolrpc.ClientAuctionMessage} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.poolrpc.ClientAuctionMessage} - */ -proto.poolrpc.ClientAuctionMessage.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.poolrpc.AccountCommitment; - reader.readMessage(value,proto.poolrpc.AccountCommitment.deserializeBinaryFromReader); - msg.setCommit(value); - break; - case 2: - var value = new proto.poolrpc.AccountSubscription; - reader.readMessage(value,proto.poolrpc.AccountSubscription.deserializeBinaryFromReader); - msg.setSubscribe(value); - break; - case 3: - var value = new proto.poolrpc.OrderMatchAccept; - reader.readMessage(value,proto.poolrpc.OrderMatchAccept.deserializeBinaryFromReader); - msg.setAccept(value); - break; - case 4: - var value = new proto.poolrpc.OrderMatchReject; - reader.readMessage(value,proto.poolrpc.OrderMatchReject.deserializeBinaryFromReader); - msg.setReject(value); - break; - case 5: - var value = new proto.poolrpc.OrderMatchSign; - reader.readMessage(value,proto.poolrpc.OrderMatchSign.deserializeBinaryFromReader); - msg.setSign(value); - break; - case 6: - var value = new proto.poolrpc.AccountRecovery; - reader.readMessage(value,proto.poolrpc.AccountRecovery.deserializeBinaryFromReader); - msg.setRecover(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.poolrpc.ClientAuctionMessage.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.poolrpc.ClientAuctionMessage.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.poolrpc.ClientAuctionMessage} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.ClientAuctionMessage.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getCommit(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.poolrpc.AccountCommitment.serializeBinaryToWriter - ); - } - f = message.getSubscribe(); - if (f != null) { - writer.writeMessage( - 2, - f, - proto.poolrpc.AccountSubscription.serializeBinaryToWriter - ); - } - f = message.getAccept(); - if (f != null) { - writer.writeMessage( - 3, - f, - proto.poolrpc.OrderMatchAccept.serializeBinaryToWriter - ); - } - f = message.getReject(); - if (f != null) { - writer.writeMessage( - 4, - f, - proto.poolrpc.OrderMatchReject.serializeBinaryToWriter - ); - } - f = message.getSign(); - if (f != null) { - writer.writeMessage( - 5, - f, - proto.poolrpc.OrderMatchSign.serializeBinaryToWriter - ); - } - f = message.getRecover(); - if (f != null) { - writer.writeMessage( - 6, - f, - proto.poolrpc.AccountRecovery.serializeBinaryToWriter - ); - } -}; - - -/** - * optional AccountCommitment commit = 1; - * @return {?proto.poolrpc.AccountCommitment} - */ -proto.poolrpc.ClientAuctionMessage.prototype.getCommit = function() { - return /** @type{?proto.poolrpc.AccountCommitment} */ ( - jspb.Message.getWrapperField(this, proto.poolrpc.AccountCommitment, 1)); -}; - - -/** - * @param {?proto.poolrpc.AccountCommitment|undefined} value - * @return {!proto.poolrpc.ClientAuctionMessage} returns this -*/ -proto.poolrpc.ClientAuctionMessage.prototype.setCommit = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.poolrpc.ClientAuctionMessage.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.poolrpc.ClientAuctionMessage} returns this - */ -proto.poolrpc.ClientAuctionMessage.prototype.clearCommit = function() { - return this.setCommit(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.poolrpc.ClientAuctionMessage.prototype.hasCommit = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional AccountSubscription subscribe = 2; - * @return {?proto.poolrpc.AccountSubscription} - */ -proto.poolrpc.ClientAuctionMessage.prototype.getSubscribe = function() { - return /** @type{?proto.poolrpc.AccountSubscription} */ ( - jspb.Message.getWrapperField(this, proto.poolrpc.AccountSubscription, 2)); -}; - - -/** - * @param {?proto.poolrpc.AccountSubscription|undefined} value - * @return {!proto.poolrpc.ClientAuctionMessage} returns this -*/ -proto.poolrpc.ClientAuctionMessage.prototype.setSubscribe = function(value) { - return jspb.Message.setOneofWrapperField(this, 2, proto.poolrpc.ClientAuctionMessage.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.poolrpc.ClientAuctionMessage} returns this - */ -proto.poolrpc.ClientAuctionMessage.prototype.clearSubscribe = function() { - return this.setSubscribe(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.poolrpc.ClientAuctionMessage.prototype.hasSubscribe = function() { - return jspb.Message.getField(this, 2) != null; -}; - - -/** - * optional OrderMatchAccept accept = 3; - * @return {?proto.poolrpc.OrderMatchAccept} - */ -proto.poolrpc.ClientAuctionMessage.prototype.getAccept = function() { - return /** @type{?proto.poolrpc.OrderMatchAccept} */ ( - jspb.Message.getWrapperField(this, proto.poolrpc.OrderMatchAccept, 3)); -}; - - -/** - * @param {?proto.poolrpc.OrderMatchAccept|undefined} value - * @return {!proto.poolrpc.ClientAuctionMessage} returns this -*/ -proto.poolrpc.ClientAuctionMessage.prototype.setAccept = function(value) { - return jspb.Message.setOneofWrapperField(this, 3, proto.poolrpc.ClientAuctionMessage.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.poolrpc.ClientAuctionMessage} returns this - */ -proto.poolrpc.ClientAuctionMessage.prototype.clearAccept = function() { - return this.setAccept(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.poolrpc.ClientAuctionMessage.prototype.hasAccept = function() { - return jspb.Message.getField(this, 3) != null; -}; - - -/** - * optional OrderMatchReject reject = 4; - * @return {?proto.poolrpc.OrderMatchReject} - */ -proto.poolrpc.ClientAuctionMessage.prototype.getReject = function() { - return /** @type{?proto.poolrpc.OrderMatchReject} */ ( - jspb.Message.getWrapperField(this, proto.poolrpc.OrderMatchReject, 4)); -}; - - -/** - * @param {?proto.poolrpc.OrderMatchReject|undefined} value - * @return {!proto.poolrpc.ClientAuctionMessage} returns this -*/ -proto.poolrpc.ClientAuctionMessage.prototype.setReject = function(value) { - return jspb.Message.setOneofWrapperField(this, 4, proto.poolrpc.ClientAuctionMessage.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.poolrpc.ClientAuctionMessage} returns this - */ -proto.poolrpc.ClientAuctionMessage.prototype.clearReject = function() { - return this.setReject(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.poolrpc.ClientAuctionMessage.prototype.hasReject = function() { - return jspb.Message.getField(this, 4) != null; -}; - - -/** - * optional OrderMatchSign sign = 5; - * @return {?proto.poolrpc.OrderMatchSign} - */ -proto.poolrpc.ClientAuctionMessage.prototype.getSign = function() { - return /** @type{?proto.poolrpc.OrderMatchSign} */ ( - jspb.Message.getWrapperField(this, proto.poolrpc.OrderMatchSign, 5)); -}; - - -/** - * @param {?proto.poolrpc.OrderMatchSign|undefined} value - * @return {!proto.poolrpc.ClientAuctionMessage} returns this -*/ -proto.poolrpc.ClientAuctionMessage.prototype.setSign = function(value) { - return jspb.Message.setOneofWrapperField(this, 5, proto.poolrpc.ClientAuctionMessage.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.poolrpc.ClientAuctionMessage} returns this - */ -proto.poolrpc.ClientAuctionMessage.prototype.clearSign = function() { - return this.setSign(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.poolrpc.ClientAuctionMessage.prototype.hasSign = function() { - return jspb.Message.getField(this, 5) != null; -}; - - -/** - * optional AccountRecovery recover = 6; - * @return {?proto.poolrpc.AccountRecovery} - */ -proto.poolrpc.ClientAuctionMessage.prototype.getRecover = function() { - return /** @type{?proto.poolrpc.AccountRecovery} */ ( - jspb.Message.getWrapperField(this, proto.poolrpc.AccountRecovery, 6)); -}; - - -/** - * @param {?proto.poolrpc.AccountRecovery|undefined} value - * @return {!proto.poolrpc.ClientAuctionMessage} returns this -*/ -proto.poolrpc.ClientAuctionMessage.prototype.setRecover = function(value) { - return jspb.Message.setOneofWrapperField(this, 6, proto.poolrpc.ClientAuctionMessage.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.poolrpc.ClientAuctionMessage} returns this - */ -proto.poolrpc.ClientAuctionMessage.prototype.clearRecover = function() { - return this.setRecover(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.poolrpc.ClientAuctionMessage.prototype.hasRecover = function() { - return jspb.Message.getField(this, 6) != null; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.poolrpc.AccountCommitment.prototype.toObject = function(opt_includeInstance) { - return proto.poolrpc.AccountCommitment.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.poolrpc.AccountCommitment} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.AccountCommitment.toObject = function(includeInstance, msg) { - var f, obj = { - commitHash: msg.getCommitHash_asB64(), - batchVersion: jspb.Message.getFieldWithDefault(msg, 2, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.poolrpc.AccountCommitment} - */ -proto.poolrpc.AccountCommitment.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.poolrpc.AccountCommitment; - return proto.poolrpc.AccountCommitment.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.poolrpc.AccountCommitment} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.poolrpc.AccountCommitment} - */ -proto.poolrpc.AccountCommitment.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setCommitHash(value); - break; - case 2: - var value = /** @type {number} */ (reader.readUint32()); - msg.setBatchVersion(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.poolrpc.AccountCommitment.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.poolrpc.AccountCommitment.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.poolrpc.AccountCommitment} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.AccountCommitment.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getCommitHash_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getBatchVersion(); - if (f !== 0) { - writer.writeUint32( - 2, - f - ); - } -}; - - -/** - * optional bytes commit_hash = 1; - * @return {!(string|Uint8Array)} - */ -proto.poolrpc.AccountCommitment.prototype.getCommitHash = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes commit_hash = 1; - * This is a type-conversion wrapper around `getCommitHash()` - * @return {string} - */ -proto.poolrpc.AccountCommitment.prototype.getCommitHash_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getCommitHash())); -}; - - -/** - * optional bytes commit_hash = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getCommitHash()` - * @return {!Uint8Array} - */ -proto.poolrpc.AccountCommitment.prototype.getCommitHash_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getCommitHash())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.poolrpc.AccountCommitment} returns this - */ -proto.poolrpc.AccountCommitment.prototype.setCommitHash = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional uint32 batch_version = 2; - * @return {number} - */ -proto.poolrpc.AccountCommitment.prototype.getBatchVersion = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.poolrpc.AccountCommitment} returns this - */ -proto.poolrpc.AccountCommitment.prototype.setBatchVersion = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.poolrpc.AccountSubscription.prototype.toObject = function(opt_includeInstance) { - return proto.poolrpc.AccountSubscription.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.poolrpc.AccountSubscription} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.AccountSubscription.toObject = function(includeInstance, msg) { - var f, obj = { - traderKey: msg.getTraderKey_asB64(), - commitNonce: msg.getCommitNonce_asB64(), - authSig: msg.getAuthSig_asB64() - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.poolrpc.AccountSubscription} - */ -proto.poolrpc.AccountSubscription.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.poolrpc.AccountSubscription; - return proto.poolrpc.AccountSubscription.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.poolrpc.AccountSubscription} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.poolrpc.AccountSubscription} - */ -proto.poolrpc.AccountSubscription.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setTraderKey(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setCommitNonce(value); - break; - case 3: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setAuthSig(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.poolrpc.AccountSubscription.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.poolrpc.AccountSubscription.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.poolrpc.AccountSubscription} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.AccountSubscription.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getTraderKey_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getCommitNonce_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } - f = message.getAuthSig_asU8(); - if (f.length > 0) { - writer.writeBytes( - 3, - f - ); - } -}; - - -/** - * optional bytes trader_key = 1; - * @return {!(string|Uint8Array)} - */ -proto.poolrpc.AccountSubscription.prototype.getTraderKey = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes trader_key = 1; - * This is a type-conversion wrapper around `getTraderKey()` - * @return {string} - */ -proto.poolrpc.AccountSubscription.prototype.getTraderKey_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getTraderKey())); -}; - - -/** - * optional bytes trader_key = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getTraderKey()` - * @return {!Uint8Array} - */ -proto.poolrpc.AccountSubscription.prototype.getTraderKey_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getTraderKey())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.poolrpc.AccountSubscription} returns this - */ -proto.poolrpc.AccountSubscription.prototype.setTraderKey = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional bytes commit_nonce = 2; - * @return {!(string|Uint8Array)} - */ -proto.poolrpc.AccountSubscription.prototype.getCommitNonce = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes commit_nonce = 2; - * This is a type-conversion wrapper around `getCommitNonce()` - * @return {string} - */ -proto.poolrpc.AccountSubscription.prototype.getCommitNonce_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getCommitNonce())); -}; - - -/** - * optional bytes commit_nonce = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getCommitNonce()` - * @return {!Uint8Array} - */ -proto.poolrpc.AccountSubscription.prototype.getCommitNonce_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getCommitNonce())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.poolrpc.AccountSubscription} returns this - */ -proto.poolrpc.AccountSubscription.prototype.setCommitNonce = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); -}; - - -/** - * optional bytes auth_sig = 3; - * @return {!(string|Uint8Array)} - */ -proto.poolrpc.AccountSubscription.prototype.getAuthSig = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * optional bytes auth_sig = 3; - * This is a type-conversion wrapper around `getAuthSig()` - * @return {string} - */ -proto.poolrpc.AccountSubscription.prototype.getAuthSig_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getAuthSig())); -}; - - -/** - * optional bytes auth_sig = 3; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getAuthSig()` - * @return {!Uint8Array} - */ -proto.poolrpc.AccountSubscription.prototype.getAuthSig_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getAuthSig())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.poolrpc.AccountSubscription} returns this - */ -proto.poolrpc.AccountSubscription.prototype.setAuthSig = function(value) { - return jspb.Message.setProto3BytesField(this, 3, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.poolrpc.OrderMatchAccept.prototype.toObject = function(opt_includeInstance) { - return proto.poolrpc.OrderMatchAccept.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.poolrpc.OrderMatchAccept} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.OrderMatchAccept.toObject = function(includeInstance, msg) { - var f, obj = { - batchId: msg.getBatchId_asB64() - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.poolrpc.OrderMatchAccept} - */ -proto.poolrpc.OrderMatchAccept.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.poolrpc.OrderMatchAccept; - return proto.poolrpc.OrderMatchAccept.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.poolrpc.OrderMatchAccept} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.poolrpc.OrderMatchAccept} - */ -proto.poolrpc.OrderMatchAccept.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setBatchId(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.poolrpc.OrderMatchAccept.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.poolrpc.OrderMatchAccept.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.poolrpc.OrderMatchAccept} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.OrderMatchAccept.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getBatchId_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } -}; - - -/** - * optional bytes batch_id = 1; - * @return {!(string|Uint8Array)} - */ -proto.poolrpc.OrderMatchAccept.prototype.getBatchId = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes batch_id = 1; - * This is a type-conversion wrapper around `getBatchId()` - * @return {string} - */ -proto.poolrpc.OrderMatchAccept.prototype.getBatchId_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getBatchId())); -}; - - -/** - * optional bytes batch_id = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getBatchId()` - * @return {!Uint8Array} - */ -proto.poolrpc.OrderMatchAccept.prototype.getBatchId_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getBatchId())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.poolrpc.OrderMatchAccept} returns this - */ -proto.poolrpc.OrderMatchAccept.prototype.setBatchId = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.poolrpc.OrderMatchReject.prototype.toObject = function(opt_includeInstance) { - return proto.poolrpc.OrderMatchReject.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.poolrpc.OrderMatchReject} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.OrderMatchReject.toObject = function(includeInstance, msg) { - var f, obj = { - batchId: msg.getBatchId_asB64(), - reason: jspb.Message.getFieldWithDefault(msg, 2, ""), - reasonCode: jspb.Message.getFieldWithDefault(msg, 3, 0), - rejectedOrdersMap: (f = msg.getRejectedOrdersMap()) ? f.toObject(includeInstance, proto.poolrpc.OrderReject.toObject) : [] - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.poolrpc.OrderMatchReject} - */ -proto.poolrpc.OrderMatchReject.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.poolrpc.OrderMatchReject; - return proto.poolrpc.OrderMatchReject.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.poolrpc.OrderMatchReject} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.poolrpc.OrderMatchReject} - */ -proto.poolrpc.OrderMatchReject.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setBatchId(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setReason(value); - break; - case 3: - var value = /** @type {!proto.poolrpc.OrderMatchReject.RejectReason} */ (reader.readEnum()); - msg.setReasonCode(value); - break; - case 4: - var value = msg.getRejectedOrdersMap(); - reader.readMessage(value, function(message, reader) { - jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readMessage, proto.poolrpc.OrderReject.deserializeBinaryFromReader, "", new proto.poolrpc.OrderReject()); - }); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.poolrpc.OrderMatchReject.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.poolrpc.OrderMatchReject.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.poolrpc.OrderMatchReject} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.OrderMatchReject.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getBatchId_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getReason(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getReasonCode(); - if (f !== 0.0) { - writer.writeEnum( - 3, - f - ); - } - f = message.getRejectedOrdersMap(true); - if (f && f.getLength() > 0) { - f.serializeBinary(4, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeMessage, proto.poolrpc.OrderReject.serializeBinaryToWriter); - } -}; - - -/** - * @enum {number} - */ -proto.poolrpc.OrderMatchReject.RejectReason = { - UNKNOWN: 0, - SERVER_MISBEHAVIOR: 1, - BATCH_VERSION_MISMATCH: 2, - PARTIAL_REJECT: 3 -}; - -/** - * optional bytes batch_id = 1; - * @return {!(string|Uint8Array)} - */ -proto.poolrpc.OrderMatchReject.prototype.getBatchId = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes batch_id = 1; - * This is a type-conversion wrapper around `getBatchId()` - * @return {string} - */ -proto.poolrpc.OrderMatchReject.prototype.getBatchId_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getBatchId())); -}; - - -/** - * optional bytes batch_id = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getBatchId()` - * @return {!Uint8Array} - */ -proto.poolrpc.OrderMatchReject.prototype.getBatchId_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getBatchId())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.poolrpc.OrderMatchReject} returns this - */ -proto.poolrpc.OrderMatchReject.prototype.setBatchId = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional string reason = 2; - * @return {string} - */ -proto.poolrpc.OrderMatchReject.prototype.getReason = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.poolrpc.OrderMatchReject} returns this - */ -proto.poolrpc.OrderMatchReject.prototype.setReason = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional RejectReason reason_code = 3; - * @return {!proto.poolrpc.OrderMatchReject.RejectReason} - */ -proto.poolrpc.OrderMatchReject.prototype.getReasonCode = function() { - return /** @type {!proto.poolrpc.OrderMatchReject.RejectReason} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {!proto.poolrpc.OrderMatchReject.RejectReason} value - * @return {!proto.poolrpc.OrderMatchReject} returns this - */ -proto.poolrpc.OrderMatchReject.prototype.setReasonCode = function(value) { - return jspb.Message.setProto3EnumField(this, 3, value); -}; - - -/** - * map rejected_orders = 4; - * @param {boolean=} opt_noLazyCreate Do not create the map if - * empty, instead returning `undefined` - * @return {!jspb.Map} - */ -proto.poolrpc.OrderMatchReject.prototype.getRejectedOrdersMap = function(opt_noLazyCreate) { - return /** @type {!jspb.Map} */ ( - jspb.Message.getMapField(this, 4, opt_noLazyCreate, - proto.poolrpc.OrderReject)); -}; - - -/** - * Clears values from the map. The map will be non-null. - * @return {!proto.poolrpc.OrderMatchReject} returns this - */ -proto.poolrpc.OrderMatchReject.prototype.clearRejectedOrdersMap = function() { - this.getRejectedOrdersMap().clear(); - return this;}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.poolrpc.OrderReject.prototype.toObject = function(opt_includeInstance) { - return proto.poolrpc.OrderReject.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.poolrpc.OrderReject} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.OrderReject.toObject = function(includeInstance, msg) { - var f, obj = { - reason: jspb.Message.getFieldWithDefault(msg, 1, ""), - reasonCode: jspb.Message.getFieldWithDefault(msg, 2, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.poolrpc.OrderReject} - */ -proto.poolrpc.OrderReject.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.poolrpc.OrderReject; - return proto.poolrpc.OrderReject.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.poolrpc.OrderReject} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.poolrpc.OrderReject} - */ -proto.poolrpc.OrderReject.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setReason(value); - break; - case 2: - var value = /** @type {!proto.poolrpc.OrderReject.OrderRejectReason} */ (reader.readEnum()); - msg.setReasonCode(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.poolrpc.OrderReject.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.poolrpc.OrderReject.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.poolrpc.OrderReject} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.OrderReject.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getReason(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getReasonCode(); - if (f !== 0.0) { - writer.writeEnum( - 2, - f - ); - } -}; - - -/** - * @enum {number} - */ -proto.poolrpc.OrderReject.OrderRejectReason = { - DUPLICATE_PEER: 0, - CHANNEL_FUNDING_FAILED: 1 -}; - -/** - * optional string reason = 1; - * @return {string} - */ -proto.poolrpc.OrderReject.prototype.getReason = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.poolrpc.OrderReject} returns this - */ -proto.poolrpc.OrderReject.prototype.setReason = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional OrderRejectReason reason_code = 2; - * @return {!proto.poolrpc.OrderReject.OrderRejectReason} - */ -proto.poolrpc.OrderReject.prototype.getReasonCode = function() { - return /** @type {!proto.poolrpc.OrderReject.OrderRejectReason} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {!proto.poolrpc.OrderReject.OrderRejectReason} value - * @return {!proto.poolrpc.OrderReject} returns this - */ -proto.poolrpc.OrderReject.prototype.setReasonCode = function(value) { - return jspb.Message.setProto3EnumField(this, 2, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.poolrpc.ChannelInfo.prototype.toObject = function(opt_includeInstance) { - return proto.poolrpc.ChannelInfo.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.poolrpc.ChannelInfo} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.ChannelInfo.toObject = function(includeInstance, msg) { - var f, obj = { - type: jspb.Message.getFieldWithDefault(msg, 1, 0), - localNodeKey: msg.getLocalNodeKey_asB64(), - remoteNodeKey: msg.getRemoteNodeKey_asB64(), - localPaymentBasePoint: msg.getLocalPaymentBasePoint_asB64(), - remotePaymentBasePoint: msg.getRemotePaymentBasePoint_asB64() - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.poolrpc.ChannelInfo} - */ -proto.poolrpc.ChannelInfo.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.poolrpc.ChannelInfo; - return proto.poolrpc.ChannelInfo.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.poolrpc.ChannelInfo} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.poolrpc.ChannelInfo} - */ -proto.poolrpc.ChannelInfo.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!proto.poolrpc.ChannelType} */ (reader.readEnum()); - msg.setType(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setLocalNodeKey(value); - break; - case 3: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setRemoteNodeKey(value); - break; - case 4: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setLocalPaymentBasePoint(value); - break; - case 5: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setRemotePaymentBasePoint(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.poolrpc.ChannelInfo.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.poolrpc.ChannelInfo.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.poolrpc.ChannelInfo} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.ChannelInfo.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getType(); - if (f !== 0.0) { - writer.writeEnum( - 1, - f - ); - } - f = message.getLocalNodeKey_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } - f = message.getRemoteNodeKey_asU8(); - if (f.length > 0) { - writer.writeBytes( - 3, - f - ); - } - f = message.getLocalPaymentBasePoint_asU8(); - if (f.length > 0) { - writer.writeBytes( - 4, - f - ); - } - f = message.getRemotePaymentBasePoint_asU8(); - if (f.length > 0) { - writer.writeBytes( - 5, - f - ); - } -}; - - -/** - * optional ChannelType type = 1; - * @return {!proto.poolrpc.ChannelType} - */ -proto.poolrpc.ChannelInfo.prototype.getType = function() { - return /** @type {!proto.poolrpc.ChannelType} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {!proto.poolrpc.ChannelType} value - * @return {!proto.poolrpc.ChannelInfo} returns this - */ -proto.poolrpc.ChannelInfo.prototype.setType = function(value) { - return jspb.Message.setProto3EnumField(this, 1, value); -}; - - -/** - * optional bytes local_node_key = 2; - * @return {!(string|Uint8Array)} - */ -proto.poolrpc.ChannelInfo.prototype.getLocalNodeKey = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes local_node_key = 2; - * This is a type-conversion wrapper around `getLocalNodeKey()` - * @return {string} - */ -proto.poolrpc.ChannelInfo.prototype.getLocalNodeKey_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getLocalNodeKey())); -}; - - -/** - * optional bytes local_node_key = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getLocalNodeKey()` - * @return {!Uint8Array} - */ -proto.poolrpc.ChannelInfo.prototype.getLocalNodeKey_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getLocalNodeKey())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.poolrpc.ChannelInfo} returns this - */ -proto.poolrpc.ChannelInfo.prototype.setLocalNodeKey = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); -}; - - -/** - * optional bytes remote_node_key = 3; - * @return {!(string|Uint8Array)} - */ -proto.poolrpc.ChannelInfo.prototype.getRemoteNodeKey = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * optional bytes remote_node_key = 3; - * This is a type-conversion wrapper around `getRemoteNodeKey()` - * @return {string} - */ -proto.poolrpc.ChannelInfo.prototype.getRemoteNodeKey_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getRemoteNodeKey())); -}; - - -/** - * optional bytes remote_node_key = 3; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getRemoteNodeKey()` - * @return {!Uint8Array} - */ -proto.poolrpc.ChannelInfo.prototype.getRemoteNodeKey_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getRemoteNodeKey())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.poolrpc.ChannelInfo} returns this - */ -proto.poolrpc.ChannelInfo.prototype.setRemoteNodeKey = function(value) { - return jspb.Message.setProto3BytesField(this, 3, value); -}; - - -/** - * optional bytes local_payment_base_point = 4; - * @return {!(string|Uint8Array)} - */ -proto.poolrpc.ChannelInfo.prototype.getLocalPaymentBasePoint = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 4, "")); -}; - - -/** - * optional bytes local_payment_base_point = 4; - * This is a type-conversion wrapper around `getLocalPaymentBasePoint()` - * @return {string} - */ -proto.poolrpc.ChannelInfo.prototype.getLocalPaymentBasePoint_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getLocalPaymentBasePoint())); -}; - - -/** - * optional bytes local_payment_base_point = 4; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getLocalPaymentBasePoint()` - * @return {!Uint8Array} - */ -proto.poolrpc.ChannelInfo.prototype.getLocalPaymentBasePoint_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getLocalPaymentBasePoint())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.poolrpc.ChannelInfo} returns this - */ -proto.poolrpc.ChannelInfo.prototype.setLocalPaymentBasePoint = function(value) { - return jspb.Message.setProto3BytesField(this, 4, value); -}; - - -/** - * optional bytes remote_payment_base_point = 5; - * @return {!(string|Uint8Array)} - */ -proto.poolrpc.ChannelInfo.prototype.getRemotePaymentBasePoint = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 5, "")); -}; - - -/** - * optional bytes remote_payment_base_point = 5; - * This is a type-conversion wrapper around `getRemotePaymentBasePoint()` - * @return {string} - */ -proto.poolrpc.ChannelInfo.prototype.getRemotePaymentBasePoint_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getRemotePaymentBasePoint())); -}; - - -/** - * optional bytes remote_payment_base_point = 5; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getRemotePaymentBasePoint()` - * @return {!Uint8Array} - */ -proto.poolrpc.ChannelInfo.prototype.getRemotePaymentBasePoint_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getRemotePaymentBasePoint())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.poolrpc.ChannelInfo} returns this - */ -proto.poolrpc.ChannelInfo.prototype.setRemotePaymentBasePoint = function(value) { - return jspb.Message.setProto3BytesField(this, 5, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.poolrpc.OrderMatchSign.prototype.toObject = function(opt_includeInstance) { - return proto.poolrpc.OrderMatchSign.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.poolrpc.OrderMatchSign} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.OrderMatchSign.toObject = function(includeInstance, msg) { - var f, obj = { - batchId: msg.getBatchId_asB64(), - accountSigsMap: (f = msg.getAccountSigsMap()) ? f.toObject(includeInstance, undefined) : [], - channelInfosMap: (f = msg.getChannelInfosMap()) ? f.toObject(includeInstance, proto.poolrpc.ChannelInfo.toObject) : [] - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.poolrpc.OrderMatchSign} - */ -proto.poolrpc.OrderMatchSign.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.poolrpc.OrderMatchSign; - return proto.poolrpc.OrderMatchSign.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.poolrpc.OrderMatchSign} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.poolrpc.OrderMatchSign} - */ -proto.poolrpc.OrderMatchSign.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setBatchId(value); - break; - case 2: - var value = msg.getAccountSigsMap(); - reader.readMessage(value, function(message, reader) { - jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readBytes, null, "", ""); - }); - break; - case 3: - var value = msg.getChannelInfosMap(); - reader.readMessage(value, function(message, reader) { - jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readMessage, proto.poolrpc.ChannelInfo.deserializeBinaryFromReader, "", new proto.poolrpc.ChannelInfo()); - }); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.poolrpc.OrderMatchSign.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.poolrpc.OrderMatchSign.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.poolrpc.OrderMatchSign} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.OrderMatchSign.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getBatchId_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getAccountSigsMap(true); - if (f && f.getLength() > 0) { - f.serializeBinary(2, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeBytes); - } - f = message.getChannelInfosMap(true); - if (f && f.getLength() > 0) { - f.serializeBinary(3, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeMessage, proto.poolrpc.ChannelInfo.serializeBinaryToWriter); - } -}; - - -/** - * optional bytes batch_id = 1; - * @return {!(string|Uint8Array)} - */ -proto.poolrpc.OrderMatchSign.prototype.getBatchId = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes batch_id = 1; - * This is a type-conversion wrapper around `getBatchId()` - * @return {string} - */ -proto.poolrpc.OrderMatchSign.prototype.getBatchId_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getBatchId())); -}; - - -/** - * optional bytes batch_id = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getBatchId()` - * @return {!Uint8Array} - */ -proto.poolrpc.OrderMatchSign.prototype.getBatchId_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getBatchId())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.poolrpc.OrderMatchSign} returns this - */ -proto.poolrpc.OrderMatchSign.prototype.setBatchId = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * map account_sigs = 2; - * @param {boolean=} opt_noLazyCreate Do not create the map if - * empty, instead returning `undefined` - * @return {!jspb.Map} - */ -proto.poolrpc.OrderMatchSign.prototype.getAccountSigsMap = function(opt_noLazyCreate) { - return /** @type {!jspb.Map} */ ( - jspb.Message.getMapField(this, 2, opt_noLazyCreate, - null)); -}; - - -/** - * Clears values from the map. The map will be non-null. - * @return {!proto.poolrpc.OrderMatchSign} returns this - */ -proto.poolrpc.OrderMatchSign.prototype.clearAccountSigsMap = function() { - this.getAccountSigsMap().clear(); - return this;}; - - -/** - * map channel_infos = 3; - * @param {boolean=} opt_noLazyCreate Do not create the map if - * empty, instead returning `undefined` - * @return {!jspb.Map} - */ -proto.poolrpc.OrderMatchSign.prototype.getChannelInfosMap = function(opt_noLazyCreate) { - return /** @type {!jspb.Map} */ ( - jspb.Message.getMapField(this, 3, opt_noLazyCreate, - proto.poolrpc.ChannelInfo)); -}; - - -/** - * Clears values from the map. The map will be non-null. - * @return {!proto.poolrpc.OrderMatchSign} returns this - */ -proto.poolrpc.OrderMatchSign.prototype.clearChannelInfosMap = function() { - this.getChannelInfosMap().clear(); - return this;}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.poolrpc.AccountRecovery.prototype.toObject = function(opt_includeInstance) { - return proto.poolrpc.AccountRecovery.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.poolrpc.AccountRecovery} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.AccountRecovery.toObject = function(includeInstance, msg) { - var f, obj = { - traderKey: msg.getTraderKey_asB64() - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.poolrpc.AccountRecovery} - */ -proto.poolrpc.AccountRecovery.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.poolrpc.AccountRecovery; - return proto.poolrpc.AccountRecovery.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.poolrpc.AccountRecovery} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.poolrpc.AccountRecovery} - */ -proto.poolrpc.AccountRecovery.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setTraderKey(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.poolrpc.AccountRecovery.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.poolrpc.AccountRecovery.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.poolrpc.AccountRecovery} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.AccountRecovery.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getTraderKey_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } -}; - - -/** - * optional bytes trader_key = 1; - * @return {!(string|Uint8Array)} - */ -proto.poolrpc.AccountRecovery.prototype.getTraderKey = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes trader_key = 1; - * This is a type-conversion wrapper around `getTraderKey()` - * @return {string} - */ -proto.poolrpc.AccountRecovery.prototype.getTraderKey_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getTraderKey())); -}; - - -/** - * optional bytes trader_key = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getTraderKey()` - * @return {!Uint8Array} - */ -proto.poolrpc.AccountRecovery.prototype.getTraderKey_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getTraderKey())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.poolrpc.AccountRecovery} returns this - */ -proto.poolrpc.AccountRecovery.prototype.setTraderKey = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - - -/** - * Oneof group definitions for this message. Each group defines the field - * numbers belonging to that group. When of these fields' value is set, all - * other fields in the group are cleared. During deserialization, if multiple - * fields are encountered for a group, only the last value seen will be kept. - * @private {!Array>} - * @const - */ -proto.poolrpc.ServerAuctionMessage.oneofGroups_ = [[1,2,3,4,5,6,7]]; - -/** - * @enum {number} - */ -proto.poolrpc.ServerAuctionMessage.MsgCase = { - MSG_NOT_SET: 0, - CHALLENGE: 1, - SUCCESS: 2, - ERROR: 3, - PREPARE: 4, - SIGN: 5, - FINALIZE: 6, - ACCOUNT: 7 -}; - -/** - * @return {proto.poolrpc.ServerAuctionMessage.MsgCase} - */ -proto.poolrpc.ServerAuctionMessage.prototype.getMsgCase = function() { - return /** @type {proto.poolrpc.ServerAuctionMessage.MsgCase} */(jspb.Message.computeOneofCase(this, proto.poolrpc.ServerAuctionMessage.oneofGroups_[0])); -}; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.poolrpc.ServerAuctionMessage.prototype.toObject = function(opt_includeInstance) { - return proto.poolrpc.ServerAuctionMessage.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.poolrpc.ServerAuctionMessage} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.ServerAuctionMessage.toObject = function(includeInstance, msg) { - var f, obj = { - challenge: (f = msg.getChallenge()) && proto.poolrpc.ServerChallenge.toObject(includeInstance, f), - success: (f = msg.getSuccess()) && proto.poolrpc.SubscribeSuccess.toObject(includeInstance, f), - error: (f = msg.getError()) && proto.poolrpc.SubscribeError.toObject(includeInstance, f), - prepare: (f = msg.getPrepare()) && proto.poolrpc.OrderMatchPrepare.toObject(includeInstance, f), - sign: (f = msg.getSign()) && proto.poolrpc.OrderMatchSignBegin.toObject(includeInstance, f), - finalize: (f = msg.getFinalize()) && proto.poolrpc.OrderMatchFinalize.toObject(includeInstance, f), - account: (f = msg.getAccount()) && proto.poolrpc.AuctionAccount.toObject(includeInstance, f) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.poolrpc.ServerAuctionMessage} - */ -proto.poolrpc.ServerAuctionMessage.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.poolrpc.ServerAuctionMessage; - return proto.poolrpc.ServerAuctionMessage.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.poolrpc.ServerAuctionMessage} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.poolrpc.ServerAuctionMessage} - */ -proto.poolrpc.ServerAuctionMessage.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.poolrpc.ServerChallenge; - reader.readMessage(value,proto.poolrpc.ServerChallenge.deserializeBinaryFromReader); - msg.setChallenge(value); - break; - case 2: - var value = new proto.poolrpc.SubscribeSuccess; - reader.readMessage(value,proto.poolrpc.SubscribeSuccess.deserializeBinaryFromReader); - msg.setSuccess(value); - break; - case 3: - var value = new proto.poolrpc.SubscribeError; - reader.readMessage(value,proto.poolrpc.SubscribeError.deserializeBinaryFromReader); - msg.setError(value); - break; - case 4: - var value = new proto.poolrpc.OrderMatchPrepare; - reader.readMessage(value,proto.poolrpc.OrderMatchPrepare.deserializeBinaryFromReader); - msg.setPrepare(value); - break; - case 5: - var value = new proto.poolrpc.OrderMatchSignBegin; - reader.readMessage(value,proto.poolrpc.OrderMatchSignBegin.deserializeBinaryFromReader); - msg.setSign(value); - break; - case 6: - var value = new proto.poolrpc.OrderMatchFinalize; - reader.readMessage(value,proto.poolrpc.OrderMatchFinalize.deserializeBinaryFromReader); - msg.setFinalize(value); - break; - case 7: - var value = new proto.poolrpc.AuctionAccount; - reader.readMessage(value,proto.poolrpc.AuctionAccount.deserializeBinaryFromReader); - msg.setAccount(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.poolrpc.ServerAuctionMessage.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.poolrpc.ServerAuctionMessage.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.poolrpc.ServerAuctionMessage} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.ServerAuctionMessage.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getChallenge(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.poolrpc.ServerChallenge.serializeBinaryToWriter - ); - } - f = message.getSuccess(); - if (f != null) { - writer.writeMessage( - 2, - f, - proto.poolrpc.SubscribeSuccess.serializeBinaryToWriter - ); - } - f = message.getError(); - if (f != null) { - writer.writeMessage( - 3, - f, - proto.poolrpc.SubscribeError.serializeBinaryToWriter - ); - } - f = message.getPrepare(); - if (f != null) { - writer.writeMessage( - 4, - f, - proto.poolrpc.OrderMatchPrepare.serializeBinaryToWriter - ); - } - f = message.getSign(); - if (f != null) { - writer.writeMessage( - 5, - f, - proto.poolrpc.OrderMatchSignBegin.serializeBinaryToWriter - ); - } - f = message.getFinalize(); - if (f != null) { - writer.writeMessage( - 6, - f, - proto.poolrpc.OrderMatchFinalize.serializeBinaryToWriter - ); - } - f = message.getAccount(); - if (f != null) { - writer.writeMessage( - 7, - f, - proto.poolrpc.AuctionAccount.serializeBinaryToWriter - ); - } -}; - - -/** - * optional ServerChallenge challenge = 1; - * @return {?proto.poolrpc.ServerChallenge} - */ -proto.poolrpc.ServerAuctionMessage.prototype.getChallenge = function() { - return /** @type{?proto.poolrpc.ServerChallenge} */ ( - jspb.Message.getWrapperField(this, proto.poolrpc.ServerChallenge, 1)); -}; - - -/** - * @param {?proto.poolrpc.ServerChallenge|undefined} value - * @return {!proto.poolrpc.ServerAuctionMessage} returns this -*/ -proto.poolrpc.ServerAuctionMessage.prototype.setChallenge = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.poolrpc.ServerAuctionMessage.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.poolrpc.ServerAuctionMessage} returns this - */ -proto.poolrpc.ServerAuctionMessage.prototype.clearChallenge = function() { - return this.setChallenge(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.poolrpc.ServerAuctionMessage.prototype.hasChallenge = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional SubscribeSuccess success = 2; - * @return {?proto.poolrpc.SubscribeSuccess} - */ -proto.poolrpc.ServerAuctionMessage.prototype.getSuccess = function() { - return /** @type{?proto.poolrpc.SubscribeSuccess} */ ( - jspb.Message.getWrapperField(this, proto.poolrpc.SubscribeSuccess, 2)); -}; - - -/** - * @param {?proto.poolrpc.SubscribeSuccess|undefined} value - * @return {!proto.poolrpc.ServerAuctionMessage} returns this -*/ -proto.poolrpc.ServerAuctionMessage.prototype.setSuccess = function(value) { - return jspb.Message.setOneofWrapperField(this, 2, proto.poolrpc.ServerAuctionMessage.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.poolrpc.ServerAuctionMessage} returns this - */ -proto.poolrpc.ServerAuctionMessage.prototype.clearSuccess = function() { - return this.setSuccess(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.poolrpc.ServerAuctionMessage.prototype.hasSuccess = function() { - return jspb.Message.getField(this, 2) != null; -}; - - -/** - * optional SubscribeError error = 3; - * @return {?proto.poolrpc.SubscribeError} - */ -proto.poolrpc.ServerAuctionMessage.prototype.getError = function() { - return /** @type{?proto.poolrpc.SubscribeError} */ ( - jspb.Message.getWrapperField(this, proto.poolrpc.SubscribeError, 3)); -}; - - -/** - * @param {?proto.poolrpc.SubscribeError|undefined} value - * @return {!proto.poolrpc.ServerAuctionMessage} returns this -*/ -proto.poolrpc.ServerAuctionMessage.prototype.setError = function(value) { - return jspb.Message.setOneofWrapperField(this, 3, proto.poolrpc.ServerAuctionMessage.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.poolrpc.ServerAuctionMessage} returns this - */ -proto.poolrpc.ServerAuctionMessage.prototype.clearError = function() { - return this.setError(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.poolrpc.ServerAuctionMessage.prototype.hasError = function() { - return jspb.Message.getField(this, 3) != null; -}; - - -/** - * optional OrderMatchPrepare prepare = 4; - * @return {?proto.poolrpc.OrderMatchPrepare} - */ -proto.poolrpc.ServerAuctionMessage.prototype.getPrepare = function() { - return /** @type{?proto.poolrpc.OrderMatchPrepare} */ ( - jspb.Message.getWrapperField(this, proto.poolrpc.OrderMatchPrepare, 4)); -}; - - -/** - * @param {?proto.poolrpc.OrderMatchPrepare|undefined} value - * @return {!proto.poolrpc.ServerAuctionMessage} returns this -*/ -proto.poolrpc.ServerAuctionMessage.prototype.setPrepare = function(value) { - return jspb.Message.setOneofWrapperField(this, 4, proto.poolrpc.ServerAuctionMessage.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.poolrpc.ServerAuctionMessage} returns this - */ -proto.poolrpc.ServerAuctionMessage.prototype.clearPrepare = function() { - return this.setPrepare(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.poolrpc.ServerAuctionMessage.prototype.hasPrepare = function() { - return jspb.Message.getField(this, 4) != null; -}; - - -/** - * optional OrderMatchSignBegin sign = 5; - * @return {?proto.poolrpc.OrderMatchSignBegin} - */ -proto.poolrpc.ServerAuctionMessage.prototype.getSign = function() { - return /** @type{?proto.poolrpc.OrderMatchSignBegin} */ ( - jspb.Message.getWrapperField(this, proto.poolrpc.OrderMatchSignBegin, 5)); -}; - - -/** - * @param {?proto.poolrpc.OrderMatchSignBegin|undefined} value - * @return {!proto.poolrpc.ServerAuctionMessage} returns this -*/ -proto.poolrpc.ServerAuctionMessage.prototype.setSign = function(value) { - return jspb.Message.setOneofWrapperField(this, 5, proto.poolrpc.ServerAuctionMessage.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.poolrpc.ServerAuctionMessage} returns this - */ -proto.poolrpc.ServerAuctionMessage.prototype.clearSign = function() { - return this.setSign(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.poolrpc.ServerAuctionMessage.prototype.hasSign = function() { - return jspb.Message.getField(this, 5) != null; -}; - - -/** - * optional OrderMatchFinalize finalize = 6; - * @return {?proto.poolrpc.OrderMatchFinalize} - */ -proto.poolrpc.ServerAuctionMessage.prototype.getFinalize = function() { - return /** @type{?proto.poolrpc.OrderMatchFinalize} */ ( - jspb.Message.getWrapperField(this, proto.poolrpc.OrderMatchFinalize, 6)); -}; - - -/** - * @param {?proto.poolrpc.OrderMatchFinalize|undefined} value - * @return {!proto.poolrpc.ServerAuctionMessage} returns this -*/ -proto.poolrpc.ServerAuctionMessage.prototype.setFinalize = function(value) { - return jspb.Message.setOneofWrapperField(this, 6, proto.poolrpc.ServerAuctionMessage.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.poolrpc.ServerAuctionMessage} returns this - */ -proto.poolrpc.ServerAuctionMessage.prototype.clearFinalize = function() { - return this.setFinalize(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.poolrpc.ServerAuctionMessage.prototype.hasFinalize = function() { - return jspb.Message.getField(this, 6) != null; -}; - - -/** - * optional AuctionAccount account = 7; - * @return {?proto.poolrpc.AuctionAccount} - */ -proto.poolrpc.ServerAuctionMessage.prototype.getAccount = function() { - return /** @type{?proto.poolrpc.AuctionAccount} */ ( - jspb.Message.getWrapperField(this, proto.poolrpc.AuctionAccount, 7)); -}; - - -/** - * @param {?proto.poolrpc.AuctionAccount|undefined} value - * @return {!proto.poolrpc.ServerAuctionMessage} returns this -*/ -proto.poolrpc.ServerAuctionMessage.prototype.setAccount = function(value) { - return jspb.Message.setOneofWrapperField(this, 7, proto.poolrpc.ServerAuctionMessage.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.poolrpc.ServerAuctionMessage} returns this - */ -proto.poolrpc.ServerAuctionMessage.prototype.clearAccount = function() { - return this.setAccount(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.poolrpc.ServerAuctionMessage.prototype.hasAccount = function() { - return jspb.Message.getField(this, 7) != null; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.poolrpc.ServerChallenge.prototype.toObject = function(opt_includeInstance) { - return proto.poolrpc.ServerChallenge.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.poolrpc.ServerChallenge} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.ServerChallenge.toObject = function(includeInstance, msg) { - var f, obj = { - challenge: msg.getChallenge_asB64(), - commitHash: msg.getCommitHash_asB64() - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.poolrpc.ServerChallenge} - */ -proto.poolrpc.ServerChallenge.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.poolrpc.ServerChallenge; - return proto.poolrpc.ServerChallenge.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.poolrpc.ServerChallenge} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.poolrpc.ServerChallenge} - */ -proto.poolrpc.ServerChallenge.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setChallenge(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setCommitHash(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.poolrpc.ServerChallenge.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.poolrpc.ServerChallenge.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.poolrpc.ServerChallenge} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.ServerChallenge.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getChallenge_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getCommitHash_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } -}; - - -/** - * optional bytes challenge = 1; - * @return {!(string|Uint8Array)} - */ -proto.poolrpc.ServerChallenge.prototype.getChallenge = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes challenge = 1; - * This is a type-conversion wrapper around `getChallenge()` - * @return {string} - */ -proto.poolrpc.ServerChallenge.prototype.getChallenge_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getChallenge())); -}; - - -/** - * optional bytes challenge = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getChallenge()` - * @return {!Uint8Array} - */ -proto.poolrpc.ServerChallenge.prototype.getChallenge_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getChallenge())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.poolrpc.ServerChallenge} returns this - */ -proto.poolrpc.ServerChallenge.prototype.setChallenge = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional bytes commit_hash = 2; - * @return {!(string|Uint8Array)} - */ -proto.poolrpc.ServerChallenge.prototype.getCommitHash = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes commit_hash = 2; - * This is a type-conversion wrapper around `getCommitHash()` - * @return {string} - */ -proto.poolrpc.ServerChallenge.prototype.getCommitHash_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getCommitHash())); -}; - - -/** - * optional bytes commit_hash = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getCommitHash()` - * @return {!Uint8Array} - */ -proto.poolrpc.ServerChallenge.prototype.getCommitHash_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getCommitHash())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.poolrpc.ServerChallenge} returns this - */ -proto.poolrpc.ServerChallenge.prototype.setCommitHash = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.poolrpc.SubscribeSuccess.prototype.toObject = function(opt_includeInstance) { - return proto.poolrpc.SubscribeSuccess.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.poolrpc.SubscribeSuccess} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.SubscribeSuccess.toObject = function(includeInstance, msg) { - var f, obj = { - traderKey: msg.getTraderKey_asB64() - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.poolrpc.SubscribeSuccess} - */ -proto.poolrpc.SubscribeSuccess.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.poolrpc.SubscribeSuccess; - return proto.poolrpc.SubscribeSuccess.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.poolrpc.SubscribeSuccess} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.poolrpc.SubscribeSuccess} - */ -proto.poolrpc.SubscribeSuccess.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setTraderKey(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.poolrpc.SubscribeSuccess.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.poolrpc.SubscribeSuccess.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.poolrpc.SubscribeSuccess} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.SubscribeSuccess.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getTraderKey_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } -}; - - -/** - * optional bytes trader_key = 1; - * @return {!(string|Uint8Array)} - */ -proto.poolrpc.SubscribeSuccess.prototype.getTraderKey = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes trader_key = 1; - * This is a type-conversion wrapper around `getTraderKey()` - * @return {string} - */ -proto.poolrpc.SubscribeSuccess.prototype.getTraderKey_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getTraderKey())); -}; - - -/** - * optional bytes trader_key = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getTraderKey()` - * @return {!Uint8Array} - */ -proto.poolrpc.SubscribeSuccess.prototype.getTraderKey_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getTraderKey())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.poolrpc.SubscribeSuccess} returns this - */ -proto.poolrpc.SubscribeSuccess.prototype.setTraderKey = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.poolrpc.MatchedMarket.prototype.toObject = function(opt_includeInstance) { - return proto.poolrpc.MatchedMarket.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.poolrpc.MatchedMarket} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.MatchedMarket.toObject = function(includeInstance, msg) { - var f, obj = { - matchedOrdersMap: (f = msg.getMatchedOrdersMap()) ? f.toObject(includeInstance, proto.poolrpc.MatchedOrder.toObject) : [], - clearingPriceRate: jspb.Message.getFieldWithDefault(msg, 2, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.poolrpc.MatchedMarket} - */ -proto.poolrpc.MatchedMarket.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.poolrpc.MatchedMarket; - return proto.poolrpc.MatchedMarket.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.poolrpc.MatchedMarket} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.poolrpc.MatchedMarket} - */ -proto.poolrpc.MatchedMarket.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = msg.getMatchedOrdersMap(); - reader.readMessage(value, function(message, reader) { - jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readMessage, proto.poolrpc.MatchedOrder.deserializeBinaryFromReader, "", new proto.poolrpc.MatchedOrder()); - }); - break; - case 2: - var value = /** @type {number} */ (reader.readUint32()); - msg.setClearingPriceRate(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.poolrpc.MatchedMarket.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.poolrpc.MatchedMarket.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.poolrpc.MatchedMarket} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.MatchedMarket.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getMatchedOrdersMap(true); - if (f && f.getLength() > 0) { - f.serializeBinary(1, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeMessage, proto.poolrpc.MatchedOrder.serializeBinaryToWriter); - } - f = message.getClearingPriceRate(); - if (f !== 0) { - writer.writeUint32( - 2, - f - ); - } -}; - - -/** - * map matched_orders = 1; - * @param {boolean=} opt_noLazyCreate Do not create the map if - * empty, instead returning `undefined` - * @return {!jspb.Map} - */ -proto.poolrpc.MatchedMarket.prototype.getMatchedOrdersMap = function(opt_noLazyCreate) { - return /** @type {!jspb.Map} */ ( - jspb.Message.getMapField(this, 1, opt_noLazyCreate, - proto.poolrpc.MatchedOrder)); -}; - - -/** - * Clears values from the map. The map will be non-null. - * @return {!proto.poolrpc.MatchedMarket} returns this - */ -proto.poolrpc.MatchedMarket.prototype.clearMatchedOrdersMap = function() { - this.getMatchedOrdersMap().clear(); - return this;}; - - -/** - * optional uint32 clearing_price_rate = 2; - * @return {number} - */ -proto.poolrpc.MatchedMarket.prototype.getClearingPriceRate = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.poolrpc.MatchedMarket} returns this - */ -proto.poolrpc.MatchedMarket.prototype.setClearingPriceRate = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.poolrpc.OrderMatchPrepare.repeatedFields_ = [3]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.poolrpc.OrderMatchPrepare.prototype.toObject = function(opt_includeInstance) { - return proto.poolrpc.OrderMatchPrepare.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.poolrpc.OrderMatchPrepare} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.OrderMatchPrepare.toObject = function(includeInstance, msg) { - var f, obj = { - matchedOrdersMap: (f = msg.getMatchedOrdersMap()) ? f.toObject(includeInstance, proto.poolrpc.MatchedOrder.toObject) : [], - clearingPriceRate: jspb.Message.getFieldWithDefault(msg, 2, 0), - chargedAccountsList: jspb.Message.toObjectList(msg.getChargedAccountsList(), - proto.poolrpc.AccountDiff.toObject, includeInstance), - executionFee: (f = msg.getExecutionFee()) && proto.poolrpc.ExecutionFee.toObject(includeInstance, f), - batchTransaction: msg.getBatchTransaction_asB64(), - feeRateSatPerKw: jspb.Message.getFieldWithDefault(msg, 6, 0), - feeRebateSat: jspb.Message.getFieldWithDefault(msg, 7, 0), - batchId: msg.getBatchId_asB64(), - batchVersion: jspb.Message.getFieldWithDefault(msg, 9, 0), - matchedMarketsMap: (f = msg.getMatchedMarketsMap()) ? f.toObject(includeInstance, proto.poolrpc.MatchedMarket.toObject) : [], - batchHeightHint: jspb.Message.getFieldWithDefault(msg, 11, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.poolrpc.OrderMatchPrepare} - */ -proto.poolrpc.OrderMatchPrepare.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.poolrpc.OrderMatchPrepare; - return proto.poolrpc.OrderMatchPrepare.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.poolrpc.OrderMatchPrepare} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.poolrpc.OrderMatchPrepare} - */ -proto.poolrpc.OrderMatchPrepare.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = msg.getMatchedOrdersMap(); - reader.readMessage(value, function(message, reader) { - jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readMessage, proto.poolrpc.MatchedOrder.deserializeBinaryFromReader, "", new proto.poolrpc.MatchedOrder()); - }); - break; - case 2: - var value = /** @type {number} */ (reader.readUint32()); - msg.setClearingPriceRate(value); - break; - case 3: - var value = new proto.poolrpc.AccountDiff; - reader.readMessage(value,proto.poolrpc.AccountDiff.deserializeBinaryFromReader); - msg.addChargedAccounts(value); - break; - case 4: - var value = new proto.poolrpc.ExecutionFee; - reader.readMessage(value,proto.poolrpc.ExecutionFee.deserializeBinaryFromReader); - msg.setExecutionFee(value); - break; - case 5: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setBatchTransaction(value); - break; - case 6: - var value = /** @type {number} */ (reader.readUint64()); - msg.setFeeRateSatPerKw(value); - break; - case 7: - var value = /** @type {number} */ (reader.readUint64()); - msg.setFeeRebateSat(value); - break; - case 8: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setBatchId(value); - break; - case 9: - var value = /** @type {number} */ (reader.readUint32()); - msg.setBatchVersion(value); - break; - case 10: - var value = msg.getMatchedMarketsMap(); - reader.readMessage(value, function(message, reader) { - jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readUint32, jspb.BinaryReader.prototype.readMessage, proto.poolrpc.MatchedMarket.deserializeBinaryFromReader, 0, new proto.poolrpc.MatchedMarket()); - }); - break; - case 11: - var value = /** @type {number} */ (reader.readUint32()); - msg.setBatchHeightHint(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.poolrpc.OrderMatchPrepare.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.poolrpc.OrderMatchPrepare.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.poolrpc.OrderMatchPrepare} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.OrderMatchPrepare.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getMatchedOrdersMap(true); - if (f && f.getLength() > 0) { - f.serializeBinary(1, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeMessage, proto.poolrpc.MatchedOrder.serializeBinaryToWriter); - } - f = message.getClearingPriceRate(); - if (f !== 0) { - writer.writeUint32( - 2, - f - ); - } - f = message.getChargedAccountsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 3, - f, - proto.poolrpc.AccountDiff.serializeBinaryToWriter - ); - } - f = message.getExecutionFee(); - if (f != null) { - writer.writeMessage( - 4, - f, - proto.poolrpc.ExecutionFee.serializeBinaryToWriter - ); - } - f = message.getBatchTransaction_asU8(); - if (f.length > 0) { - writer.writeBytes( - 5, - f - ); - } - f = message.getFeeRateSatPerKw(); - if (f !== 0) { - writer.writeUint64( - 6, - f - ); - } - f = message.getFeeRebateSat(); - if (f !== 0) { - writer.writeUint64( - 7, - f - ); - } - f = message.getBatchId_asU8(); - if (f.length > 0) { - writer.writeBytes( - 8, - f - ); - } - f = message.getBatchVersion(); - if (f !== 0) { - writer.writeUint32( - 9, - f - ); - } - f = message.getMatchedMarketsMap(true); - if (f && f.getLength() > 0) { - f.serializeBinary(10, writer, jspb.BinaryWriter.prototype.writeUint32, jspb.BinaryWriter.prototype.writeMessage, proto.poolrpc.MatchedMarket.serializeBinaryToWriter); - } - f = message.getBatchHeightHint(); - if (f !== 0) { - writer.writeUint32( - 11, - f - ); - } -}; - - -/** - * map matched_orders = 1; - * @param {boolean=} opt_noLazyCreate Do not create the map if - * empty, instead returning `undefined` - * @return {!jspb.Map} - */ -proto.poolrpc.OrderMatchPrepare.prototype.getMatchedOrdersMap = function(opt_noLazyCreate) { - return /** @type {!jspb.Map} */ ( - jspb.Message.getMapField(this, 1, opt_noLazyCreate, - proto.poolrpc.MatchedOrder)); -}; - - -/** - * Clears values from the map. The map will be non-null. - * @return {!proto.poolrpc.OrderMatchPrepare} returns this - */ -proto.poolrpc.OrderMatchPrepare.prototype.clearMatchedOrdersMap = function() { - this.getMatchedOrdersMap().clear(); - return this;}; - - -/** - * optional uint32 clearing_price_rate = 2; - * @return {number} - */ -proto.poolrpc.OrderMatchPrepare.prototype.getClearingPriceRate = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.poolrpc.OrderMatchPrepare} returns this - */ -proto.poolrpc.OrderMatchPrepare.prototype.setClearingPriceRate = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * repeated AccountDiff charged_accounts = 3; - * @return {!Array} - */ -proto.poolrpc.OrderMatchPrepare.prototype.getChargedAccountsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.poolrpc.AccountDiff, 3)); -}; - - -/** - * @param {!Array} value - * @return {!proto.poolrpc.OrderMatchPrepare} returns this -*/ -proto.poolrpc.OrderMatchPrepare.prototype.setChargedAccountsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 3, value); -}; - - -/** - * @param {!proto.poolrpc.AccountDiff=} opt_value - * @param {number=} opt_index - * @return {!proto.poolrpc.AccountDiff} - */ -proto.poolrpc.OrderMatchPrepare.prototype.addChargedAccounts = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.poolrpc.AccountDiff, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.poolrpc.OrderMatchPrepare} returns this - */ -proto.poolrpc.OrderMatchPrepare.prototype.clearChargedAccountsList = function() { - return this.setChargedAccountsList([]); -}; - - -/** - * optional ExecutionFee execution_fee = 4; - * @return {?proto.poolrpc.ExecutionFee} - */ -proto.poolrpc.OrderMatchPrepare.prototype.getExecutionFee = function() { - return /** @type{?proto.poolrpc.ExecutionFee} */ ( - jspb.Message.getWrapperField(this, proto.poolrpc.ExecutionFee, 4)); -}; - - -/** - * @param {?proto.poolrpc.ExecutionFee|undefined} value - * @return {!proto.poolrpc.OrderMatchPrepare} returns this -*/ -proto.poolrpc.OrderMatchPrepare.prototype.setExecutionFee = function(value) { - return jspb.Message.setWrapperField(this, 4, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.poolrpc.OrderMatchPrepare} returns this - */ -proto.poolrpc.OrderMatchPrepare.prototype.clearExecutionFee = function() { - return this.setExecutionFee(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.poolrpc.OrderMatchPrepare.prototype.hasExecutionFee = function() { - return jspb.Message.getField(this, 4) != null; -}; - - -/** - * optional bytes batch_transaction = 5; - * @return {!(string|Uint8Array)} - */ -proto.poolrpc.OrderMatchPrepare.prototype.getBatchTransaction = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 5, "")); -}; - - -/** - * optional bytes batch_transaction = 5; - * This is a type-conversion wrapper around `getBatchTransaction()` - * @return {string} - */ -proto.poolrpc.OrderMatchPrepare.prototype.getBatchTransaction_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getBatchTransaction())); -}; - - -/** - * optional bytes batch_transaction = 5; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getBatchTransaction()` - * @return {!Uint8Array} - */ -proto.poolrpc.OrderMatchPrepare.prototype.getBatchTransaction_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getBatchTransaction())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.poolrpc.OrderMatchPrepare} returns this - */ -proto.poolrpc.OrderMatchPrepare.prototype.setBatchTransaction = function(value) { - return jspb.Message.setProto3BytesField(this, 5, value); -}; - - -/** - * optional uint64 fee_rate_sat_per_kw = 6; - * @return {number} - */ -proto.poolrpc.OrderMatchPrepare.prototype.getFeeRateSatPerKw = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.poolrpc.OrderMatchPrepare} returns this - */ -proto.poolrpc.OrderMatchPrepare.prototype.setFeeRateSatPerKw = function(value) { - return jspb.Message.setProto3IntField(this, 6, value); -}; - - -/** - * optional uint64 fee_rebate_sat = 7; - * @return {number} - */ -proto.poolrpc.OrderMatchPrepare.prototype.getFeeRebateSat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.poolrpc.OrderMatchPrepare} returns this - */ -proto.poolrpc.OrderMatchPrepare.prototype.setFeeRebateSat = function(value) { - return jspb.Message.setProto3IntField(this, 7, value); -}; - - -/** - * optional bytes batch_id = 8; - * @return {!(string|Uint8Array)} - */ -proto.poolrpc.OrderMatchPrepare.prototype.getBatchId = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 8, "")); -}; - - -/** - * optional bytes batch_id = 8; - * This is a type-conversion wrapper around `getBatchId()` - * @return {string} - */ -proto.poolrpc.OrderMatchPrepare.prototype.getBatchId_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getBatchId())); -}; - - -/** - * optional bytes batch_id = 8; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getBatchId()` - * @return {!Uint8Array} - */ -proto.poolrpc.OrderMatchPrepare.prototype.getBatchId_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getBatchId())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.poolrpc.OrderMatchPrepare} returns this - */ -proto.poolrpc.OrderMatchPrepare.prototype.setBatchId = function(value) { - return jspb.Message.setProto3BytesField(this, 8, value); -}; - - -/** - * optional uint32 batch_version = 9; - * @return {number} - */ -proto.poolrpc.OrderMatchPrepare.prototype.getBatchVersion = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.poolrpc.OrderMatchPrepare} returns this - */ -proto.poolrpc.OrderMatchPrepare.prototype.setBatchVersion = function(value) { - return jspb.Message.setProto3IntField(this, 9, value); -}; - - -/** - * map matched_markets = 10; - * @param {boolean=} opt_noLazyCreate Do not create the map if - * empty, instead returning `undefined` - * @return {!jspb.Map} - */ -proto.poolrpc.OrderMatchPrepare.prototype.getMatchedMarketsMap = function(opt_noLazyCreate) { - return /** @type {!jspb.Map} */ ( - jspb.Message.getMapField(this, 10, opt_noLazyCreate, - proto.poolrpc.MatchedMarket)); -}; - - -/** - * Clears values from the map. The map will be non-null. - * @return {!proto.poolrpc.OrderMatchPrepare} returns this - */ -proto.poolrpc.OrderMatchPrepare.prototype.clearMatchedMarketsMap = function() { - this.getMatchedMarketsMap().clear(); - return this;}; - - -/** - * optional uint32 batch_height_hint = 11; - * @return {number} - */ -proto.poolrpc.OrderMatchPrepare.prototype.getBatchHeightHint = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 11, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.poolrpc.OrderMatchPrepare} returns this - */ -proto.poolrpc.OrderMatchPrepare.prototype.setBatchHeightHint = function(value) { - return jspb.Message.setProto3IntField(this, 11, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.poolrpc.OrderMatchSignBegin.prototype.toObject = function(opt_includeInstance) { - return proto.poolrpc.OrderMatchSignBegin.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.poolrpc.OrderMatchSignBegin} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.OrderMatchSignBegin.toObject = function(includeInstance, msg) { - var f, obj = { - batchId: msg.getBatchId_asB64() - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.poolrpc.OrderMatchSignBegin} - */ -proto.poolrpc.OrderMatchSignBegin.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.poolrpc.OrderMatchSignBegin; - return proto.poolrpc.OrderMatchSignBegin.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.poolrpc.OrderMatchSignBegin} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.poolrpc.OrderMatchSignBegin} - */ -proto.poolrpc.OrderMatchSignBegin.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setBatchId(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.poolrpc.OrderMatchSignBegin.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.poolrpc.OrderMatchSignBegin.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.poolrpc.OrderMatchSignBegin} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.OrderMatchSignBegin.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getBatchId_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } -}; - - -/** - * optional bytes batch_id = 1; - * @return {!(string|Uint8Array)} - */ -proto.poolrpc.OrderMatchSignBegin.prototype.getBatchId = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes batch_id = 1; - * This is a type-conversion wrapper around `getBatchId()` - * @return {string} - */ -proto.poolrpc.OrderMatchSignBegin.prototype.getBatchId_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getBatchId())); -}; - - -/** - * optional bytes batch_id = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getBatchId()` - * @return {!Uint8Array} - */ -proto.poolrpc.OrderMatchSignBegin.prototype.getBatchId_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getBatchId())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.poolrpc.OrderMatchSignBegin} returns this - */ -proto.poolrpc.OrderMatchSignBegin.prototype.setBatchId = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.poolrpc.OrderMatchFinalize.prototype.toObject = function(opt_includeInstance) { - return proto.poolrpc.OrderMatchFinalize.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.poolrpc.OrderMatchFinalize} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.OrderMatchFinalize.toObject = function(includeInstance, msg) { - var f, obj = { - batchId: msg.getBatchId_asB64(), - batchTxid: msg.getBatchTxid_asB64() - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.poolrpc.OrderMatchFinalize} - */ -proto.poolrpc.OrderMatchFinalize.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.poolrpc.OrderMatchFinalize; - return proto.poolrpc.OrderMatchFinalize.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.poolrpc.OrderMatchFinalize} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.poolrpc.OrderMatchFinalize} - */ -proto.poolrpc.OrderMatchFinalize.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setBatchId(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setBatchTxid(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.poolrpc.OrderMatchFinalize.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.poolrpc.OrderMatchFinalize.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.poolrpc.OrderMatchFinalize} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.OrderMatchFinalize.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getBatchId_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getBatchTxid_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } -}; - - -/** - * optional bytes batch_id = 1; - * @return {!(string|Uint8Array)} - */ -proto.poolrpc.OrderMatchFinalize.prototype.getBatchId = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes batch_id = 1; - * This is a type-conversion wrapper around `getBatchId()` - * @return {string} - */ -proto.poolrpc.OrderMatchFinalize.prototype.getBatchId_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getBatchId())); -}; - - -/** - * optional bytes batch_id = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getBatchId()` - * @return {!Uint8Array} - */ -proto.poolrpc.OrderMatchFinalize.prototype.getBatchId_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getBatchId())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.poolrpc.OrderMatchFinalize} returns this - */ -proto.poolrpc.OrderMatchFinalize.prototype.setBatchId = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional bytes batch_txid = 2; - * @return {!(string|Uint8Array)} - */ -proto.poolrpc.OrderMatchFinalize.prototype.getBatchTxid = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes batch_txid = 2; - * This is a type-conversion wrapper around `getBatchTxid()` - * @return {string} - */ -proto.poolrpc.OrderMatchFinalize.prototype.getBatchTxid_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getBatchTxid())); -}; - - -/** - * optional bytes batch_txid = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getBatchTxid()` - * @return {!Uint8Array} - */ -proto.poolrpc.OrderMatchFinalize.prototype.getBatchTxid_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getBatchTxid())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.poolrpc.OrderMatchFinalize} returns this - */ -proto.poolrpc.OrderMatchFinalize.prototype.setBatchTxid = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.poolrpc.SubscribeError.prototype.toObject = function(opt_includeInstance) { - return proto.poolrpc.SubscribeError.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.poolrpc.SubscribeError} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.SubscribeError.toObject = function(includeInstance, msg) { - var f, obj = { - error: jspb.Message.getFieldWithDefault(msg, 1, ""), - errorCode: jspb.Message.getFieldWithDefault(msg, 2, 0), - traderKey: msg.getTraderKey_asB64(), - accountReservation: (f = msg.getAccountReservation()) && proto.poolrpc.AuctionAccount.toObject(includeInstance, f) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.poolrpc.SubscribeError} - */ -proto.poolrpc.SubscribeError.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.poolrpc.SubscribeError; - return proto.poolrpc.SubscribeError.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.poolrpc.SubscribeError} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.poolrpc.SubscribeError} - */ -proto.poolrpc.SubscribeError.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setError(value); - break; - case 2: - var value = /** @type {!proto.poolrpc.SubscribeError.Error} */ (reader.readEnum()); - msg.setErrorCode(value); - break; - case 3: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setTraderKey(value); - break; - case 4: - var value = new proto.poolrpc.AuctionAccount; - reader.readMessage(value,proto.poolrpc.AuctionAccount.deserializeBinaryFromReader); - msg.setAccountReservation(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.poolrpc.SubscribeError.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.poolrpc.SubscribeError.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.poolrpc.SubscribeError} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.SubscribeError.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getError(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getErrorCode(); - if (f !== 0.0) { - writer.writeEnum( - 2, - f - ); - } - f = message.getTraderKey_asU8(); - if (f.length > 0) { - writer.writeBytes( - 3, - f - ); - } - f = message.getAccountReservation(); - if (f != null) { - writer.writeMessage( - 4, - f, - proto.poolrpc.AuctionAccount.serializeBinaryToWriter - ); - } -}; - - -/** - * @enum {number} - */ -proto.poolrpc.SubscribeError.Error = { - UNKNOWN: 0, - SERVER_SHUTDOWN: 1, - ACCOUNT_DOES_NOT_EXIST: 2, - INCOMPLETE_ACCOUNT_RESERVATION: 3 -}; - -/** - * optional string error = 1; - * @return {string} - */ -proto.poolrpc.SubscribeError.prototype.getError = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.poolrpc.SubscribeError} returns this - */ -proto.poolrpc.SubscribeError.prototype.setError = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional Error error_code = 2; - * @return {!proto.poolrpc.SubscribeError.Error} - */ -proto.poolrpc.SubscribeError.prototype.getErrorCode = function() { - return /** @type {!proto.poolrpc.SubscribeError.Error} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {!proto.poolrpc.SubscribeError.Error} value - * @return {!proto.poolrpc.SubscribeError} returns this - */ -proto.poolrpc.SubscribeError.prototype.setErrorCode = function(value) { - return jspb.Message.setProto3EnumField(this, 2, value); -}; - - -/** - * optional bytes trader_key = 3; - * @return {!(string|Uint8Array)} - */ -proto.poolrpc.SubscribeError.prototype.getTraderKey = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * optional bytes trader_key = 3; - * This is a type-conversion wrapper around `getTraderKey()` - * @return {string} - */ -proto.poolrpc.SubscribeError.prototype.getTraderKey_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getTraderKey())); -}; - - -/** - * optional bytes trader_key = 3; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getTraderKey()` - * @return {!Uint8Array} - */ -proto.poolrpc.SubscribeError.prototype.getTraderKey_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getTraderKey())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.poolrpc.SubscribeError} returns this - */ -proto.poolrpc.SubscribeError.prototype.setTraderKey = function(value) { - return jspb.Message.setProto3BytesField(this, 3, value); -}; - - -/** - * optional AuctionAccount account_reservation = 4; - * @return {?proto.poolrpc.AuctionAccount} - */ -proto.poolrpc.SubscribeError.prototype.getAccountReservation = function() { - return /** @type{?proto.poolrpc.AuctionAccount} */ ( - jspb.Message.getWrapperField(this, proto.poolrpc.AuctionAccount, 4)); -}; - - -/** - * @param {?proto.poolrpc.AuctionAccount|undefined} value - * @return {!proto.poolrpc.SubscribeError} returns this -*/ -proto.poolrpc.SubscribeError.prototype.setAccountReservation = function(value) { - return jspb.Message.setWrapperField(this, 4, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.poolrpc.SubscribeError} returns this - */ -proto.poolrpc.SubscribeError.prototype.clearAccountReservation = function() { - return this.setAccountReservation(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.poolrpc.SubscribeError.prototype.hasAccountReservation = function() { - return jspb.Message.getField(this, 4) != null; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.poolrpc.AuctionAccount.prototype.toObject = function(opt_includeInstance) { - return proto.poolrpc.AuctionAccount.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.poolrpc.AuctionAccount} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.AuctionAccount.toObject = function(includeInstance, msg) { - var f, obj = { - value: jspb.Message.getFieldWithDefault(msg, 1, 0), - expiry: jspb.Message.getFieldWithDefault(msg, 2, 0), - traderKey: msg.getTraderKey_asB64(), - auctioneerKey: msg.getAuctioneerKey_asB64(), - batchKey: msg.getBatchKey_asB64(), - state: jspb.Message.getFieldWithDefault(msg, 6, 0), - heightHint: jspb.Message.getFieldWithDefault(msg, 7, 0), - outpoint: (f = msg.getOutpoint()) && proto.poolrpc.OutPoint.toObject(includeInstance, f), - latestTx: msg.getLatestTx_asB64() - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.poolrpc.AuctionAccount} - */ -proto.poolrpc.AuctionAccount.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.poolrpc.AuctionAccount; - return proto.poolrpc.AuctionAccount.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.poolrpc.AuctionAccount} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.poolrpc.AuctionAccount} - */ -proto.poolrpc.AuctionAccount.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readUint64()); - msg.setValue(value); - break; - case 2: - var value = /** @type {number} */ (reader.readUint32()); - msg.setExpiry(value); - break; - case 3: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setTraderKey(value); - break; - case 4: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setAuctioneerKey(value); - break; - case 5: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setBatchKey(value); - break; - case 6: - var value = /** @type {!proto.poolrpc.AuctionAccountState} */ (reader.readEnum()); - msg.setState(value); - break; - case 7: - var value = /** @type {number} */ (reader.readUint32()); - msg.setHeightHint(value); - break; - case 8: - var value = new proto.poolrpc.OutPoint; - reader.readMessage(value,proto.poolrpc.OutPoint.deserializeBinaryFromReader); - msg.setOutpoint(value); - break; - case 9: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setLatestTx(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.poolrpc.AuctionAccount.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.poolrpc.AuctionAccount.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.poolrpc.AuctionAccount} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.AuctionAccount.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getValue(); - if (f !== 0) { - writer.writeUint64( - 1, - f - ); - } - f = message.getExpiry(); - if (f !== 0) { - writer.writeUint32( - 2, - f - ); - } - f = message.getTraderKey_asU8(); - if (f.length > 0) { - writer.writeBytes( - 3, - f - ); - } - f = message.getAuctioneerKey_asU8(); - if (f.length > 0) { - writer.writeBytes( - 4, - f - ); - } - f = message.getBatchKey_asU8(); - if (f.length > 0) { - writer.writeBytes( - 5, - f - ); - } - f = message.getState(); - if (f !== 0.0) { - writer.writeEnum( - 6, - f - ); - } - f = message.getHeightHint(); - if (f !== 0) { - writer.writeUint32( - 7, - f - ); - } - f = message.getOutpoint(); - if (f != null) { - writer.writeMessage( - 8, - f, - proto.poolrpc.OutPoint.serializeBinaryToWriter - ); - } - f = message.getLatestTx_asU8(); - if (f.length > 0) { - writer.writeBytes( - 9, - f - ); - } -}; - - -/** - * optional uint64 value = 1; - * @return {number} - */ -proto.poolrpc.AuctionAccount.prototype.getValue = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.poolrpc.AuctionAccount} returns this - */ -proto.poolrpc.AuctionAccount.prototype.setValue = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); -}; - - -/** - * optional uint32 expiry = 2; - * @return {number} - */ -proto.poolrpc.AuctionAccount.prototype.getExpiry = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.poolrpc.AuctionAccount} returns this - */ -proto.poolrpc.AuctionAccount.prototype.setExpiry = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * optional bytes trader_key = 3; - * @return {!(string|Uint8Array)} - */ -proto.poolrpc.AuctionAccount.prototype.getTraderKey = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * optional bytes trader_key = 3; - * This is a type-conversion wrapper around `getTraderKey()` - * @return {string} - */ -proto.poolrpc.AuctionAccount.prototype.getTraderKey_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getTraderKey())); -}; - - -/** - * optional bytes trader_key = 3; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getTraderKey()` - * @return {!Uint8Array} - */ -proto.poolrpc.AuctionAccount.prototype.getTraderKey_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getTraderKey())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.poolrpc.AuctionAccount} returns this - */ -proto.poolrpc.AuctionAccount.prototype.setTraderKey = function(value) { - return jspb.Message.setProto3BytesField(this, 3, value); -}; - - -/** - * optional bytes auctioneer_key = 4; - * @return {!(string|Uint8Array)} - */ -proto.poolrpc.AuctionAccount.prototype.getAuctioneerKey = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 4, "")); -}; - - -/** - * optional bytes auctioneer_key = 4; - * This is a type-conversion wrapper around `getAuctioneerKey()` - * @return {string} - */ -proto.poolrpc.AuctionAccount.prototype.getAuctioneerKey_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getAuctioneerKey())); -}; - - -/** - * optional bytes auctioneer_key = 4; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getAuctioneerKey()` - * @return {!Uint8Array} - */ -proto.poolrpc.AuctionAccount.prototype.getAuctioneerKey_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getAuctioneerKey())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.poolrpc.AuctionAccount} returns this - */ -proto.poolrpc.AuctionAccount.prototype.setAuctioneerKey = function(value) { - return jspb.Message.setProto3BytesField(this, 4, value); -}; - - -/** - * optional bytes batch_key = 5; - * @return {!(string|Uint8Array)} - */ -proto.poolrpc.AuctionAccount.prototype.getBatchKey = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 5, "")); -}; - - -/** - * optional bytes batch_key = 5; - * This is a type-conversion wrapper around `getBatchKey()` - * @return {string} - */ -proto.poolrpc.AuctionAccount.prototype.getBatchKey_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getBatchKey())); -}; - - -/** - * optional bytes batch_key = 5; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getBatchKey()` - * @return {!Uint8Array} - */ -proto.poolrpc.AuctionAccount.prototype.getBatchKey_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getBatchKey())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.poolrpc.AuctionAccount} returns this - */ -proto.poolrpc.AuctionAccount.prototype.setBatchKey = function(value) { - return jspb.Message.setProto3BytesField(this, 5, value); -}; - - -/** - * optional AuctionAccountState state = 6; - * @return {!proto.poolrpc.AuctionAccountState} - */ -proto.poolrpc.AuctionAccount.prototype.getState = function() { - return /** @type {!proto.poolrpc.AuctionAccountState} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); -}; - - -/** - * @param {!proto.poolrpc.AuctionAccountState} value - * @return {!proto.poolrpc.AuctionAccount} returns this - */ -proto.poolrpc.AuctionAccount.prototype.setState = function(value) { - return jspb.Message.setProto3EnumField(this, 6, value); -}; - - -/** - * optional uint32 height_hint = 7; - * @return {number} - */ -proto.poolrpc.AuctionAccount.prototype.getHeightHint = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.poolrpc.AuctionAccount} returns this - */ -proto.poolrpc.AuctionAccount.prototype.setHeightHint = function(value) { - return jspb.Message.setProto3IntField(this, 7, value); -}; - - -/** - * optional OutPoint outpoint = 8; - * @return {?proto.poolrpc.OutPoint} - */ -proto.poolrpc.AuctionAccount.prototype.getOutpoint = function() { - return /** @type{?proto.poolrpc.OutPoint} */ ( - jspb.Message.getWrapperField(this, proto.poolrpc.OutPoint, 8)); -}; - - -/** - * @param {?proto.poolrpc.OutPoint|undefined} value - * @return {!proto.poolrpc.AuctionAccount} returns this -*/ -proto.poolrpc.AuctionAccount.prototype.setOutpoint = function(value) { - return jspb.Message.setWrapperField(this, 8, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.poolrpc.AuctionAccount} returns this - */ -proto.poolrpc.AuctionAccount.prototype.clearOutpoint = function() { - return this.setOutpoint(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.poolrpc.AuctionAccount.prototype.hasOutpoint = function() { - return jspb.Message.getField(this, 8) != null; -}; - - -/** - * optional bytes latest_tx = 9; - * @return {!(string|Uint8Array)} - */ -proto.poolrpc.AuctionAccount.prototype.getLatestTx = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 9, "")); -}; - - -/** - * optional bytes latest_tx = 9; - * This is a type-conversion wrapper around `getLatestTx()` - * @return {string} - */ -proto.poolrpc.AuctionAccount.prototype.getLatestTx_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getLatestTx())); -}; - - -/** - * optional bytes latest_tx = 9; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getLatestTx()` - * @return {!Uint8Array} - */ -proto.poolrpc.AuctionAccount.prototype.getLatestTx_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getLatestTx())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.poolrpc.AuctionAccount} returns this - */ -proto.poolrpc.AuctionAccount.prototype.setLatestTx = function(value) { - return jspb.Message.setProto3BytesField(this, 9, value); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.poolrpc.MatchedOrder.repeatedFields_ = [1,2]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.poolrpc.MatchedOrder.prototype.toObject = function(opt_includeInstance) { - return proto.poolrpc.MatchedOrder.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.poolrpc.MatchedOrder} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.MatchedOrder.toObject = function(includeInstance, msg) { - var f, obj = { - matchedBidsList: jspb.Message.toObjectList(msg.getMatchedBidsList(), - proto.poolrpc.MatchedBid.toObject, includeInstance), - matchedAsksList: jspb.Message.toObjectList(msg.getMatchedAsksList(), - proto.poolrpc.MatchedAsk.toObject, includeInstance) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.poolrpc.MatchedOrder} - */ -proto.poolrpc.MatchedOrder.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.poolrpc.MatchedOrder; - return proto.poolrpc.MatchedOrder.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.poolrpc.MatchedOrder} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.poolrpc.MatchedOrder} - */ -proto.poolrpc.MatchedOrder.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.poolrpc.MatchedBid; - reader.readMessage(value,proto.poolrpc.MatchedBid.deserializeBinaryFromReader); - msg.addMatchedBids(value); - break; - case 2: - var value = new proto.poolrpc.MatchedAsk; - reader.readMessage(value,proto.poolrpc.MatchedAsk.deserializeBinaryFromReader); - msg.addMatchedAsks(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.poolrpc.MatchedOrder.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.poolrpc.MatchedOrder.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.poolrpc.MatchedOrder} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.MatchedOrder.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getMatchedBidsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 1, - f, - proto.poolrpc.MatchedBid.serializeBinaryToWriter - ); - } - f = message.getMatchedAsksList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 2, - f, - proto.poolrpc.MatchedAsk.serializeBinaryToWriter - ); - } -}; - - -/** - * repeated MatchedBid matched_bids = 1; - * @return {!Array} - */ -proto.poolrpc.MatchedOrder.prototype.getMatchedBidsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.poolrpc.MatchedBid, 1)); -}; - - -/** - * @param {!Array} value - * @return {!proto.poolrpc.MatchedOrder} returns this -*/ -proto.poolrpc.MatchedOrder.prototype.setMatchedBidsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); -}; - - -/** - * @param {!proto.poolrpc.MatchedBid=} opt_value - * @param {number=} opt_index - * @return {!proto.poolrpc.MatchedBid} - */ -proto.poolrpc.MatchedOrder.prototype.addMatchedBids = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.poolrpc.MatchedBid, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.poolrpc.MatchedOrder} returns this - */ -proto.poolrpc.MatchedOrder.prototype.clearMatchedBidsList = function() { - return this.setMatchedBidsList([]); -}; - - -/** - * repeated MatchedAsk matched_asks = 2; - * @return {!Array} - */ -proto.poolrpc.MatchedOrder.prototype.getMatchedAsksList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.poolrpc.MatchedAsk, 2)); -}; - - -/** - * @param {!Array} value - * @return {!proto.poolrpc.MatchedOrder} returns this -*/ -proto.poolrpc.MatchedOrder.prototype.setMatchedAsksList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 2, value); -}; - - -/** - * @param {!proto.poolrpc.MatchedAsk=} opt_value - * @param {number=} opt_index - * @return {!proto.poolrpc.MatchedAsk} - */ -proto.poolrpc.MatchedOrder.prototype.addMatchedAsks = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.poolrpc.MatchedAsk, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.poolrpc.MatchedOrder} returns this - */ -proto.poolrpc.MatchedOrder.prototype.clearMatchedAsksList = function() { - return this.setMatchedAsksList([]); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.poolrpc.MatchedAsk.prototype.toObject = function(opt_includeInstance) { - return proto.poolrpc.MatchedAsk.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.poolrpc.MatchedAsk} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.MatchedAsk.toObject = function(includeInstance, msg) { - var f, obj = { - ask: (f = msg.getAsk()) && proto.poolrpc.ServerAsk.toObject(includeInstance, f), - unitsFilled: jspb.Message.getFieldWithDefault(msg, 2, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.poolrpc.MatchedAsk} - */ -proto.poolrpc.MatchedAsk.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.poolrpc.MatchedAsk; - return proto.poolrpc.MatchedAsk.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.poolrpc.MatchedAsk} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.poolrpc.MatchedAsk} - */ -proto.poolrpc.MatchedAsk.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.poolrpc.ServerAsk; - reader.readMessage(value,proto.poolrpc.ServerAsk.deserializeBinaryFromReader); - msg.setAsk(value); - break; - case 2: - var value = /** @type {number} */ (reader.readUint32()); - msg.setUnitsFilled(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.poolrpc.MatchedAsk.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.poolrpc.MatchedAsk.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.poolrpc.MatchedAsk} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.MatchedAsk.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getAsk(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.poolrpc.ServerAsk.serializeBinaryToWriter - ); - } - f = message.getUnitsFilled(); - if (f !== 0) { - writer.writeUint32( - 2, - f - ); - } -}; - - -/** - * optional ServerAsk ask = 1; - * @return {?proto.poolrpc.ServerAsk} - */ -proto.poolrpc.MatchedAsk.prototype.getAsk = function() { - return /** @type{?proto.poolrpc.ServerAsk} */ ( - jspb.Message.getWrapperField(this, proto.poolrpc.ServerAsk, 1)); -}; - - -/** - * @param {?proto.poolrpc.ServerAsk|undefined} value - * @return {!proto.poolrpc.MatchedAsk} returns this -*/ -proto.poolrpc.MatchedAsk.prototype.setAsk = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.poolrpc.MatchedAsk} returns this - */ -proto.poolrpc.MatchedAsk.prototype.clearAsk = function() { - return this.setAsk(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.poolrpc.MatchedAsk.prototype.hasAsk = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional uint32 units_filled = 2; - * @return {number} - */ -proto.poolrpc.MatchedAsk.prototype.getUnitsFilled = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.poolrpc.MatchedAsk} returns this - */ -proto.poolrpc.MatchedAsk.prototype.setUnitsFilled = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.poolrpc.MatchedBid.prototype.toObject = function(opt_includeInstance) { - return proto.poolrpc.MatchedBid.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.poolrpc.MatchedBid} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.MatchedBid.toObject = function(includeInstance, msg) { - var f, obj = { - bid: (f = msg.getBid()) && proto.poolrpc.ServerBid.toObject(includeInstance, f), - unitsFilled: jspb.Message.getFieldWithDefault(msg, 2, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.poolrpc.MatchedBid} - */ -proto.poolrpc.MatchedBid.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.poolrpc.MatchedBid; - return proto.poolrpc.MatchedBid.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.poolrpc.MatchedBid} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.poolrpc.MatchedBid} - */ -proto.poolrpc.MatchedBid.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.poolrpc.ServerBid; - reader.readMessage(value,proto.poolrpc.ServerBid.deserializeBinaryFromReader); - msg.setBid(value); - break; - case 2: - var value = /** @type {number} */ (reader.readUint32()); - msg.setUnitsFilled(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.poolrpc.MatchedBid.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.poolrpc.MatchedBid.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.poolrpc.MatchedBid} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.MatchedBid.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getBid(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.poolrpc.ServerBid.serializeBinaryToWriter - ); - } - f = message.getUnitsFilled(); - if (f !== 0) { - writer.writeUint32( - 2, - f - ); - } -}; - - -/** - * optional ServerBid bid = 1; - * @return {?proto.poolrpc.ServerBid} - */ -proto.poolrpc.MatchedBid.prototype.getBid = function() { - return /** @type{?proto.poolrpc.ServerBid} */ ( - jspb.Message.getWrapperField(this, proto.poolrpc.ServerBid, 1)); -}; - - -/** - * @param {?proto.poolrpc.ServerBid|undefined} value - * @return {!proto.poolrpc.MatchedBid} returns this -*/ -proto.poolrpc.MatchedBid.prototype.setBid = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.poolrpc.MatchedBid} returns this - */ -proto.poolrpc.MatchedBid.prototype.clearBid = function() { - return this.setBid(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.poolrpc.MatchedBid.prototype.hasBid = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional uint32 units_filled = 2; - * @return {number} - */ -proto.poolrpc.MatchedBid.prototype.getUnitsFilled = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.poolrpc.MatchedBid} returns this - */ -proto.poolrpc.MatchedBid.prototype.setUnitsFilled = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.poolrpc.AccountDiff.prototype.toObject = function(opt_includeInstance) { - return proto.poolrpc.AccountDiff.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.poolrpc.AccountDiff} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.AccountDiff.toObject = function(includeInstance, msg) { - var f, obj = { - endingBalance: jspb.Message.getFieldWithDefault(msg, 1, 0), - endingState: jspb.Message.getFieldWithDefault(msg, 2, 0), - outpointIndex: jspb.Message.getFieldWithDefault(msg, 3, 0), - traderKey: msg.getTraderKey_asB64(), - newExpiry: jspb.Message.getFieldWithDefault(msg, 5, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.poolrpc.AccountDiff} - */ -proto.poolrpc.AccountDiff.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.poolrpc.AccountDiff; - return proto.poolrpc.AccountDiff.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.poolrpc.AccountDiff} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.poolrpc.AccountDiff} - */ -proto.poolrpc.AccountDiff.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readUint64()); - msg.setEndingBalance(value); - break; - case 2: - var value = /** @type {!proto.poolrpc.AccountDiff.AccountState} */ (reader.readEnum()); - msg.setEndingState(value); - break; - case 3: - var value = /** @type {number} */ (reader.readInt32()); - msg.setOutpointIndex(value); - break; - case 4: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setTraderKey(value); - break; - case 5: - var value = /** @type {number} */ (reader.readUint32()); - msg.setNewExpiry(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.poolrpc.AccountDiff.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.poolrpc.AccountDiff.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.poolrpc.AccountDiff} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.AccountDiff.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getEndingBalance(); - if (f !== 0) { - writer.writeUint64( - 1, - f - ); - } - f = message.getEndingState(); - if (f !== 0.0) { - writer.writeEnum( - 2, - f - ); - } - f = message.getOutpointIndex(); - if (f !== 0) { - writer.writeInt32( - 3, - f - ); - } - f = message.getTraderKey_asU8(); - if (f.length > 0) { - writer.writeBytes( - 4, - f - ); - } - f = message.getNewExpiry(); - if (f !== 0) { - writer.writeUint32( - 5, - f - ); - } -}; - - -/** - * @enum {number} - */ -proto.poolrpc.AccountDiff.AccountState = { - OUTPUT_RECREATED: 0, - OUTPUT_DUST_EXTENDED_OFFCHAIN: 1, - OUTPUT_DUST_ADDED_TO_FEES: 2, - OUTPUT_FULLY_SPENT: 3 -}; - -/** - * optional uint64 ending_balance = 1; - * @return {number} - */ -proto.poolrpc.AccountDiff.prototype.getEndingBalance = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.poolrpc.AccountDiff} returns this - */ -proto.poolrpc.AccountDiff.prototype.setEndingBalance = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); -}; - - -/** - * optional AccountState ending_state = 2; - * @return {!proto.poolrpc.AccountDiff.AccountState} - */ -proto.poolrpc.AccountDiff.prototype.getEndingState = function() { - return /** @type {!proto.poolrpc.AccountDiff.AccountState} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {!proto.poolrpc.AccountDiff.AccountState} value - * @return {!proto.poolrpc.AccountDiff} returns this - */ -proto.poolrpc.AccountDiff.prototype.setEndingState = function(value) { - return jspb.Message.setProto3EnumField(this, 2, value); -}; - - -/** - * optional int32 outpoint_index = 3; - * @return {number} - */ -proto.poolrpc.AccountDiff.prototype.getOutpointIndex = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.poolrpc.AccountDiff} returns this - */ -proto.poolrpc.AccountDiff.prototype.setOutpointIndex = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - -/** - * optional bytes trader_key = 4; - * @return {!(string|Uint8Array)} - */ -proto.poolrpc.AccountDiff.prototype.getTraderKey = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 4, "")); -}; - - -/** - * optional bytes trader_key = 4; - * This is a type-conversion wrapper around `getTraderKey()` - * @return {string} - */ -proto.poolrpc.AccountDiff.prototype.getTraderKey_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getTraderKey())); -}; - - -/** - * optional bytes trader_key = 4; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getTraderKey()` - * @return {!Uint8Array} - */ -proto.poolrpc.AccountDiff.prototype.getTraderKey_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getTraderKey())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.poolrpc.AccountDiff} returns this - */ -proto.poolrpc.AccountDiff.prototype.setTraderKey = function(value) { - return jspb.Message.setProto3BytesField(this, 4, value); -}; - - -/** - * optional uint32 new_expiry = 5; - * @return {number} - */ -proto.poolrpc.AccountDiff.prototype.getNewExpiry = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.poolrpc.AccountDiff} returns this - */ -proto.poolrpc.AccountDiff.prototype.setNewExpiry = function(value) { - return jspb.Message.setProto3IntField(this, 5, value); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.poolrpc.ServerOrder.repeatedFields_ = [10]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.poolrpc.ServerOrder.prototype.toObject = function(opt_includeInstance) { - return proto.poolrpc.ServerOrder.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.poolrpc.ServerOrder} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.ServerOrder.toObject = function(includeInstance, msg) { - var f, obj = { - traderKey: msg.getTraderKey_asB64(), - rateFixed: jspb.Message.getFieldWithDefault(msg, 2, 0), - amt: jspb.Message.getFieldWithDefault(msg, 3, 0), - minChanAmt: jspb.Message.getFieldWithDefault(msg, 4, 0), - orderNonce: msg.getOrderNonce_asB64(), - orderSig: msg.getOrderSig_asB64(), - multiSigKey: msg.getMultiSigKey_asB64(), - nodePub: msg.getNodePub_asB64(), - nodeAddrList: jspb.Message.toObjectList(msg.getNodeAddrList(), - proto.poolrpc.NodeAddress.toObject, includeInstance), - channelType: jspb.Message.getFieldWithDefault(msg, 12, 0), - maxBatchFeeRateSatPerKw: jspb.Message.getFieldWithDefault(msg, 13, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.poolrpc.ServerOrder} - */ -proto.poolrpc.ServerOrder.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.poolrpc.ServerOrder; - return proto.poolrpc.ServerOrder.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.poolrpc.ServerOrder} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.poolrpc.ServerOrder} - */ -proto.poolrpc.ServerOrder.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setTraderKey(value); - break; - case 2: - var value = /** @type {number} */ (reader.readUint32()); - msg.setRateFixed(value); - break; - case 3: - var value = /** @type {number} */ (reader.readUint64()); - msg.setAmt(value); - break; - case 4: - var value = /** @type {number} */ (reader.readUint64()); - msg.setMinChanAmt(value); - break; - case 6: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setOrderNonce(value); - break; - case 7: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setOrderSig(value); - break; - case 8: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setMultiSigKey(value); - break; - case 9: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setNodePub(value); - break; - case 10: - var value = new proto.poolrpc.NodeAddress; - reader.readMessage(value,proto.poolrpc.NodeAddress.deserializeBinaryFromReader); - msg.addNodeAddr(value); - break; - case 12: - var value = /** @type {!proto.poolrpc.OrderChannelType} */ (reader.readEnum()); - msg.setChannelType(value); - break; - case 13: - var value = /** @type {number} */ (reader.readUint64()); - msg.setMaxBatchFeeRateSatPerKw(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.poolrpc.ServerOrder.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.poolrpc.ServerOrder.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.poolrpc.ServerOrder} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.ServerOrder.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getTraderKey_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getRateFixed(); - if (f !== 0) { - writer.writeUint32( - 2, - f - ); - } - f = message.getAmt(); - if (f !== 0) { - writer.writeUint64( - 3, - f - ); - } - f = message.getMinChanAmt(); - if (f !== 0) { - writer.writeUint64( - 4, - f - ); - } - f = message.getOrderNonce_asU8(); - if (f.length > 0) { - writer.writeBytes( - 6, - f - ); - } - f = message.getOrderSig_asU8(); - if (f.length > 0) { - writer.writeBytes( - 7, - f - ); - } - f = message.getMultiSigKey_asU8(); - if (f.length > 0) { - writer.writeBytes( - 8, - f - ); - } - f = message.getNodePub_asU8(); - if (f.length > 0) { - writer.writeBytes( - 9, - f - ); - } - f = message.getNodeAddrList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 10, - f, - proto.poolrpc.NodeAddress.serializeBinaryToWriter - ); - } - f = message.getChannelType(); - if (f !== 0.0) { - writer.writeEnum( - 12, - f - ); - } - f = message.getMaxBatchFeeRateSatPerKw(); - if (f !== 0) { - writer.writeUint64( - 13, - f - ); - } -}; - - -/** - * optional bytes trader_key = 1; - * @return {!(string|Uint8Array)} - */ -proto.poolrpc.ServerOrder.prototype.getTraderKey = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes trader_key = 1; - * This is a type-conversion wrapper around `getTraderKey()` - * @return {string} - */ -proto.poolrpc.ServerOrder.prototype.getTraderKey_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getTraderKey())); -}; - - -/** - * optional bytes trader_key = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getTraderKey()` - * @return {!Uint8Array} - */ -proto.poolrpc.ServerOrder.prototype.getTraderKey_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getTraderKey())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.poolrpc.ServerOrder} returns this - */ -proto.poolrpc.ServerOrder.prototype.setTraderKey = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional uint32 rate_fixed = 2; - * @return {number} - */ -proto.poolrpc.ServerOrder.prototype.getRateFixed = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.poolrpc.ServerOrder} returns this - */ -proto.poolrpc.ServerOrder.prototype.setRateFixed = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * optional uint64 amt = 3; - * @return {number} - */ -proto.poolrpc.ServerOrder.prototype.getAmt = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.poolrpc.ServerOrder} returns this - */ -proto.poolrpc.ServerOrder.prototype.setAmt = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - -/** - * optional uint64 min_chan_amt = 4; - * @return {number} - */ -proto.poolrpc.ServerOrder.prototype.getMinChanAmt = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.poolrpc.ServerOrder} returns this - */ -proto.poolrpc.ServerOrder.prototype.setMinChanAmt = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); -}; - - -/** - * optional bytes order_nonce = 6; - * @return {!(string|Uint8Array)} - */ -proto.poolrpc.ServerOrder.prototype.getOrderNonce = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 6, "")); -}; - - -/** - * optional bytes order_nonce = 6; - * This is a type-conversion wrapper around `getOrderNonce()` - * @return {string} - */ -proto.poolrpc.ServerOrder.prototype.getOrderNonce_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getOrderNonce())); -}; - - -/** - * optional bytes order_nonce = 6; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getOrderNonce()` - * @return {!Uint8Array} - */ -proto.poolrpc.ServerOrder.prototype.getOrderNonce_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getOrderNonce())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.poolrpc.ServerOrder} returns this - */ -proto.poolrpc.ServerOrder.prototype.setOrderNonce = function(value) { - return jspb.Message.setProto3BytesField(this, 6, value); -}; - - -/** - * optional bytes order_sig = 7; - * @return {!(string|Uint8Array)} - */ -proto.poolrpc.ServerOrder.prototype.getOrderSig = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 7, "")); -}; - - -/** - * optional bytes order_sig = 7; - * This is a type-conversion wrapper around `getOrderSig()` - * @return {string} - */ -proto.poolrpc.ServerOrder.prototype.getOrderSig_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getOrderSig())); -}; - - -/** - * optional bytes order_sig = 7; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getOrderSig()` - * @return {!Uint8Array} - */ -proto.poolrpc.ServerOrder.prototype.getOrderSig_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getOrderSig())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.poolrpc.ServerOrder} returns this - */ -proto.poolrpc.ServerOrder.prototype.setOrderSig = function(value) { - return jspb.Message.setProto3BytesField(this, 7, value); -}; - - -/** - * optional bytes multi_sig_key = 8; - * @return {!(string|Uint8Array)} - */ -proto.poolrpc.ServerOrder.prototype.getMultiSigKey = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 8, "")); -}; - - -/** - * optional bytes multi_sig_key = 8; - * This is a type-conversion wrapper around `getMultiSigKey()` - * @return {string} - */ -proto.poolrpc.ServerOrder.prototype.getMultiSigKey_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getMultiSigKey())); -}; - - -/** - * optional bytes multi_sig_key = 8; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getMultiSigKey()` - * @return {!Uint8Array} - */ -proto.poolrpc.ServerOrder.prototype.getMultiSigKey_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getMultiSigKey())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.poolrpc.ServerOrder} returns this - */ -proto.poolrpc.ServerOrder.prototype.setMultiSigKey = function(value) { - return jspb.Message.setProto3BytesField(this, 8, value); -}; - - -/** - * optional bytes node_pub = 9; - * @return {!(string|Uint8Array)} - */ -proto.poolrpc.ServerOrder.prototype.getNodePub = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 9, "")); -}; - - -/** - * optional bytes node_pub = 9; - * This is a type-conversion wrapper around `getNodePub()` - * @return {string} - */ -proto.poolrpc.ServerOrder.prototype.getNodePub_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getNodePub())); -}; - - -/** - * optional bytes node_pub = 9; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getNodePub()` - * @return {!Uint8Array} - */ -proto.poolrpc.ServerOrder.prototype.getNodePub_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getNodePub())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.poolrpc.ServerOrder} returns this - */ -proto.poolrpc.ServerOrder.prototype.setNodePub = function(value) { - return jspb.Message.setProto3BytesField(this, 9, value); -}; - - -/** - * repeated NodeAddress node_addr = 10; - * @return {!Array} - */ -proto.poolrpc.ServerOrder.prototype.getNodeAddrList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.poolrpc.NodeAddress, 10)); -}; - - -/** - * @param {!Array} value - * @return {!proto.poolrpc.ServerOrder} returns this -*/ -proto.poolrpc.ServerOrder.prototype.setNodeAddrList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 10, value); -}; - - -/** - * @param {!proto.poolrpc.NodeAddress=} opt_value - * @param {number=} opt_index - * @return {!proto.poolrpc.NodeAddress} - */ -proto.poolrpc.ServerOrder.prototype.addNodeAddr = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 10, opt_value, proto.poolrpc.NodeAddress, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.poolrpc.ServerOrder} returns this - */ -proto.poolrpc.ServerOrder.prototype.clearNodeAddrList = function() { - return this.setNodeAddrList([]); -}; - - -/** - * optional OrderChannelType channel_type = 12; - * @return {!proto.poolrpc.OrderChannelType} - */ -proto.poolrpc.ServerOrder.prototype.getChannelType = function() { - return /** @type {!proto.poolrpc.OrderChannelType} */ (jspb.Message.getFieldWithDefault(this, 12, 0)); -}; - - -/** - * @param {!proto.poolrpc.OrderChannelType} value - * @return {!proto.poolrpc.ServerOrder} returns this - */ -proto.poolrpc.ServerOrder.prototype.setChannelType = function(value) { - return jspb.Message.setProto3EnumField(this, 12, value); -}; - - -/** - * optional uint64 max_batch_fee_rate_sat_per_kw = 13; - * @return {number} - */ -proto.poolrpc.ServerOrder.prototype.getMaxBatchFeeRateSatPerKw = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 13, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.poolrpc.ServerOrder} returns this - */ -proto.poolrpc.ServerOrder.prototype.setMaxBatchFeeRateSatPerKw = function(value) { - return jspb.Message.setProto3IntField(this, 13, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.poolrpc.ServerBid.prototype.toObject = function(opt_includeInstance) { - return proto.poolrpc.ServerBid.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.poolrpc.ServerBid} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.ServerBid.toObject = function(includeInstance, msg) { - var f, obj = { - details: (f = msg.getDetails()) && proto.poolrpc.ServerOrder.toObject(includeInstance, f), - leaseDurationBlocks: jspb.Message.getFieldWithDefault(msg, 2, 0), - version: jspb.Message.getFieldWithDefault(msg, 4, 0), - minNodeTier: jspb.Message.getFieldWithDefault(msg, 5, 0), - selfChanBalance: jspb.Message.getFieldWithDefault(msg, 6, 0), - isSidecarChannel: jspb.Message.getBooleanFieldWithDefault(msg, 7, false) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.poolrpc.ServerBid} - */ -proto.poolrpc.ServerBid.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.poolrpc.ServerBid; - return proto.poolrpc.ServerBid.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.poolrpc.ServerBid} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.poolrpc.ServerBid} - */ -proto.poolrpc.ServerBid.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.poolrpc.ServerOrder; - reader.readMessage(value,proto.poolrpc.ServerOrder.deserializeBinaryFromReader); - msg.setDetails(value); - break; - case 2: - var value = /** @type {number} */ (reader.readUint32()); - msg.setLeaseDurationBlocks(value); - break; - case 4: - var value = /** @type {number} */ (reader.readUint32()); - msg.setVersion(value); - break; - case 5: - var value = /** @type {!proto.poolrpc.NodeTier} */ (reader.readEnum()); - msg.setMinNodeTier(value); - break; - case 6: - var value = /** @type {number} */ (reader.readUint64()); - msg.setSelfChanBalance(value); - break; - case 7: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setIsSidecarChannel(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.poolrpc.ServerBid.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.poolrpc.ServerBid.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.poolrpc.ServerBid} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.ServerBid.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getDetails(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.poolrpc.ServerOrder.serializeBinaryToWriter - ); - } - f = message.getLeaseDurationBlocks(); - if (f !== 0) { - writer.writeUint32( - 2, - f - ); - } - f = message.getVersion(); - if (f !== 0) { - writer.writeUint32( - 4, - f - ); - } - f = message.getMinNodeTier(); - if (f !== 0.0) { - writer.writeEnum( - 5, - f - ); - } - f = message.getSelfChanBalance(); - if (f !== 0) { - writer.writeUint64( - 6, - f - ); - } - f = message.getIsSidecarChannel(); - if (f) { - writer.writeBool( - 7, - f - ); - } -}; - - -/** - * optional ServerOrder details = 1; - * @return {?proto.poolrpc.ServerOrder} - */ -proto.poolrpc.ServerBid.prototype.getDetails = function() { - return /** @type{?proto.poolrpc.ServerOrder} */ ( - jspb.Message.getWrapperField(this, proto.poolrpc.ServerOrder, 1)); -}; - - -/** - * @param {?proto.poolrpc.ServerOrder|undefined} value - * @return {!proto.poolrpc.ServerBid} returns this -*/ -proto.poolrpc.ServerBid.prototype.setDetails = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.poolrpc.ServerBid} returns this - */ -proto.poolrpc.ServerBid.prototype.clearDetails = function() { - return this.setDetails(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.poolrpc.ServerBid.prototype.hasDetails = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional uint32 lease_duration_blocks = 2; - * @return {number} - */ -proto.poolrpc.ServerBid.prototype.getLeaseDurationBlocks = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.poolrpc.ServerBid} returns this - */ -proto.poolrpc.ServerBid.prototype.setLeaseDurationBlocks = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * optional uint32 version = 4; - * @return {number} - */ -proto.poolrpc.ServerBid.prototype.getVersion = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.poolrpc.ServerBid} returns this - */ -proto.poolrpc.ServerBid.prototype.setVersion = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); -}; - - -/** - * optional NodeTier min_node_tier = 5; - * @return {!proto.poolrpc.NodeTier} - */ -proto.poolrpc.ServerBid.prototype.getMinNodeTier = function() { - return /** @type {!proto.poolrpc.NodeTier} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); -}; - - -/** - * @param {!proto.poolrpc.NodeTier} value - * @return {!proto.poolrpc.ServerBid} returns this - */ -proto.poolrpc.ServerBid.prototype.setMinNodeTier = function(value) { - return jspb.Message.setProto3EnumField(this, 5, value); -}; - - -/** - * optional uint64 self_chan_balance = 6; - * @return {number} - */ -proto.poolrpc.ServerBid.prototype.getSelfChanBalance = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.poolrpc.ServerBid} returns this - */ -proto.poolrpc.ServerBid.prototype.setSelfChanBalance = function(value) { - return jspb.Message.setProto3IntField(this, 6, value); -}; - - -/** - * optional bool is_sidecar_channel = 7; - * @return {boolean} - */ -proto.poolrpc.ServerBid.prototype.getIsSidecarChannel = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 7, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.poolrpc.ServerBid} returns this - */ -proto.poolrpc.ServerBid.prototype.setIsSidecarChannel = function(value) { - return jspb.Message.setProto3BooleanField(this, 7, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.poolrpc.ServerAsk.prototype.toObject = function(opt_includeInstance) { - return proto.poolrpc.ServerAsk.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.poolrpc.ServerAsk} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.ServerAsk.toObject = function(includeInstance, msg) { - var f, obj = { - details: (f = msg.getDetails()) && proto.poolrpc.ServerOrder.toObject(includeInstance, f), - leaseDurationBlocks: jspb.Message.getFieldWithDefault(msg, 4, 0), - version: jspb.Message.getFieldWithDefault(msg, 5, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.poolrpc.ServerAsk} - */ -proto.poolrpc.ServerAsk.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.poolrpc.ServerAsk; - return proto.poolrpc.ServerAsk.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.poolrpc.ServerAsk} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.poolrpc.ServerAsk} - */ -proto.poolrpc.ServerAsk.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.poolrpc.ServerOrder; - reader.readMessage(value,proto.poolrpc.ServerOrder.deserializeBinaryFromReader); - msg.setDetails(value); - break; - case 4: - var value = /** @type {number} */ (reader.readUint32()); - msg.setLeaseDurationBlocks(value); - break; - case 5: - var value = /** @type {number} */ (reader.readUint32()); - msg.setVersion(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.poolrpc.ServerAsk.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.poolrpc.ServerAsk.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.poolrpc.ServerAsk} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.ServerAsk.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getDetails(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.poolrpc.ServerOrder.serializeBinaryToWriter - ); - } - f = message.getLeaseDurationBlocks(); - if (f !== 0) { - writer.writeUint32( - 4, - f - ); - } - f = message.getVersion(); - if (f !== 0) { - writer.writeUint32( - 5, - f - ); - } -}; - - -/** - * optional ServerOrder details = 1; - * @return {?proto.poolrpc.ServerOrder} - */ -proto.poolrpc.ServerAsk.prototype.getDetails = function() { - return /** @type{?proto.poolrpc.ServerOrder} */ ( - jspb.Message.getWrapperField(this, proto.poolrpc.ServerOrder, 1)); -}; - - -/** - * @param {?proto.poolrpc.ServerOrder|undefined} value - * @return {!proto.poolrpc.ServerAsk} returns this -*/ -proto.poolrpc.ServerAsk.prototype.setDetails = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.poolrpc.ServerAsk} returns this - */ -proto.poolrpc.ServerAsk.prototype.clearDetails = function() { - return this.setDetails(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.poolrpc.ServerAsk.prototype.hasDetails = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional uint32 lease_duration_blocks = 4; - * @return {number} - */ -proto.poolrpc.ServerAsk.prototype.getLeaseDurationBlocks = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.poolrpc.ServerAsk} returns this - */ -proto.poolrpc.ServerAsk.prototype.setLeaseDurationBlocks = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); -}; - - -/** - * optional uint32 version = 5; - * @return {number} - */ -proto.poolrpc.ServerAsk.prototype.getVersion = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.poolrpc.ServerAsk} returns this - */ -proto.poolrpc.ServerAsk.prototype.setVersion = function(value) { - return jspb.Message.setProto3IntField(this, 5, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.poolrpc.CancelOrder.prototype.toObject = function(opt_includeInstance) { - return proto.poolrpc.CancelOrder.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.poolrpc.CancelOrder} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.CancelOrder.toObject = function(includeInstance, msg) { - var f, obj = { - orderNonce: msg.getOrderNonce_asB64() - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.poolrpc.CancelOrder} - */ -proto.poolrpc.CancelOrder.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.poolrpc.CancelOrder; - return proto.poolrpc.CancelOrder.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.poolrpc.CancelOrder} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.poolrpc.CancelOrder} - */ -proto.poolrpc.CancelOrder.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setOrderNonce(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.poolrpc.CancelOrder.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.poolrpc.CancelOrder.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.poolrpc.CancelOrder} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.CancelOrder.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getOrderNonce_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } -}; - - -/** - * optional bytes order_nonce = 1; - * @return {!(string|Uint8Array)} - */ -proto.poolrpc.CancelOrder.prototype.getOrderNonce = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes order_nonce = 1; - * This is a type-conversion wrapper around `getOrderNonce()` - * @return {string} - */ -proto.poolrpc.CancelOrder.prototype.getOrderNonce_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getOrderNonce())); -}; - - -/** - * optional bytes order_nonce = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getOrderNonce()` - * @return {!Uint8Array} - */ -proto.poolrpc.CancelOrder.prototype.getOrderNonce_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getOrderNonce())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.poolrpc.CancelOrder} returns this - */ -proto.poolrpc.CancelOrder.prototype.setOrderNonce = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.poolrpc.InvalidOrder.prototype.toObject = function(opt_includeInstance) { - return proto.poolrpc.InvalidOrder.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.poolrpc.InvalidOrder} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.InvalidOrder.toObject = function(includeInstance, msg) { - var f, obj = { - orderNonce: msg.getOrderNonce_asB64(), - failReason: jspb.Message.getFieldWithDefault(msg, 2, 0), - failString: jspb.Message.getFieldWithDefault(msg, 3, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.poolrpc.InvalidOrder} - */ -proto.poolrpc.InvalidOrder.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.poolrpc.InvalidOrder; - return proto.poolrpc.InvalidOrder.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.poolrpc.InvalidOrder} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.poolrpc.InvalidOrder} - */ -proto.poolrpc.InvalidOrder.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setOrderNonce(value); - break; - case 2: - var value = /** @type {!proto.poolrpc.InvalidOrder.FailReason} */ (reader.readEnum()); - msg.setFailReason(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setFailString(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.poolrpc.InvalidOrder.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.poolrpc.InvalidOrder.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.poolrpc.InvalidOrder} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.InvalidOrder.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getOrderNonce_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getFailReason(); - if (f !== 0.0) { - writer.writeEnum( - 2, - f - ); - } - f = message.getFailString(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } -}; - - -/** - * @enum {number} - */ -proto.poolrpc.InvalidOrder.FailReason = { - INVALID_AMT: 0 -}; - -/** - * optional bytes order_nonce = 1; - * @return {!(string|Uint8Array)} - */ -proto.poolrpc.InvalidOrder.prototype.getOrderNonce = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes order_nonce = 1; - * This is a type-conversion wrapper around `getOrderNonce()` - * @return {string} - */ -proto.poolrpc.InvalidOrder.prototype.getOrderNonce_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getOrderNonce())); -}; - - -/** - * optional bytes order_nonce = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getOrderNonce()` - * @return {!Uint8Array} - */ -proto.poolrpc.InvalidOrder.prototype.getOrderNonce_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getOrderNonce())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.poolrpc.InvalidOrder} returns this - */ -proto.poolrpc.InvalidOrder.prototype.setOrderNonce = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional FailReason fail_reason = 2; - * @return {!proto.poolrpc.InvalidOrder.FailReason} - */ -proto.poolrpc.InvalidOrder.prototype.getFailReason = function() { - return /** @type {!proto.poolrpc.InvalidOrder.FailReason} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {!proto.poolrpc.InvalidOrder.FailReason} value - * @return {!proto.poolrpc.InvalidOrder} returns this - */ -proto.poolrpc.InvalidOrder.prototype.setFailReason = function(value) { - return jspb.Message.setProto3EnumField(this, 2, value); -}; - - -/** - * optional string fail_string = 3; - * @return {string} - */ -proto.poolrpc.InvalidOrder.prototype.getFailString = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * @param {string} value - * @return {!proto.poolrpc.InvalidOrder} returns this - */ -proto.poolrpc.InvalidOrder.prototype.setFailString = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.poolrpc.ServerInput.prototype.toObject = function(opt_includeInstance) { - return proto.poolrpc.ServerInput.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.poolrpc.ServerInput} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.ServerInput.toObject = function(includeInstance, msg) { - var f, obj = { - outpoint: (f = msg.getOutpoint()) && proto.poolrpc.OutPoint.toObject(includeInstance, f), - sigScript: msg.getSigScript_asB64() - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.poolrpc.ServerInput} - */ -proto.poolrpc.ServerInput.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.poolrpc.ServerInput; - return proto.poolrpc.ServerInput.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.poolrpc.ServerInput} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.poolrpc.ServerInput} - */ -proto.poolrpc.ServerInput.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.poolrpc.OutPoint; - reader.readMessage(value,proto.poolrpc.OutPoint.deserializeBinaryFromReader); - msg.setOutpoint(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setSigScript(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.poolrpc.ServerInput.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.poolrpc.ServerInput.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.poolrpc.ServerInput} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.ServerInput.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getOutpoint(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.poolrpc.OutPoint.serializeBinaryToWriter - ); - } - f = message.getSigScript_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } -}; - - -/** - * optional OutPoint outpoint = 1; - * @return {?proto.poolrpc.OutPoint} - */ -proto.poolrpc.ServerInput.prototype.getOutpoint = function() { - return /** @type{?proto.poolrpc.OutPoint} */ ( - jspb.Message.getWrapperField(this, proto.poolrpc.OutPoint, 1)); -}; - - -/** - * @param {?proto.poolrpc.OutPoint|undefined} value - * @return {!proto.poolrpc.ServerInput} returns this -*/ -proto.poolrpc.ServerInput.prototype.setOutpoint = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.poolrpc.ServerInput} returns this - */ -proto.poolrpc.ServerInput.prototype.clearOutpoint = function() { - return this.setOutpoint(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.poolrpc.ServerInput.prototype.hasOutpoint = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional bytes sig_script = 2; - * @return {!(string|Uint8Array)} - */ -proto.poolrpc.ServerInput.prototype.getSigScript = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes sig_script = 2; - * This is a type-conversion wrapper around `getSigScript()` - * @return {string} - */ -proto.poolrpc.ServerInput.prototype.getSigScript_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getSigScript())); -}; - - -/** - * optional bytes sig_script = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getSigScript()` - * @return {!Uint8Array} - */ -proto.poolrpc.ServerInput.prototype.getSigScript_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getSigScript())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.poolrpc.ServerInput} returns this - */ -proto.poolrpc.ServerInput.prototype.setSigScript = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.poolrpc.ServerOutput.prototype.toObject = function(opt_includeInstance) { - return proto.poolrpc.ServerOutput.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.poolrpc.ServerOutput} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.ServerOutput.toObject = function(includeInstance, msg) { - var f, obj = { - value: jspb.Message.getFieldWithDefault(msg, 1, 0), - script: msg.getScript_asB64() - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.poolrpc.ServerOutput} - */ -proto.poolrpc.ServerOutput.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.poolrpc.ServerOutput; - return proto.poolrpc.ServerOutput.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.poolrpc.ServerOutput} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.poolrpc.ServerOutput} - */ -proto.poolrpc.ServerOutput.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readUint64()); - msg.setValue(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setScript(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.poolrpc.ServerOutput.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.poolrpc.ServerOutput.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.poolrpc.ServerOutput} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.ServerOutput.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getValue(); - if (f !== 0) { - writer.writeUint64( - 1, - f - ); - } - f = message.getScript_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } -}; - - -/** - * optional uint64 value = 1; - * @return {number} - */ -proto.poolrpc.ServerOutput.prototype.getValue = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.poolrpc.ServerOutput} returns this - */ -proto.poolrpc.ServerOutput.prototype.setValue = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); -}; - - -/** - * optional bytes script = 2; - * @return {!(string|Uint8Array)} - */ -proto.poolrpc.ServerOutput.prototype.getScript = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes script = 2; - * This is a type-conversion wrapper around `getScript()` - * @return {string} - */ -proto.poolrpc.ServerOutput.prototype.getScript_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getScript())); -}; - - -/** - * optional bytes script = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getScript()` - * @return {!Uint8Array} - */ -proto.poolrpc.ServerOutput.prototype.getScript_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getScript())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.poolrpc.ServerOutput} returns this - */ -proto.poolrpc.ServerOutput.prototype.setScript = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.poolrpc.ServerModifyAccountRequest.repeatedFields_ = [2,3]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.poolrpc.ServerModifyAccountRequest.prototype.toObject = function(opt_includeInstance) { - return proto.poolrpc.ServerModifyAccountRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.poolrpc.ServerModifyAccountRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.ServerModifyAccountRequest.toObject = function(includeInstance, msg) { - var f, obj = { - traderKey: msg.getTraderKey_asB64(), - newInputsList: jspb.Message.toObjectList(msg.getNewInputsList(), - proto.poolrpc.ServerInput.toObject, includeInstance), - newOutputsList: jspb.Message.toObjectList(msg.getNewOutputsList(), - proto.poolrpc.ServerOutput.toObject, includeInstance), - newParams: (f = msg.getNewParams()) && proto.poolrpc.ServerModifyAccountRequest.NewAccountParameters.toObject(includeInstance, f) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.poolrpc.ServerModifyAccountRequest} - */ -proto.poolrpc.ServerModifyAccountRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.poolrpc.ServerModifyAccountRequest; - return proto.poolrpc.ServerModifyAccountRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.poolrpc.ServerModifyAccountRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.poolrpc.ServerModifyAccountRequest} - */ -proto.poolrpc.ServerModifyAccountRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setTraderKey(value); - break; - case 2: - var value = new proto.poolrpc.ServerInput; - reader.readMessage(value,proto.poolrpc.ServerInput.deserializeBinaryFromReader); - msg.addNewInputs(value); - break; - case 3: - var value = new proto.poolrpc.ServerOutput; - reader.readMessage(value,proto.poolrpc.ServerOutput.deserializeBinaryFromReader); - msg.addNewOutputs(value); - break; - case 4: - var value = new proto.poolrpc.ServerModifyAccountRequest.NewAccountParameters; - reader.readMessage(value,proto.poolrpc.ServerModifyAccountRequest.NewAccountParameters.deserializeBinaryFromReader); - msg.setNewParams(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.poolrpc.ServerModifyAccountRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.poolrpc.ServerModifyAccountRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.poolrpc.ServerModifyAccountRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.ServerModifyAccountRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getTraderKey_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getNewInputsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 2, - f, - proto.poolrpc.ServerInput.serializeBinaryToWriter - ); - } - f = message.getNewOutputsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 3, - f, - proto.poolrpc.ServerOutput.serializeBinaryToWriter - ); - } - f = message.getNewParams(); - if (f != null) { - writer.writeMessage( - 4, - f, - proto.poolrpc.ServerModifyAccountRequest.NewAccountParameters.serializeBinaryToWriter - ); - } -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.poolrpc.ServerModifyAccountRequest.NewAccountParameters.prototype.toObject = function(opt_includeInstance) { - return proto.poolrpc.ServerModifyAccountRequest.NewAccountParameters.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.poolrpc.ServerModifyAccountRequest.NewAccountParameters} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.ServerModifyAccountRequest.NewAccountParameters.toObject = function(includeInstance, msg) { - var f, obj = { - value: jspb.Message.getFieldWithDefault(msg, 1, 0), - expiry: jspb.Message.getFieldWithDefault(msg, 2, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.poolrpc.ServerModifyAccountRequest.NewAccountParameters} - */ -proto.poolrpc.ServerModifyAccountRequest.NewAccountParameters.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.poolrpc.ServerModifyAccountRequest.NewAccountParameters; - return proto.poolrpc.ServerModifyAccountRequest.NewAccountParameters.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.poolrpc.ServerModifyAccountRequest.NewAccountParameters} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.poolrpc.ServerModifyAccountRequest.NewAccountParameters} - */ -proto.poolrpc.ServerModifyAccountRequest.NewAccountParameters.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readUint64()); - msg.setValue(value); - break; - case 2: - var value = /** @type {number} */ (reader.readUint32()); - msg.setExpiry(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.poolrpc.ServerModifyAccountRequest.NewAccountParameters.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.poolrpc.ServerModifyAccountRequest.NewAccountParameters.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.poolrpc.ServerModifyAccountRequest.NewAccountParameters} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.ServerModifyAccountRequest.NewAccountParameters.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getValue(); - if (f !== 0) { - writer.writeUint64( - 1, - f - ); - } - f = message.getExpiry(); - if (f !== 0) { - writer.writeUint32( - 2, - f - ); - } -}; - - -/** - * optional uint64 value = 1; - * @return {number} - */ -proto.poolrpc.ServerModifyAccountRequest.NewAccountParameters.prototype.getValue = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.poolrpc.ServerModifyAccountRequest.NewAccountParameters} returns this - */ -proto.poolrpc.ServerModifyAccountRequest.NewAccountParameters.prototype.setValue = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); -}; - - -/** - * optional uint32 expiry = 2; - * @return {number} - */ -proto.poolrpc.ServerModifyAccountRequest.NewAccountParameters.prototype.getExpiry = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.poolrpc.ServerModifyAccountRequest.NewAccountParameters} returns this - */ -proto.poolrpc.ServerModifyAccountRequest.NewAccountParameters.prototype.setExpiry = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * optional bytes trader_key = 1; - * @return {!(string|Uint8Array)} - */ -proto.poolrpc.ServerModifyAccountRequest.prototype.getTraderKey = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes trader_key = 1; - * This is a type-conversion wrapper around `getTraderKey()` - * @return {string} - */ -proto.poolrpc.ServerModifyAccountRequest.prototype.getTraderKey_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getTraderKey())); -}; - - -/** - * optional bytes trader_key = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getTraderKey()` - * @return {!Uint8Array} - */ -proto.poolrpc.ServerModifyAccountRequest.prototype.getTraderKey_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getTraderKey())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.poolrpc.ServerModifyAccountRequest} returns this - */ -proto.poolrpc.ServerModifyAccountRequest.prototype.setTraderKey = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * repeated ServerInput new_inputs = 2; - * @return {!Array} - */ -proto.poolrpc.ServerModifyAccountRequest.prototype.getNewInputsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.poolrpc.ServerInput, 2)); -}; - - -/** - * @param {!Array} value - * @return {!proto.poolrpc.ServerModifyAccountRequest} returns this -*/ -proto.poolrpc.ServerModifyAccountRequest.prototype.setNewInputsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 2, value); -}; - - -/** - * @param {!proto.poolrpc.ServerInput=} opt_value - * @param {number=} opt_index - * @return {!proto.poolrpc.ServerInput} - */ -proto.poolrpc.ServerModifyAccountRequest.prototype.addNewInputs = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.poolrpc.ServerInput, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.poolrpc.ServerModifyAccountRequest} returns this - */ -proto.poolrpc.ServerModifyAccountRequest.prototype.clearNewInputsList = function() { - return this.setNewInputsList([]); -}; - - -/** - * repeated ServerOutput new_outputs = 3; - * @return {!Array} - */ -proto.poolrpc.ServerModifyAccountRequest.prototype.getNewOutputsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.poolrpc.ServerOutput, 3)); -}; - - -/** - * @param {!Array} value - * @return {!proto.poolrpc.ServerModifyAccountRequest} returns this -*/ -proto.poolrpc.ServerModifyAccountRequest.prototype.setNewOutputsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 3, value); -}; - - -/** - * @param {!proto.poolrpc.ServerOutput=} opt_value - * @param {number=} opt_index - * @return {!proto.poolrpc.ServerOutput} - */ -proto.poolrpc.ServerModifyAccountRequest.prototype.addNewOutputs = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.poolrpc.ServerOutput, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.poolrpc.ServerModifyAccountRequest} returns this - */ -proto.poolrpc.ServerModifyAccountRequest.prototype.clearNewOutputsList = function() { - return this.setNewOutputsList([]); -}; - - -/** - * optional NewAccountParameters new_params = 4; - * @return {?proto.poolrpc.ServerModifyAccountRequest.NewAccountParameters} - */ -proto.poolrpc.ServerModifyAccountRequest.prototype.getNewParams = function() { - return /** @type{?proto.poolrpc.ServerModifyAccountRequest.NewAccountParameters} */ ( - jspb.Message.getWrapperField(this, proto.poolrpc.ServerModifyAccountRequest.NewAccountParameters, 4)); -}; - - -/** - * @param {?proto.poolrpc.ServerModifyAccountRequest.NewAccountParameters|undefined} value - * @return {!proto.poolrpc.ServerModifyAccountRequest} returns this -*/ -proto.poolrpc.ServerModifyAccountRequest.prototype.setNewParams = function(value) { - return jspb.Message.setWrapperField(this, 4, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.poolrpc.ServerModifyAccountRequest} returns this - */ -proto.poolrpc.ServerModifyAccountRequest.prototype.clearNewParams = function() { - return this.setNewParams(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.poolrpc.ServerModifyAccountRequest.prototype.hasNewParams = function() { - return jspb.Message.getField(this, 4) != null; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.poolrpc.ServerModifyAccountResponse.prototype.toObject = function(opt_includeInstance) { - return proto.poolrpc.ServerModifyAccountResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.poolrpc.ServerModifyAccountResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.ServerModifyAccountResponse.toObject = function(includeInstance, msg) { - var f, obj = { - accountSig: msg.getAccountSig_asB64() - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.poolrpc.ServerModifyAccountResponse} - */ -proto.poolrpc.ServerModifyAccountResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.poolrpc.ServerModifyAccountResponse; - return proto.poolrpc.ServerModifyAccountResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.poolrpc.ServerModifyAccountResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.poolrpc.ServerModifyAccountResponse} - */ -proto.poolrpc.ServerModifyAccountResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setAccountSig(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.poolrpc.ServerModifyAccountResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.poolrpc.ServerModifyAccountResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.poolrpc.ServerModifyAccountResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.ServerModifyAccountResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getAccountSig_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } -}; - - -/** - * optional bytes account_sig = 1; - * @return {!(string|Uint8Array)} - */ -proto.poolrpc.ServerModifyAccountResponse.prototype.getAccountSig = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes account_sig = 1; - * This is a type-conversion wrapper around `getAccountSig()` - * @return {string} - */ -proto.poolrpc.ServerModifyAccountResponse.prototype.getAccountSig_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getAccountSig())); -}; - - -/** - * optional bytes account_sig = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getAccountSig()` - * @return {!Uint8Array} - */ -proto.poolrpc.ServerModifyAccountResponse.prototype.getAccountSig_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getAccountSig())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.poolrpc.ServerModifyAccountResponse} returns this - */ -proto.poolrpc.ServerModifyAccountResponse.prototype.setAccountSig = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.poolrpc.ServerOrderStateRequest.prototype.toObject = function(opt_includeInstance) { - return proto.poolrpc.ServerOrderStateRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.poolrpc.ServerOrderStateRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.ServerOrderStateRequest.toObject = function(includeInstance, msg) { - var f, obj = { - orderNonce: msg.getOrderNonce_asB64() - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.poolrpc.ServerOrderStateRequest} - */ -proto.poolrpc.ServerOrderStateRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.poolrpc.ServerOrderStateRequest; - return proto.poolrpc.ServerOrderStateRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.poolrpc.ServerOrderStateRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.poolrpc.ServerOrderStateRequest} - */ -proto.poolrpc.ServerOrderStateRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setOrderNonce(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.poolrpc.ServerOrderStateRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.poolrpc.ServerOrderStateRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.poolrpc.ServerOrderStateRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.ServerOrderStateRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getOrderNonce_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } -}; - - -/** - * optional bytes order_nonce = 1; - * @return {!(string|Uint8Array)} - */ -proto.poolrpc.ServerOrderStateRequest.prototype.getOrderNonce = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes order_nonce = 1; - * This is a type-conversion wrapper around `getOrderNonce()` - * @return {string} - */ -proto.poolrpc.ServerOrderStateRequest.prototype.getOrderNonce_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getOrderNonce())); -}; - - -/** - * optional bytes order_nonce = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getOrderNonce()` - * @return {!Uint8Array} - */ -proto.poolrpc.ServerOrderStateRequest.prototype.getOrderNonce_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getOrderNonce())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.poolrpc.ServerOrderStateRequest} returns this - */ -proto.poolrpc.ServerOrderStateRequest.prototype.setOrderNonce = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.poolrpc.ServerOrderStateResponse.prototype.toObject = function(opt_includeInstance) { - return proto.poolrpc.ServerOrderStateResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.poolrpc.ServerOrderStateResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.ServerOrderStateResponse.toObject = function(includeInstance, msg) { - var f, obj = { - state: jspb.Message.getFieldWithDefault(msg, 1, 0), - unitsUnfulfilled: jspb.Message.getFieldWithDefault(msg, 2, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.poolrpc.ServerOrderStateResponse} - */ -proto.poolrpc.ServerOrderStateResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.poolrpc.ServerOrderStateResponse; - return proto.poolrpc.ServerOrderStateResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.poolrpc.ServerOrderStateResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.poolrpc.ServerOrderStateResponse} - */ -proto.poolrpc.ServerOrderStateResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!proto.poolrpc.OrderState} */ (reader.readEnum()); - msg.setState(value); - break; - case 2: - var value = /** @type {number} */ (reader.readUint32()); - msg.setUnitsUnfulfilled(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.poolrpc.ServerOrderStateResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.poolrpc.ServerOrderStateResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.poolrpc.ServerOrderStateResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.ServerOrderStateResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getState(); - if (f !== 0.0) { - writer.writeEnum( - 1, - f - ); - } - f = message.getUnitsUnfulfilled(); - if (f !== 0) { - writer.writeUint32( - 2, - f - ); - } -}; - - -/** - * optional OrderState state = 1; - * @return {!proto.poolrpc.OrderState} - */ -proto.poolrpc.ServerOrderStateResponse.prototype.getState = function() { - return /** @type {!proto.poolrpc.OrderState} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {!proto.poolrpc.OrderState} value - * @return {!proto.poolrpc.ServerOrderStateResponse} returns this - */ -proto.poolrpc.ServerOrderStateResponse.prototype.setState = function(value) { - return jspb.Message.setProto3EnumField(this, 1, value); -}; - - -/** - * optional uint32 units_unfulfilled = 2; - * @return {number} - */ -proto.poolrpc.ServerOrderStateResponse.prototype.getUnitsUnfulfilled = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.poolrpc.ServerOrderStateResponse} returns this - */ -proto.poolrpc.ServerOrderStateResponse.prototype.setUnitsUnfulfilled = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.poolrpc.TermsRequest.prototype.toObject = function(opt_includeInstance) { - return proto.poolrpc.TermsRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.poolrpc.TermsRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.TermsRequest.toObject = function(includeInstance, msg) { - var f, obj = { - - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.poolrpc.TermsRequest} - */ -proto.poolrpc.TermsRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.poolrpc.TermsRequest; - return proto.poolrpc.TermsRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.poolrpc.TermsRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.poolrpc.TermsRequest} - */ -proto.poolrpc.TermsRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.poolrpc.TermsRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.poolrpc.TermsRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.poolrpc.TermsRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.TermsRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.poolrpc.TermsResponse.prototype.toObject = function(opt_includeInstance) { - return proto.poolrpc.TermsResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.poolrpc.TermsResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.TermsResponse.toObject = function(includeInstance, msg) { - var f, obj = { - maxAccountValue: jspb.Message.getFieldWithDefault(msg, 1, 0), - maxOrderDurationBlocks: jspb.Message.getFieldWithDefault(msg, 2, 0), - executionFee: (f = msg.getExecutionFee()) && proto.poolrpc.ExecutionFee.toObject(includeInstance, f), - leaseDurationsMap: (f = msg.getLeaseDurationsMap()) ? f.toObject(includeInstance, undefined) : [], - nextBatchConfTarget: jspb.Message.getFieldWithDefault(msg, 5, 0), - nextBatchFeeRateSatPerKw: jspb.Message.getFieldWithDefault(msg, 6, 0), - nextBatchClearTimestamp: jspb.Message.getFieldWithDefault(msg, 7, 0), - leaseDurationBucketsMap: (f = msg.getLeaseDurationBucketsMap()) ? f.toObject(includeInstance, undefined) : [], - autoRenewExtensionBlocks: jspb.Message.getFieldWithDefault(msg, 9, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.poolrpc.TermsResponse} - */ -proto.poolrpc.TermsResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.poolrpc.TermsResponse; - return proto.poolrpc.TermsResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.poolrpc.TermsResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.poolrpc.TermsResponse} - */ -proto.poolrpc.TermsResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readUint64()); - msg.setMaxAccountValue(value); - break; - case 2: - var value = /** @type {number} */ (reader.readUint32()); - msg.setMaxOrderDurationBlocks(value); - break; - case 3: - var value = new proto.poolrpc.ExecutionFee; - reader.readMessage(value,proto.poolrpc.ExecutionFee.deserializeBinaryFromReader); - msg.setExecutionFee(value); - break; - case 4: - var value = msg.getLeaseDurationsMap(); - reader.readMessage(value, function(message, reader) { - jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readUint32, jspb.BinaryReader.prototype.readBool, null, 0, false); - }); - break; - case 5: - var value = /** @type {number} */ (reader.readUint32()); - msg.setNextBatchConfTarget(value); - break; - case 6: - var value = /** @type {number} */ (reader.readUint64()); - msg.setNextBatchFeeRateSatPerKw(value); - break; - case 7: - var value = /** @type {number} */ (reader.readUint64()); - msg.setNextBatchClearTimestamp(value); - break; - case 8: - var value = msg.getLeaseDurationBucketsMap(); - reader.readMessage(value, function(message, reader) { - jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readUint32, jspb.BinaryReader.prototype.readEnum, null, 0, 0); - }); - break; - case 9: - var value = /** @type {number} */ (reader.readUint32()); - msg.setAutoRenewExtensionBlocks(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.poolrpc.TermsResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.poolrpc.TermsResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.poolrpc.TermsResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.TermsResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getMaxAccountValue(); - if (f !== 0) { - writer.writeUint64( - 1, - f - ); - } - f = message.getMaxOrderDurationBlocks(); - if (f !== 0) { - writer.writeUint32( - 2, - f - ); - } - f = message.getExecutionFee(); - if (f != null) { - writer.writeMessage( - 3, - f, - proto.poolrpc.ExecutionFee.serializeBinaryToWriter - ); - } - f = message.getLeaseDurationsMap(true); - if (f && f.getLength() > 0) { - f.serializeBinary(4, writer, jspb.BinaryWriter.prototype.writeUint32, jspb.BinaryWriter.prototype.writeBool); - } - f = message.getNextBatchConfTarget(); - if (f !== 0) { - writer.writeUint32( - 5, - f - ); - } - f = message.getNextBatchFeeRateSatPerKw(); - if (f !== 0) { - writer.writeUint64( - 6, - f - ); - } - f = message.getNextBatchClearTimestamp(); - if (f !== 0) { - writer.writeUint64( - 7, - f - ); - } - f = message.getLeaseDurationBucketsMap(true); - if (f && f.getLength() > 0) { - f.serializeBinary(8, writer, jspb.BinaryWriter.prototype.writeUint32, jspb.BinaryWriter.prototype.writeEnum); - } - f = message.getAutoRenewExtensionBlocks(); - if (f !== 0) { - writer.writeUint32( - 9, - f - ); - } -}; - - -/** - * optional uint64 max_account_value = 1; - * @return {number} - */ -proto.poolrpc.TermsResponse.prototype.getMaxAccountValue = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.poolrpc.TermsResponse} returns this - */ -proto.poolrpc.TermsResponse.prototype.setMaxAccountValue = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); -}; - - -/** - * optional uint32 max_order_duration_blocks = 2; - * @return {number} - */ -proto.poolrpc.TermsResponse.prototype.getMaxOrderDurationBlocks = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.poolrpc.TermsResponse} returns this - */ -proto.poolrpc.TermsResponse.prototype.setMaxOrderDurationBlocks = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * optional ExecutionFee execution_fee = 3; - * @return {?proto.poolrpc.ExecutionFee} - */ -proto.poolrpc.TermsResponse.prototype.getExecutionFee = function() { - return /** @type{?proto.poolrpc.ExecutionFee} */ ( - jspb.Message.getWrapperField(this, proto.poolrpc.ExecutionFee, 3)); -}; - - -/** - * @param {?proto.poolrpc.ExecutionFee|undefined} value - * @return {!proto.poolrpc.TermsResponse} returns this -*/ -proto.poolrpc.TermsResponse.prototype.setExecutionFee = function(value) { - return jspb.Message.setWrapperField(this, 3, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.poolrpc.TermsResponse} returns this - */ -proto.poolrpc.TermsResponse.prototype.clearExecutionFee = function() { - return this.setExecutionFee(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.poolrpc.TermsResponse.prototype.hasExecutionFee = function() { - return jspb.Message.getField(this, 3) != null; -}; - - -/** - * map lease_durations = 4; - * @param {boolean=} opt_noLazyCreate Do not create the map if - * empty, instead returning `undefined` - * @return {!jspb.Map} - */ -proto.poolrpc.TermsResponse.prototype.getLeaseDurationsMap = function(opt_noLazyCreate) { - return /** @type {!jspb.Map} */ ( - jspb.Message.getMapField(this, 4, opt_noLazyCreate, - null)); -}; - - -/** - * Clears values from the map. The map will be non-null. - * @return {!proto.poolrpc.TermsResponse} returns this - */ -proto.poolrpc.TermsResponse.prototype.clearLeaseDurationsMap = function() { - this.getLeaseDurationsMap().clear(); - return this;}; - - -/** - * optional uint32 next_batch_conf_target = 5; - * @return {number} - */ -proto.poolrpc.TermsResponse.prototype.getNextBatchConfTarget = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.poolrpc.TermsResponse} returns this - */ -proto.poolrpc.TermsResponse.prototype.setNextBatchConfTarget = function(value) { - return jspb.Message.setProto3IntField(this, 5, value); -}; - - -/** - * optional uint64 next_batch_fee_rate_sat_per_kw = 6; - * @return {number} - */ -proto.poolrpc.TermsResponse.prototype.getNextBatchFeeRateSatPerKw = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.poolrpc.TermsResponse} returns this - */ -proto.poolrpc.TermsResponse.prototype.setNextBatchFeeRateSatPerKw = function(value) { - return jspb.Message.setProto3IntField(this, 6, value); -}; - - -/** - * optional uint64 next_batch_clear_timestamp = 7; - * @return {number} - */ -proto.poolrpc.TermsResponse.prototype.getNextBatchClearTimestamp = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.poolrpc.TermsResponse} returns this - */ -proto.poolrpc.TermsResponse.prototype.setNextBatchClearTimestamp = function(value) { - return jspb.Message.setProto3IntField(this, 7, value); -}; - - -/** - * map lease_duration_buckets = 8; - * @param {boolean=} opt_noLazyCreate Do not create the map if - * empty, instead returning `undefined` - * @return {!jspb.Map} - */ -proto.poolrpc.TermsResponse.prototype.getLeaseDurationBucketsMap = function(opt_noLazyCreate) { - return /** @type {!jspb.Map} */ ( - jspb.Message.getMapField(this, 8, opt_noLazyCreate, - null)); -}; - - -/** - * Clears values from the map. The map will be non-null. - * @return {!proto.poolrpc.TermsResponse} returns this - */ -proto.poolrpc.TermsResponse.prototype.clearLeaseDurationBucketsMap = function() { - this.getLeaseDurationBucketsMap().clear(); - return this;}; - - -/** - * optional uint32 auto_renew_extension_blocks = 9; - * @return {number} - */ -proto.poolrpc.TermsResponse.prototype.getAutoRenewExtensionBlocks = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.poolrpc.TermsResponse} returns this - */ -proto.poolrpc.TermsResponse.prototype.setAutoRenewExtensionBlocks = function(value) { - return jspb.Message.setProto3IntField(this, 9, value); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.poolrpc.RelevantBatchRequest.repeatedFields_ = [2]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.poolrpc.RelevantBatchRequest.prototype.toObject = function(opt_includeInstance) { - return proto.poolrpc.RelevantBatchRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.poolrpc.RelevantBatchRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.RelevantBatchRequest.toObject = function(includeInstance, msg) { - var f, obj = { - id: msg.getId_asB64(), - accountsList: msg.getAccountsList_asB64() - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.poolrpc.RelevantBatchRequest} - */ -proto.poolrpc.RelevantBatchRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.poolrpc.RelevantBatchRequest; - return proto.poolrpc.RelevantBatchRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.poolrpc.RelevantBatchRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.poolrpc.RelevantBatchRequest} - */ -proto.poolrpc.RelevantBatchRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setId(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.addAccounts(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.poolrpc.RelevantBatchRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.poolrpc.RelevantBatchRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.poolrpc.RelevantBatchRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.RelevantBatchRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getId_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getAccountsList_asU8(); - if (f.length > 0) { - writer.writeRepeatedBytes( - 2, - f - ); - } -}; - - -/** - * optional bytes id = 1; - * @return {!(string|Uint8Array)} - */ -proto.poolrpc.RelevantBatchRequest.prototype.getId = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes id = 1; - * This is a type-conversion wrapper around `getId()` - * @return {string} - */ -proto.poolrpc.RelevantBatchRequest.prototype.getId_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getId())); -}; - - -/** - * optional bytes id = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getId()` - * @return {!Uint8Array} - */ -proto.poolrpc.RelevantBatchRequest.prototype.getId_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getId())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.poolrpc.RelevantBatchRequest} returns this - */ -proto.poolrpc.RelevantBatchRequest.prototype.setId = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * repeated bytes accounts = 2; - * @return {!(Array|Array)} - */ -proto.poolrpc.RelevantBatchRequest.prototype.getAccountsList = function() { - return /** @type {!(Array|Array)} */ (jspb.Message.getRepeatedField(this, 2)); -}; - - -/** - * repeated bytes accounts = 2; - * This is a type-conversion wrapper around `getAccountsList()` - * @return {!Array} - */ -proto.poolrpc.RelevantBatchRequest.prototype.getAccountsList_asB64 = function() { - return /** @type {!Array} */ (jspb.Message.bytesListAsB64( - this.getAccountsList())); -}; - - -/** - * repeated bytes accounts = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getAccountsList()` - * @return {!Array} - */ -proto.poolrpc.RelevantBatchRequest.prototype.getAccountsList_asU8 = function() { - return /** @type {!Array} */ (jspb.Message.bytesListAsU8( - this.getAccountsList())); -}; - - -/** - * @param {!(Array|Array)} value - * @return {!proto.poolrpc.RelevantBatchRequest} returns this - */ -proto.poolrpc.RelevantBatchRequest.prototype.setAccountsList = function(value) { - return jspb.Message.setField(this, 2, value || []); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @param {number=} opt_index - * @return {!proto.poolrpc.RelevantBatchRequest} returns this - */ -proto.poolrpc.RelevantBatchRequest.prototype.addAccounts = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 2, value, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.poolrpc.RelevantBatchRequest} returns this - */ -proto.poolrpc.RelevantBatchRequest.prototype.clearAccountsList = function() { - return this.setAccountsList([]); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.poolrpc.RelevantBatch.repeatedFields_ = [3]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.poolrpc.RelevantBatch.prototype.toObject = function(opt_includeInstance) { - return proto.poolrpc.RelevantBatch.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.poolrpc.RelevantBatch} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.RelevantBatch.toObject = function(includeInstance, msg) { - var f, obj = { - version: jspb.Message.getFieldWithDefault(msg, 1, 0), - id: msg.getId_asB64(), - chargedAccountsList: jspb.Message.toObjectList(msg.getChargedAccountsList(), - proto.poolrpc.AccountDiff.toObject, includeInstance), - matchedOrdersMap: (f = msg.getMatchedOrdersMap()) ? f.toObject(includeInstance, proto.poolrpc.MatchedOrder.toObject) : [], - clearingPriceRate: jspb.Message.getFieldWithDefault(msg, 5, 0), - executionFee: (f = msg.getExecutionFee()) && proto.poolrpc.ExecutionFee.toObject(includeInstance, f), - transaction: msg.getTransaction_asB64(), - feeRateSatPerKw: jspb.Message.getFieldWithDefault(msg, 8, 0), - creationTimestampNs: jspb.Message.getFieldWithDefault(msg, 9, 0), - matchedMarketsMap: (f = msg.getMatchedMarketsMap()) ? f.toObject(includeInstance, proto.poolrpc.MatchedMarket.toObject) : [] - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.poolrpc.RelevantBatch} - */ -proto.poolrpc.RelevantBatch.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.poolrpc.RelevantBatch; - return proto.poolrpc.RelevantBatch.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.poolrpc.RelevantBatch} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.poolrpc.RelevantBatch} - */ -proto.poolrpc.RelevantBatch.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readUint32()); - msg.setVersion(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setId(value); - break; - case 3: - var value = new proto.poolrpc.AccountDiff; - reader.readMessage(value,proto.poolrpc.AccountDiff.deserializeBinaryFromReader); - msg.addChargedAccounts(value); - break; - case 4: - var value = msg.getMatchedOrdersMap(); - reader.readMessage(value, function(message, reader) { - jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readMessage, proto.poolrpc.MatchedOrder.deserializeBinaryFromReader, "", new proto.poolrpc.MatchedOrder()); - }); - break; - case 5: - var value = /** @type {number} */ (reader.readUint32()); - msg.setClearingPriceRate(value); - break; - case 6: - var value = new proto.poolrpc.ExecutionFee; - reader.readMessage(value,proto.poolrpc.ExecutionFee.deserializeBinaryFromReader); - msg.setExecutionFee(value); - break; - case 7: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setTransaction(value); - break; - case 8: - var value = /** @type {number} */ (reader.readUint64()); - msg.setFeeRateSatPerKw(value); - break; - case 9: - var value = /** @type {number} */ (reader.readUint64()); - msg.setCreationTimestampNs(value); - break; - case 10: - var value = msg.getMatchedMarketsMap(); - reader.readMessage(value, function(message, reader) { - jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readUint32, jspb.BinaryReader.prototype.readMessage, proto.poolrpc.MatchedMarket.deserializeBinaryFromReader, 0, new proto.poolrpc.MatchedMarket()); - }); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.poolrpc.RelevantBatch.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.poolrpc.RelevantBatch.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.poolrpc.RelevantBatch} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.RelevantBatch.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getVersion(); - if (f !== 0) { - writer.writeUint32( - 1, - f - ); - } - f = message.getId_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } - f = message.getChargedAccountsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 3, - f, - proto.poolrpc.AccountDiff.serializeBinaryToWriter - ); - } - f = message.getMatchedOrdersMap(true); - if (f && f.getLength() > 0) { - f.serializeBinary(4, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeMessage, proto.poolrpc.MatchedOrder.serializeBinaryToWriter); - } - f = message.getClearingPriceRate(); - if (f !== 0) { - writer.writeUint32( - 5, - f - ); - } - f = message.getExecutionFee(); - if (f != null) { - writer.writeMessage( - 6, - f, - proto.poolrpc.ExecutionFee.serializeBinaryToWriter - ); - } - f = message.getTransaction_asU8(); - if (f.length > 0) { - writer.writeBytes( - 7, - f - ); - } - f = message.getFeeRateSatPerKw(); - if (f !== 0) { - writer.writeUint64( - 8, - f - ); - } - f = message.getCreationTimestampNs(); - if (f !== 0) { - writer.writeUint64( - 9, - f - ); - } - f = message.getMatchedMarketsMap(true); - if (f && f.getLength() > 0) { - f.serializeBinary(10, writer, jspb.BinaryWriter.prototype.writeUint32, jspb.BinaryWriter.prototype.writeMessage, proto.poolrpc.MatchedMarket.serializeBinaryToWriter); - } -}; - - -/** - * optional uint32 version = 1; - * @return {number} - */ -proto.poolrpc.RelevantBatch.prototype.getVersion = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.poolrpc.RelevantBatch} returns this - */ -proto.poolrpc.RelevantBatch.prototype.setVersion = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); -}; - - -/** - * optional bytes id = 2; - * @return {!(string|Uint8Array)} - */ -proto.poolrpc.RelevantBatch.prototype.getId = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes id = 2; - * This is a type-conversion wrapper around `getId()` - * @return {string} - */ -proto.poolrpc.RelevantBatch.prototype.getId_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getId())); -}; - - -/** - * optional bytes id = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getId()` - * @return {!Uint8Array} - */ -proto.poolrpc.RelevantBatch.prototype.getId_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getId())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.poolrpc.RelevantBatch} returns this - */ -proto.poolrpc.RelevantBatch.prototype.setId = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); -}; - - -/** - * repeated AccountDiff charged_accounts = 3; - * @return {!Array} - */ -proto.poolrpc.RelevantBatch.prototype.getChargedAccountsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.poolrpc.AccountDiff, 3)); -}; - - -/** - * @param {!Array} value - * @return {!proto.poolrpc.RelevantBatch} returns this -*/ -proto.poolrpc.RelevantBatch.prototype.setChargedAccountsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 3, value); -}; - - -/** - * @param {!proto.poolrpc.AccountDiff=} opt_value - * @param {number=} opt_index - * @return {!proto.poolrpc.AccountDiff} - */ -proto.poolrpc.RelevantBatch.prototype.addChargedAccounts = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.poolrpc.AccountDiff, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.poolrpc.RelevantBatch} returns this - */ -proto.poolrpc.RelevantBatch.prototype.clearChargedAccountsList = function() { - return this.setChargedAccountsList([]); -}; - - -/** - * map matched_orders = 4; - * @param {boolean=} opt_noLazyCreate Do not create the map if - * empty, instead returning `undefined` - * @return {!jspb.Map} - */ -proto.poolrpc.RelevantBatch.prototype.getMatchedOrdersMap = function(opt_noLazyCreate) { - return /** @type {!jspb.Map} */ ( - jspb.Message.getMapField(this, 4, opt_noLazyCreate, - proto.poolrpc.MatchedOrder)); -}; - - -/** - * Clears values from the map. The map will be non-null. - * @return {!proto.poolrpc.RelevantBatch} returns this - */ -proto.poolrpc.RelevantBatch.prototype.clearMatchedOrdersMap = function() { - this.getMatchedOrdersMap().clear(); - return this;}; - - -/** - * optional uint32 clearing_price_rate = 5; - * @return {number} - */ -proto.poolrpc.RelevantBatch.prototype.getClearingPriceRate = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.poolrpc.RelevantBatch} returns this - */ -proto.poolrpc.RelevantBatch.prototype.setClearingPriceRate = function(value) { - return jspb.Message.setProto3IntField(this, 5, value); -}; - - -/** - * optional ExecutionFee execution_fee = 6; - * @return {?proto.poolrpc.ExecutionFee} - */ -proto.poolrpc.RelevantBatch.prototype.getExecutionFee = function() { - return /** @type{?proto.poolrpc.ExecutionFee} */ ( - jspb.Message.getWrapperField(this, proto.poolrpc.ExecutionFee, 6)); -}; - - -/** - * @param {?proto.poolrpc.ExecutionFee|undefined} value - * @return {!proto.poolrpc.RelevantBatch} returns this -*/ -proto.poolrpc.RelevantBatch.prototype.setExecutionFee = function(value) { - return jspb.Message.setWrapperField(this, 6, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.poolrpc.RelevantBatch} returns this - */ -proto.poolrpc.RelevantBatch.prototype.clearExecutionFee = function() { - return this.setExecutionFee(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.poolrpc.RelevantBatch.prototype.hasExecutionFee = function() { - return jspb.Message.getField(this, 6) != null; -}; - - -/** - * optional bytes transaction = 7; - * @return {!(string|Uint8Array)} - */ -proto.poolrpc.RelevantBatch.prototype.getTransaction = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 7, "")); -}; - - -/** - * optional bytes transaction = 7; - * This is a type-conversion wrapper around `getTransaction()` - * @return {string} - */ -proto.poolrpc.RelevantBatch.prototype.getTransaction_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getTransaction())); -}; - - -/** - * optional bytes transaction = 7; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getTransaction()` - * @return {!Uint8Array} - */ -proto.poolrpc.RelevantBatch.prototype.getTransaction_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getTransaction())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.poolrpc.RelevantBatch} returns this - */ -proto.poolrpc.RelevantBatch.prototype.setTransaction = function(value) { - return jspb.Message.setProto3BytesField(this, 7, value); -}; - - -/** - * optional uint64 fee_rate_sat_per_kw = 8; - * @return {number} - */ -proto.poolrpc.RelevantBatch.prototype.getFeeRateSatPerKw = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.poolrpc.RelevantBatch} returns this - */ -proto.poolrpc.RelevantBatch.prototype.setFeeRateSatPerKw = function(value) { - return jspb.Message.setProto3IntField(this, 8, value); -}; - - -/** - * optional uint64 creation_timestamp_ns = 9; - * @return {number} - */ -proto.poolrpc.RelevantBatch.prototype.getCreationTimestampNs = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.poolrpc.RelevantBatch} returns this - */ -proto.poolrpc.RelevantBatch.prototype.setCreationTimestampNs = function(value) { - return jspb.Message.setProto3IntField(this, 9, value); -}; - - -/** - * map matched_markets = 10; - * @param {boolean=} opt_noLazyCreate Do not create the map if - * empty, instead returning `undefined` - * @return {!jspb.Map} - */ -proto.poolrpc.RelevantBatch.prototype.getMatchedMarketsMap = function(opt_noLazyCreate) { - return /** @type {!jspb.Map} */ ( - jspb.Message.getMapField(this, 10, opt_noLazyCreate, - proto.poolrpc.MatchedMarket)); -}; - - -/** - * Clears values from the map. The map will be non-null. - * @return {!proto.poolrpc.RelevantBatch} returns this - */ -proto.poolrpc.RelevantBatch.prototype.clearMatchedMarketsMap = function() { - this.getMatchedMarketsMap().clear(); - return this;}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.poolrpc.ExecutionFee.prototype.toObject = function(opt_includeInstance) { - return proto.poolrpc.ExecutionFee.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.poolrpc.ExecutionFee} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.ExecutionFee.toObject = function(includeInstance, msg) { - var f, obj = { - baseFee: jspb.Message.getFieldWithDefault(msg, 1, 0), - feeRate: jspb.Message.getFieldWithDefault(msg, 2, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.poolrpc.ExecutionFee} - */ -proto.poolrpc.ExecutionFee.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.poolrpc.ExecutionFee; - return proto.poolrpc.ExecutionFee.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.poolrpc.ExecutionFee} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.poolrpc.ExecutionFee} - */ -proto.poolrpc.ExecutionFee.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readUint64()); - msg.setBaseFee(value); - break; - case 2: - var value = /** @type {number} */ (reader.readUint64()); - msg.setFeeRate(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.poolrpc.ExecutionFee.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.poolrpc.ExecutionFee.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.poolrpc.ExecutionFee} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.ExecutionFee.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getBaseFee(); - if (f !== 0) { - writer.writeUint64( - 1, - f - ); - } - f = message.getFeeRate(); - if (f !== 0) { - writer.writeUint64( - 2, - f - ); - } -}; - - -/** - * optional uint64 base_fee = 1; - * @return {number} - */ -proto.poolrpc.ExecutionFee.prototype.getBaseFee = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.poolrpc.ExecutionFee} returns this - */ -proto.poolrpc.ExecutionFee.prototype.setBaseFee = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); -}; - - -/** - * optional uint64 fee_rate = 2; - * @return {number} - */ -proto.poolrpc.ExecutionFee.prototype.getFeeRate = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.poolrpc.ExecutionFee} returns this - */ -proto.poolrpc.ExecutionFee.prototype.setFeeRate = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.poolrpc.NodeAddress.prototype.toObject = function(opt_includeInstance) { - return proto.poolrpc.NodeAddress.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.poolrpc.NodeAddress} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.NodeAddress.toObject = function(includeInstance, msg) { - var f, obj = { - network: jspb.Message.getFieldWithDefault(msg, 1, ""), - addr: jspb.Message.getFieldWithDefault(msg, 2, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.poolrpc.NodeAddress} - */ -proto.poolrpc.NodeAddress.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.poolrpc.NodeAddress; - return proto.poolrpc.NodeAddress.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.poolrpc.NodeAddress} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.poolrpc.NodeAddress} - */ -proto.poolrpc.NodeAddress.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setNetwork(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setAddr(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.poolrpc.NodeAddress.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.poolrpc.NodeAddress.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.poolrpc.NodeAddress} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.NodeAddress.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getNetwork(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getAddr(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } -}; - - -/** - * optional string network = 1; - * @return {string} - */ -proto.poolrpc.NodeAddress.prototype.getNetwork = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.poolrpc.NodeAddress} returns this - */ -proto.poolrpc.NodeAddress.prototype.setNetwork = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional string addr = 2; - * @return {string} - */ -proto.poolrpc.NodeAddress.prototype.getAddr = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.poolrpc.NodeAddress} returns this - */ -proto.poolrpc.NodeAddress.prototype.setAddr = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.poolrpc.OutPoint.prototype.toObject = function(opt_includeInstance) { - return proto.poolrpc.OutPoint.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.poolrpc.OutPoint} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.OutPoint.toObject = function(includeInstance, msg) { - var f, obj = { - txid: msg.getTxid_asB64(), - outputIndex: jspb.Message.getFieldWithDefault(msg, 2, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.poolrpc.OutPoint} - */ -proto.poolrpc.OutPoint.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.poolrpc.OutPoint; - return proto.poolrpc.OutPoint.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.poolrpc.OutPoint} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.poolrpc.OutPoint} - */ -proto.poolrpc.OutPoint.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setTxid(value); - break; - case 2: - var value = /** @type {number} */ (reader.readUint32()); - msg.setOutputIndex(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.poolrpc.OutPoint.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.poolrpc.OutPoint.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.poolrpc.OutPoint} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.OutPoint.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getTxid_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getOutputIndex(); - if (f !== 0) { - writer.writeUint32( - 2, - f - ); - } -}; - - -/** - * optional bytes txid = 1; - * @return {!(string|Uint8Array)} - */ -proto.poolrpc.OutPoint.prototype.getTxid = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes txid = 1; - * This is a type-conversion wrapper around `getTxid()` - * @return {string} - */ -proto.poolrpc.OutPoint.prototype.getTxid_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getTxid())); -}; - - -/** - * optional bytes txid = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getTxid()` - * @return {!Uint8Array} - */ -proto.poolrpc.OutPoint.prototype.getTxid_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getTxid())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.poolrpc.OutPoint} returns this - */ -proto.poolrpc.OutPoint.prototype.setTxid = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional uint32 output_index = 2; - * @return {number} - */ -proto.poolrpc.OutPoint.prototype.getOutputIndex = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.poolrpc.OutPoint} returns this - */ -proto.poolrpc.OutPoint.prototype.setOutputIndex = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.poolrpc.AskSnapshot.prototype.toObject = function(opt_includeInstance) { - return proto.poolrpc.AskSnapshot.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.poolrpc.AskSnapshot} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.AskSnapshot.toObject = function(includeInstance, msg) { - var f, obj = { - version: jspb.Message.getFieldWithDefault(msg, 1, 0), - leaseDurationBlocks: jspb.Message.getFieldWithDefault(msg, 2, 0), - rateFixed: jspb.Message.getFieldWithDefault(msg, 3, 0), - chanType: jspb.Message.getFieldWithDefault(msg, 4, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.poolrpc.AskSnapshot} - */ -proto.poolrpc.AskSnapshot.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.poolrpc.AskSnapshot; - return proto.poolrpc.AskSnapshot.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.poolrpc.AskSnapshot} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.poolrpc.AskSnapshot} - */ -proto.poolrpc.AskSnapshot.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readUint32()); - msg.setVersion(value); - break; - case 2: - var value = /** @type {number} */ (reader.readUint32()); - msg.setLeaseDurationBlocks(value); - break; - case 3: - var value = /** @type {number} */ (reader.readUint32()); - msg.setRateFixed(value); - break; - case 4: - var value = /** @type {!proto.poolrpc.OrderChannelType} */ (reader.readEnum()); - msg.setChanType(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.poolrpc.AskSnapshot.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.poolrpc.AskSnapshot.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.poolrpc.AskSnapshot} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.AskSnapshot.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getVersion(); - if (f !== 0) { - writer.writeUint32( - 1, - f - ); - } - f = message.getLeaseDurationBlocks(); - if (f !== 0) { - writer.writeUint32( - 2, - f - ); - } - f = message.getRateFixed(); - if (f !== 0) { - writer.writeUint32( - 3, - f - ); - } - f = message.getChanType(); - if (f !== 0.0) { - writer.writeEnum( - 4, - f - ); - } -}; - - -/** - * optional uint32 version = 1; - * @return {number} - */ -proto.poolrpc.AskSnapshot.prototype.getVersion = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.poolrpc.AskSnapshot} returns this - */ -proto.poolrpc.AskSnapshot.prototype.setVersion = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); -}; - - -/** - * optional uint32 lease_duration_blocks = 2; - * @return {number} - */ -proto.poolrpc.AskSnapshot.prototype.getLeaseDurationBlocks = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.poolrpc.AskSnapshot} returns this - */ -proto.poolrpc.AskSnapshot.prototype.setLeaseDurationBlocks = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * optional uint32 rate_fixed = 3; - * @return {number} - */ -proto.poolrpc.AskSnapshot.prototype.getRateFixed = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.poolrpc.AskSnapshot} returns this - */ -proto.poolrpc.AskSnapshot.prototype.setRateFixed = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - -/** - * optional OrderChannelType chan_type = 4; - * @return {!proto.poolrpc.OrderChannelType} - */ -proto.poolrpc.AskSnapshot.prototype.getChanType = function() { - return /** @type {!proto.poolrpc.OrderChannelType} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** - * @param {!proto.poolrpc.OrderChannelType} value - * @return {!proto.poolrpc.AskSnapshot} returns this - */ -proto.poolrpc.AskSnapshot.prototype.setChanType = function(value) { - return jspb.Message.setProto3EnumField(this, 4, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.poolrpc.BidSnapshot.prototype.toObject = function(opt_includeInstance) { - return proto.poolrpc.BidSnapshot.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.poolrpc.BidSnapshot} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.BidSnapshot.toObject = function(includeInstance, msg) { - var f, obj = { - version: jspb.Message.getFieldWithDefault(msg, 1, 0), - leaseDurationBlocks: jspb.Message.getFieldWithDefault(msg, 2, 0), - rateFixed: jspb.Message.getFieldWithDefault(msg, 3, 0), - chanType: jspb.Message.getFieldWithDefault(msg, 4, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.poolrpc.BidSnapshot} - */ -proto.poolrpc.BidSnapshot.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.poolrpc.BidSnapshot; - return proto.poolrpc.BidSnapshot.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.poolrpc.BidSnapshot} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.poolrpc.BidSnapshot} - */ -proto.poolrpc.BidSnapshot.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readUint32()); - msg.setVersion(value); - break; - case 2: - var value = /** @type {number} */ (reader.readUint32()); - msg.setLeaseDurationBlocks(value); - break; - case 3: - var value = /** @type {number} */ (reader.readUint32()); - msg.setRateFixed(value); - break; - case 4: - var value = /** @type {!proto.poolrpc.OrderChannelType} */ (reader.readEnum()); - msg.setChanType(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.poolrpc.BidSnapshot.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.poolrpc.BidSnapshot.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.poolrpc.BidSnapshot} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.BidSnapshot.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getVersion(); - if (f !== 0) { - writer.writeUint32( - 1, - f - ); - } - f = message.getLeaseDurationBlocks(); - if (f !== 0) { - writer.writeUint32( - 2, - f - ); - } - f = message.getRateFixed(); - if (f !== 0) { - writer.writeUint32( - 3, - f - ); - } - f = message.getChanType(); - if (f !== 0.0) { - writer.writeEnum( - 4, - f - ); - } -}; - - -/** - * optional uint32 version = 1; - * @return {number} - */ -proto.poolrpc.BidSnapshot.prototype.getVersion = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.poolrpc.BidSnapshot} returns this - */ -proto.poolrpc.BidSnapshot.prototype.setVersion = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); -}; - - -/** - * optional uint32 lease_duration_blocks = 2; - * @return {number} - */ -proto.poolrpc.BidSnapshot.prototype.getLeaseDurationBlocks = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.poolrpc.BidSnapshot} returns this - */ -proto.poolrpc.BidSnapshot.prototype.setLeaseDurationBlocks = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * optional uint32 rate_fixed = 3; - * @return {number} - */ -proto.poolrpc.BidSnapshot.prototype.getRateFixed = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.poolrpc.BidSnapshot} returns this - */ -proto.poolrpc.BidSnapshot.prototype.setRateFixed = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - -/** - * optional OrderChannelType chan_type = 4; - * @return {!proto.poolrpc.OrderChannelType} - */ -proto.poolrpc.BidSnapshot.prototype.getChanType = function() { - return /** @type {!proto.poolrpc.OrderChannelType} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** - * @param {!proto.poolrpc.OrderChannelType} value - * @return {!proto.poolrpc.BidSnapshot} returns this - */ -proto.poolrpc.BidSnapshot.prototype.setChanType = function(value) { - return jspb.Message.setProto3EnumField(this, 4, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.poolrpc.MatchedOrderSnapshot.prototype.toObject = function(opt_includeInstance) { - return proto.poolrpc.MatchedOrderSnapshot.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.poolrpc.MatchedOrderSnapshot} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.MatchedOrderSnapshot.toObject = function(includeInstance, msg) { - var f, obj = { - ask: (f = msg.getAsk()) && proto.poolrpc.AskSnapshot.toObject(includeInstance, f), - bid: (f = msg.getBid()) && proto.poolrpc.BidSnapshot.toObject(includeInstance, f), - matchingRate: jspb.Message.getFieldWithDefault(msg, 3, 0), - totalSatsCleared: jspb.Message.getFieldWithDefault(msg, 4, 0), - unitsMatched: jspb.Message.getFieldWithDefault(msg, 5, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.poolrpc.MatchedOrderSnapshot} - */ -proto.poolrpc.MatchedOrderSnapshot.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.poolrpc.MatchedOrderSnapshot; - return proto.poolrpc.MatchedOrderSnapshot.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.poolrpc.MatchedOrderSnapshot} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.poolrpc.MatchedOrderSnapshot} - */ -proto.poolrpc.MatchedOrderSnapshot.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.poolrpc.AskSnapshot; - reader.readMessage(value,proto.poolrpc.AskSnapshot.deserializeBinaryFromReader); - msg.setAsk(value); - break; - case 2: - var value = new proto.poolrpc.BidSnapshot; - reader.readMessage(value,proto.poolrpc.BidSnapshot.deserializeBinaryFromReader); - msg.setBid(value); - break; - case 3: - var value = /** @type {number} */ (reader.readUint32()); - msg.setMatchingRate(value); - break; - case 4: - var value = /** @type {number} */ (reader.readUint64()); - msg.setTotalSatsCleared(value); - break; - case 5: - var value = /** @type {number} */ (reader.readUint32()); - msg.setUnitsMatched(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.poolrpc.MatchedOrderSnapshot.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.poolrpc.MatchedOrderSnapshot.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.poolrpc.MatchedOrderSnapshot} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.MatchedOrderSnapshot.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getAsk(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.poolrpc.AskSnapshot.serializeBinaryToWriter - ); - } - f = message.getBid(); - if (f != null) { - writer.writeMessage( - 2, - f, - proto.poolrpc.BidSnapshot.serializeBinaryToWriter - ); - } - f = message.getMatchingRate(); - if (f !== 0) { - writer.writeUint32( - 3, - f - ); - } - f = message.getTotalSatsCleared(); - if (f !== 0) { - writer.writeUint64( - 4, - f - ); - } - f = message.getUnitsMatched(); - if (f !== 0) { - writer.writeUint32( - 5, - f - ); - } -}; - - -/** - * optional AskSnapshot ask = 1; - * @return {?proto.poolrpc.AskSnapshot} - */ -proto.poolrpc.MatchedOrderSnapshot.prototype.getAsk = function() { - return /** @type{?proto.poolrpc.AskSnapshot} */ ( - jspb.Message.getWrapperField(this, proto.poolrpc.AskSnapshot, 1)); -}; - - -/** - * @param {?proto.poolrpc.AskSnapshot|undefined} value - * @return {!proto.poolrpc.MatchedOrderSnapshot} returns this -*/ -proto.poolrpc.MatchedOrderSnapshot.prototype.setAsk = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.poolrpc.MatchedOrderSnapshot} returns this - */ -proto.poolrpc.MatchedOrderSnapshot.prototype.clearAsk = function() { - return this.setAsk(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.poolrpc.MatchedOrderSnapshot.prototype.hasAsk = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional BidSnapshot bid = 2; - * @return {?proto.poolrpc.BidSnapshot} - */ -proto.poolrpc.MatchedOrderSnapshot.prototype.getBid = function() { - return /** @type{?proto.poolrpc.BidSnapshot} */ ( - jspb.Message.getWrapperField(this, proto.poolrpc.BidSnapshot, 2)); -}; - - -/** - * @param {?proto.poolrpc.BidSnapshot|undefined} value - * @return {!proto.poolrpc.MatchedOrderSnapshot} returns this -*/ -proto.poolrpc.MatchedOrderSnapshot.prototype.setBid = function(value) { - return jspb.Message.setWrapperField(this, 2, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.poolrpc.MatchedOrderSnapshot} returns this - */ -proto.poolrpc.MatchedOrderSnapshot.prototype.clearBid = function() { - return this.setBid(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.poolrpc.MatchedOrderSnapshot.prototype.hasBid = function() { - return jspb.Message.getField(this, 2) != null; -}; - - -/** - * optional uint32 matching_rate = 3; - * @return {number} - */ -proto.poolrpc.MatchedOrderSnapshot.prototype.getMatchingRate = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.poolrpc.MatchedOrderSnapshot} returns this - */ -proto.poolrpc.MatchedOrderSnapshot.prototype.setMatchingRate = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - -/** - * optional uint64 total_sats_cleared = 4; - * @return {number} - */ -proto.poolrpc.MatchedOrderSnapshot.prototype.getTotalSatsCleared = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.poolrpc.MatchedOrderSnapshot} returns this - */ -proto.poolrpc.MatchedOrderSnapshot.prototype.setTotalSatsCleared = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); -}; - - -/** - * optional uint32 units_matched = 5; - * @return {number} - */ -proto.poolrpc.MatchedOrderSnapshot.prototype.getUnitsMatched = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.poolrpc.MatchedOrderSnapshot} returns this - */ -proto.poolrpc.MatchedOrderSnapshot.prototype.setUnitsMatched = function(value) { - return jspb.Message.setProto3IntField(this, 5, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.poolrpc.BatchSnapshotRequest.prototype.toObject = function(opt_includeInstance) { - return proto.poolrpc.BatchSnapshotRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.poolrpc.BatchSnapshotRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.BatchSnapshotRequest.toObject = function(includeInstance, msg) { - var f, obj = { - batchId: msg.getBatchId_asB64() - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.poolrpc.BatchSnapshotRequest} - */ -proto.poolrpc.BatchSnapshotRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.poolrpc.BatchSnapshotRequest; - return proto.poolrpc.BatchSnapshotRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.poolrpc.BatchSnapshotRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.poolrpc.BatchSnapshotRequest} - */ -proto.poolrpc.BatchSnapshotRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setBatchId(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.poolrpc.BatchSnapshotRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.poolrpc.BatchSnapshotRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.poolrpc.BatchSnapshotRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.BatchSnapshotRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getBatchId_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } -}; - - -/** - * optional bytes batch_id = 1; - * @return {!(string|Uint8Array)} - */ -proto.poolrpc.BatchSnapshotRequest.prototype.getBatchId = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes batch_id = 1; - * This is a type-conversion wrapper around `getBatchId()` - * @return {string} - */ -proto.poolrpc.BatchSnapshotRequest.prototype.getBatchId_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getBatchId())); -}; - - -/** - * optional bytes batch_id = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getBatchId()` - * @return {!Uint8Array} - */ -proto.poolrpc.BatchSnapshotRequest.prototype.getBatchId_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getBatchId())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.poolrpc.BatchSnapshotRequest} returns this - */ -proto.poolrpc.BatchSnapshotRequest.prototype.setBatchId = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.poolrpc.MatchedMarketSnapshot.repeatedFields_ = [1]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.poolrpc.MatchedMarketSnapshot.prototype.toObject = function(opt_includeInstance) { - return proto.poolrpc.MatchedMarketSnapshot.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.poolrpc.MatchedMarketSnapshot} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.MatchedMarketSnapshot.toObject = function(includeInstance, msg) { - var f, obj = { - matchedOrdersList: jspb.Message.toObjectList(msg.getMatchedOrdersList(), - proto.poolrpc.MatchedOrderSnapshot.toObject, includeInstance), - clearingPriceRate: jspb.Message.getFieldWithDefault(msg, 2, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.poolrpc.MatchedMarketSnapshot} - */ -proto.poolrpc.MatchedMarketSnapshot.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.poolrpc.MatchedMarketSnapshot; - return proto.poolrpc.MatchedMarketSnapshot.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.poolrpc.MatchedMarketSnapshot} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.poolrpc.MatchedMarketSnapshot} - */ -proto.poolrpc.MatchedMarketSnapshot.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.poolrpc.MatchedOrderSnapshot; - reader.readMessage(value,proto.poolrpc.MatchedOrderSnapshot.deserializeBinaryFromReader); - msg.addMatchedOrders(value); - break; - case 2: - var value = /** @type {number} */ (reader.readUint32()); - msg.setClearingPriceRate(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.poolrpc.MatchedMarketSnapshot.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.poolrpc.MatchedMarketSnapshot.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.poolrpc.MatchedMarketSnapshot} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.MatchedMarketSnapshot.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getMatchedOrdersList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 1, - f, - proto.poolrpc.MatchedOrderSnapshot.serializeBinaryToWriter - ); - } - f = message.getClearingPriceRate(); - if (f !== 0) { - writer.writeUint32( - 2, - f - ); - } -}; - - -/** - * repeated MatchedOrderSnapshot matched_orders = 1; - * @return {!Array} - */ -proto.poolrpc.MatchedMarketSnapshot.prototype.getMatchedOrdersList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.poolrpc.MatchedOrderSnapshot, 1)); -}; - - -/** - * @param {!Array} value - * @return {!proto.poolrpc.MatchedMarketSnapshot} returns this -*/ -proto.poolrpc.MatchedMarketSnapshot.prototype.setMatchedOrdersList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); -}; - - -/** - * @param {!proto.poolrpc.MatchedOrderSnapshot=} opt_value - * @param {number=} opt_index - * @return {!proto.poolrpc.MatchedOrderSnapshot} - */ -proto.poolrpc.MatchedMarketSnapshot.prototype.addMatchedOrders = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.poolrpc.MatchedOrderSnapshot, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.poolrpc.MatchedMarketSnapshot} returns this - */ -proto.poolrpc.MatchedMarketSnapshot.prototype.clearMatchedOrdersList = function() { - return this.setMatchedOrdersList([]); -}; - - -/** - * optional uint32 clearing_price_rate = 2; - * @return {number} - */ -proto.poolrpc.MatchedMarketSnapshot.prototype.getClearingPriceRate = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.poolrpc.MatchedMarketSnapshot} returns this - */ -proto.poolrpc.MatchedMarketSnapshot.prototype.setClearingPriceRate = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.poolrpc.BatchSnapshotResponse.repeatedFields_ = [5]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.poolrpc.BatchSnapshotResponse.prototype.toObject = function(opt_includeInstance) { - return proto.poolrpc.BatchSnapshotResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.poolrpc.BatchSnapshotResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.BatchSnapshotResponse.toObject = function(includeInstance, msg) { - var f, obj = { - version: jspb.Message.getFieldWithDefault(msg, 1, 0), - batchId: msg.getBatchId_asB64(), - prevBatchId: msg.getPrevBatchId_asB64(), - clearingPriceRate: jspb.Message.getFieldWithDefault(msg, 4, 0), - matchedOrdersList: jspb.Message.toObjectList(msg.getMatchedOrdersList(), - proto.poolrpc.MatchedOrderSnapshot.toObject, includeInstance), - batchTxId: jspb.Message.getFieldWithDefault(msg, 7, ""), - batchTx: msg.getBatchTx_asB64(), - batchTxFeeRateSatPerKw: jspb.Message.getFieldWithDefault(msg, 8, 0), - creationTimestampNs: jspb.Message.getFieldWithDefault(msg, 9, 0), - matchedMarketsMap: (f = msg.getMatchedMarketsMap()) ? f.toObject(includeInstance, proto.poolrpc.MatchedMarketSnapshot.toObject) : [] - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.poolrpc.BatchSnapshotResponse} - */ -proto.poolrpc.BatchSnapshotResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.poolrpc.BatchSnapshotResponse; - return proto.poolrpc.BatchSnapshotResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.poolrpc.BatchSnapshotResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.poolrpc.BatchSnapshotResponse} - */ -proto.poolrpc.BatchSnapshotResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readUint32()); - msg.setVersion(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setBatchId(value); - break; - case 3: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setPrevBatchId(value); - break; - case 4: - var value = /** @type {number} */ (reader.readUint32()); - msg.setClearingPriceRate(value); - break; - case 5: - var value = new proto.poolrpc.MatchedOrderSnapshot; - reader.readMessage(value,proto.poolrpc.MatchedOrderSnapshot.deserializeBinaryFromReader); - msg.addMatchedOrders(value); - break; - case 7: - var value = /** @type {string} */ (reader.readString()); - msg.setBatchTxId(value); - break; - case 6: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setBatchTx(value); - break; - case 8: - var value = /** @type {number} */ (reader.readUint64()); - msg.setBatchTxFeeRateSatPerKw(value); - break; - case 9: - var value = /** @type {number} */ (reader.readUint64()); - msg.setCreationTimestampNs(value); - break; - case 10: - var value = msg.getMatchedMarketsMap(); - reader.readMessage(value, function(message, reader) { - jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readUint32, jspb.BinaryReader.prototype.readMessage, proto.poolrpc.MatchedMarketSnapshot.deserializeBinaryFromReader, 0, new proto.poolrpc.MatchedMarketSnapshot()); - }); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.poolrpc.BatchSnapshotResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.poolrpc.BatchSnapshotResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.poolrpc.BatchSnapshotResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.BatchSnapshotResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getVersion(); - if (f !== 0) { - writer.writeUint32( - 1, - f - ); - } - f = message.getBatchId_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } - f = message.getPrevBatchId_asU8(); - if (f.length > 0) { - writer.writeBytes( - 3, - f - ); - } - f = message.getClearingPriceRate(); - if (f !== 0) { - writer.writeUint32( - 4, - f - ); - } - f = message.getMatchedOrdersList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 5, - f, - proto.poolrpc.MatchedOrderSnapshot.serializeBinaryToWriter - ); - } - f = message.getBatchTxId(); - if (f.length > 0) { - writer.writeString( - 7, - f - ); - } - f = message.getBatchTx_asU8(); - if (f.length > 0) { - writer.writeBytes( - 6, - f - ); - } - f = message.getBatchTxFeeRateSatPerKw(); - if (f !== 0) { - writer.writeUint64( - 8, - f - ); - } - f = message.getCreationTimestampNs(); - if (f !== 0) { - writer.writeUint64( - 9, - f - ); - } - f = message.getMatchedMarketsMap(true); - if (f && f.getLength() > 0) { - f.serializeBinary(10, writer, jspb.BinaryWriter.prototype.writeUint32, jspb.BinaryWriter.prototype.writeMessage, proto.poolrpc.MatchedMarketSnapshot.serializeBinaryToWriter); - } -}; - - -/** - * optional uint32 version = 1; - * @return {number} - */ -proto.poolrpc.BatchSnapshotResponse.prototype.getVersion = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.poolrpc.BatchSnapshotResponse} returns this - */ -proto.poolrpc.BatchSnapshotResponse.prototype.setVersion = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); -}; - - -/** - * optional bytes batch_id = 2; - * @return {!(string|Uint8Array)} - */ -proto.poolrpc.BatchSnapshotResponse.prototype.getBatchId = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes batch_id = 2; - * This is a type-conversion wrapper around `getBatchId()` - * @return {string} - */ -proto.poolrpc.BatchSnapshotResponse.prototype.getBatchId_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getBatchId())); -}; - - -/** - * optional bytes batch_id = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getBatchId()` - * @return {!Uint8Array} - */ -proto.poolrpc.BatchSnapshotResponse.prototype.getBatchId_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getBatchId())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.poolrpc.BatchSnapshotResponse} returns this - */ -proto.poolrpc.BatchSnapshotResponse.prototype.setBatchId = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); -}; - - -/** - * optional bytes prev_batch_id = 3; - * @return {!(string|Uint8Array)} - */ -proto.poolrpc.BatchSnapshotResponse.prototype.getPrevBatchId = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * optional bytes prev_batch_id = 3; - * This is a type-conversion wrapper around `getPrevBatchId()` - * @return {string} - */ -proto.poolrpc.BatchSnapshotResponse.prototype.getPrevBatchId_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getPrevBatchId())); -}; - - -/** - * optional bytes prev_batch_id = 3; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getPrevBatchId()` - * @return {!Uint8Array} - */ -proto.poolrpc.BatchSnapshotResponse.prototype.getPrevBatchId_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getPrevBatchId())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.poolrpc.BatchSnapshotResponse} returns this - */ -proto.poolrpc.BatchSnapshotResponse.prototype.setPrevBatchId = function(value) { - return jspb.Message.setProto3BytesField(this, 3, value); -}; - - -/** - * optional uint32 clearing_price_rate = 4; - * @return {number} - */ -proto.poolrpc.BatchSnapshotResponse.prototype.getClearingPriceRate = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.poolrpc.BatchSnapshotResponse} returns this - */ -proto.poolrpc.BatchSnapshotResponse.prototype.setClearingPriceRate = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); -}; - - -/** - * repeated MatchedOrderSnapshot matched_orders = 5; - * @return {!Array} - */ -proto.poolrpc.BatchSnapshotResponse.prototype.getMatchedOrdersList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.poolrpc.MatchedOrderSnapshot, 5)); -}; - - -/** - * @param {!Array} value - * @return {!proto.poolrpc.BatchSnapshotResponse} returns this -*/ -proto.poolrpc.BatchSnapshotResponse.prototype.setMatchedOrdersList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 5, value); -}; - - -/** - * @param {!proto.poolrpc.MatchedOrderSnapshot=} opt_value - * @param {number=} opt_index - * @return {!proto.poolrpc.MatchedOrderSnapshot} - */ -proto.poolrpc.BatchSnapshotResponse.prototype.addMatchedOrders = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 5, opt_value, proto.poolrpc.MatchedOrderSnapshot, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.poolrpc.BatchSnapshotResponse} returns this - */ -proto.poolrpc.BatchSnapshotResponse.prototype.clearMatchedOrdersList = function() { - return this.setMatchedOrdersList([]); -}; - - -/** - * optional string batch_tx_id = 7; - * @return {string} - */ -proto.poolrpc.BatchSnapshotResponse.prototype.getBatchTxId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); -}; - - -/** - * @param {string} value - * @return {!proto.poolrpc.BatchSnapshotResponse} returns this - */ -proto.poolrpc.BatchSnapshotResponse.prototype.setBatchTxId = function(value) { - return jspb.Message.setProto3StringField(this, 7, value); -}; - - -/** - * optional bytes batch_tx = 6; - * @return {!(string|Uint8Array)} - */ -proto.poolrpc.BatchSnapshotResponse.prototype.getBatchTx = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 6, "")); -}; - - -/** - * optional bytes batch_tx = 6; - * This is a type-conversion wrapper around `getBatchTx()` - * @return {string} - */ -proto.poolrpc.BatchSnapshotResponse.prototype.getBatchTx_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getBatchTx())); -}; - - -/** - * optional bytes batch_tx = 6; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getBatchTx()` - * @return {!Uint8Array} - */ -proto.poolrpc.BatchSnapshotResponse.prototype.getBatchTx_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getBatchTx())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.poolrpc.BatchSnapshotResponse} returns this - */ -proto.poolrpc.BatchSnapshotResponse.prototype.setBatchTx = function(value) { - return jspb.Message.setProto3BytesField(this, 6, value); -}; - - -/** - * optional uint64 batch_tx_fee_rate_sat_per_kw = 8; - * @return {number} - */ -proto.poolrpc.BatchSnapshotResponse.prototype.getBatchTxFeeRateSatPerKw = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.poolrpc.BatchSnapshotResponse} returns this - */ -proto.poolrpc.BatchSnapshotResponse.prototype.setBatchTxFeeRateSatPerKw = function(value) { - return jspb.Message.setProto3IntField(this, 8, value); -}; - - -/** - * optional uint64 creation_timestamp_ns = 9; - * @return {number} - */ -proto.poolrpc.BatchSnapshotResponse.prototype.getCreationTimestampNs = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.poolrpc.BatchSnapshotResponse} returns this - */ -proto.poolrpc.BatchSnapshotResponse.prototype.setCreationTimestampNs = function(value) { - return jspb.Message.setProto3IntField(this, 9, value); -}; - - -/** - * map matched_markets = 10; - * @param {boolean=} opt_noLazyCreate Do not create the map if - * empty, instead returning `undefined` - * @return {!jspb.Map} - */ -proto.poolrpc.BatchSnapshotResponse.prototype.getMatchedMarketsMap = function(opt_noLazyCreate) { - return /** @type {!jspb.Map} */ ( - jspb.Message.getMapField(this, 10, opt_noLazyCreate, - proto.poolrpc.MatchedMarketSnapshot)); -}; - - -/** - * Clears values from the map. The map will be non-null. - * @return {!proto.poolrpc.BatchSnapshotResponse} returns this - */ -proto.poolrpc.BatchSnapshotResponse.prototype.clearMatchedMarketsMap = function() { - this.getMatchedMarketsMap().clear(); - return this;}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.poolrpc.ServerNodeRatingRequest.repeatedFields_ = [1]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.poolrpc.ServerNodeRatingRequest.prototype.toObject = function(opt_includeInstance) { - return proto.poolrpc.ServerNodeRatingRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.poolrpc.ServerNodeRatingRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.ServerNodeRatingRequest.toObject = function(includeInstance, msg) { - var f, obj = { - nodePubkeysList: msg.getNodePubkeysList_asB64() - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.poolrpc.ServerNodeRatingRequest} - */ -proto.poolrpc.ServerNodeRatingRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.poolrpc.ServerNodeRatingRequest; - return proto.poolrpc.ServerNodeRatingRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.poolrpc.ServerNodeRatingRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.poolrpc.ServerNodeRatingRequest} - */ -proto.poolrpc.ServerNodeRatingRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.addNodePubkeys(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.poolrpc.ServerNodeRatingRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.poolrpc.ServerNodeRatingRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.poolrpc.ServerNodeRatingRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.ServerNodeRatingRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getNodePubkeysList_asU8(); - if (f.length > 0) { - writer.writeRepeatedBytes( - 1, - f - ); - } -}; - - -/** - * repeated bytes node_pubkeys = 1; - * @return {!(Array|Array)} - */ -proto.poolrpc.ServerNodeRatingRequest.prototype.getNodePubkeysList = function() { - return /** @type {!(Array|Array)} */ (jspb.Message.getRepeatedField(this, 1)); -}; - - -/** - * repeated bytes node_pubkeys = 1; - * This is a type-conversion wrapper around `getNodePubkeysList()` - * @return {!Array} - */ -proto.poolrpc.ServerNodeRatingRequest.prototype.getNodePubkeysList_asB64 = function() { - return /** @type {!Array} */ (jspb.Message.bytesListAsB64( - this.getNodePubkeysList())); -}; - - -/** - * repeated bytes node_pubkeys = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getNodePubkeysList()` - * @return {!Array} - */ -proto.poolrpc.ServerNodeRatingRequest.prototype.getNodePubkeysList_asU8 = function() { - return /** @type {!Array} */ (jspb.Message.bytesListAsU8( - this.getNodePubkeysList())); -}; - - -/** - * @param {!(Array|Array)} value - * @return {!proto.poolrpc.ServerNodeRatingRequest} returns this - */ -proto.poolrpc.ServerNodeRatingRequest.prototype.setNodePubkeysList = function(value) { - return jspb.Message.setField(this, 1, value || []); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @param {number=} opt_index - * @return {!proto.poolrpc.ServerNodeRatingRequest} returns this - */ -proto.poolrpc.ServerNodeRatingRequest.prototype.addNodePubkeys = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 1, value, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.poolrpc.ServerNodeRatingRequest} returns this - */ -proto.poolrpc.ServerNodeRatingRequest.prototype.clearNodePubkeysList = function() { - return this.setNodePubkeysList([]); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.poolrpc.NodeRating.prototype.toObject = function(opt_includeInstance) { - return proto.poolrpc.NodeRating.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.poolrpc.NodeRating} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.NodeRating.toObject = function(includeInstance, msg) { - var f, obj = { - nodePubkey: msg.getNodePubkey_asB64(), - nodeTier: jspb.Message.getFieldWithDefault(msg, 2, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.poolrpc.NodeRating} - */ -proto.poolrpc.NodeRating.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.poolrpc.NodeRating; - return proto.poolrpc.NodeRating.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.poolrpc.NodeRating} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.poolrpc.NodeRating} - */ -proto.poolrpc.NodeRating.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setNodePubkey(value); - break; - case 2: - var value = /** @type {!proto.poolrpc.NodeTier} */ (reader.readEnum()); - msg.setNodeTier(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.poolrpc.NodeRating.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.poolrpc.NodeRating.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.poolrpc.NodeRating} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.NodeRating.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getNodePubkey_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getNodeTier(); - if (f !== 0.0) { - writer.writeEnum( - 2, - f - ); - } -}; - - -/** - * optional bytes node_pubkey = 1; - * @return {!(string|Uint8Array)} - */ -proto.poolrpc.NodeRating.prototype.getNodePubkey = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes node_pubkey = 1; - * This is a type-conversion wrapper around `getNodePubkey()` - * @return {string} - */ -proto.poolrpc.NodeRating.prototype.getNodePubkey_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getNodePubkey())); -}; - - -/** - * optional bytes node_pubkey = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getNodePubkey()` - * @return {!Uint8Array} - */ -proto.poolrpc.NodeRating.prototype.getNodePubkey_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getNodePubkey())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.poolrpc.NodeRating} returns this - */ -proto.poolrpc.NodeRating.prototype.setNodePubkey = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional NodeTier node_tier = 2; - * @return {!proto.poolrpc.NodeTier} - */ -proto.poolrpc.NodeRating.prototype.getNodeTier = function() { - return /** @type {!proto.poolrpc.NodeTier} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {!proto.poolrpc.NodeTier} value - * @return {!proto.poolrpc.NodeRating} returns this - */ -proto.poolrpc.NodeRating.prototype.setNodeTier = function(value) { - return jspb.Message.setProto3EnumField(this, 2, value); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.poolrpc.ServerNodeRatingResponse.repeatedFields_ = [1]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.poolrpc.ServerNodeRatingResponse.prototype.toObject = function(opt_includeInstance) { - return proto.poolrpc.ServerNodeRatingResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.poolrpc.ServerNodeRatingResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.ServerNodeRatingResponse.toObject = function(includeInstance, msg) { - var f, obj = { - nodeRatingsList: jspb.Message.toObjectList(msg.getNodeRatingsList(), - proto.poolrpc.NodeRating.toObject, includeInstance) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.poolrpc.ServerNodeRatingResponse} - */ -proto.poolrpc.ServerNodeRatingResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.poolrpc.ServerNodeRatingResponse; - return proto.poolrpc.ServerNodeRatingResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.poolrpc.ServerNodeRatingResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.poolrpc.ServerNodeRatingResponse} - */ -proto.poolrpc.ServerNodeRatingResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.poolrpc.NodeRating; - reader.readMessage(value,proto.poolrpc.NodeRating.deserializeBinaryFromReader); - msg.addNodeRatings(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.poolrpc.ServerNodeRatingResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.poolrpc.ServerNodeRatingResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.poolrpc.ServerNodeRatingResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.ServerNodeRatingResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getNodeRatingsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 1, - f, - proto.poolrpc.NodeRating.serializeBinaryToWriter - ); - } -}; - - -/** - * repeated NodeRating node_ratings = 1; - * @return {!Array} - */ -proto.poolrpc.ServerNodeRatingResponse.prototype.getNodeRatingsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.poolrpc.NodeRating, 1)); -}; - - -/** - * @param {!Array} value - * @return {!proto.poolrpc.ServerNodeRatingResponse} returns this -*/ -proto.poolrpc.ServerNodeRatingResponse.prototype.setNodeRatingsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); -}; - - -/** - * @param {!proto.poolrpc.NodeRating=} opt_value - * @param {number=} opt_index - * @return {!proto.poolrpc.NodeRating} - */ -proto.poolrpc.ServerNodeRatingResponse.prototype.addNodeRatings = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.poolrpc.NodeRating, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.poolrpc.ServerNodeRatingResponse} returns this - */ -proto.poolrpc.ServerNodeRatingResponse.prototype.clearNodeRatingsList = function() { - return this.setNodeRatingsList([]); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.poolrpc.BatchSnapshotsRequest.prototype.toObject = function(opt_includeInstance) { - return proto.poolrpc.BatchSnapshotsRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.poolrpc.BatchSnapshotsRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.BatchSnapshotsRequest.toObject = function(includeInstance, msg) { - var f, obj = { - startBatchId: msg.getStartBatchId_asB64(), - numBatchesBack: jspb.Message.getFieldWithDefault(msg, 2, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.poolrpc.BatchSnapshotsRequest} - */ -proto.poolrpc.BatchSnapshotsRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.poolrpc.BatchSnapshotsRequest; - return proto.poolrpc.BatchSnapshotsRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.poolrpc.BatchSnapshotsRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.poolrpc.BatchSnapshotsRequest} - */ -proto.poolrpc.BatchSnapshotsRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setStartBatchId(value); - break; - case 2: - var value = /** @type {number} */ (reader.readUint32()); - msg.setNumBatchesBack(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.poolrpc.BatchSnapshotsRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.poolrpc.BatchSnapshotsRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.poolrpc.BatchSnapshotsRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.BatchSnapshotsRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getStartBatchId_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getNumBatchesBack(); - if (f !== 0) { - writer.writeUint32( - 2, - f - ); - } -}; - - -/** - * optional bytes start_batch_id = 1; - * @return {!(string|Uint8Array)} - */ -proto.poolrpc.BatchSnapshotsRequest.prototype.getStartBatchId = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes start_batch_id = 1; - * This is a type-conversion wrapper around `getStartBatchId()` - * @return {string} - */ -proto.poolrpc.BatchSnapshotsRequest.prototype.getStartBatchId_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getStartBatchId())); -}; - - -/** - * optional bytes start_batch_id = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getStartBatchId()` - * @return {!Uint8Array} - */ -proto.poolrpc.BatchSnapshotsRequest.prototype.getStartBatchId_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getStartBatchId())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.poolrpc.BatchSnapshotsRequest} returns this - */ -proto.poolrpc.BatchSnapshotsRequest.prototype.setStartBatchId = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional uint32 num_batches_back = 2; - * @return {number} - */ -proto.poolrpc.BatchSnapshotsRequest.prototype.getNumBatchesBack = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.poolrpc.BatchSnapshotsRequest} returns this - */ -proto.poolrpc.BatchSnapshotsRequest.prototype.setNumBatchesBack = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.poolrpc.BatchSnapshotsResponse.repeatedFields_ = [1]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.poolrpc.BatchSnapshotsResponse.prototype.toObject = function(opt_includeInstance) { - return proto.poolrpc.BatchSnapshotsResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.poolrpc.BatchSnapshotsResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.BatchSnapshotsResponse.toObject = function(includeInstance, msg) { - var f, obj = { - batchesList: jspb.Message.toObjectList(msg.getBatchesList(), - proto.poolrpc.BatchSnapshotResponse.toObject, includeInstance) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.poolrpc.BatchSnapshotsResponse} - */ -proto.poolrpc.BatchSnapshotsResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.poolrpc.BatchSnapshotsResponse; - return proto.poolrpc.BatchSnapshotsResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.poolrpc.BatchSnapshotsResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.poolrpc.BatchSnapshotsResponse} - */ -proto.poolrpc.BatchSnapshotsResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.poolrpc.BatchSnapshotResponse; - reader.readMessage(value,proto.poolrpc.BatchSnapshotResponse.deserializeBinaryFromReader); - msg.addBatches(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.poolrpc.BatchSnapshotsResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.poolrpc.BatchSnapshotsResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.poolrpc.BatchSnapshotsResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.BatchSnapshotsResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getBatchesList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 1, - f, - proto.poolrpc.BatchSnapshotResponse.serializeBinaryToWriter - ); - } -}; - - -/** - * repeated BatchSnapshotResponse batches = 1; - * @return {!Array} - */ -proto.poolrpc.BatchSnapshotsResponse.prototype.getBatchesList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.poolrpc.BatchSnapshotResponse, 1)); -}; - - -/** - * @param {!Array} value - * @return {!proto.poolrpc.BatchSnapshotsResponse} returns this -*/ -proto.poolrpc.BatchSnapshotsResponse.prototype.setBatchesList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); -}; - - -/** - * @param {!proto.poolrpc.BatchSnapshotResponse=} opt_value - * @param {number=} opt_index - * @return {!proto.poolrpc.BatchSnapshotResponse} - */ -proto.poolrpc.BatchSnapshotsResponse.prototype.addBatches = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.poolrpc.BatchSnapshotResponse, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.poolrpc.BatchSnapshotsResponse} returns this - */ -proto.poolrpc.BatchSnapshotsResponse.prototype.clearBatchesList = function() { - return this.setBatchesList([]); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.poolrpc.MarketInfoRequest.prototype.toObject = function(opt_includeInstance) { - return proto.poolrpc.MarketInfoRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.poolrpc.MarketInfoRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.MarketInfoRequest.toObject = function(includeInstance, msg) { - var f, obj = { - - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.poolrpc.MarketInfoRequest} - */ -proto.poolrpc.MarketInfoRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.poolrpc.MarketInfoRequest; - return proto.poolrpc.MarketInfoRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.poolrpc.MarketInfoRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.poolrpc.MarketInfoRequest} - */ -proto.poolrpc.MarketInfoRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.poolrpc.MarketInfoRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.poolrpc.MarketInfoRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.poolrpc.MarketInfoRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.MarketInfoRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.poolrpc.MarketInfo.repeatedFields_ = [1,2,3,4]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.poolrpc.MarketInfo.prototype.toObject = function(opt_includeInstance) { - return proto.poolrpc.MarketInfo.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.poolrpc.MarketInfo} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.MarketInfo.toObject = function(includeInstance, msg) { - var f, obj = { - numAsksList: jspb.Message.toObjectList(msg.getNumAsksList(), - proto.poolrpc.MarketInfo.TierValue.toObject, includeInstance), - numBidsList: jspb.Message.toObjectList(msg.getNumBidsList(), - proto.poolrpc.MarketInfo.TierValue.toObject, includeInstance), - askOpenInterestUnitsList: jspb.Message.toObjectList(msg.getAskOpenInterestUnitsList(), - proto.poolrpc.MarketInfo.TierValue.toObject, includeInstance), - bidOpenInterestUnitsList: jspb.Message.toObjectList(msg.getBidOpenInterestUnitsList(), - proto.poolrpc.MarketInfo.TierValue.toObject, includeInstance) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.poolrpc.MarketInfo} - */ -proto.poolrpc.MarketInfo.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.poolrpc.MarketInfo; - return proto.poolrpc.MarketInfo.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.poolrpc.MarketInfo} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.poolrpc.MarketInfo} - */ -proto.poolrpc.MarketInfo.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.poolrpc.MarketInfo.TierValue; - reader.readMessage(value,proto.poolrpc.MarketInfo.TierValue.deserializeBinaryFromReader); - msg.addNumAsks(value); - break; - case 2: - var value = new proto.poolrpc.MarketInfo.TierValue; - reader.readMessage(value,proto.poolrpc.MarketInfo.TierValue.deserializeBinaryFromReader); - msg.addNumBids(value); - break; - case 3: - var value = new proto.poolrpc.MarketInfo.TierValue; - reader.readMessage(value,proto.poolrpc.MarketInfo.TierValue.deserializeBinaryFromReader); - msg.addAskOpenInterestUnits(value); - break; - case 4: - var value = new proto.poolrpc.MarketInfo.TierValue; - reader.readMessage(value,proto.poolrpc.MarketInfo.TierValue.deserializeBinaryFromReader); - msg.addBidOpenInterestUnits(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.poolrpc.MarketInfo.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.poolrpc.MarketInfo.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.poolrpc.MarketInfo} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.MarketInfo.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getNumAsksList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 1, - f, - proto.poolrpc.MarketInfo.TierValue.serializeBinaryToWriter - ); - } - f = message.getNumBidsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 2, - f, - proto.poolrpc.MarketInfo.TierValue.serializeBinaryToWriter - ); - } - f = message.getAskOpenInterestUnitsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 3, - f, - proto.poolrpc.MarketInfo.TierValue.serializeBinaryToWriter - ); - } - f = message.getBidOpenInterestUnitsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 4, - f, - proto.poolrpc.MarketInfo.TierValue.serializeBinaryToWriter - ); - } -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.poolrpc.MarketInfo.TierValue.prototype.toObject = function(opt_includeInstance) { - return proto.poolrpc.MarketInfo.TierValue.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.poolrpc.MarketInfo.TierValue} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.MarketInfo.TierValue.toObject = function(includeInstance, msg) { - var f, obj = { - tier: jspb.Message.getFieldWithDefault(msg, 1, 0), - value: jspb.Message.getFieldWithDefault(msg, 2, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.poolrpc.MarketInfo.TierValue} - */ -proto.poolrpc.MarketInfo.TierValue.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.poolrpc.MarketInfo.TierValue; - return proto.poolrpc.MarketInfo.TierValue.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.poolrpc.MarketInfo.TierValue} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.poolrpc.MarketInfo.TierValue} - */ -proto.poolrpc.MarketInfo.TierValue.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!proto.poolrpc.NodeTier} */ (reader.readEnum()); - msg.setTier(value); - break; - case 2: - var value = /** @type {number} */ (reader.readUint32()); - msg.setValue(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.poolrpc.MarketInfo.TierValue.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.poolrpc.MarketInfo.TierValue.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.poolrpc.MarketInfo.TierValue} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.MarketInfo.TierValue.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getTier(); - if (f !== 0.0) { - writer.writeEnum( - 1, - f - ); - } - f = message.getValue(); - if (f !== 0) { - writer.writeUint32( - 2, - f - ); - } -}; - - -/** - * optional NodeTier tier = 1; - * @return {!proto.poolrpc.NodeTier} - */ -proto.poolrpc.MarketInfo.TierValue.prototype.getTier = function() { - return /** @type {!proto.poolrpc.NodeTier} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {!proto.poolrpc.NodeTier} value - * @return {!proto.poolrpc.MarketInfo.TierValue} returns this - */ -proto.poolrpc.MarketInfo.TierValue.prototype.setTier = function(value) { - return jspb.Message.setProto3EnumField(this, 1, value); -}; - - -/** - * optional uint32 value = 2; - * @return {number} - */ -proto.poolrpc.MarketInfo.TierValue.prototype.getValue = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.poolrpc.MarketInfo.TierValue} returns this - */ -proto.poolrpc.MarketInfo.TierValue.prototype.setValue = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * repeated TierValue num_asks = 1; - * @return {!Array} - */ -proto.poolrpc.MarketInfo.prototype.getNumAsksList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.poolrpc.MarketInfo.TierValue, 1)); -}; - - -/** - * @param {!Array} value - * @return {!proto.poolrpc.MarketInfo} returns this -*/ -proto.poolrpc.MarketInfo.prototype.setNumAsksList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); -}; - - -/** - * @param {!proto.poolrpc.MarketInfo.TierValue=} opt_value - * @param {number=} opt_index - * @return {!proto.poolrpc.MarketInfo.TierValue} - */ -proto.poolrpc.MarketInfo.prototype.addNumAsks = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.poolrpc.MarketInfo.TierValue, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.poolrpc.MarketInfo} returns this - */ -proto.poolrpc.MarketInfo.prototype.clearNumAsksList = function() { - return this.setNumAsksList([]); -}; - - -/** - * repeated TierValue num_bids = 2; - * @return {!Array} - */ -proto.poolrpc.MarketInfo.prototype.getNumBidsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.poolrpc.MarketInfo.TierValue, 2)); -}; - - -/** - * @param {!Array} value - * @return {!proto.poolrpc.MarketInfo} returns this -*/ -proto.poolrpc.MarketInfo.prototype.setNumBidsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 2, value); -}; - - -/** - * @param {!proto.poolrpc.MarketInfo.TierValue=} opt_value - * @param {number=} opt_index - * @return {!proto.poolrpc.MarketInfo.TierValue} - */ -proto.poolrpc.MarketInfo.prototype.addNumBids = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.poolrpc.MarketInfo.TierValue, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.poolrpc.MarketInfo} returns this - */ -proto.poolrpc.MarketInfo.prototype.clearNumBidsList = function() { - return this.setNumBidsList([]); -}; - - -/** - * repeated TierValue ask_open_interest_units = 3; - * @return {!Array} - */ -proto.poolrpc.MarketInfo.prototype.getAskOpenInterestUnitsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.poolrpc.MarketInfo.TierValue, 3)); -}; - - -/** - * @param {!Array} value - * @return {!proto.poolrpc.MarketInfo} returns this -*/ -proto.poolrpc.MarketInfo.prototype.setAskOpenInterestUnitsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 3, value); -}; - - -/** - * @param {!proto.poolrpc.MarketInfo.TierValue=} opt_value - * @param {number=} opt_index - * @return {!proto.poolrpc.MarketInfo.TierValue} - */ -proto.poolrpc.MarketInfo.prototype.addAskOpenInterestUnits = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.poolrpc.MarketInfo.TierValue, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.poolrpc.MarketInfo} returns this - */ -proto.poolrpc.MarketInfo.prototype.clearAskOpenInterestUnitsList = function() { - return this.setAskOpenInterestUnitsList([]); -}; - - -/** - * repeated TierValue bid_open_interest_units = 4; - * @return {!Array} - */ -proto.poolrpc.MarketInfo.prototype.getBidOpenInterestUnitsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.poolrpc.MarketInfo.TierValue, 4)); -}; - - -/** - * @param {!Array} value - * @return {!proto.poolrpc.MarketInfo} returns this -*/ -proto.poolrpc.MarketInfo.prototype.setBidOpenInterestUnitsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 4, value); -}; - - -/** - * @param {!proto.poolrpc.MarketInfo.TierValue=} opt_value - * @param {number=} opt_index - * @return {!proto.poolrpc.MarketInfo.TierValue} - */ -proto.poolrpc.MarketInfo.prototype.addBidOpenInterestUnits = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 4, opt_value, proto.poolrpc.MarketInfo.TierValue, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.poolrpc.MarketInfo} returns this - */ -proto.poolrpc.MarketInfo.prototype.clearBidOpenInterestUnitsList = function() { - return this.setBidOpenInterestUnitsList([]); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.poolrpc.MarketInfoResponse.prototype.toObject = function(opt_includeInstance) { - return proto.poolrpc.MarketInfoResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.poolrpc.MarketInfoResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.MarketInfoResponse.toObject = function(includeInstance, msg) { - var f, obj = { - marketsMap: (f = msg.getMarketsMap()) ? f.toObject(includeInstance, proto.poolrpc.MarketInfo.toObject) : [] - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.poolrpc.MarketInfoResponse} - */ -proto.poolrpc.MarketInfoResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.poolrpc.MarketInfoResponse; - return proto.poolrpc.MarketInfoResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.poolrpc.MarketInfoResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.poolrpc.MarketInfoResponse} - */ -proto.poolrpc.MarketInfoResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = msg.getMarketsMap(); - reader.readMessage(value, function(message, reader) { - jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readUint32, jspb.BinaryReader.prototype.readMessage, proto.poolrpc.MarketInfo.deserializeBinaryFromReader, 0, new proto.poolrpc.MarketInfo()); - }); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.poolrpc.MarketInfoResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.poolrpc.MarketInfoResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.poolrpc.MarketInfoResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.MarketInfoResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getMarketsMap(true); - if (f && f.getLength() > 0) { - f.serializeBinary(1, writer, jspb.BinaryWriter.prototype.writeUint32, jspb.BinaryWriter.prototype.writeMessage, proto.poolrpc.MarketInfo.serializeBinaryToWriter); - } -}; - - -/** - * map markets = 1; - * @param {boolean=} opt_noLazyCreate Do not create the map if - * empty, instead returning `undefined` - * @return {!jspb.Map} - */ -proto.poolrpc.MarketInfoResponse.prototype.getMarketsMap = function(opt_noLazyCreate) { - return /** @type {!jspb.Map} */ ( - jspb.Message.getMapField(this, 1, opt_noLazyCreate, - proto.poolrpc.MarketInfo)); -}; - - -/** - * Clears values from the map. The map will be non-null. - * @return {!proto.poolrpc.MarketInfoResponse} returns this - */ -proto.poolrpc.MarketInfoResponse.prototype.clearMarketsMap = function() { - this.getMarketsMap().clear(); - return this;}; - - -/** - * @enum {number} - */ -proto.poolrpc.ChannelType = { - TWEAKLESS: 0, - ANCHORS: 1, - SCRIPT_ENFORCED_LEASE: 2 -}; - -/** - * @enum {number} - */ -proto.poolrpc.AuctionAccountState = { - STATE_PENDING_OPEN: 0, - STATE_OPEN: 1, - STATE_EXPIRED: 2, - STATE_PENDING_UPDATE: 3, - STATE_CLOSED: 4, - STATE_PENDING_BATCH: 5 -}; - -/** - * @enum {number} - */ -proto.poolrpc.OrderChannelType = { - ORDER_CHANNEL_TYPE_UNKNOWN: 0, - ORDER_CHANNEL_TYPE_PEER_DEPENDENT: 1, - ORDER_CHANNEL_TYPE_SCRIPT_ENFORCED: 2 -}; - -/** - * @enum {number} - */ -proto.poolrpc.NodeTier = { - TIER_DEFAULT: 0, - TIER_0: 1, - TIER_1: 2 -}; - -/** - * @enum {number} - */ -proto.poolrpc.OrderState = { - ORDER_SUBMITTED: 0, - ORDER_CLEARED: 1, - ORDER_PARTIALLY_FILLED: 2, - ORDER_EXECUTED: 3, - ORDER_CANCELED: 4, - ORDER_EXPIRED: 5, - ORDER_FAILED: 6 -}; - -/** - * @enum {number} - */ -proto.poolrpc.DurationBucketState = { - NO_MARKET: 0, - MARKET_CLOSED: 1, - ACCEPTING_ORDERS: 2, - MARKET_OPEN: 3 -}; - -goog.object.extend(exports, proto.poolrpc); diff --git a/lib/types/generated/auctioneerrpc/auctioneer_pb_service.d.ts b/lib/types/generated/auctioneerrpc/auctioneer_pb_service.d.ts deleted file mode 100644 index 9b08239..0000000 --- a/lib/types/generated/auctioneerrpc/auctioneer_pb_service.d.ts +++ /dev/null @@ -1,294 +0,0 @@ -// package: poolrpc -// file: auctioneerrpc/auctioneer.proto - -import * as auctioneerrpc_auctioneer_pb from "../auctioneerrpc/auctioneer_pb"; -import {grpc} from "@improbable-eng/grpc-web"; - -type ChannelAuctioneerReserveAccount = { - readonly methodName: string; - readonly service: typeof ChannelAuctioneer; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof auctioneerrpc_auctioneer_pb.ReserveAccountRequest; - readonly responseType: typeof auctioneerrpc_auctioneer_pb.ReserveAccountResponse; -}; - -type ChannelAuctioneerInitAccount = { - readonly methodName: string; - readonly service: typeof ChannelAuctioneer; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof auctioneerrpc_auctioneer_pb.ServerInitAccountRequest; - readonly responseType: typeof auctioneerrpc_auctioneer_pb.ServerInitAccountResponse; -}; - -type ChannelAuctioneerModifyAccount = { - readonly methodName: string; - readonly service: typeof ChannelAuctioneer; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof auctioneerrpc_auctioneer_pb.ServerModifyAccountRequest; - readonly responseType: typeof auctioneerrpc_auctioneer_pb.ServerModifyAccountResponse; -}; - -type ChannelAuctioneerSubmitOrder = { - readonly methodName: string; - readonly service: typeof ChannelAuctioneer; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof auctioneerrpc_auctioneer_pb.ServerSubmitOrderRequest; - readonly responseType: typeof auctioneerrpc_auctioneer_pb.ServerSubmitOrderResponse; -}; - -type ChannelAuctioneerCancelOrder = { - readonly methodName: string; - readonly service: typeof ChannelAuctioneer; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof auctioneerrpc_auctioneer_pb.ServerCancelOrderRequest; - readonly responseType: typeof auctioneerrpc_auctioneer_pb.ServerCancelOrderResponse; -}; - -type ChannelAuctioneerOrderState = { - readonly methodName: string; - readonly service: typeof ChannelAuctioneer; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof auctioneerrpc_auctioneer_pb.ServerOrderStateRequest; - readonly responseType: typeof auctioneerrpc_auctioneer_pb.ServerOrderStateResponse; -}; - -type ChannelAuctioneerSubscribeBatchAuction = { - readonly methodName: string; - readonly service: typeof ChannelAuctioneer; - readonly requestStream: true; - readonly responseStream: true; - readonly requestType: typeof auctioneerrpc_auctioneer_pb.ClientAuctionMessage; - readonly responseType: typeof auctioneerrpc_auctioneer_pb.ServerAuctionMessage; -}; - -type ChannelAuctioneerSubscribeSidecar = { - readonly methodName: string; - readonly service: typeof ChannelAuctioneer; - readonly requestStream: true; - readonly responseStream: true; - readonly requestType: typeof auctioneerrpc_auctioneer_pb.ClientAuctionMessage; - readonly responseType: typeof auctioneerrpc_auctioneer_pb.ServerAuctionMessage; -}; - -type ChannelAuctioneerTerms = { - readonly methodName: string; - readonly service: typeof ChannelAuctioneer; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof auctioneerrpc_auctioneer_pb.TermsRequest; - readonly responseType: typeof auctioneerrpc_auctioneer_pb.TermsResponse; -}; - -type ChannelAuctioneerRelevantBatchSnapshot = { - readonly methodName: string; - readonly service: typeof ChannelAuctioneer; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof auctioneerrpc_auctioneer_pb.RelevantBatchRequest; - readonly responseType: typeof auctioneerrpc_auctioneer_pb.RelevantBatch; -}; - -type ChannelAuctioneerBatchSnapshot = { - readonly methodName: string; - readonly service: typeof ChannelAuctioneer; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof auctioneerrpc_auctioneer_pb.BatchSnapshotRequest; - readonly responseType: typeof auctioneerrpc_auctioneer_pb.BatchSnapshotResponse; -}; - -type ChannelAuctioneerNodeRating = { - readonly methodName: string; - readonly service: typeof ChannelAuctioneer; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof auctioneerrpc_auctioneer_pb.ServerNodeRatingRequest; - readonly responseType: typeof auctioneerrpc_auctioneer_pb.ServerNodeRatingResponse; -}; - -type ChannelAuctioneerBatchSnapshots = { - readonly methodName: string; - readonly service: typeof ChannelAuctioneer; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof auctioneerrpc_auctioneer_pb.BatchSnapshotsRequest; - readonly responseType: typeof auctioneerrpc_auctioneer_pb.BatchSnapshotsResponse; -}; - -type ChannelAuctioneerMarketInfo = { - readonly methodName: string; - readonly service: typeof ChannelAuctioneer; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof auctioneerrpc_auctioneer_pb.MarketInfoRequest; - readonly responseType: typeof auctioneerrpc_auctioneer_pb.MarketInfoResponse; -}; - -export class ChannelAuctioneer { - static readonly serviceName: string; - static readonly ReserveAccount: ChannelAuctioneerReserveAccount; - static readonly InitAccount: ChannelAuctioneerInitAccount; - static readonly ModifyAccount: ChannelAuctioneerModifyAccount; - static readonly SubmitOrder: ChannelAuctioneerSubmitOrder; - static readonly CancelOrder: ChannelAuctioneerCancelOrder; - static readonly OrderState: ChannelAuctioneerOrderState; - static readonly SubscribeBatchAuction: ChannelAuctioneerSubscribeBatchAuction; - static readonly SubscribeSidecar: ChannelAuctioneerSubscribeSidecar; - static readonly Terms: ChannelAuctioneerTerms; - static readonly RelevantBatchSnapshot: ChannelAuctioneerRelevantBatchSnapshot; - static readonly BatchSnapshot: ChannelAuctioneerBatchSnapshot; - static readonly NodeRating: ChannelAuctioneerNodeRating; - static readonly BatchSnapshots: ChannelAuctioneerBatchSnapshots; - static readonly MarketInfo: ChannelAuctioneerMarketInfo; -} - -export type ServiceError = { message: string, code: number; metadata: grpc.Metadata } -export type Status = { details: string, code: number; metadata: grpc.Metadata } - -interface UnaryResponse { - cancel(): void; -} -interface ResponseStream { - cancel(): void; - on(type: 'data', handler: (message: T) => void): ResponseStream; - on(type: 'end', handler: (status?: Status) => void): ResponseStream; - on(type: 'status', handler: (status: Status) => void): ResponseStream; -} -interface RequestStream { - write(message: T): RequestStream; - end(): void; - cancel(): void; - on(type: 'end', handler: (status?: Status) => void): RequestStream; - on(type: 'status', handler: (status: Status) => void): RequestStream; -} -interface BidirectionalStream { - write(message: ReqT): BidirectionalStream; - end(): void; - cancel(): void; - on(type: 'data', handler: (message: ResT) => void): BidirectionalStream; - on(type: 'end', handler: (status?: Status) => void): BidirectionalStream; - on(type: 'status', handler: (status: Status) => void): BidirectionalStream; -} - -export class ChannelAuctioneerClient { - readonly serviceHost: string; - - constructor(serviceHost: string, options?: grpc.RpcOptions); - reserveAccount( - requestMessage: auctioneerrpc_auctioneer_pb.ReserveAccountRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: auctioneerrpc_auctioneer_pb.ReserveAccountResponse|null) => void - ): UnaryResponse; - reserveAccount( - requestMessage: auctioneerrpc_auctioneer_pb.ReserveAccountRequest, - callback: (error: ServiceError|null, responseMessage: auctioneerrpc_auctioneer_pb.ReserveAccountResponse|null) => void - ): UnaryResponse; - initAccount( - requestMessage: auctioneerrpc_auctioneer_pb.ServerInitAccountRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: auctioneerrpc_auctioneer_pb.ServerInitAccountResponse|null) => void - ): UnaryResponse; - initAccount( - requestMessage: auctioneerrpc_auctioneer_pb.ServerInitAccountRequest, - callback: (error: ServiceError|null, responseMessage: auctioneerrpc_auctioneer_pb.ServerInitAccountResponse|null) => void - ): UnaryResponse; - modifyAccount( - requestMessage: auctioneerrpc_auctioneer_pb.ServerModifyAccountRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: auctioneerrpc_auctioneer_pb.ServerModifyAccountResponse|null) => void - ): UnaryResponse; - modifyAccount( - requestMessage: auctioneerrpc_auctioneer_pb.ServerModifyAccountRequest, - callback: (error: ServiceError|null, responseMessage: auctioneerrpc_auctioneer_pb.ServerModifyAccountResponse|null) => void - ): UnaryResponse; - submitOrder( - requestMessage: auctioneerrpc_auctioneer_pb.ServerSubmitOrderRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: auctioneerrpc_auctioneer_pb.ServerSubmitOrderResponse|null) => void - ): UnaryResponse; - submitOrder( - requestMessage: auctioneerrpc_auctioneer_pb.ServerSubmitOrderRequest, - callback: (error: ServiceError|null, responseMessage: auctioneerrpc_auctioneer_pb.ServerSubmitOrderResponse|null) => void - ): UnaryResponse; - cancelOrder( - requestMessage: auctioneerrpc_auctioneer_pb.ServerCancelOrderRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: auctioneerrpc_auctioneer_pb.ServerCancelOrderResponse|null) => void - ): UnaryResponse; - cancelOrder( - requestMessage: auctioneerrpc_auctioneer_pb.ServerCancelOrderRequest, - callback: (error: ServiceError|null, responseMessage: auctioneerrpc_auctioneer_pb.ServerCancelOrderResponse|null) => void - ): UnaryResponse; - orderState( - requestMessage: auctioneerrpc_auctioneer_pb.ServerOrderStateRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: auctioneerrpc_auctioneer_pb.ServerOrderStateResponse|null) => void - ): UnaryResponse; - orderState( - requestMessage: auctioneerrpc_auctioneer_pb.ServerOrderStateRequest, - callback: (error: ServiceError|null, responseMessage: auctioneerrpc_auctioneer_pb.ServerOrderStateResponse|null) => void - ): UnaryResponse; - subscribeBatchAuction(metadata?: grpc.Metadata): BidirectionalStream; - subscribeSidecar(metadata?: grpc.Metadata): BidirectionalStream; - terms( - requestMessage: auctioneerrpc_auctioneer_pb.TermsRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: auctioneerrpc_auctioneer_pb.TermsResponse|null) => void - ): UnaryResponse; - terms( - requestMessage: auctioneerrpc_auctioneer_pb.TermsRequest, - callback: (error: ServiceError|null, responseMessage: auctioneerrpc_auctioneer_pb.TermsResponse|null) => void - ): UnaryResponse; - relevantBatchSnapshot( - requestMessage: auctioneerrpc_auctioneer_pb.RelevantBatchRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: auctioneerrpc_auctioneer_pb.RelevantBatch|null) => void - ): UnaryResponse; - relevantBatchSnapshot( - requestMessage: auctioneerrpc_auctioneer_pb.RelevantBatchRequest, - callback: (error: ServiceError|null, responseMessage: auctioneerrpc_auctioneer_pb.RelevantBatch|null) => void - ): UnaryResponse; - batchSnapshot( - requestMessage: auctioneerrpc_auctioneer_pb.BatchSnapshotRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: auctioneerrpc_auctioneer_pb.BatchSnapshotResponse|null) => void - ): UnaryResponse; - batchSnapshot( - requestMessage: auctioneerrpc_auctioneer_pb.BatchSnapshotRequest, - callback: (error: ServiceError|null, responseMessage: auctioneerrpc_auctioneer_pb.BatchSnapshotResponse|null) => void - ): UnaryResponse; - nodeRating( - requestMessage: auctioneerrpc_auctioneer_pb.ServerNodeRatingRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: auctioneerrpc_auctioneer_pb.ServerNodeRatingResponse|null) => void - ): UnaryResponse; - nodeRating( - requestMessage: auctioneerrpc_auctioneer_pb.ServerNodeRatingRequest, - callback: (error: ServiceError|null, responseMessage: auctioneerrpc_auctioneer_pb.ServerNodeRatingResponse|null) => void - ): UnaryResponse; - batchSnapshots( - requestMessage: auctioneerrpc_auctioneer_pb.BatchSnapshotsRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: auctioneerrpc_auctioneer_pb.BatchSnapshotsResponse|null) => void - ): UnaryResponse; - batchSnapshots( - requestMessage: auctioneerrpc_auctioneer_pb.BatchSnapshotsRequest, - callback: (error: ServiceError|null, responseMessage: auctioneerrpc_auctioneer_pb.BatchSnapshotsResponse|null) => void - ): UnaryResponse; - marketInfo( - requestMessage: auctioneerrpc_auctioneer_pb.MarketInfoRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: auctioneerrpc_auctioneer_pb.MarketInfoResponse|null) => void - ): UnaryResponse; - marketInfo( - requestMessage: auctioneerrpc_auctioneer_pb.MarketInfoRequest, - callback: (error: ServiceError|null, responseMessage: auctioneerrpc_auctioneer_pb.MarketInfoResponse|null) => void - ): UnaryResponse; -} - diff --git a/lib/types/generated/auctioneerrpc/auctioneer_pb_service.js b/lib/types/generated/auctioneerrpc/auctioneer_pb_service.js deleted file mode 100644 index 11a6eca..0000000 --- a/lib/types/generated/auctioneerrpc/auctioneer_pb_service.js +++ /dev/null @@ -1,609 +0,0 @@ -// package: poolrpc -// file: auctioneerrpc/auctioneer.proto - -var auctioneerrpc_auctioneer_pb = require("../auctioneerrpc/auctioneer_pb"); -var grpc = require("@improbable-eng/grpc-web").grpc; - -var ChannelAuctioneer = (function () { - function ChannelAuctioneer() {} - ChannelAuctioneer.serviceName = "poolrpc.ChannelAuctioneer"; - return ChannelAuctioneer; -}()); - -ChannelAuctioneer.ReserveAccount = { - methodName: "ReserveAccount", - service: ChannelAuctioneer, - requestStream: false, - responseStream: false, - requestType: auctioneerrpc_auctioneer_pb.ReserveAccountRequest, - responseType: auctioneerrpc_auctioneer_pb.ReserveAccountResponse -}; - -ChannelAuctioneer.InitAccount = { - methodName: "InitAccount", - service: ChannelAuctioneer, - requestStream: false, - responseStream: false, - requestType: auctioneerrpc_auctioneer_pb.ServerInitAccountRequest, - responseType: auctioneerrpc_auctioneer_pb.ServerInitAccountResponse -}; - -ChannelAuctioneer.ModifyAccount = { - methodName: "ModifyAccount", - service: ChannelAuctioneer, - requestStream: false, - responseStream: false, - requestType: auctioneerrpc_auctioneer_pb.ServerModifyAccountRequest, - responseType: auctioneerrpc_auctioneer_pb.ServerModifyAccountResponse -}; - -ChannelAuctioneer.SubmitOrder = { - methodName: "SubmitOrder", - service: ChannelAuctioneer, - requestStream: false, - responseStream: false, - requestType: auctioneerrpc_auctioneer_pb.ServerSubmitOrderRequest, - responseType: auctioneerrpc_auctioneer_pb.ServerSubmitOrderResponse -}; - -ChannelAuctioneer.CancelOrder = { - methodName: "CancelOrder", - service: ChannelAuctioneer, - requestStream: false, - responseStream: false, - requestType: auctioneerrpc_auctioneer_pb.ServerCancelOrderRequest, - responseType: auctioneerrpc_auctioneer_pb.ServerCancelOrderResponse -}; - -ChannelAuctioneer.OrderState = { - methodName: "OrderState", - service: ChannelAuctioneer, - requestStream: false, - responseStream: false, - requestType: auctioneerrpc_auctioneer_pb.ServerOrderStateRequest, - responseType: auctioneerrpc_auctioneer_pb.ServerOrderStateResponse -}; - -ChannelAuctioneer.SubscribeBatchAuction = { - methodName: "SubscribeBatchAuction", - service: ChannelAuctioneer, - requestStream: true, - responseStream: true, - requestType: auctioneerrpc_auctioneer_pb.ClientAuctionMessage, - responseType: auctioneerrpc_auctioneer_pb.ServerAuctionMessage -}; - -ChannelAuctioneer.SubscribeSidecar = { - methodName: "SubscribeSidecar", - service: ChannelAuctioneer, - requestStream: true, - responseStream: true, - requestType: auctioneerrpc_auctioneer_pb.ClientAuctionMessage, - responseType: auctioneerrpc_auctioneer_pb.ServerAuctionMessage -}; - -ChannelAuctioneer.Terms = { - methodName: "Terms", - service: ChannelAuctioneer, - requestStream: false, - responseStream: false, - requestType: auctioneerrpc_auctioneer_pb.TermsRequest, - responseType: auctioneerrpc_auctioneer_pb.TermsResponse -}; - -ChannelAuctioneer.RelevantBatchSnapshot = { - methodName: "RelevantBatchSnapshot", - service: ChannelAuctioneer, - requestStream: false, - responseStream: false, - requestType: auctioneerrpc_auctioneer_pb.RelevantBatchRequest, - responseType: auctioneerrpc_auctioneer_pb.RelevantBatch -}; - -ChannelAuctioneer.BatchSnapshot = { - methodName: "BatchSnapshot", - service: ChannelAuctioneer, - requestStream: false, - responseStream: false, - requestType: auctioneerrpc_auctioneer_pb.BatchSnapshotRequest, - responseType: auctioneerrpc_auctioneer_pb.BatchSnapshotResponse -}; - -ChannelAuctioneer.NodeRating = { - methodName: "NodeRating", - service: ChannelAuctioneer, - requestStream: false, - responseStream: false, - requestType: auctioneerrpc_auctioneer_pb.ServerNodeRatingRequest, - responseType: auctioneerrpc_auctioneer_pb.ServerNodeRatingResponse -}; - -ChannelAuctioneer.BatchSnapshots = { - methodName: "BatchSnapshots", - service: ChannelAuctioneer, - requestStream: false, - responseStream: false, - requestType: auctioneerrpc_auctioneer_pb.BatchSnapshotsRequest, - responseType: auctioneerrpc_auctioneer_pb.BatchSnapshotsResponse -}; - -ChannelAuctioneer.MarketInfo = { - methodName: "MarketInfo", - service: ChannelAuctioneer, - requestStream: false, - responseStream: false, - requestType: auctioneerrpc_auctioneer_pb.MarketInfoRequest, - responseType: auctioneerrpc_auctioneer_pb.MarketInfoResponse -}; - -exports.ChannelAuctioneer = ChannelAuctioneer; - -function ChannelAuctioneerClient(serviceHost, options) { - this.serviceHost = serviceHost; - this.options = options || {}; -} - -ChannelAuctioneerClient.prototype.reserveAccount = function reserveAccount(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(ChannelAuctioneer.ReserveAccount, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -ChannelAuctioneerClient.prototype.initAccount = function initAccount(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(ChannelAuctioneer.InitAccount, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -ChannelAuctioneerClient.prototype.modifyAccount = function modifyAccount(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(ChannelAuctioneer.ModifyAccount, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -ChannelAuctioneerClient.prototype.submitOrder = function submitOrder(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(ChannelAuctioneer.SubmitOrder, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -ChannelAuctioneerClient.prototype.cancelOrder = function cancelOrder(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(ChannelAuctioneer.CancelOrder, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -ChannelAuctioneerClient.prototype.orderState = function orderState(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(ChannelAuctioneer.OrderState, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -ChannelAuctioneerClient.prototype.subscribeBatchAuction = function subscribeBatchAuction(metadata) { - var listeners = { - data: [], - end: [], - status: [] - }; - var client = grpc.client(ChannelAuctioneer.SubscribeBatchAuction, { - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport - }); - client.onEnd(function (status, statusMessage, trailers) { - listeners.status.forEach(function (handler) { - handler({ code: status, details: statusMessage, metadata: trailers }); - }); - listeners.end.forEach(function (handler) { - handler({ code: status, details: statusMessage, metadata: trailers }); - }); - listeners = null; - }); - client.onMessage(function (message) { - listeners.data.forEach(function (handler) { - handler(message); - }) - }); - client.start(metadata); - return { - on: function (type, handler) { - listeners[type].push(handler); - return this; - }, - write: function (requestMessage) { - client.send(requestMessage); - return this; - }, - end: function () { - client.finishSend(); - }, - cancel: function () { - listeners = null; - client.close(); - } - }; -}; - -ChannelAuctioneerClient.prototype.subscribeSidecar = function subscribeSidecar(metadata) { - var listeners = { - data: [], - end: [], - status: [] - }; - var client = grpc.client(ChannelAuctioneer.SubscribeSidecar, { - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport - }); - client.onEnd(function (status, statusMessage, trailers) { - listeners.status.forEach(function (handler) { - handler({ code: status, details: statusMessage, metadata: trailers }); - }); - listeners.end.forEach(function (handler) { - handler({ code: status, details: statusMessage, metadata: trailers }); - }); - listeners = null; - }); - client.onMessage(function (message) { - listeners.data.forEach(function (handler) { - handler(message); - }) - }); - client.start(metadata); - return { - on: function (type, handler) { - listeners[type].push(handler); - return this; - }, - write: function (requestMessage) { - client.send(requestMessage); - return this; - }, - end: function () { - client.finishSend(); - }, - cancel: function () { - listeners = null; - client.close(); - } - }; -}; - -ChannelAuctioneerClient.prototype.terms = function terms(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(ChannelAuctioneer.Terms, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -ChannelAuctioneerClient.prototype.relevantBatchSnapshot = function relevantBatchSnapshot(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(ChannelAuctioneer.RelevantBatchSnapshot, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -ChannelAuctioneerClient.prototype.batchSnapshot = function batchSnapshot(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(ChannelAuctioneer.BatchSnapshot, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -ChannelAuctioneerClient.prototype.nodeRating = function nodeRating(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(ChannelAuctioneer.NodeRating, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -ChannelAuctioneerClient.prototype.batchSnapshots = function batchSnapshots(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(ChannelAuctioneer.BatchSnapshots, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -ChannelAuctioneerClient.prototype.marketInfo = function marketInfo(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(ChannelAuctioneer.MarketInfo, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -exports.ChannelAuctioneerClient = ChannelAuctioneerClient; - diff --git a/lib/types/generated/auctioneerrpc/hashmail_pb.d.ts b/lib/types/generated/auctioneerrpc/hashmail_pb.d.ts deleted file mode 100644 index 7e8f9c9..0000000 --- a/lib/types/generated/auctioneerrpc/hashmail_pb.d.ts +++ /dev/null @@ -1,256 +0,0 @@ -// package: poolrpc -// file: auctioneerrpc/hashmail.proto - -import * as jspb from "google-protobuf"; - -export class PoolAccountAuth extends jspb.Message { - getAcctKey(): Uint8Array | string; - getAcctKey_asU8(): Uint8Array; - getAcctKey_asB64(): string; - setAcctKey(value: Uint8Array | string): void; - - getStreamSig(): Uint8Array | string; - getStreamSig_asU8(): Uint8Array; - getStreamSig_asB64(): string; - setStreamSig(value: Uint8Array | string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): PoolAccountAuth.AsObject; - static toObject(includeInstance: boolean, msg: PoolAccountAuth): PoolAccountAuth.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: PoolAccountAuth, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): PoolAccountAuth; - static deserializeBinaryFromReader(message: PoolAccountAuth, reader: jspb.BinaryReader): PoolAccountAuth; -} - -export namespace PoolAccountAuth { - export type AsObject = { - acctKey: Uint8Array | string, - streamSig: Uint8Array | string, - } -} - -export class SidecarAuth extends jspb.Message { - getTicket(): string; - setTicket(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): SidecarAuth.AsObject; - static toObject(includeInstance: boolean, msg: SidecarAuth): SidecarAuth.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: SidecarAuth, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): SidecarAuth; - static deserializeBinaryFromReader(message: SidecarAuth, reader: jspb.BinaryReader): SidecarAuth; -} - -export namespace SidecarAuth { - export type AsObject = { - ticket: string, - } -} - -export class CipherBoxAuth extends jspb.Message { - hasDesc(): boolean; - clearDesc(): void; - getDesc(): CipherBoxDesc | undefined; - setDesc(value?: CipherBoxDesc): void; - - hasAcctAuth(): boolean; - clearAcctAuth(): void; - getAcctAuth(): PoolAccountAuth | undefined; - setAcctAuth(value?: PoolAccountAuth): void; - - hasSidecarAuth(): boolean; - clearSidecarAuth(): void; - getSidecarAuth(): SidecarAuth | undefined; - setSidecarAuth(value?: SidecarAuth): void; - - getAuthCase(): CipherBoxAuth.AuthCase; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): CipherBoxAuth.AsObject; - static toObject(includeInstance: boolean, msg: CipherBoxAuth): CipherBoxAuth.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: CipherBoxAuth, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): CipherBoxAuth; - static deserializeBinaryFromReader(message: CipherBoxAuth, reader: jspb.BinaryReader): CipherBoxAuth; -} - -export namespace CipherBoxAuth { - export type AsObject = { - desc?: CipherBoxDesc.AsObject, - acctAuth?: PoolAccountAuth.AsObject, - sidecarAuth?: SidecarAuth.AsObject, - } - - export enum AuthCase { - AUTH_NOT_SET = 0, - ACCT_AUTH = 2, - SIDECAR_AUTH = 3, - } -} - -export class DelCipherBoxResp extends jspb.Message { - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): DelCipherBoxResp.AsObject; - static toObject(includeInstance: boolean, msg: DelCipherBoxResp): DelCipherBoxResp.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: DelCipherBoxResp, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): DelCipherBoxResp; - static deserializeBinaryFromReader(message: DelCipherBoxResp, reader: jspb.BinaryReader): DelCipherBoxResp; -} - -export namespace DelCipherBoxResp { - export type AsObject = { - } -} - -export class CipherChallenge extends jspb.Message { - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): CipherChallenge.AsObject; - static toObject(includeInstance: boolean, msg: CipherChallenge): CipherChallenge.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: CipherChallenge, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): CipherChallenge; - static deserializeBinaryFromReader(message: CipherChallenge, reader: jspb.BinaryReader): CipherChallenge; -} - -export namespace CipherChallenge { - export type AsObject = { - } -} - -export class CipherError extends jspb.Message { - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): CipherError.AsObject; - static toObject(includeInstance: boolean, msg: CipherError): CipherError.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: CipherError, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): CipherError; - static deserializeBinaryFromReader(message: CipherError, reader: jspb.BinaryReader): CipherError; -} - -export namespace CipherError { - export type AsObject = { - } -} - -export class CipherSuccess extends jspb.Message { - hasDesc(): boolean; - clearDesc(): void; - getDesc(): CipherBoxDesc | undefined; - setDesc(value?: CipherBoxDesc): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): CipherSuccess.AsObject; - static toObject(includeInstance: boolean, msg: CipherSuccess): CipherSuccess.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: CipherSuccess, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): CipherSuccess; - static deserializeBinaryFromReader(message: CipherSuccess, reader: jspb.BinaryReader): CipherSuccess; -} - -export namespace CipherSuccess { - export type AsObject = { - desc?: CipherBoxDesc.AsObject, - } -} - -export class CipherInitResp extends jspb.Message { - hasSuccess(): boolean; - clearSuccess(): void; - getSuccess(): CipherSuccess | undefined; - setSuccess(value?: CipherSuccess): void; - - hasChallenge(): boolean; - clearChallenge(): void; - getChallenge(): CipherChallenge | undefined; - setChallenge(value?: CipherChallenge): void; - - hasError(): boolean; - clearError(): void; - getError(): CipherError | undefined; - setError(value?: CipherError): void; - - getRespCase(): CipherInitResp.RespCase; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): CipherInitResp.AsObject; - static toObject(includeInstance: boolean, msg: CipherInitResp): CipherInitResp.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: CipherInitResp, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): CipherInitResp; - static deserializeBinaryFromReader(message: CipherInitResp, reader: jspb.BinaryReader): CipherInitResp; -} - -export namespace CipherInitResp { - export type AsObject = { - success?: CipherSuccess.AsObject, - challenge?: CipherChallenge.AsObject, - error?: CipherError.AsObject, - } - - export enum RespCase { - RESP_NOT_SET = 0, - SUCCESS = 1, - CHALLENGE = 2, - ERROR = 3, - } -} - -export class CipherBoxDesc extends jspb.Message { - getStreamId(): Uint8Array | string; - getStreamId_asU8(): Uint8Array; - getStreamId_asB64(): string; - setStreamId(value: Uint8Array | string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): CipherBoxDesc.AsObject; - static toObject(includeInstance: boolean, msg: CipherBoxDesc): CipherBoxDesc.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: CipherBoxDesc, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): CipherBoxDesc; - static deserializeBinaryFromReader(message: CipherBoxDesc, reader: jspb.BinaryReader): CipherBoxDesc; -} - -export namespace CipherBoxDesc { - export type AsObject = { - streamId: Uint8Array | string, - } -} - -export class CipherBox extends jspb.Message { - hasDesc(): boolean; - clearDesc(): void; - getDesc(): CipherBoxDesc | undefined; - setDesc(value?: CipherBoxDesc): void; - - getMsg(): Uint8Array | string; - getMsg_asU8(): Uint8Array; - getMsg_asB64(): string; - setMsg(value: Uint8Array | string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): CipherBox.AsObject; - static toObject(includeInstance: boolean, msg: CipherBox): CipherBox.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: CipherBox, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): CipherBox; - static deserializeBinaryFromReader(message: CipherBox, reader: jspb.BinaryReader): CipherBox; -} - -export namespace CipherBox { - export type AsObject = { - desc?: CipherBoxDesc.AsObject, - msg: Uint8Array | string, - } -} - diff --git a/lib/types/generated/auctioneerrpc/hashmail_pb.js b/lib/types/generated/auctioneerrpc/hashmail_pb.js deleted file mode 100644 index edcb1d4..0000000 --- a/lib/types/generated/auctioneerrpc/hashmail_pb.js +++ /dev/null @@ -1,1950 +0,0 @@ -// source: auctioneerrpc/hashmail.proto -/** - * @fileoverview - * @enhanceable - * @suppress {missingRequire} reports error on implicit type usages. - * @suppress {messageConventions} JS Compiler reports an error if a variable or - * field starts with 'MSG_' and isn't a translatable message. - * @public - */ -// GENERATED CODE -- DO NOT EDIT! -/* eslint-disable */ -// @ts-nocheck - -var jspb = require('google-protobuf'); -var goog = jspb; -var global = Function('return this')(); - -goog.exportSymbol('proto.poolrpc.CipherBox', null, global); -goog.exportSymbol('proto.poolrpc.CipherBoxAuth', null, global); -goog.exportSymbol('proto.poolrpc.CipherBoxAuth.AuthCase', null, global); -goog.exportSymbol('proto.poolrpc.CipherBoxDesc', null, global); -goog.exportSymbol('proto.poolrpc.CipherChallenge', null, global); -goog.exportSymbol('proto.poolrpc.CipherError', null, global); -goog.exportSymbol('proto.poolrpc.CipherInitResp', null, global); -goog.exportSymbol('proto.poolrpc.CipherInitResp.RespCase', null, global); -goog.exportSymbol('proto.poolrpc.CipherSuccess', null, global); -goog.exportSymbol('proto.poolrpc.DelCipherBoxResp', null, global); -goog.exportSymbol('proto.poolrpc.PoolAccountAuth', null, global); -goog.exportSymbol('proto.poolrpc.SidecarAuth', null, global); -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.poolrpc.PoolAccountAuth = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.poolrpc.PoolAccountAuth, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.poolrpc.PoolAccountAuth.displayName = 'proto.poolrpc.PoolAccountAuth'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.poolrpc.SidecarAuth = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.poolrpc.SidecarAuth, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.poolrpc.SidecarAuth.displayName = 'proto.poolrpc.SidecarAuth'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.poolrpc.CipherBoxAuth = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.poolrpc.CipherBoxAuth.oneofGroups_); -}; -goog.inherits(proto.poolrpc.CipherBoxAuth, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.poolrpc.CipherBoxAuth.displayName = 'proto.poolrpc.CipherBoxAuth'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.poolrpc.DelCipherBoxResp = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.poolrpc.DelCipherBoxResp, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.poolrpc.DelCipherBoxResp.displayName = 'proto.poolrpc.DelCipherBoxResp'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.poolrpc.CipherChallenge = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.poolrpc.CipherChallenge, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.poolrpc.CipherChallenge.displayName = 'proto.poolrpc.CipherChallenge'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.poolrpc.CipherError = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.poolrpc.CipherError, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.poolrpc.CipherError.displayName = 'proto.poolrpc.CipherError'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.poolrpc.CipherSuccess = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.poolrpc.CipherSuccess, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.poolrpc.CipherSuccess.displayName = 'proto.poolrpc.CipherSuccess'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.poolrpc.CipherInitResp = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.poolrpc.CipherInitResp.oneofGroups_); -}; -goog.inherits(proto.poolrpc.CipherInitResp, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.poolrpc.CipherInitResp.displayName = 'proto.poolrpc.CipherInitResp'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.poolrpc.CipherBoxDesc = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.poolrpc.CipherBoxDesc, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.poolrpc.CipherBoxDesc.displayName = 'proto.poolrpc.CipherBoxDesc'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.poolrpc.CipherBox = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.poolrpc.CipherBox, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.poolrpc.CipherBox.displayName = 'proto.poolrpc.CipherBox'; -} - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.poolrpc.PoolAccountAuth.prototype.toObject = function(opt_includeInstance) { - return proto.poolrpc.PoolAccountAuth.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.poolrpc.PoolAccountAuth} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.PoolAccountAuth.toObject = function(includeInstance, msg) { - var f, obj = { - acctKey: msg.getAcctKey_asB64(), - streamSig: msg.getStreamSig_asB64() - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.poolrpc.PoolAccountAuth} - */ -proto.poolrpc.PoolAccountAuth.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.poolrpc.PoolAccountAuth; - return proto.poolrpc.PoolAccountAuth.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.poolrpc.PoolAccountAuth} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.poolrpc.PoolAccountAuth} - */ -proto.poolrpc.PoolAccountAuth.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setAcctKey(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setStreamSig(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.poolrpc.PoolAccountAuth.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.poolrpc.PoolAccountAuth.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.poolrpc.PoolAccountAuth} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.PoolAccountAuth.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getAcctKey_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getStreamSig_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } -}; - - -/** - * optional bytes acct_key = 1; - * @return {!(string|Uint8Array)} - */ -proto.poolrpc.PoolAccountAuth.prototype.getAcctKey = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes acct_key = 1; - * This is a type-conversion wrapper around `getAcctKey()` - * @return {string} - */ -proto.poolrpc.PoolAccountAuth.prototype.getAcctKey_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getAcctKey())); -}; - - -/** - * optional bytes acct_key = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getAcctKey()` - * @return {!Uint8Array} - */ -proto.poolrpc.PoolAccountAuth.prototype.getAcctKey_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getAcctKey())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.poolrpc.PoolAccountAuth} returns this - */ -proto.poolrpc.PoolAccountAuth.prototype.setAcctKey = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional bytes stream_sig = 2; - * @return {!(string|Uint8Array)} - */ -proto.poolrpc.PoolAccountAuth.prototype.getStreamSig = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes stream_sig = 2; - * This is a type-conversion wrapper around `getStreamSig()` - * @return {string} - */ -proto.poolrpc.PoolAccountAuth.prototype.getStreamSig_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getStreamSig())); -}; - - -/** - * optional bytes stream_sig = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getStreamSig()` - * @return {!Uint8Array} - */ -proto.poolrpc.PoolAccountAuth.prototype.getStreamSig_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getStreamSig())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.poolrpc.PoolAccountAuth} returns this - */ -proto.poolrpc.PoolAccountAuth.prototype.setStreamSig = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.poolrpc.SidecarAuth.prototype.toObject = function(opt_includeInstance) { - return proto.poolrpc.SidecarAuth.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.poolrpc.SidecarAuth} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.SidecarAuth.toObject = function(includeInstance, msg) { - var f, obj = { - ticket: jspb.Message.getFieldWithDefault(msg, 1, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.poolrpc.SidecarAuth} - */ -proto.poolrpc.SidecarAuth.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.poolrpc.SidecarAuth; - return proto.poolrpc.SidecarAuth.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.poolrpc.SidecarAuth} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.poolrpc.SidecarAuth} - */ -proto.poolrpc.SidecarAuth.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setTicket(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.poolrpc.SidecarAuth.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.poolrpc.SidecarAuth.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.poolrpc.SidecarAuth} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.SidecarAuth.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getTicket(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } -}; - - -/** - * optional string ticket = 1; - * @return {string} - */ -proto.poolrpc.SidecarAuth.prototype.getTicket = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.poolrpc.SidecarAuth} returns this - */ -proto.poolrpc.SidecarAuth.prototype.setTicket = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - - -/** - * Oneof group definitions for this message. Each group defines the field - * numbers belonging to that group. When of these fields' value is set, all - * other fields in the group are cleared. During deserialization, if multiple - * fields are encountered for a group, only the last value seen will be kept. - * @private {!Array>} - * @const - */ -proto.poolrpc.CipherBoxAuth.oneofGroups_ = [[2,3]]; - -/** - * @enum {number} - */ -proto.poolrpc.CipherBoxAuth.AuthCase = { - AUTH_NOT_SET: 0, - ACCT_AUTH: 2, - SIDECAR_AUTH: 3 -}; - -/** - * @return {proto.poolrpc.CipherBoxAuth.AuthCase} - */ -proto.poolrpc.CipherBoxAuth.prototype.getAuthCase = function() { - return /** @type {proto.poolrpc.CipherBoxAuth.AuthCase} */(jspb.Message.computeOneofCase(this, proto.poolrpc.CipherBoxAuth.oneofGroups_[0])); -}; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.poolrpc.CipherBoxAuth.prototype.toObject = function(opt_includeInstance) { - return proto.poolrpc.CipherBoxAuth.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.poolrpc.CipherBoxAuth} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.CipherBoxAuth.toObject = function(includeInstance, msg) { - var f, obj = { - desc: (f = msg.getDesc()) && proto.poolrpc.CipherBoxDesc.toObject(includeInstance, f), - acctAuth: (f = msg.getAcctAuth()) && proto.poolrpc.PoolAccountAuth.toObject(includeInstance, f), - sidecarAuth: (f = msg.getSidecarAuth()) && proto.poolrpc.SidecarAuth.toObject(includeInstance, f) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.poolrpc.CipherBoxAuth} - */ -proto.poolrpc.CipherBoxAuth.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.poolrpc.CipherBoxAuth; - return proto.poolrpc.CipherBoxAuth.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.poolrpc.CipherBoxAuth} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.poolrpc.CipherBoxAuth} - */ -proto.poolrpc.CipherBoxAuth.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.poolrpc.CipherBoxDesc; - reader.readMessage(value,proto.poolrpc.CipherBoxDesc.deserializeBinaryFromReader); - msg.setDesc(value); - break; - case 2: - var value = new proto.poolrpc.PoolAccountAuth; - reader.readMessage(value,proto.poolrpc.PoolAccountAuth.deserializeBinaryFromReader); - msg.setAcctAuth(value); - break; - case 3: - var value = new proto.poolrpc.SidecarAuth; - reader.readMessage(value,proto.poolrpc.SidecarAuth.deserializeBinaryFromReader); - msg.setSidecarAuth(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.poolrpc.CipherBoxAuth.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.poolrpc.CipherBoxAuth.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.poolrpc.CipherBoxAuth} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.CipherBoxAuth.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getDesc(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.poolrpc.CipherBoxDesc.serializeBinaryToWriter - ); - } - f = message.getAcctAuth(); - if (f != null) { - writer.writeMessage( - 2, - f, - proto.poolrpc.PoolAccountAuth.serializeBinaryToWriter - ); - } - f = message.getSidecarAuth(); - if (f != null) { - writer.writeMessage( - 3, - f, - proto.poolrpc.SidecarAuth.serializeBinaryToWriter - ); - } -}; - - -/** - * optional CipherBoxDesc desc = 1; - * @return {?proto.poolrpc.CipherBoxDesc} - */ -proto.poolrpc.CipherBoxAuth.prototype.getDesc = function() { - return /** @type{?proto.poolrpc.CipherBoxDesc} */ ( - jspb.Message.getWrapperField(this, proto.poolrpc.CipherBoxDesc, 1)); -}; - - -/** - * @param {?proto.poolrpc.CipherBoxDesc|undefined} value - * @return {!proto.poolrpc.CipherBoxAuth} returns this -*/ -proto.poolrpc.CipherBoxAuth.prototype.setDesc = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.poolrpc.CipherBoxAuth} returns this - */ -proto.poolrpc.CipherBoxAuth.prototype.clearDesc = function() { - return this.setDesc(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.poolrpc.CipherBoxAuth.prototype.hasDesc = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional PoolAccountAuth acct_auth = 2; - * @return {?proto.poolrpc.PoolAccountAuth} - */ -proto.poolrpc.CipherBoxAuth.prototype.getAcctAuth = function() { - return /** @type{?proto.poolrpc.PoolAccountAuth} */ ( - jspb.Message.getWrapperField(this, proto.poolrpc.PoolAccountAuth, 2)); -}; - - -/** - * @param {?proto.poolrpc.PoolAccountAuth|undefined} value - * @return {!proto.poolrpc.CipherBoxAuth} returns this -*/ -proto.poolrpc.CipherBoxAuth.prototype.setAcctAuth = function(value) { - return jspb.Message.setOneofWrapperField(this, 2, proto.poolrpc.CipherBoxAuth.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.poolrpc.CipherBoxAuth} returns this - */ -proto.poolrpc.CipherBoxAuth.prototype.clearAcctAuth = function() { - return this.setAcctAuth(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.poolrpc.CipherBoxAuth.prototype.hasAcctAuth = function() { - return jspb.Message.getField(this, 2) != null; -}; - - -/** - * optional SidecarAuth sidecar_auth = 3; - * @return {?proto.poolrpc.SidecarAuth} - */ -proto.poolrpc.CipherBoxAuth.prototype.getSidecarAuth = function() { - return /** @type{?proto.poolrpc.SidecarAuth} */ ( - jspb.Message.getWrapperField(this, proto.poolrpc.SidecarAuth, 3)); -}; - - -/** - * @param {?proto.poolrpc.SidecarAuth|undefined} value - * @return {!proto.poolrpc.CipherBoxAuth} returns this -*/ -proto.poolrpc.CipherBoxAuth.prototype.setSidecarAuth = function(value) { - return jspb.Message.setOneofWrapperField(this, 3, proto.poolrpc.CipherBoxAuth.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.poolrpc.CipherBoxAuth} returns this - */ -proto.poolrpc.CipherBoxAuth.prototype.clearSidecarAuth = function() { - return this.setSidecarAuth(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.poolrpc.CipherBoxAuth.prototype.hasSidecarAuth = function() { - return jspb.Message.getField(this, 3) != null; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.poolrpc.DelCipherBoxResp.prototype.toObject = function(opt_includeInstance) { - return proto.poolrpc.DelCipherBoxResp.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.poolrpc.DelCipherBoxResp} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.DelCipherBoxResp.toObject = function(includeInstance, msg) { - var f, obj = { - - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.poolrpc.DelCipherBoxResp} - */ -proto.poolrpc.DelCipherBoxResp.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.poolrpc.DelCipherBoxResp; - return proto.poolrpc.DelCipherBoxResp.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.poolrpc.DelCipherBoxResp} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.poolrpc.DelCipherBoxResp} - */ -proto.poolrpc.DelCipherBoxResp.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.poolrpc.DelCipherBoxResp.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.poolrpc.DelCipherBoxResp.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.poolrpc.DelCipherBoxResp} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.DelCipherBoxResp.serializeBinaryToWriter = function(message, writer) { - var f = undefined; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.poolrpc.CipherChallenge.prototype.toObject = function(opt_includeInstance) { - return proto.poolrpc.CipherChallenge.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.poolrpc.CipherChallenge} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.CipherChallenge.toObject = function(includeInstance, msg) { - var f, obj = { - - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.poolrpc.CipherChallenge} - */ -proto.poolrpc.CipherChallenge.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.poolrpc.CipherChallenge; - return proto.poolrpc.CipherChallenge.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.poolrpc.CipherChallenge} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.poolrpc.CipherChallenge} - */ -proto.poolrpc.CipherChallenge.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.poolrpc.CipherChallenge.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.poolrpc.CipherChallenge.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.poolrpc.CipherChallenge} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.CipherChallenge.serializeBinaryToWriter = function(message, writer) { - var f = undefined; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.poolrpc.CipherError.prototype.toObject = function(opt_includeInstance) { - return proto.poolrpc.CipherError.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.poolrpc.CipherError} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.CipherError.toObject = function(includeInstance, msg) { - var f, obj = { - - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.poolrpc.CipherError} - */ -proto.poolrpc.CipherError.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.poolrpc.CipherError; - return proto.poolrpc.CipherError.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.poolrpc.CipherError} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.poolrpc.CipherError} - */ -proto.poolrpc.CipherError.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.poolrpc.CipherError.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.poolrpc.CipherError.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.poolrpc.CipherError} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.CipherError.serializeBinaryToWriter = function(message, writer) { - var f = undefined; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.poolrpc.CipherSuccess.prototype.toObject = function(opt_includeInstance) { - return proto.poolrpc.CipherSuccess.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.poolrpc.CipherSuccess} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.CipherSuccess.toObject = function(includeInstance, msg) { - var f, obj = { - desc: (f = msg.getDesc()) && proto.poolrpc.CipherBoxDesc.toObject(includeInstance, f) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.poolrpc.CipherSuccess} - */ -proto.poolrpc.CipherSuccess.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.poolrpc.CipherSuccess; - return proto.poolrpc.CipherSuccess.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.poolrpc.CipherSuccess} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.poolrpc.CipherSuccess} - */ -proto.poolrpc.CipherSuccess.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.poolrpc.CipherBoxDesc; - reader.readMessage(value,proto.poolrpc.CipherBoxDesc.deserializeBinaryFromReader); - msg.setDesc(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.poolrpc.CipherSuccess.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.poolrpc.CipherSuccess.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.poolrpc.CipherSuccess} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.CipherSuccess.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getDesc(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.poolrpc.CipherBoxDesc.serializeBinaryToWriter - ); - } -}; - - -/** - * optional CipherBoxDesc desc = 1; - * @return {?proto.poolrpc.CipherBoxDesc} - */ -proto.poolrpc.CipherSuccess.prototype.getDesc = function() { - return /** @type{?proto.poolrpc.CipherBoxDesc} */ ( - jspb.Message.getWrapperField(this, proto.poolrpc.CipherBoxDesc, 1)); -}; - - -/** - * @param {?proto.poolrpc.CipherBoxDesc|undefined} value - * @return {!proto.poolrpc.CipherSuccess} returns this -*/ -proto.poolrpc.CipherSuccess.prototype.setDesc = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.poolrpc.CipherSuccess} returns this - */ -proto.poolrpc.CipherSuccess.prototype.clearDesc = function() { - return this.setDesc(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.poolrpc.CipherSuccess.prototype.hasDesc = function() { - return jspb.Message.getField(this, 1) != null; -}; - - - -/** - * Oneof group definitions for this message. Each group defines the field - * numbers belonging to that group. When of these fields' value is set, all - * other fields in the group are cleared. During deserialization, if multiple - * fields are encountered for a group, only the last value seen will be kept. - * @private {!Array>} - * @const - */ -proto.poolrpc.CipherInitResp.oneofGroups_ = [[1,2,3]]; - -/** - * @enum {number} - */ -proto.poolrpc.CipherInitResp.RespCase = { - RESP_NOT_SET: 0, - SUCCESS: 1, - CHALLENGE: 2, - ERROR: 3 -}; - -/** - * @return {proto.poolrpc.CipherInitResp.RespCase} - */ -proto.poolrpc.CipherInitResp.prototype.getRespCase = function() { - return /** @type {proto.poolrpc.CipherInitResp.RespCase} */(jspb.Message.computeOneofCase(this, proto.poolrpc.CipherInitResp.oneofGroups_[0])); -}; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.poolrpc.CipherInitResp.prototype.toObject = function(opt_includeInstance) { - return proto.poolrpc.CipherInitResp.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.poolrpc.CipherInitResp} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.CipherInitResp.toObject = function(includeInstance, msg) { - var f, obj = { - success: (f = msg.getSuccess()) && proto.poolrpc.CipherSuccess.toObject(includeInstance, f), - challenge: (f = msg.getChallenge()) && proto.poolrpc.CipherChallenge.toObject(includeInstance, f), - error: (f = msg.getError()) && proto.poolrpc.CipherError.toObject(includeInstance, f) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.poolrpc.CipherInitResp} - */ -proto.poolrpc.CipherInitResp.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.poolrpc.CipherInitResp; - return proto.poolrpc.CipherInitResp.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.poolrpc.CipherInitResp} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.poolrpc.CipherInitResp} - */ -proto.poolrpc.CipherInitResp.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.poolrpc.CipherSuccess; - reader.readMessage(value,proto.poolrpc.CipherSuccess.deserializeBinaryFromReader); - msg.setSuccess(value); - break; - case 2: - var value = new proto.poolrpc.CipherChallenge; - reader.readMessage(value,proto.poolrpc.CipherChallenge.deserializeBinaryFromReader); - msg.setChallenge(value); - break; - case 3: - var value = new proto.poolrpc.CipherError; - reader.readMessage(value,proto.poolrpc.CipherError.deserializeBinaryFromReader); - msg.setError(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.poolrpc.CipherInitResp.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.poolrpc.CipherInitResp.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.poolrpc.CipherInitResp} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.CipherInitResp.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getSuccess(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.poolrpc.CipherSuccess.serializeBinaryToWriter - ); - } - f = message.getChallenge(); - if (f != null) { - writer.writeMessage( - 2, - f, - proto.poolrpc.CipherChallenge.serializeBinaryToWriter - ); - } - f = message.getError(); - if (f != null) { - writer.writeMessage( - 3, - f, - proto.poolrpc.CipherError.serializeBinaryToWriter - ); - } -}; - - -/** - * optional CipherSuccess success = 1; - * @return {?proto.poolrpc.CipherSuccess} - */ -proto.poolrpc.CipherInitResp.prototype.getSuccess = function() { - return /** @type{?proto.poolrpc.CipherSuccess} */ ( - jspb.Message.getWrapperField(this, proto.poolrpc.CipherSuccess, 1)); -}; - - -/** - * @param {?proto.poolrpc.CipherSuccess|undefined} value - * @return {!proto.poolrpc.CipherInitResp} returns this -*/ -proto.poolrpc.CipherInitResp.prototype.setSuccess = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.poolrpc.CipherInitResp.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.poolrpc.CipherInitResp} returns this - */ -proto.poolrpc.CipherInitResp.prototype.clearSuccess = function() { - return this.setSuccess(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.poolrpc.CipherInitResp.prototype.hasSuccess = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional CipherChallenge challenge = 2; - * @return {?proto.poolrpc.CipherChallenge} - */ -proto.poolrpc.CipherInitResp.prototype.getChallenge = function() { - return /** @type{?proto.poolrpc.CipherChallenge} */ ( - jspb.Message.getWrapperField(this, proto.poolrpc.CipherChallenge, 2)); -}; - - -/** - * @param {?proto.poolrpc.CipherChallenge|undefined} value - * @return {!proto.poolrpc.CipherInitResp} returns this -*/ -proto.poolrpc.CipherInitResp.prototype.setChallenge = function(value) { - return jspb.Message.setOneofWrapperField(this, 2, proto.poolrpc.CipherInitResp.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.poolrpc.CipherInitResp} returns this - */ -proto.poolrpc.CipherInitResp.prototype.clearChallenge = function() { - return this.setChallenge(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.poolrpc.CipherInitResp.prototype.hasChallenge = function() { - return jspb.Message.getField(this, 2) != null; -}; - - -/** - * optional CipherError error = 3; - * @return {?proto.poolrpc.CipherError} - */ -proto.poolrpc.CipherInitResp.prototype.getError = function() { - return /** @type{?proto.poolrpc.CipherError} */ ( - jspb.Message.getWrapperField(this, proto.poolrpc.CipherError, 3)); -}; - - -/** - * @param {?proto.poolrpc.CipherError|undefined} value - * @return {!proto.poolrpc.CipherInitResp} returns this -*/ -proto.poolrpc.CipherInitResp.prototype.setError = function(value) { - return jspb.Message.setOneofWrapperField(this, 3, proto.poolrpc.CipherInitResp.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.poolrpc.CipherInitResp} returns this - */ -proto.poolrpc.CipherInitResp.prototype.clearError = function() { - return this.setError(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.poolrpc.CipherInitResp.prototype.hasError = function() { - return jspb.Message.getField(this, 3) != null; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.poolrpc.CipherBoxDesc.prototype.toObject = function(opt_includeInstance) { - return proto.poolrpc.CipherBoxDesc.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.poolrpc.CipherBoxDesc} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.CipherBoxDesc.toObject = function(includeInstance, msg) { - var f, obj = { - streamId: msg.getStreamId_asB64() - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.poolrpc.CipherBoxDesc} - */ -proto.poolrpc.CipherBoxDesc.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.poolrpc.CipherBoxDesc; - return proto.poolrpc.CipherBoxDesc.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.poolrpc.CipherBoxDesc} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.poolrpc.CipherBoxDesc} - */ -proto.poolrpc.CipherBoxDesc.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setStreamId(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.poolrpc.CipherBoxDesc.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.poolrpc.CipherBoxDesc.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.poolrpc.CipherBoxDesc} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.CipherBoxDesc.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getStreamId_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } -}; - - -/** - * optional bytes stream_id = 1; - * @return {!(string|Uint8Array)} - */ -proto.poolrpc.CipherBoxDesc.prototype.getStreamId = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes stream_id = 1; - * This is a type-conversion wrapper around `getStreamId()` - * @return {string} - */ -proto.poolrpc.CipherBoxDesc.prototype.getStreamId_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getStreamId())); -}; - - -/** - * optional bytes stream_id = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getStreamId()` - * @return {!Uint8Array} - */ -proto.poolrpc.CipherBoxDesc.prototype.getStreamId_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getStreamId())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.poolrpc.CipherBoxDesc} returns this - */ -proto.poolrpc.CipherBoxDesc.prototype.setStreamId = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.poolrpc.CipherBox.prototype.toObject = function(opt_includeInstance) { - return proto.poolrpc.CipherBox.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.poolrpc.CipherBox} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.CipherBox.toObject = function(includeInstance, msg) { - var f, obj = { - desc: (f = msg.getDesc()) && proto.poolrpc.CipherBoxDesc.toObject(includeInstance, f), - msg: msg.getMsg_asB64() - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.poolrpc.CipherBox} - */ -proto.poolrpc.CipherBox.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.poolrpc.CipherBox; - return proto.poolrpc.CipherBox.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.poolrpc.CipherBox} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.poolrpc.CipherBox} - */ -proto.poolrpc.CipherBox.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.poolrpc.CipherBoxDesc; - reader.readMessage(value,proto.poolrpc.CipherBoxDesc.deserializeBinaryFromReader); - msg.setDesc(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setMsg(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.poolrpc.CipherBox.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.poolrpc.CipherBox.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.poolrpc.CipherBox} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.CipherBox.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getDesc(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.poolrpc.CipherBoxDesc.serializeBinaryToWriter - ); - } - f = message.getMsg_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } -}; - - -/** - * optional CipherBoxDesc desc = 1; - * @return {?proto.poolrpc.CipherBoxDesc} - */ -proto.poolrpc.CipherBox.prototype.getDesc = function() { - return /** @type{?proto.poolrpc.CipherBoxDesc} */ ( - jspb.Message.getWrapperField(this, proto.poolrpc.CipherBoxDesc, 1)); -}; - - -/** - * @param {?proto.poolrpc.CipherBoxDesc|undefined} value - * @return {!proto.poolrpc.CipherBox} returns this -*/ -proto.poolrpc.CipherBox.prototype.setDesc = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.poolrpc.CipherBox} returns this - */ -proto.poolrpc.CipherBox.prototype.clearDesc = function() { - return this.setDesc(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.poolrpc.CipherBox.prototype.hasDesc = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional bytes msg = 2; - * @return {!(string|Uint8Array)} - */ -proto.poolrpc.CipherBox.prototype.getMsg = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes msg = 2; - * This is a type-conversion wrapper around `getMsg()` - * @return {string} - */ -proto.poolrpc.CipherBox.prototype.getMsg_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getMsg())); -}; - - -/** - * optional bytes msg = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getMsg()` - * @return {!Uint8Array} - */ -proto.poolrpc.CipherBox.prototype.getMsg_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getMsg())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.poolrpc.CipherBox} returns this - */ -proto.poolrpc.CipherBox.prototype.setMsg = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); -}; - - -goog.object.extend(exports, proto.poolrpc); diff --git a/lib/types/generated/auctioneerrpc/hashmail_pb_service.d.ts b/lib/types/generated/auctioneerrpc/hashmail_pb_service.d.ts deleted file mode 100644 index b28e38c..0000000 --- a/lib/types/generated/auctioneerrpc/hashmail_pb_service.d.ts +++ /dev/null @@ -1,104 +0,0 @@ -// package: poolrpc -// file: auctioneerrpc/hashmail.proto - -import * as auctioneerrpc_hashmail_pb from "../auctioneerrpc/hashmail_pb"; -import {grpc} from "@improbable-eng/grpc-web"; - -type HashMailNewCipherBox = { - readonly methodName: string; - readonly service: typeof HashMail; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof auctioneerrpc_hashmail_pb.CipherBoxAuth; - readonly responseType: typeof auctioneerrpc_hashmail_pb.CipherInitResp; -}; - -type HashMailDelCipherBox = { - readonly methodName: string; - readonly service: typeof HashMail; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof auctioneerrpc_hashmail_pb.CipherBoxAuth; - readonly responseType: typeof auctioneerrpc_hashmail_pb.DelCipherBoxResp; -}; - -type HashMailSendStream = { - readonly methodName: string; - readonly service: typeof HashMail; - readonly requestStream: true; - readonly responseStream: false; - readonly requestType: typeof auctioneerrpc_hashmail_pb.CipherBox; - readonly responseType: typeof auctioneerrpc_hashmail_pb.CipherBoxDesc; -}; - -type HashMailRecvStream = { - readonly methodName: string; - readonly service: typeof HashMail; - readonly requestStream: false; - readonly responseStream: true; - readonly requestType: typeof auctioneerrpc_hashmail_pb.CipherBoxDesc; - readonly responseType: typeof auctioneerrpc_hashmail_pb.CipherBox; -}; - -export class HashMail { - static readonly serviceName: string; - static readonly NewCipherBox: HashMailNewCipherBox; - static readonly DelCipherBox: HashMailDelCipherBox; - static readonly SendStream: HashMailSendStream; - static readonly RecvStream: HashMailRecvStream; -} - -export type ServiceError = { message: string, code: number; metadata: grpc.Metadata } -export type Status = { details: string, code: number; metadata: grpc.Metadata } - -interface UnaryResponse { - cancel(): void; -} -interface ResponseStream { - cancel(): void; - on(type: 'data', handler: (message: T) => void): ResponseStream; - on(type: 'end', handler: (status?: Status) => void): ResponseStream; - on(type: 'status', handler: (status: Status) => void): ResponseStream; -} -interface RequestStream { - write(message: T): RequestStream; - end(): void; - cancel(): void; - on(type: 'end', handler: (status?: Status) => void): RequestStream; - on(type: 'status', handler: (status: Status) => void): RequestStream; -} -interface BidirectionalStream { - write(message: ReqT): BidirectionalStream; - end(): void; - cancel(): void; - on(type: 'data', handler: (message: ResT) => void): BidirectionalStream; - on(type: 'end', handler: (status?: Status) => void): BidirectionalStream; - on(type: 'status', handler: (status: Status) => void): BidirectionalStream; -} - -export class HashMailClient { - readonly serviceHost: string; - - constructor(serviceHost: string, options?: grpc.RpcOptions); - newCipherBox( - requestMessage: auctioneerrpc_hashmail_pb.CipherBoxAuth, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: auctioneerrpc_hashmail_pb.CipherInitResp|null) => void - ): UnaryResponse; - newCipherBox( - requestMessage: auctioneerrpc_hashmail_pb.CipherBoxAuth, - callback: (error: ServiceError|null, responseMessage: auctioneerrpc_hashmail_pb.CipherInitResp|null) => void - ): UnaryResponse; - delCipherBox( - requestMessage: auctioneerrpc_hashmail_pb.CipherBoxAuth, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: auctioneerrpc_hashmail_pb.DelCipherBoxResp|null) => void - ): UnaryResponse; - delCipherBox( - requestMessage: auctioneerrpc_hashmail_pb.CipherBoxAuth, - callback: (error: ServiceError|null, responseMessage: auctioneerrpc_hashmail_pb.DelCipherBoxResp|null) => void - ): UnaryResponse; - sendStream(metadata?: grpc.Metadata): RequestStream; - recvStream(requestMessage: auctioneerrpc_hashmail_pb.CipherBoxDesc, metadata?: grpc.Metadata): ResponseStream; -} - diff --git a/lib/types/generated/auctioneerrpc/hashmail_pb_service.js b/lib/types/generated/auctioneerrpc/hashmail_pb_service.js deleted file mode 100644 index 4524b2b..0000000 --- a/lib/types/generated/auctioneerrpc/hashmail_pb_service.js +++ /dev/null @@ -1,199 +0,0 @@ -// package: poolrpc -// file: auctioneerrpc/hashmail.proto - -var auctioneerrpc_hashmail_pb = require("../auctioneerrpc/hashmail_pb"); -var grpc = require("@improbable-eng/grpc-web").grpc; - -var HashMail = (function () { - function HashMail() {} - HashMail.serviceName = "poolrpc.HashMail"; - return HashMail; -}()); - -HashMail.NewCipherBox = { - methodName: "NewCipherBox", - service: HashMail, - requestStream: false, - responseStream: false, - requestType: auctioneerrpc_hashmail_pb.CipherBoxAuth, - responseType: auctioneerrpc_hashmail_pb.CipherInitResp -}; - -HashMail.DelCipherBox = { - methodName: "DelCipherBox", - service: HashMail, - requestStream: false, - responseStream: false, - requestType: auctioneerrpc_hashmail_pb.CipherBoxAuth, - responseType: auctioneerrpc_hashmail_pb.DelCipherBoxResp -}; - -HashMail.SendStream = { - methodName: "SendStream", - service: HashMail, - requestStream: true, - responseStream: false, - requestType: auctioneerrpc_hashmail_pb.CipherBox, - responseType: auctioneerrpc_hashmail_pb.CipherBoxDesc -}; - -HashMail.RecvStream = { - methodName: "RecvStream", - service: HashMail, - requestStream: false, - responseStream: true, - requestType: auctioneerrpc_hashmail_pb.CipherBoxDesc, - responseType: auctioneerrpc_hashmail_pb.CipherBox -}; - -exports.HashMail = HashMail; - -function HashMailClient(serviceHost, options) { - this.serviceHost = serviceHost; - this.options = options || {}; -} - -HashMailClient.prototype.newCipherBox = function newCipherBox(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(HashMail.NewCipherBox, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -HashMailClient.prototype.delCipherBox = function delCipherBox(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(HashMail.DelCipherBox, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -HashMailClient.prototype.sendStream = function sendStream(metadata) { - var listeners = { - end: [], - status: [] - }; - var client = grpc.client(HashMail.SendStream, { - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport - }); - client.onEnd(function (status, statusMessage, trailers) { - listeners.status.forEach(function (handler) { - handler({ code: status, details: statusMessage, metadata: trailers }); - }); - listeners.end.forEach(function (handler) { - handler({ code: status, details: statusMessage, metadata: trailers }); - }); - listeners = null; - }); - return { - on: function (type, handler) { - listeners[type].push(handler); - return this; - }, - write: function (requestMessage) { - if (!client.started) { - client.start(metadata); - } - client.send(requestMessage); - return this; - }, - end: function () { - client.finishSend(); - }, - cancel: function () { - listeners = null; - client.close(); - } - }; -}; - -HashMailClient.prototype.recvStream = function recvStream(requestMessage, metadata) { - var listeners = { - data: [], - end: [], - status: [] - }; - var client = grpc.invoke(HashMail.RecvStream, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onMessage: function (responseMessage) { - listeners.data.forEach(function (handler) { - handler(responseMessage); - }); - }, - onEnd: function (status, statusMessage, trailers) { - listeners.status.forEach(function (handler) { - handler({ code: status, details: statusMessage, metadata: trailers }); - }); - listeners.end.forEach(function (handler) { - handler({ code: status, details: statusMessage, metadata: trailers }); - }); - listeners = null; - } - }); - return { - on: function (type, handler) { - listeners[type].push(handler); - return this; - }, - cancel: function () { - listeners = null; - client.close(); - } - }; -}; - -exports.HashMailClient = HashMailClient; - diff --git a/lib/types/generated/autopilotrpc/autopilot_pb.d.ts b/lib/types/generated/autopilotrpc/autopilot_pb.d.ts deleted file mode 100644 index ebe5256..0000000 --- a/lib/types/generated/autopilotrpc/autopilot_pb.d.ts +++ /dev/null @@ -1,187 +0,0 @@ -// package: autopilotrpc -// file: autopilotrpc/autopilot.proto - -import * as jspb from "google-protobuf"; - -export class StatusRequest extends jspb.Message { - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): StatusRequest.AsObject; - static toObject(includeInstance: boolean, msg: StatusRequest): StatusRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: StatusRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): StatusRequest; - static deserializeBinaryFromReader(message: StatusRequest, reader: jspb.BinaryReader): StatusRequest; -} - -export namespace StatusRequest { - export type AsObject = { - } -} - -export class StatusResponse extends jspb.Message { - getActive(): boolean; - setActive(value: boolean): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): StatusResponse.AsObject; - static toObject(includeInstance: boolean, msg: StatusResponse): StatusResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: StatusResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): StatusResponse; - static deserializeBinaryFromReader(message: StatusResponse, reader: jspb.BinaryReader): StatusResponse; -} - -export namespace StatusResponse { - export type AsObject = { - active: boolean, - } -} - -export class ModifyStatusRequest extends jspb.Message { - getEnable(): boolean; - setEnable(value: boolean): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ModifyStatusRequest.AsObject; - static toObject(includeInstance: boolean, msg: ModifyStatusRequest): ModifyStatusRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ModifyStatusRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ModifyStatusRequest; - static deserializeBinaryFromReader(message: ModifyStatusRequest, reader: jspb.BinaryReader): ModifyStatusRequest; -} - -export namespace ModifyStatusRequest { - export type AsObject = { - enable: boolean, - } -} - -export class ModifyStatusResponse extends jspb.Message { - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ModifyStatusResponse.AsObject; - static toObject(includeInstance: boolean, msg: ModifyStatusResponse): ModifyStatusResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ModifyStatusResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ModifyStatusResponse; - static deserializeBinaryFromReader(message: ModifyStatusResponse, reader: jspb.BinaryReader): ModifyStatusResponse; -} - -export namespace ModifyStatusResponse { - export type AsObject = { - } -} - -export class QueryScoresRequest extends jspb.Message { - clearPubkeysList(): void; - getPubkeysList(): Array; - setPubkeysList(value: Array): void; - addPubkeys(value: string, index?: number): string; - - getIgnoreLocalState(): boolean; - setIgnoreLocalState(value: boolean): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): QueryScoresRequest.AsObject; - static toObject(includeInstance: boolean, msg: QueryScoresRequest): QueryScoresRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: QueryScoresRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): QueryScoresRequest; - static deserializeBinaryFromReader(message: QueryScoresRequest, reader: jspb.BinaryReader): QueryScoresRequest; -} - -export namespace QueryScoresRequest { - export type AsObject = { - pubkeys: Array, - ignoreLocalState: boolean, - } -} - -export class QueryScoresResponse extends jspb.Message { - clearResultsList(): void; - getResultsList(): Array; - setResultsList(value: Array): void; - addResults(value?: QueryScoresResponse.HeuristicResult, index?: number): QueryScoresResponse.HeuristicResult; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): QueryScoresResponse.AsObject; - static toObject(includeInstance: boolean, msg: QueryScoresResponse): QueryScoresResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: QueryScoresResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): QueryScoresResponse; - static deserializeBinaryFromReader(message: QueryScoresResponse, reader: jspb.BinaryReader): QueryScoresResponse; -} - -export namespace QueryScoresResponse { - export type AsObject = { - results: Array, - } - - export class HeuristicResult extends jspb.Message { - getHeuristic(): string; - setHeuristic(value: string): void; - - getScoresMap(): jspb.Map; - clearScoresMap(): void; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): HeuristicResult.AsObject; - static toObject(includeInstance: boolean, msg: HeuristicResult): HeuristicResult.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: HeuristicResult, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): HeuristicResult; - static deserializeBinaryFromReader(message: HeuristicResult, reader: jspb.BinaryReader): HeuristicResult; - } - - export namespace HeuristicResult { - export type AsObject = { - heuristic: string, - scores: Array<[string, number]>, - } - } -} - -export class SetScoresRequest extends jspb.Message { - getHeuristic(): string; - setHeuristic(value: string): void; - - getScoresMap(): jspb.Map; - clearScoresMap(): void; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): SetScoresRequest.AsObject; - static toObject(includeInstance: boolean, msg: SetScoresRequest): SetScoresRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: SetScoresRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): SetScoresRequest; - static deserializeBinaryFromReader(message: SetScoresRequest, reader: jspb.BinaryReader): SetScoresRequest; -} - -export namespace SetScoresRequest { - export type AsObject = { - heuristic: string, - scores: Array<[string, number]>, - } -} - -export class SetScoresResponse extends jspb.Message { - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): SetScoresResponse.AsObject; - static toObject(includeInstance: boolean, msg: SetScoresResponse): SetScoresResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: SetScoresResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): SetScoresResponse; - static deserializeBinaryFromReader(message: SetScoresResponse, reader: jspb.BinaryReader): SetScoresResponse; -} - -export namespace SetScoresResponse { - export type AsObject = { - } -} - diff --git a/lib/types/generated/autopilotrpc/autopilot_pb.js b/lib/types/generated/autopilotrpc/autopilot_pb.js deleted file mode 100644 index 0ecc131..0000000 --- a/lib/types/generated/autopilotrpc/autopilot_pb.js +++ /dev/null @@ -1,1451 +0,0 @@ -// source: autopilotrpc/autopilot.proto -/** - * @fileoverview - * @enhanceable - * @suppress {missingRequire} reports error on implicit type usages. - * @suppress {messageConventions} JS Compiler reports an error if a variable or - * field starts with 'MSG_' and isn't a translatable message. - * @public - */ -// GENERATED CODE -- DO NOT EDIT! -/* eslint-disable */ -// @ts-nocheck - -var jspb = require('google-protobuf'); -var goog = jspb; -var global = Function('return this')(); - -goog.exportSymbol('proto.autopilotrpc.ModifyStatusRequest', null, global); -goog.exportSymbol('proto.autopilotrpc.ModifyStatusResponse', null, global); -goog.exportSymbol('proto.autopilotrpc.QueryScoresRequest', null, global); -goog.exportSymbol('proto.autopilotrpc.QueryScoresResponse', null, global); -goog.exportSymbol('proto.autopilotrpc.QueryScoresResponse.HeuristicResult', null, global); -goog.exportSymbol('proto.autopilotrpc.SetScoresRequest', null, global); -goog.exportSymbol('proto.autopilotrpc.SetScoresResponse', null, global); -goog.exportSymbol('proto.autopilotrpc.StatusRequest', null, global); -goog.exportSymbol('proto.autopilotrpc.StatusResponse', null, global); -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.autopilotrpc.StatusRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.autopilotrpc.StatusRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.autopilotrpc.StatusRequest.displayName = 'proto.autopilotrpc.StatusRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.autopilotrpc.StatusResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.autopilotrpc.StatusResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.autopilotrpc.StatusResponse.displayName = 'proto.autopilotrpc.StatusResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.autopilotrpc.ModifyStatusRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.autopilotrpc.ModifyStatusRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.autopilotrpc.ModifyStatusRequest.displayName = 'proto.autopilotrpc.ModifyStatusRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.autopilotrpc.ModifyStatusResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.autopilotrpc.ModifyStatusResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.autopilotrpc.ModifyStatusResponse.displayName = 'proto.autopilotrpc.ModifyStatusResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.autopilotrpc.QueryScoresRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.autopilotrpc.QueryScoresRequest.repeatedFields_, null); -}; -goog.inherits(proto.autopilotrpc.QueryScoresRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.autopilotrpc.QueryScoresRequest.displayName = 'proto.autopilotrpc.QueryScoresRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.autopilotrpc.QueryScoresResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.autopilotrpc.QueryScoresResponse.repeatedFields_, null); -}; -goog.inherits(proto.autopilotrpc.QueryScoresResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.autopilotrpc.QueryScoresResponse.displayName = 'proto.autopilotrpc.QueryScoresResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.autopilotrpc.QueryScoresResponse.HeuristicResult = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.autopilotrpc.QueryScoresResponse.HeuristicResult, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.autopilotrpc.QueryScoresResponse.HeuristicResult.displayName = 'proto.autopilotrpc.QueryScoresResponse.HeuristicResult'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.autopilotrpc.SetScoresRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.autopilotrpc.SetScoresRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.autopilotrpc.SetScoresRequest.displayName = 'proto.autopilotrpc.SetScoresRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.autopilotrpc.SetScoresResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.autopilotrpc.SetScoresResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.autopilotrpc.SetScoresResponse.displayName = 'proto.autopilotrpc.SetScoresResponse'; -} - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.autopilotrpc.StatusRequest.prototype.toObject = function(opt_includeInstance) { - return proto.autopilotrpc.StatusRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.autopilotrpc.StatusRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.autopilotrpc.StatusRequest.toObject = function(includeInstance, msg) { - var f, obj = { - - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.autopilotrpc.StatusRequest} - */ -proto.autopilotrpc.StatusRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.autopilotrpc.StatusRequest; - return proto.autopilotrpc.StatusRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.autopilotrpc.StatusRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.autopilotrpc.StatusRequest} - */ -proto.autopilotrpc.StatusRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.autopilotrpc.StatusRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.autopilotrpc.StatusRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.autopilotrpc.StatusRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.autopilotrpc.StatusRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.autopilotrpc.StatusResponse.prototype.toObject = function(opt_includeInstance) { - return proto.autopilotrpc.StatusResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.autopilotrpc.StatusResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.autopilotrpc.StatusResponse.toObject = function(includeInstance, msg) { - var f, obj = { - active: jspb.Message.getBooleanFieldWithDefault(msg, 1, false) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.autopilotrpc.StatusResponse} - */ -proto.autopilotrpc.StatusResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.autopilotrpc.StatusResponse; - return proto.autopilotrpc.StatusResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.autopilotrpc.StatusResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.autopilotrpc.StatusResponse} - */ -proto.autopilotrpc.StatusResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setActive(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.autopilotrpc.StatusResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.autopilotrpc.StatusResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.autopilotrpc.StatusResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.autopilotrpc.StatusResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getActive(); - if (f) { - writer.writeBool( - 1, - f - ); - } -}; - - -/** - * optional bool active = 1; - * @return {boolean} - */ -proto.autopilotrpc.StatusResponse.prototype.getActive = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.autopilotrpc.StatusResponse} returns this - */ -proto.autopilotrpc.StatusResponse.prototype.setActive = function(value) { - return jspb.Message.setProto3BooleanField(this, 1, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.autopilotrpc.ModifyStatusRequest.prototype.toObject = function(opt_includeInstance) { - return proto.autopilotrpc.ModifyStatusRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.autopilotrpc.ModifyStatusRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.autopilotrpc.ModifyStatusRequest.toObject = function(includeInstance, msg) { - var f, obj = { - enable: jspb.Message.getBooleanFieldWithDefault(msg, 1, false) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.autopilotrpc.ModifyStatusRequest} - */ -proto.autopilotrpc.ModifyStatusRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.autopilotrpc.ModifyStatusRequest; - return proto.autopilotrpc.ModifyStatusRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.autopilotrpc.ModifyStatusRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.autopilotrpc.ModifyStatusRequest} - */ -proto.autopilotrpc.ModifyStatusRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setEnable(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.autopilotrpc.ModifyStatusRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.autopilotrpc.ModifyStatusRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.autopilotrpc.ModifyStatusRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.autopilotrpc.ModifyStatusRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getEnable(); - if (f) { - writer.writeBool( - 1, - f - ); - } -}; - - -/** - * optional bool enable = 1; - * @return {boolean} - */ -proto.autopilotrpc.ModifyStatusRequest.prototype.getEnable = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.autopilotrpc.ModifyStatusRequest} returns this - */ -proto.autopilotrpc.ModifyStatusRequest.prototype.setEnable = function(value) { - return jspb.Message.setProto3BooleanField(this, 1, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.autopilotrpc.ModifyStatusResponse.prototype.toObject = function(opt_includeInstance) { - return proto.autopilotrpc.ModifyStatusResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.autopilotrpc.ModifyStatusResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.autopilotrpc.ModifyStatusResponse.toObject = function(includeInstance, msg) { - var f, obj = { - - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.autopilotrpc.ModifyStatusResponse} - */ -proto.autopilotrpc.ModifyStatusResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.autopilotrpc.ModifyStatusResponse; - return proto.autopilotrpc.ModifyStatusResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.autopilotrpc.ModifyStatusResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.autopilotrpc.ModifyStatusResponse} - */ -proto.autopilotrpc.ModifyStatusResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.autopilotrpc.ModifyStatusResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.autopilotrpc.ModifyStatusResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.autopilotrpc.ModifyStatusResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.autopilotrpc.ModifyStatusResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.autopilotrpc.QueryScoresRequest.repeatedFields_ = [1]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.autopilotrpc.QueryScoresRequest.prototype.toObject = function(opt_includeInstance) { - return proto.autopilotrpc.QueryScoresRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.autopilotrpc.QueryScoresRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.autopilotrpc.QueryScoresRequest.toObject = function(includeInstance, msg) { - var f, obj = { - pubkeysList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : f, - ignoreLocalState: jspb.Message.getBooleanFieldWithDefault(msg, 2, false) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.autopilotrpc.QueryScoresRequest} - */ -proto.autopilotrpc.QueryScoresRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.autopilotrpc.QueryScoresRequest; - return proto.autopilotrpc.QueryScoresRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.autopilotrpc.QueryScoresRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.autopilotrpc.QueryScoresRequest} - */ -proto.autopilotrpc.QueryScoresRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.addPubkeys(value); - break; - case 2: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setIgnoreLocalState(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.autopilotrpc.QueryScoresRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.autopilotrpc.QueryScoresRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.autopilotrpc.QueryScoresRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.autopilotrpc.QueryScoresRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getPubkeysList(); - if (f.length > 0) { - writer.writeRepeatedString( - 1, - f - ); - } - f = message.getIgnoreLocalState(); - if (f) { - writer.writeBool( - 2, - f - ); - } -}; - - -/** - * repeated string pubkeys = 1; - * @return {!Array} - */ -proto.autopilotrpc.QueryScoresRequest.prototype.getPubkeysList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); -}; - - -/** - * @param {!Array} value - * @return {!proto.autopilotrpc.QueryScoresRequest} returns this - */ -proto.autopilotrpc.QueryScoresRequest.prototype.setPubkeysList = function(value) { - return jspb.Message.setField(this, 1, value || []); -}; - - -/** - * @param {string} value - * @param {number=} opt_index - * @return {!proto.autopilotrpc.QueryScoresRequest} returns this - */ -proto.autopilotrpc.QueryScoresRequest.prototype.addPubkeys = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 1, value, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.autopilotrpc.QueryScoresRequest} returns this - */ -proto.autopilotrpc.QueryScoresRequest.prototype.clearPubkeysList = function() { - return this.setPubkeysList([]); -}; - - -/** - * optional bool ignore_local_state = 2; - * @return {boolean} - */ -proto.autopilotrpc.QueryScoresRequest.prototype.getIgnoreLocalState = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.autopilotrpc.QueryScoresRequest} returns this - */ -proto.autopilotrpc.QueryScoresRequest.prototype.setIgnoreLocalState = function(value) { - return jspb.Message.setProto3BooleanField(this, 2, value); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.autopilotrpc.QueryScoresResponse.repeatedFields_ = [1]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.autopilotrpc.QueryScoresResponse.prototype.toObject = function(opt_includeInstance) { - return proto.autopilotrpc.QueryScoresResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.autopilotrpc.QueryScoresResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.autopilotrpc.QueryScoresResponse.toObject = function(includeInstance, msg) { - var f, obj = { - resultsList: jspb.Message.toObjectList(msg.getResultsList(), - proto.autopilotrpc.QueryScoresResponse.HeuristicResult.toObject, includeInstance) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.autopilotrpc.QueryScoresResponse} - */ -proto.autopilotrpc.QueryScoresResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.autopilotrpc.QueryScoresResponse; - return proto.autopilotrpc.QueryScoresResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.autopilotrpc.QueryScoresResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.autopilotrpc.QueryScoresResponse} - */ -proto.autopilotrpc.QueryScoresResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.autopilotrpc.QueryScoresResponse.HeuristicResult; - reader.readMessage(value,proto.autopilotrpc.QueryScoresResponse.HeuristicResult.deserializeBinaryFromReader); - msg.addResults(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.autopilotrpc.QueryScoresResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.autopilotrpc.QueryScoresResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.autopilotrpc.QueryScoresResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.autopilotrpc.QueryScoresResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getResultsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 1, - f, - proto.autopilotrpc.QueryScoresResponse.HeuristicResult.serializeBinaryToWriter - ); - } -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.autopilotrpc.QueryScoresResponse.HeuristicResult.prototype.toObject = function(opt_includeInstance) { - return proto.autopilotrpc.QueryScoresResponse.HeuristicResult.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.autopilotrpc.QueryScoresResponse.HeuristicResult} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.autopilotrpc.QueryScoresResponse.HeuristicResult.toObject = function(includeInstance, msg) { - var f, obj = { - heuristic: jspb.Message.getFieldWithDefault(msg, 1, ""), - scoresMap: (f = msg.getScoresMap()) ? f.toObject(includeInstance, undefined) : [] - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.autopilotrpc.QueryScoresResponse.HeuristicResult} - */ -proto.autopilotrpc.QueryScoresResponse.HeuristicResult.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.autopilotrpc.QueryScoresResponse.HeuristicResult; - return proto.autopilotrpc.QueryScoresResponse.HeuristicResult.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.autopilotrpc.QueryScoresResponse.HeuristicResult} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.autopilotrpc.QueryScoresResponse.HeuristicResult} - */ -proto.autopilotrpc.QueryScoresResponse.HeuristicResult.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setHeuristic(value); - break; - case 2: - var value = msg.getScoresMap(); - reader.readMessage(value, function(message, reader) { - jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readDouble, null, "", 0.0); - }); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.autopilotrpc.QueryScoresResponse.HeuristicResult.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.autopilotrpc.QueryScoresResponse.HeuristicResult.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.autopilotrpc.QueryScoresResponse.HeuristicResult} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.autopilotrpc.QueryScoresResponse.HeuristicResult.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getHeuristic(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getScoresMap(true); - if (f && f.getLength() > 0) { - f.serializeBinary(2, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeDouble); - } -}; - - -/** - * optional string heuristic = 1; - * @return {string} - */ -proto.autopilotrpc.QueryScoresResponse.HeuristicResult.prototype.getHeuristic = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.autopilotrpc.QueryScoresResponse.HeuristicResult} returns this - */ -proto.autopilotrpc.QueryScoresResponse.HeuristicResult.prototype.setHeuristic = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * map scores = 2; - * @param {boolean=} opt_noLazyCreate Do not create the map if - * empty, instead returning `undefined` - * @return {!jspb.Map} - */ -proto.autopilotrpc.QueryScoresResponse.HeuristicResult.prototype.getScoresMap = function(opt_noLazyCreate) { - return /** @type {!jspb.Map} */ ( - jspb.Message.getMapField(this, 2, opt_noLazyCreate, - null)); -}; - - -/** - * Clears values from the map. The map will be non-null. - * @return {!proto.autopilotrpc.QueryScoresResponse.HeuristicResult} returns this - */ -proto.autopilotrpc.QueryScoresResponse.HeuristicResult.prototype.clearScoresMap = function() { - this.getScoresMap().clear(); - return this;}; - - -/** - * repeated HeuristicResult results = 1; - * @return {!Array} - */ -proto.autopilotrpc.QueryScoresResponse.prototype.getResultsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.autopilotrpc.QueryScoresResponse.HeuristicResult, 1)); -}; - - -/** - * @param {!Array} value - * @return {!proto.autopilotrpc.QueryScoresResponse} returns this -*/ -proto.autopilotrpc.QueryScoresResponse.prototype.setResultsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); -}; - - -/** - * @param {!proto.autopilotrpc.QueryScoresResponse.HeuristicResult=} opt_value - * @param {number=} opt_index - * @return {!proto.autopilotrpc.QueryScoresResponse.HeuristicResult} - */ -proto.autopilotrpc.QueryScoresResponse.prototype.addResults = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.autopilotrpc.QueryScoresResponse.HeuristicResult, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.autopilotrpc.QueryScoresResponse} returns this - */ -proto.autopilotrpc.QueryScoresResponse.prototype.clearResultsList = function() { - return this.setResultsList([]); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.autopilotrpc.SetScoresRequest.prototype.toObject = function(opt_includeInstance) { - return proto.autopilotrpc.SetScoresRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.autopilotrpc.SetScoresRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.autopilotrpc.SetScoresRequest.toObject = function(includeInstance, msg) { - var f, obj = { - heuristic: jspb.Message.getFieldWithDefault(msg, 1, ""), - scoresMap: (f = msg.getScoresMap()) ? f.toObject(includeInstance, undefined) : [] - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.autopilotrpc.SetScoresRequest} - */ -proto.autopilotrpc.SetScoresRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.autopilotrpc.SetScoresRequest; - return proto.autopilotrpc.SetScoresRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.autopilotrpc.SetScoresRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.autopilotrpc.SetScoresRequest} - */ -proto.autopilotrpc.SetScoresRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setHeuristic(value); - break; - case 2: - var value = msg.getScoresMap(); - reader.readMessage(value, function(message, reader) { - jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readDouble, null, "", 0.0); - }); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.autopilotrpc.SetScoresRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.autopilotrpc.SetScoresRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.autopilotrpc.SetScoresRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.autopilotrpc.SetScoresRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getHeuristic(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getScoresMap(true); - if (f && f.getLength() > 0) { - f.serializeBinary(2, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeDouble); - } -}; - - -/** - * optional string heuristic = 1; - * @return {string} - */ -proto.autopilotrpc.SetScoresRequest.prototype.getHeuristic = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.autopilotrpc.SetScoresRequest} returns this - */ -proto.autopilotrpc.SetScoresRequest.prototype.setHeuristic = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * map scores = 2; - * @param {boolean=} opt_noLazyCreate Do not create the map if - * empty, instead returning `undefined` - * @return {!jspb.Map} - */ -proto.autopilotrpc.SetScoresRequest.prototype.getScoresMap = function(opt_noLazyCreate) { - return /** @type {!jspb.Map} */ ( - jspb.Message.getMapField(this, 2, opt_noLazyCreate, - null)); -}; - - -/** - * Clears values from the map. The map will be non-null. - * @return {!proto.autopilotrpc.SetScoresRequest} returns this - */ -proto.autopilotrpc.SetScoresRequest.prototype.clearScoresMap = function() { - this.getScoresMap().clear(); - return this;}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.autopilotrpc.SetScoresResponse.prototype.toObject = function(opt_includeInstance) { - return proto.autopilotrpc.SetScoresResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.autopilotrpc.SetScoresResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.autopilotrpc.SetScoresResponse.toObject = function(includeInstance, msg) { - var f, obj = { - - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.autopilotrpc.SetScoresResponse} - */ -proto.autopilotrpc.SetScoresResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.autopilotrpc.SetScoresResponse; - return proto.autopilotrpc.SetScoresResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.autopilotrpc.SetScoresResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.autopilotrpc.SetScoresResponse} - */ -proto.autopilotrpc.SetScoresResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.autopilotrpc.SetScoresResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.autopilotrpc.SetScoresResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.autopilotrpc.SetScoresResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.autopilotrpc.SetScoresResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; -}; - - -goog.object.extend(exports, proto.autopilotrpc); diff --git a/lib/types/generated/autopilotrpc/autopilot_pb_service.d.ts b/lib/types/generated/autopilotrpc/autopilot_pb_service.d.ts deleted file mode 100644 index 110fd5b..0000000 --- a/lib/types/generated/autopilotrpc/autopilot_pb_service.d.ts +++ /dev/null @@ -1,120 +0,0 @@ -// package: autopilotrpc -// file: autopilotrpc/autopilot.proto - -import * as autopilotrpc_autopilot_pb from "../autopilotrpc/autopilot_pb"; -import {grpc} from "@improbable-eng/grpc-web"; - -type AutopilotStatus = { - readonly methodName: string; - readonly service: typeof Autopilot; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof autopilotrpc_autopilot_pb.StatusRequest; - readonly responseType: typeof autopilotrpc_autopilot_pb.StatusResponse; -}; - -type AutopilotModifyStatus = { - readonly methodName: string; - readonly service: typeof Autopilot; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof autopilotrpc_autopilot_pb.ModifyStatusRequest; - readonly responseType: typeof autopilotrpc_autopilot_pb.ModifyStatusResponse; -}; - -type AutopilotQueryScores = { - readonly methodName: string; - readonly service: typeof Autopilot; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof autopilotrpc_autopilot_pb.QueryScoresRequest; - readonly responseType: typeof autopilotrpc_autopilot_pb.QueryScoresResponse; -}; - -type AutopilotSetScores = { - readonly methodName: string; - readonly service: typeof Autopilot; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof autopilotrpc_autopilot_pb.SetScoresRequest; - readonly responseType: typeof autopilotrpc_autopilot_pb.SetScoresResponse; -}; - -export class Autopilot { - static readonly serviceName: string; - static readonly Status: AutopilotStatus; - static readonly ModifyStatus: AutopilotModifyStatus; - static readonly QueryScores: AutopilotQueryScores; - static readonly SetScores: AutopilotSetScores; -} - -export type ServiceError = { message: string, code: number; metadata: grpc.Metadata } -export type Status = { details: string, code: number; metadata: grpc.Metadata } - -interface UnaryResponse { - cancel(): void; -} -interface ResponseStream { - cancel(): void; - on(type: 'data', handler: (message: T) => void): ResponseStream; - on(type: 'end', handler: (status?: Status) => void): ResponseStream; - on(type: 'status', handler: (status: Status) => void): ResponseStream; -} -interface RequestStream { - write(message: T): RequestStream; - end(): void; - cancel(): void; - on(type: 'end', handler: (status?: Status) => void): RequestStream; - on(type: 'status', handler: (status: Status) => void): RequestStream; -} -interface BidirectionalStream { - write(message: ReqT): BidirectionalStream; - end(): void; - cancel(): void; - on(type: 'data', handler: (message: ResT) => void): BidirectionalStream; - on(type: 'end', handler: (status?: Status) => void): BidirectionalStream; - on(type: 'status', handler: (status: Status) => void): BidirectionalStream; -} - -export class AutopilotClient { - readonly serviceHost: string; - - constructor(serviceHost: string, options?: grpc.RpcOptions); - status( - requestMessage: autopilotrpc_autopilot_pb.StatusRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: autopilotrpc_autopilot_pb.StatusResponse|null) => void - ): UnaryResponse; - status( - requestMessage: autopilotrpc_autopilot_pb.StatusRequest, - callback: (error: ServiceError|null, responseMessage: autopilotrpc_autopilot_pb.StatusResponse|null) => void - ): UnaryResponse; - modifyStatus( - requestMessage: autopilotrpc_autopilot_pb.ModifyStatusRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: autopilotrpc_autopilot_pb.ModifyStatusResponse|null) => void - ): UnaryResponse; - modifyStatus( - requestMessage: autopilotrpc_autopilot_pb.ModifyStatusRequest, - callback: (error: ServiceError|null, responseMessage: autopilotrpc_autopilot_pb.ModifyStatusResponse|null) => void - ): UnaryResponse; - queryScores( - requestMessage: autopilotrpc_autopilot_pb.QueryScoresRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: autopilotrpc_autopilot_pb.QueryScoresResponse|null) => void - ): UnaryResponse; - queryScores( - requestMessage: autopilotrpc_autopilot_pb.QueryScoresRequest, - callback: (error: ServiceError|null, responseMessage: autopilotrpc_autopilot_pb.QueryScoresResponse|null) => void - ): UnaryResponse; - setScores( - requestMessage: autopilotrpc_autopilot_pb.SetScoresRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: autopilotrpc_autopilot_pb.SetScoresResponse|null) => void - ): UnaryResponse; - setScores( - requestMessage: autopilotrpc_autopilot_pb.SetScoresRequest, - callback: (error: ServiceError|null, responseMessage: autopilotrpc_autopilot_pb.SetScoresResponse|null) => void - ): UnaryResponse; -} - diff --git a/lib/types/generated/autopilotrpc/autopilot_pb_service.js b/lib/types/generated/autopilotrpc/autopilot_pb_service.js deleted file mode 100644 index 2e25416..0000000 --- a/lib/types/generated/autopilotrpc/autopilot_pb_service.js +++ /dev/null @@ -1,181 +0,0 @@ -// package: autopilotrpc -// file: autopilotrpc/autopilot.proto - -var autopilotrpc_autopilot_pb = require("../autopilotrpc/autopilot_pb"); -var grpc = require("@improbable-eng/grpc-web").grpc; - -var Autopilot = (function () { - function Autopilot() {} - Autopilot.serviceName = "autopilotrpc.Autopilot"; - return Autopilot; -}()); - -Autopilot.Status = { - methodName: "Status", - service: Autopilot, - requestStream: false, - responseStream: false, - requestType: autopilotrpc_autopilot_pb.StatusRequest, - responseType: autopilotrpc_autopilot_pb.StatusResponse -}; - -Autopilot.ModifyStatus = { - methodName: "ModifyStatus", - service: Autopilot, - requestStream: false, - responseStream: false, - requestType: autopilotrpc_autopilot_pb.ModifyStatusRequest, - responseType: autopilotrpc_autopilot_pb.ModifyStatusResponse -}; - -Autopilot.QueryScores = { - methodName: "QueryScores", - service: Autopilot, - requestStream: false, - responseStream: false, - requestType: autopilotrpc_autopilot_pb.QueryScoresRequest, - responseType: autopilotrpc_autopilot_pb.QueryScoresResponse -}; - -Autopilot.SetScores = { - methodName: "SetScores", - service: Autopilot, - requestStream: false, - responseStream: false, - requestType: autopilotrpc_autopilot_pb.SetScoresRequest, - responseType: autopilotrpc_autopilot_pb.SetScoresResponse -}; - -exports.Autopilot = Autopilot; - -function AutopilotClient(serviceHost, options) { - this.serviceHost = serviceHost; - this.options = options || {}; -} - -AutopilotClient.prototype.status = function status(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(Autopilot.Status, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -AutopilotClient.prototype.modifyStatus = function modifyStatus(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(Autopilot.ModifyStatus, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -AutopilotClient.prototype.queryScores = function queryScores(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(Autopilot.QueryScores, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -AutopilotClient.prototype.setScores = function setScores(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(Autopilot.SetScores, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -exports.AutopilotClient = AutopilotClient; - diff --git a/lib/types/generated/chainrpc/chainnotifier_pb.d.ts b/lib/types/generated/chainrpc/chainnotifier_pb.d.ts deleted file mode 100644 index 16f221a..0000000 --- a/lib/types/generated/chainrpc/chainnotifier_pb.d.ts +++ /dev/null @@ -1,289 +0,0 @@ -// package: chainrpc -// file: chainrpc/chainnotifier.proto - -import * as jspb from "google-protobuf"; - -export class ConfRequest extends jspb.Message { - getTxid(): Uint8Array | string; - getTxid_asU8(): Uint8Array; - getTxid_asB64(): string; - setTxid(value: Uint8Array | string): void; - - getScript(): Uint8Array | string; - getScript_asU8(): Uint8Array; - getScript_asB64(): string; - setScript(value: Uint8Array | string): void; - - getNumConfs(): number; - setNumConfs(value: number): void; - - getHeightHint(): number; - setHeightHint(value: number): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ConfRequest.AsObject; - static toObject(includeInstance: boolean, msg: ConfRequest): ConfRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ConfRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ConfRequest; - static deserializeBinaryFromReader(message: ConfRequest, reader: jspb.BinaryReader): ConfRequest; -} - -export namespace ConfRequest { - export type AsObject = { - txid: Uint8Array | string, - script: Uint8Array | string, - numConfs: number, - heightHint: number, - } -} - -export class ConfDetails extends jspb.Message { - getRawTx(): Uint8Array | string; - getRawTx_asU8(): Uint8Array; - getRawTx_asB64(): string; - setRawTx(value: Uint8Array | string): void; - - getBlockHash(): Uint8Array | string; - getBlockHash_asU8(): Uint8Array; - getBlockHash_asB64(): string; - setBlockHash(value: Uint8Array | string): void; - - getBlockHeight(): number; - setBlockHeight(value: number): void; - - getTxIndex(): number; - setTxIndex(value: number): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ConfDetails.AsObject; - static toObject(includeInstance: boolean, msg: ConfDetails): ConfDetails.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ConfDetails, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ConfDetails; - static deserializeBinaryFromReader(message: ConfDetails, reader: jspb.BinaryReader): ConfDetails; -} - -export namespace ConfDetails { - export type AsObject = { - rawTx: Uint8Array | string, - blockHash: Uint8Array | string, - blockHeight: number, - txIndex: number, - } -} - -export class Reorg extends jspb.Message { - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Reorg.AsObject; - static toObject(includeInstance: boolean, msg: Reorg): Reorg.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: Reorg, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Reorg; - static deserializeBinaryFromReader(message: Reorg, reader: jspb.BinaryReader): Reorg; -} - -export namespace Reorg { - export type AsObject = { - } -} - -export class ConfEvent extends jspb.Message { - hasConf(): boolean; - clearConf(): void; - getConf(): ConfDetails | undefined; - setConf(value?: ConfDetails): void; - - hasReorg(): boolean; - clearReorg(): void; - getReorg(): Reorg | undefined; - setReorg(value?: Reorg): void; - - getEventCase(): ConfEvent.EventCase; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ConfEvent.AsObject; - static toObject(includeInstance: boolean, msg: ConfEvent): ConfEvent.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ConfEvent, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ConfEvent; - static deserializeBinaryFromReader(message: ConfEvent, reader: jspb.BinaryReader): ConfEvent; -} - -export namespace ConfEvent { - export type AsObject = { - conf?: ConfDetails.AsObject, - reorg?: Reorg.AsObject, - } - - export enum EventCase { - EVENT_NOT_SET = 0, - CONF = 1, - REORG = 2, - } -} - -export class Outpoint extends jspb.Message { - getHash(): Uint8Array | string; - getHash_asU8(): Uint8Array; - getHash_asB64(): string; - setHash(value: Uint8Array | string): void; - - getIndex(): number; - setIndex(value: number): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Outpoint.AsObject; - static toObject(includeInstance: boolean, msg: Outpoint): Outpoint.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: Outpoint, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Outpoint; - static deserializeBinaryFromReader(message: Outpoint, reader: jspb.BinaryReader): Outpoint; -} - -export namespace Outpoint { - export type AsObject = { - hash: Uint8Array | string, - index: number, - } -} - -export class SpendRequest extends jspb.Message { - hasOutpoint(): boolean; - clearOutpoint(): void; - getOutpoint(): Outpoint | undefined; - setOutpoint(value?: Outpoint): void; - - getScript(): Uint8Array | string; - getScript_asU8(): Uint8Array; - getScript_asB64(): string; - setScript(value: Uint8Array | string): void; - - getHeightHint(): number; - setHeightHint(value: number): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): SpendRequest.AsObject; - static toObject(includeInstance: boolean, msg: SpendRequest): SpendRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: SpendRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): SpendRequest; - static deserializeBinaryFromReader(message: SpendRequest, reader: jspb.BinaryReader): SpendRequest; -} - -export namespace SpendRequest { - export type AsObject = { - outpoint?: Outpoint.AsObject, - script: Uint8Array | string, - heightHint: number, - } -} - -export class SpendDetails extends jspb.Message { - hasSpendingOutpoint(): boolean; - clearSpendingOutpoint(): void; - getSpendingOutpoint(): Outpoint | undefined; - setSpendingOutpoint(value?: Outpoint): void; - - getRawSpendingTx(): Uint8Array | string; - getRawSpendingTx_asU8(): Uint8Array; - getRawSpendingTx_asB64(): string; - setRawSpendingTx(value: Uint8Array | string): void; - - getSpendingTxHash(): Uint8Array | string; - getSpendingTxHash_asU8(): Uint8Array; - getSpendingTxHash_asB64(): string; - setSpendingTxHash(value: Uint8Array | string): void; - - getSpendingInputIndex(): number; - setSpendingInputIndex(value: number): void; - - getSpendingHeight(): number; - setSpendingHeight(value: number): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): SpendDetails.AsObject; - static toObject(includeInstance: boolean, msg: SpendDetails): SpendDetails.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: SpendDetails, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): SpendDetails; - static deserializeBinaryFromReader(message: SpendDetails, reader: jspb.BinaryReader): SpendDetails; -} - -export namespace SpendDetails { - export type AsObject = { - spendingOutpoint?: Outpoint.AsObject, - rawSpendingTx: Uint8Array | string, - spendingTxHash: Uint8Array | string, - spendingInputIndex: number, - spendingHeight: number, - } -} - -export class SpendEvent extends jspb.Message { - hasSpend(): boolean; - clearSpend(): void; - getSpend(): SpendDetails | undefined; - setSpend(value?: SpendDetails): void; - - hasReorg(): boolean; - clearReorg(): void; - getReorg(): Reorg | undefined; - setReorg(value?: Reorg): void; - - getEventCase(): SpendEvent.EventCase; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): SpendEvent.AsObject; - static toObject(includeInstance: boolean, msg: SpendEvent): SpendEvent.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: SpendEvent, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): SpendEvent; - static deserializeBinaryFromReader(message: SpendEvent, reader: jspb.BinaryReader): SpendEvent; -} - -export namespace SpendEvent { - export type AsObject = { - spend?: SpendDetails.AsObject, - reorg?: Reorg.AsObject, - } - - export enum EventCase { - EVENT_NOT_SET = 0, - SPEND = 1, - REORG = 2, - } -} - -export class BlockEpoch extends jspb.Message { - getHash(): Uint8Array | string; - getHash_asU8(): Uint8Array; - getHash_asB64(): string; - setHash(value: Uint8Array | string): void; - - getHeight(): number; - setHeight(value: number): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): BlockEpoch.AsObject; - static toObject(includeInstance: boolean, msg: BlockEpoch): BlockEpoch.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: BlockEpoch, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): BlockEpoch; - static deserializeBinaryFromReader(message: BlockEpoch, reader: jspb.BinaryReader): BlockEpoch; -} - -export namespace BlockEpoch { - export type AsObject = { - hash: Uint8Array | string, - height: number, - } -} - diff --git a/lib/types/generated/chainrpc/chainnotifier_pb.js b/lib/types/generated/chainrpc/chainnotifier_pb.js deleted file mode 100644 index 3e57f89..0000000 --- a/lib/types/generated/chainrpc/chainnotifier_pb.js +++ /dev/null @@ -1,2233 +0,0 @@ -// source: chainrpc/chainnotifier.proto -/** - * @fileoverview - * @enhanceable - * @suppress {missingRequire} reports error on implicit type usages. - * @suppress {messageConventions} JS Compiler reports an error if a variable or - * field starts with 'MSG_' and isn't a translatable message. - * @public - */ -// GENERATED CODE -- DO NOT EDIT! -/* eslint-disable */ -// @ts-nocheck - -var jspb = require('google-protobuf'); -var goog = jspb; -var global = Function('return this')(); - -goog.exportSymbol('proto.chainrpc.BlockEpoch', null, global); -goog.exportSymbol('proto.chainrpc.ConfDetails', null, global); -goog.exportSymbol('proto.chainrpc.ConfEvent', null, global); -goog.exportSymbol('proto.chainrpc.ConfEvent.EventCase', null, global); -goog.exportSymbol('proto.chainrpc.ConfRequest', null, global); -goog.exportSymbol('proto.chainrpc.Outpoint', null, global); -goog.exportSymbol('proto.chainrpc.Reorg', null, global); -goog.exportSymbol('proto.chainrpc.SpendDetails', null, global); -goog.exportSymbol('proto.chainrpc.SpendEvent', null, global); -goog.exportSymbol('proto.chainrpc.SpendEvent.EventCase', null, global); -goog.exportSymbol('proto.chainrpc.SpendRequest', null, global); -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.chainrpc.ConfRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.chainrpc.ConfRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.chainrpc.ConfRequest.displayName = 'proto.chainrpc.ConfRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.chainrpc.ConfDetails = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.chainrpc.ConfDetails, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.chainrpc.ConfDetails.displayName = 'proto.chainrpc.ConfDetails'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.chainrpc.Reorg = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.chainrpc.Reorg, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.chainrpc.Reorg.displayName = 'proto.chainrpc.Reorg'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.chainrpc.ConfEvent = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.chainrpc.ConfEvent.oneofGroups_); -}; -goog.inherits(proto.chainrpc.ConfEvent, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.chainrpc.ConfEvent.displayName = 'proto.chainrpc.ConfEvent'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.chainrpc.Outpoint = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.chainrpc.Outpoint, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.chainrpc.Outpoint.displayName = 'proto.chainrpc.Outpoint'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.chainrpc.SpendRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.chainrpc.SpendRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.chainrpc.SpendRequest.displayName = 'proto.chainrpc.SpendRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.chainrpc.SpendDetails = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.chainrpc.SpendDetails, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.chainrpc.SpendDetails.displayName = 'proto.chainrpc.SpendDetails'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.chainrpc.SpendEvent = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.chainrpc.SpendEvent.oneofGroups_); -}; -goog.inherits(proto.chainrpc.SpendEvent, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.chainrpc.SpendEvent.displayName = 'proto.chainrpc.SpendEvent'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.chainrpc.BlockEpoch = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.chainrpc.BlockEpoch, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.chainrpc.BlockEpoch.displayName = 'proto.chainrpc.BlockEpoch'; -} - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.chainrpc.ConfRequest.prototype.toObject = function(opt_includeInstance) { - return proto.chainrpc.ConfRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.chainrpc.ConfRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.chainrpc.ConfRequest.toObject = function(includeInstance, msg) { - var f, obj = { - txid: msg.getTxid_asB64(), - script: msg.getScript_asB64(), - numConfs: jspb.Message.getFieldWithDefault(msg, 3, 0), - heightHint: jspb.Message.getFieldWithDefault(msg, 4, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.chainrpc.ConfRequest} - */ -proto.chainrpc.ConfRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.chainrpc.ConfRequest; - return proto.chainrpc.ConfRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.chainrpc.ConfRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.chainrpc.ConfRequest} - */ -proto.chainrpc.ConfRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setTxid(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setScript(value); - break; - case 3: - var value = /** @type {number} */ (reader.readUint32()); - msg.setNumConfs(value); - break; - case 4: - var value = /** @type {number} */ (reader.readUint32()); - msg.setHeightHint(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.chainrpc.ConfRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.chainrpc.ConfRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.chainrpc.ConfRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.chainrpc.ConfRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getTxid_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getScript_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } - f = message.getNumConfs(); - if (f !== 0) { - writer.writeUint32( - 3, - f - ); - } - f = message.getHeightHint(); - if (f !== 0) { - writer.writeUint32( - 4, - f - ); - } -}; - - -/** - * optional bytes txid = 1; - * @return {!(string|Uint8Array)} - */ -proto.chainrpc.ConfRequest.prototype.getTxid = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes txid = 1; - * This is a type-conversion wrapper around `getTxid()` - * @return {string} - */ -proto.chainrpc.ConfRequest.prototype.getTxid_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getTxid())); -}; - - -/** - * optional bytes txid = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getTxid()` - * @return {!Uint8Array} - */ -proto.chainrpc.ConfRequest.prototype.getTxid_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getTxid())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.chainrpc.ConfRequest} returns this - */ -proto.chainrpc.ConfRequest.prototype.setTxid = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional bytes script = 2; - * @return {!(string|Uint8Array)} - */ -proto.chainrpc.ConfRequest.prototype.getScript = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes script = 2; - * This is a type-conversion wrapper around `getScript()` - * @return {string} - */ -proto.chainrpc.ConfRequest.prototype.getScript_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getScript())); -}; - - -/** - * optional bytes script = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getScript()` - * @return {!Uint8Array} - */ -proto.chainrpc.ConfRequest.prototype.getScript_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getScript())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.chainrpc.ConfRequest} returns this - */ -proto.chainrpc.ConfRequest.prototype.setScript = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); -}; - - -/** - * optional uint32 num_confs = 3; - * @return {number} - */ -proto.chainrpc.ConfRequest.prototype.getNumConfs = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.chainrpc.ConfRequest} returns this - */ -proto.chainrpc.ConfRequest.prototype.setNumConfs = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - -/** - * optional uint32 height_hint = 4; - * @return {number} - */ -proto.chainrpc.ConfRequest.prototype.getHeightHint = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.chainrpc.ConfRequest} returns this - */ -proto.chainrpc.ConfRequest.prototype.setHeightHint = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.chainrpc.ConfDetails.prototype.toObject = function(opt_includeInstance) { - return proto.chainrpc.ConfDetails.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.chainrpc.ConfDetails} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.chainrpc.ConfDetails.toObject = function(includeInstance, msg) { - var f, obj = { - rawTx: msg.getRawTx_asB64(), - blockHash: msg.getBlockHash_asB64(), - blockHeight: jspb.Message.getFieldWithDefault(msg, 3, 0), - txIndex: jspb.Message.getFieldWithDefault(msg, 4, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.chainrpc.ConfDetails} - */ -proto.chainrpc.ConfDetails.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.chainrpc.ConfDetails; - return proto.chainrpc.ConfDetails.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.chainrpc.ConfDetails} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.chainrpc.ConfDetails} - */ -proto.chainrpc.ConfDetails.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setRawTx(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setBlockHash(value); - break; - case 3: - var value = /** @type {number} */ (reader.readUint32()); - msg.setBlockHeight(value); - break; - case 4: - var value = /** @type {number} */ (reader.readUint32()); - msg.setTxIndex(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.chainrpc.ConfDetails.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.chainrpc.ConfDetails.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.chainrpc.ConfDetails} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.chainrpc.ConfDetails.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getRawTx_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getBlockHash_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } - f = message.getBlockHeight(); - if (f !== 0) { - writer.writeUint32( - 3, - f - ); - } - f = message.getTxIndex(); - if (f !== 0) { - writer.writeUint32( - 4, - f - ); - } -}; - - -/** - * optional bytes raw_tx = 1; - * @return {!(string|Uint8Array)} - */ -proto.chainrpc.ConfDetails.prototype.getRawTx = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes raw_tx = 1; - * This is a type-conversion wrapper around `getRawTx()` - * @return {string} - */ -proto.chainrpc.ConfDetails.prototype.getRawTx_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getRawTx())); -}; - - -/** - * optional bytes raw_tx = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getRawTx()` - * @return {!Uint8Array} - */ -proto.chainrpc.ConfDetails.prototype.getRawTx_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getRawTx())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.chainrpc.ConfDetails} returns this - */ -proto.chainrpc.ConfDetails.prototype.setRawTx = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional bytes block_hash = 2; - * @return {!(string|Uint8Array)} - */ -proto.chainrpc.ConfDetails.prototype.getBlockHash = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes block_hash = 2; - * This is a type-conversion wrapper around `getBlockHash()` - * @return {string} - */ -proto.chainrpc.ConfDetails.prototype.getBlockHash_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getBlockHash())); -}; - - -/** - * optional bytes block_hash = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getBlockHash()` - * @return {!Uint8Array} - */ -proto.chainrpc.ConfDetails.prototype.getBlockHash_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getBlockHash())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.chainrpc.ConfDetails} returns this - */ -proto.chainrpc.ConfDetails.prototype.setBlockHash = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); -}; - - -/** - * optional uint32 block_height = 3; - * @return {number} - */ -proto.chainrpc.ConfDetails.prototype.getBlockHeight = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.chainrpc.ConfDetails} returns this - */ -proto.chainrpc.ConfDetails.prototype.setBlockHeight = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - -/** - * optional uint32 tx_index = 4; - * @return {number} - */ -proto.chainrpc.ConfDetails.prototype.getTxIndex = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.chainrpc.ConfDetails} returns this - */ -proto.chainrpc.ConfDetails.prototype.setTxIndex = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.chainrpc.Reorg.prototype.toObject = function(opt_includeInstance) { - return proto.chainrpc.Reorg.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.chainrpc.Reorg} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.chainrpc.Reorg.toObject = function(includeInstance, msg) { - var f, obj = { - - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.chainrpc.Reorg} - */ -proto.chainrpc.Reorg.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.chainrpc.Reorg; - return proto.chainrpc.Reorg.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.chainrpc.Reorg} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.chainrpc.Reorg} - */ -proto.chainrpc.Reorg.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.chainrpc.Reorg.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.chainrpc.Reorg.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.chainrpc.Reorg} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.chainrpc.Reorg.serializeBinaryToWriter = function(message, writer) { - var f = undefined; -}; - - - -/** - * Oneof group definitions for this message. Each group defines the field - * numbers belonging to that group. When of these fields' value is set, all - * other fields in the group are cleared. During deserialization, if multiple - * fields are encountered for a group, only the last value seen will be kept. - * @private {!Array>} - * @const - */ -proto.chainrpc.ConfEvent.oneofGroups_ = [[1,2]]; - -/** - * @enum {number} - */ -proto.chainrpc.ConfEvent.EventCase = { - EVENT_NOT_SET: 0, - CONF: 1, - REORG: 2 -}; - -/** - * @return {proto.chainrpc.ConfEvent.EventCase} - */ -proto.chainrpc.ConfEvent.prototype.getEventCase = function() { - return /** @type {proto.chainrpc.ConfEvent.EventCase} */(jspb.Message.computeOneofCase(this, proto.chainrpc.ConfEvent.oneofGroups_[0])); -}; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.chainrpc.ConfEvent.prototype.toObject = function(opt_includeInstance) { - return proto.chainrpc.ConfEvent.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.chainrpc.ConfEvent} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.chainrpc.ConfEvent.toObject = function(includeInstance, msg) { - var f, obj = { - conf: (f = msg.getConf()) && proto.chainrpc.ConfDetails.toObject(includeInstance, f), - reorg: (f = msg.getReorg()) && proto.chainrpc.Reorg.toObject(includeInstance, f) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.chainrpc.ConfEvent} - */ -proto.chainrpc.ConfEvent.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.chainrpc.ConfEvent; - return proto.chainrpc.ConfEvent.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.chainrpc.ConfEvent} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.chainrpc.ConfEvent} - */ -proto.chainrpc.ConfEvent.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.chainrpc.ConfDetails; - reader.readMessage(value,proto.chainrpc.ConfDetails.deserializeBinaryFromReader); - msg.setConf(value); - break; - case 2: - var value = new proto.chainrpc.Reorg; - reader.readMessage(value,proto.chainrpc.Reorg.deserializeBinaryFromReader); - msg.setReorg(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.chainrpc.ConfEvent.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.chainrpc.ConfEvent.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.chainrpc.ConfEvent} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.chainrpc.ConfEvent.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getConf(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.chainrpc.ConfDetails.serializeBinaryToWriter - ); - } - f = message.getReorg(); - if (f != null) { - writer.writeMessage( - 2, - f, - proto.chainrpc.Reorg.serializeBinaryToWriter - ); - } -}; - - -/** - * optional ConfDetails conf = 1; - * @return {?proto.chainrpc.ConfDetails} - */ -proto.chainrpc.ConfEvent.prototype.getConf = function() { - return /** @type{?proto.chainrpc.ConfDetails} */ ( - jspb.Message.getWrapperField(this, proto.chainrpc.ConfDetails, 1)); -}; - - -/** - * @param {?proto.chainrpc.ConfDetails|undefined} value - * @return {!proto.chainrpc.ConfEvent} returns this -*/ -proto.chainrpc.ConfEvent.prototype.setConf = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.chainrpc.ConfEvent.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.chainrpc.ConfEvent} returns this - */ -proto.chainrpc.ConfEvent.prototype.clearConf = function() { - return this.setConf(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.chainrpc.ConfEvent.prototype.hasConf = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional Reorg reorg = 2; - * @return {?proto.chainrpc.Reorg} - */ -proto.chainrpc.ConfEvent.prototype.getReorg = function() { - return /** @type{?proto.chainrpc.Reorg} */ ( - jspb.Message.getWrapperField(this, proto.chainrpc.Reorg, 2)); -}; - - -/** - * @param {?proto.chainrpc.Reorg|undefined} value - * @return {!proto.chainrpc.ConfEvent} returns this -*/ -proto.chainrpc.ConfEvent.prototype.setReorg = function(value) { - return jspb.Message.setOneofWrapperField(this, 2, proto.chainrpc.ConfEvent.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.chainrpc.ConfEvent} returns this - */ -proto.chainrpc.ConfEvent.prototype.clearReorg = function() { - return this.setReorg(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.chainrpc.ConfEvent.prototype.hasReorg = function() { - return jspb.Message.getField(this, 2) != null; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.chainrpc.Outpoint.prototype.toObject = function(opt_includeInstance) { - return proto.chainrpc.Outpoint.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.chainrpc.Outpoint} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.chainrpc.Outpoint.toObject = function(includeInstance, msg) { - var f, obj = { - hash: msg.getHash_asB64(), - index: jspb.Message.getFieldWithDefault(msg, 2, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.chainrpc.Outpoint} - */ -proto.chainrpc.Outpoint.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.chainrpc.Outpoint; - return proto.chainrpc.Outpoint.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.chainrpc.Outpoint} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.chainrpc.Outpoint} - */ -proto.chainrpc.Outpoint.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setHash(value); - break; - case 2: - var value = /** @type {number} */ (reader.readUint32()); - msg.setIndex(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.chainrpc.Outpoint.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.chainrpc.Outpoint.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.chainrpc.Outpoint} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.chainrpc.Outpoint.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getHash_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getIndex(); - if (f !== 0) { - writer.writeUint32( - 2, - f - ); - } -}; - - -/** - * optional bytes hash = 1; - * @return {!(string|Uint8Array)} - */ -proto.chainrpc.Outpoint.prototype.getHash = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes hash = 1; - * This is a type-conversion wrapper around `getHash()` - * @return {string} - */ -proto.chainrpc.Outpoint.prototype.getHash_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getHash())); -}; - - -/** - * optional bytes hash = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getHash()` - * @return {!Uint8Array} - */ -proto.chainrpc.Outpoint.prototype.getHash_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getHash())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.chainrpc.Outpoint} returns this - */ -proto.chainrpc.Outpoint.prototype.setHash = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional uint32 index = 2; - * @return {number} - */ -proto.chainrpc.Outpoint.prototype.getIndex = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.chainrpc.Outpoint} returns this - */ -proto.chainrpc.Outpoint.prototype.setIndex = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.chainrpc.SpendRequest.prototype.toObject = function(opt_includeInstance) { - return proto.chainrpc.SpendRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.chainrpc.SpendRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.chainrpc.SpendRequest.toObject = function(includeInstance, msg) { - var f, obj = { - outpoint: (f = msg.getOutpoint()) && proto.chainrpc.Outpoint.toObject(includeInstance, f), - script: msg.getScript_asB64(), - heightHint: jspb.Message.getFieldWithDefault(msg, 3, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.chainrpc.SpendRequest} - */ -proto.chainrpc.SpendRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.chainrpc.SpendRequest; - return proto.chainrpc.SpendRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.chainrpc.SpendRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.chainrpc.SpendRequest} - */ -proto.chainrpc.SpendRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.chainrpc.Outpoint; - reader.readMessage(value,proto.chainrpc.Outpoint.deserializeBinaryFromReader); - msg.setOutpoint(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setScript(value); - break; - case 3: - var value = /** @type {number} */ (reader.readUint32()); - msg.setHeightHint(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.chainrpc.SpendRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.chainrpc.SpendRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.chainrpc.SpendRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.chainrpc.SpendRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getOutpoint(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.chainrpc.Outpoint.serializeBinaryToWriter - ); - } - f = message.getScript_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } - f = message.getHeightHint(); - if (f !== 0) { - writer.writeUint32( - 3, - f - ); - } -}; - - -/** - * optional Outpoint outpoint = 1; - * @return {?proto.chainrpc.Outpoint} - */ -proto.chainrpc.SpendRequest.prototype.getOutpoint = function() { - return /** @type{?proto.chainrpc.Outpoint} */ ( - jspb.Message.getWrapperField(this, proto.chainrpc.Outpoint, 1)); -}; - - -/** - * @param {?proto.chainrpc.Outpoint|undefined} value - * @return {!proto.chainrpc.SpendRequest} returns this -*/ -proto.chainrpc.SpendRequest.prototype.setOutpoint = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.chainrpc.SpendRequest} returns this - */ -proto.chainrpc.SpendRequest.prototype.clearOutpoint = function() { - return this.setOutpoint(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.chainrpc.SpendRequest.prototype.hasOutpoint = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional bytes script = 2; - * @return {!(string|Uint8Array)} - */ -proto.chainrpc.SpendRequest.prototype.getScript = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes script = 2; - * This is a type-conversion wrapper around `getScript()` - * @return {string} - */ -proto.chainrpc.SpendRequest.prototype.getScript_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getScript())); -}; - - -/** - * optional bytes script = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getScript()` - * @return {!Uint8Array} - */ -proto.chainrpc.SpendRequest.prototype.getScript_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getScript())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.chainrpc.SpendRequest} returns this - */ -proto.chainrpc.SpendRequest.prototype.setScript = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); -}; - - -/** - * optional uint32 height_hint = 3; - * @return {number} - */ -proto.chainrpc.SpendRequest.prototype.getHeightHint = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.chainrpc.SpendRequest} returns this - */ -proto.chainrpc.SpendRequest.prototype.setHeightHint = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.chainrpc.SpendDetails.prototype.toObject = function(opt_includeInstance) { - return proto.chainrpc.SpendDetails.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.chainrpc.SpendDetails} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.chainrpc.SpendDetails.toObject = function(includeInstance, msg) { - var f, obj = { - spendingOutpoint: (f = msg.getSpendingOutpoint()) && proto.chainrpc.Outpoint.toObject(includeInstance, f), - rawSpendingTx: msg.getRawSpendingTx_asB64(), - spendingTxHash: msg.getSpendingTxHash_asB64(), - spendingInputIndex: jspb.Message.getFieldWithDefault(msg, 4, 0), - spendingHeight: jspb.Message.getFieldWithDefault(msg, 5, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.chainrpc.SpendDetails} - */ -proto.chainrpc.SpendDetails.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.chainrpc.SpendDetails; - return proto.chainrpc.SpendDetails.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.chainrpc.SpendDetails} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.chainrpc.SpendDetails} - */ -proto.chainrpc.SpendDetails.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.chainrpc.Outpoint; - reader.readMessage(value,proto.chainrpc.Outpoint.deserializeBinaryFromReader); - msg.setSpendingOutpoint(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setRawSpendingTx(value); - break; - case 3: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setSpendingTxHash(value); - break; - case 4: - var value = /** @type {number} */ (reader.readUint32()); - msg.setSpendingInputIndex(value); - break; - case 5: - var value = /** @type {number} */ (reader.readUint32()); - msg.setSpendingHeight(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.chainrpc.SpendDetails.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.chainrpc.SpendDetails.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.chainrpc.SpendDetails} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.chainrpc.SpendDetails.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getSpendingOutpoint(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.chainrpc.Outpoint.serializeBinaryToWriter - ); - } - f = message.getRawSpendingTx_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } - f = message.getSpendingTxHash_asU8(); - if (f.length > 0) { - writer.writeBytes( - 3, - f - ); - } - f = message.getSpendingInputIndex(); - if (f !== 0) { - writer.writeUint32( - 4, - f - ); - } - f = message.getSpendingHeight(); - if (f !== 0) { - writer.writeUint32( - 5, - f - ); - } -}; - - -/** - * optional Outpoint spending_outpoint = 1; - * @return {?proto.chainrpc.Outpoint} - */ -proto.chainrpc.SpendDetails.prototype.getSpendingOutpoint = function() { - return /** @type{?proto.chainrpc.Outpoint} */ ( - jspb.Message.getWrapperField(this, proto.chainrpc.Outpoint, 1)); -}; - - -/** - * @param {?proto.chainrpc.Outpoint|undefined} value - * @return {!proto.chainrpc.SpendDetails} returns this -*/ -proto.chainrpc.SpendDetails.prototype.setSpendingOutpoint = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.chainrpc.SpendDetails} returns this - */ -proto.chainrpc.SpendDetails.prototype.clearSpendingOutpoint = function() { - return this.setSpendingOutpoint(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.chainrpc.SpendDetails.prototype.hasSpendingOutpoint = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional bytes raw_spending_tx = 2; - * @return {!(string|Uint8Array)} - */ -proto.chainrpc.SpendDetails.prototype.getRawSpendingTx = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes raw_spending_tx = 2; - * This is a type-conversion wrapper around `getRawSpendingTx()` - * @return {string} - */ -proto.chainrpc.SpendDetails.prototype.getRawSpendingTx_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getRawSpendingTx())); -}; - - -/** - * optional bytes raw_spending_tx = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getRawSpendingTx()` - * @return {!Uint8Array} - */ -proto.chainrpc.SpendDetails.prototype.getRawSpendingTx_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getRawSpendingTx())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.chainrpc.SpendDetails} returns this - */ -proto.chainrpc.SpendDetails.prototype.setRawSpendingTx = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); -}; - - -/** - * optional bytes spending_tx_hash = 3; - * @return {!(string|Uint8Array)} - */ -proto.chainrpc.SpendDetails.prototype.getSpendingTxHash = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * optional bytes spending_tx_hash = 3; - * This is a type-conversion wrapper around `getSpendingTxHash()` - * @return {string} - */ -proto.chainrpc.SpendDetails.prototype.getSpendingTxHash_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getSpendingTxHash())); -}; - - -/** - * optional bytes spending_tx_hash = 3; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getSpendingTxHash()` - * @return {!Uint8Array} - */ -proto.chainrpc.SpendDetails.prototype.getSpendingTxHash_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getSpendingTxHash())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.chainrpc.SpendDetails} returns this - */ -proto.chainrpc.SpendDetails.prototype.setSpendingTxHash = function(value) { - return jspb.Message.setProto3BytesField(this, 3, value); -}; - - -/** - * optional uint32 spending_input_index = 4; - * @return {number} - */ -proto.chainrpc.SpendDetails.prototype.getSpendingInputIndex = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.chainrpc.SpendDetails} returns this - */ -proto.chainrpc.SpendDetails.prototype.setSpendingInputIndex = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); -}; - - -/** - * optional uint32 spending_height = 5; - * @return {number} - */ -proto.chainrpc.SpendDetails.prototype.getSpendingHeight = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.chainrpc.SpendDetails} returns this - */ -proto.chainrpc.SpendDetails.prototype.setSpendingHeight = function(value) { - return jspb.Message.setProto3IntField(this, 5, value); -}; - - - -/** - * Oneof group definitions for this message. Each group defines the field - * numbers belonging to that group. When of these fields' value is set, all - * other fields in the group are cleared. During deserialization, if multiple - * fields are encountered for a group, only the last value seen will be kept. - * @private {!Array>} - * @const - */ -proto.chainrpc.SpendEvent.oneofGroups_ = [[1,2]]; - -/** - * @enum {number} - */ -proto.chainrpc.SpendEvent.EventCase = { - EVENT_NOT_SET: 0, - SPEND: 1, - REORG: 2 -}; - -/** - * @return {proto.chainrpc.SpendEvent.EventCase} - */ -proto.chainrpc.SpendEvent.prototype.getEventCase = function() { - return /** @type {proto.chainrpc.SpendEvent.EventCase} */(jspb.Message.computeOneofCase(this, proto.chainrpc.SpendEvent.oneofGroups_[0])); -}; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.chainrpc.SpendEvent.prototype.toObject = function(opt_includeInstance) { - return proto.chainrpc.SpendEvent.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.chainrpc.SpendEvent} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.chainrpc.SpendEvent.toObject = function(includeInstance, msg) { - var f, obj = { - spend: (f = msg.getSpend()) && proto.chainrpc.SpendDetails.toObject(includeInstance, f), - reorg: (f = msg.getReorg()) && proto.chainrpc.Reorg.toObject(includeInstance, f) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.chainrpc.SpendEvent} - */ -proto.chainrpc.SpendEvent.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.chainrpc.SpendEvent; - return proto.chainrpc.SpendEvent.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.chainrpc.SpendEvent} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.chainrpc.SpendEvent} - */ -proto.chainrpc.SpendEvent.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.chainrpc.SpendDetails; - reader.readMessage(value,proto.chainrpc.SpendDetails.deserializeBinaryFromReader); - msg.setSpend(value); - break; - case 2: - var value = new proto.chainrpc.Reorg; - reader.readMessage(value,proto.chainrpc.Reorg.deserializeBinaryFromReader); - msg.setReorg(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.chainrpc.SpendEvent.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.chainrpc.SpendEvent.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.chainrpc.SpendEvent} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.chainrpc.SpendEvent.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getSpend(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.chainrpc.SpendDetails.serializeBinaryToWriter - ); - } - f = message.getReorg(); - if (f != null) { - writer.writeMessage( - 2, - f, - proto.chainrpc.Reorg.serializeBinaryToWriter - ); - } -}; - - -/** - * optional SpendDetails spend = 1; - * @return {?proto.chainrpc.SpendDetails} - */ -proto.chainrpc.SpendEvent.prototype.getSpend = function() { - return /** @type{?proto.chainrpc.SpendDetails} */ ( - jspb.Message.getWrapperField(this, proto.chainrpc.SpendDetails, 1)); -}; - - -/** - * @param {?proto.chainrpc.SpendDetails|undefined} value - * @return {!proto.chainrpc.SpendEvent} returns this -*/ -proto.chainrpc.SpendEvent.prototype.setSpend = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.chainrpc.SpendEvent.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.chainrpc.SpendEvent} returns this - */ -proto.chainrpc.SpendEvent.prototype.clearSpend = function() { - return this.setSpend(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.chainrpc.SpendEvent.prototype.hasSpend = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional Reorg reorg = 2; - * @return {?proto.chainrpc.Reorg} - */ -proto.chainrpc.SpendEvent.prototype.getReorg = function() { - return /** @type{?proto.chainrpc.Reorg} */ ( - jspb.Message.getWrapperField(this, proto.chainrpc.Reorg, 2)); -}; - - -/** - * @param {?proto.chainrpc.Reorg|undefined} value - * @return {!proto.chainrpc.SpendEvent} returns this -*/ -proto.chainrpc.SpendEvent.prototype.setReorg = function(value) { - return jspb.Message.setOneofWrapperField(this, 2, proto.chainrpc.SpendEvent.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.chainrpc.SpendEvent} returns this - */ -proto.chainrpc.SpendEvent.prototype.clearReorg = function() { - return this.setReorg(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.chainrpc.SpendEvent.prototype.hasReorg = function() { - return jspb.Message.getField(this, 2) != null; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.chainrpc.BlockEpoch.prototype.toObject = function(opt_includeInstance) { - return proto.chainrpc.BlockEpoch.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.chainrpc.BlockEpoch} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.chainrpc.BlockEpoch.toObject = function(includeInstance, msg) { - var f, obj = { - hash: msg.getHash_asB64(), - height: jspb.Message.getFieldWithDefault(msg, 2, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.chainrpc.BlockEpoch} - */ -proto.chainrpc.BlockEpoch.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.chainrpc.BlockEpoch; - return proto.chainrpc.BlockEpoch.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.chainrpc.BlockEpoch} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.chainrpc.BlockEpoch} - */ -proto.chainrpc.BlockEpoch.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setHash(value); - break; - case 2: - var value = /** @type {number} */ (reader.readUint32()); - msg.setHeight(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.chainrpc.BlockEpoch.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.chainrpc.BlockEpoch.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.chainrpc.BlockEpoch} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.chainrpc.BlockEpoch.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getHash_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getHeight(); - if (f !== 0) { - writer.writeUint32( - 2, - f - ); - } -}; - - -/** - * optional bytes hash = 1; - * @return {!(string|Uint8Array)} - */ -proto.chainrpc.BlockEpoch.prototype.getHash = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes hash = 1; - * This is a type-conversion wrapper around `getHash()` - * @return {string} - */ -proto.chainrpc.BlockEpoch.prototype.getHash_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getHash())); -}; - - -/** - * optional bytes hash = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getHash()` - * @return {!Uint8Array} - */ -proto.chainrpc.BlockEpoch.prototype.getHash_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getHash())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.chainrpc.BlockEpoch} returns this - */ -proto.chainrpc.BlockEpoch.prototype.setHash = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional uint32 height = 2; - * @return {number} - */ -proto.chainrpc.BlockEpoch.prototype.getHeight = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.chainrpc.BlockEpoch} returns this - */ -proto.chainrpc.BlockEpoch.prototype.setHeight = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -goog.object.extend(exports, proto.chainrpc); diff --git a/lib/types/generated/chainrpc/chainnotifier_pb_service.d.ts b/lib/types/generated/chainrpc/chainnotifier_pb_service.d.ts deleted file mode 100644 index 26d028b..0000000 --- a/lib/types/generated/chainrpc/chainnotifier_pb_service.d.ts +++ /dev/null @@ -1,77 +0,0 @@ -// package: chainrpc -// file: chainrpc/chainnotifier.proto - -import * as chainrpc_chainnotifier_pb from "../chainrpc/chainnotifier_pb"; -import {grpc} from "@improbable-eng/grpc-web"; - -type ChainNotifierRegisterConfirmationsNtfn = { - readonly methodName: string; - readonly service: typeof ChainNotifier; - readonly requestStream: false; - readonly responseStream: true; - readonly requestType: typeof chainrpc_chainnotifier_pb.ConfRequest; - readonly responseType: typeof chainrpc_chainnotifier_pb.ConfEvent; -}; - -type ChainNotifierRegisterSpendNtfn = { - readonly methodName: string; - readonly service: typeof ChainNotifier; - readonly requestStream: false; - readonly responseStream: true; - readonly requestType: typeof chainrpc_chainnotifier_pb.SpendRequest; - readonly responseType: typeof chainrpc_chainnotifier_pb.SpendEvent; -}; - -type ChainNotifierRegisterBlockEpochNtfn = { - readonly methodName: string; - readonly service: typeof ChainNotifier; - readonly requestStream: false; - readonly responseStream: true; - readonly requestType: typeof chainrpc_chainnotifier_pb.BlockEpoch; - readonly responseType: typeof chainrpc_chainnotifier_pb.BlockEpoch; -}; - -export class ChainNotifier { - static readonly serviceName: string; - static readonly RegisterConfirmationsNtfn: ChainNotifierRegisterConfirmationsNtfn; - static readonly RegisterSpendNtfn: ChainNotifierRegisterSpendNtfn; - static readonly RegisterBlockEpochNtfn: ChainNotifierRegisterBlockEpochNtfn; -} - -export type ServiceError = { message: string, code: number; metadata: grpc.Metadata } -export type Status = { details: string, code: number; metadata: grpc.Metadata } - -interface UnaryResponse { - cancel(): void; -} -interface ResponseStream { - cancel(): void; - on(type: 'data', handler: (message: T) => void): ResponseStream; - on(type: 'end', handler: (status?: Status) => void): ResponseStream; - on(type: 'status', handler: (status: Status) => void): ResponseStream; -} -interface RequestStream { - write(message: T): RequestStream; - end(): void; - cancel(): void; - on(type: 'end', handler: (status?: Status) => void): RequestStream; - on(type: 'status', handler: (status: Status) => void): RequestStream; -} -interface BidirectionalStream { - write(message: ReqT): BidirectionalStream; - end(): void; - cancel(): void; - on(type: 'data', handler: (message: ResT) => void): BidirectionalStream; - on(type: 'end', handler: (status?: Status) => void): BidirectionalStream; - on(type: 'status', handler: (status: Status) => void): BidirectionalStream; -} - -export class ChainNotifierClient { - readonly serviceHost: string; - - constructor(serviceHost: string, options?: grpc.RpcOptions); - registerConfirmationsNtfn(requestMessage: chainrpc_chainnotifier_pb.ConfRequest, metadata?: grpc.Metadata): ResponseStream; - registerSpendNtfn(requestMessage: chainrpc_chainnotifier_pb.SpendRequest, metadata?: grpc.Metadata): ResponseStream; - registerBlockEpochNtfn(requestMessage: chainrpc_chainnotifier_pb.BlockEpoch, metadata?: grpc.Metadata): ResponseStream; -} - diff --git a/lib/types/generated/chainrpc/chainnotifier_pb_service.js b/lib/types/generated/chainrpc/chainnotifier_pb_service.js deleted file mode 100644 index f0ca83d..0000000 --- a/lib/types/generated/chainrpc/chainnotifier_pb_service.js +++ /dev/null @@ -1,165 +0,0 @@ -// package: chainrpc -// file: chainrpc/chainnotifier.proto - -var chainrpc_chainnotifier_pb = require("../chainrpc/chainnotifier_pb"); -var grpc = require("@improbable-eng/grpc-web").grpc; - -var ChainNotifier = (function () { - function ChainNotifier() {} - ChainNotifier.serviceName = "chainrpc.ChainNotifier"; - return ChainNotifier; -}()); - -ChainNotifier.RegisterConfirmationsNtfn = { - methodName: "RegisterConfirmationsNtfn", - service: ChainNotifier, - requestStream: false, - responseStream: true, - requestType: chainrpc_chainnotifier_pb.ConfRequest, - responseType: chainrpc_chainnotifier_pb.ConfEvent -}; - -ChainNotifier.RegisterSpendNtfn = { - methodName: "RegisterSpendNtfn", - service: ChainNotifier, - requestStream: false, - responseStream: true, - requestType: chainrpc_chainnotifier_pb.SpendRequest, - responseType: chainrpc_chainnotifier_pb.SpendEvent -}; - -ChainNotifier.RegisterBlockEpochNtfn = { - methodName: "RegisterBlockEpochNtfn", - service: ChainNotifier, - requestStream: false, - responseStream: true, - requestType: chainrpc_chainnotifier_pb.BlockEpoch, - responseType: chainrpc_chainnotifier_pb.BlockEpoch -}; - -exports.ChainNotifier = ChainNotifier; - -function ChainNotifierClient(serviceHost, options) { - this.serviceHost = serviceHost; - this.options = options || {}; -} - -ChainNotifierClient.prototype.registerConfirmationsNtfn = function registerConfirmationsNtfn(requestMessage, metadata) { - var listeners = { - data: [], - end: [], - status: [] - }; - var client = grpc.invoke(ChainNotifier.RegisterConfirmationsNtfn, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onMessage: function (responseMessage) { - listeners.data.forEach(function (handler) { - handler(responseMessage); - }); - }, - onEnd: function (status, statusMessage, trailers) { - listeners.status.forEach(function (handler) { - handler({ code: status, details: statusMessage, metadata: trailers }); - }); - listeners.end.forEach(function (handler) { - handler({ code: status, details: statusMessage, metadata: trailers }); - }); - listeners = null; - } - }); - return { - on: function (type, handler) { - listeners[type].push(handler); - return this; - }, - cancel: function () { - listeners = null; - client.close(); - } - }; -}; - -ChainNotifierClient.prototype.registerSpendNtfn = function registerSpendNtfn(requestMessage, metadata) { - var listeners = { - data: [], - end: [], - status: [] - }; - var client = grpc.invoke(ChainNotifier.RegisterSpendNtfn, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onMessage: function (responseMessage) { - listeners.data.forEach(function (handler) { - handler(responseMessage); - }); - }, - onEnd: function (status, statusMessage, trailers) { - listeners.status.forEach(function (handler) { - handler({ code: status, details: statusMessage, metadata: trailers }); - }); - listeners.end.forEach(function (handler) { - handler({ code: status, details: statusMessage, metadata: trailers }); - }); - listeners = null; - } - }); - return { - on: function (type, handler) { - listeners[type].push(handler); - return this; - }, - cancel: function () { - listeners = null; - client.close(); - } - }; -}; - -ChainNotifierClient.prototype.registerBlockEpochNtfn = function registerBlockEpochNtfn(requestMessage, metadata) { - var listeners = { - data: [], - end: [], - status: [] - }; - var client = grpc.invoke(ChainNotifier.RegisterBlockEpochNtfn, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onMessage: function (responseMessage) { - listeners.data.forEach(function (handler) { - handler(responseMessage); - }); - }, - onEnd: function (status, statusMessage, trailers) { - listeners.status.forEach(function (handler) { - handler({ code: status, details: statusMessage, metadata: trailers }); - }); - listeners.end.forEach(function (handler) { - handler({ code: status, details: statusMessage, metadata: trailers }); - }); - listeners = null; - } - }); - return { - on: function (type, handler) { - listeners[type].push(handler); - return this; - }, - cancel: function () { - listeners = null; - client.close(); - } - }; -}; - -exports.ChainNotifierClient = ChainNotifierClient; - diff --git a/lib/types/generated/client_pb.d.ts b/lib/types/generated/client_pb.d.ts deleted file mode 100644 index 45281de..0000000 --- a/lib/types/generated/client_pb.d.ts +++ /dev/null @@ -1,1000 +0,0 @@ -// package: looprpc -// file: client.proto - -import * as jspb from "google-protobuf"; -import * as swapserverrpc_common_pb from "./swapserverrpc/common_pb"; - -export class LoopOutRequest extends jspb.Message { - getAmt(): number; - setAmt(value: number): void; - - getDest(): string; - setDest(value: string): void; - - getMaxSwapRoutingFee(): number; - setMaxSwapRoutingFee(value: number): void; - - getMaxPrepayRoutingFee(): number; - setMaxPrepayRoutingFee(value: number): void; - - getMaxSwapFee(): number; - setMaxSwapFee(value: number): void; - - getMaxPrepayAmt(): number; - setMaxPrepayAmt(value: number): void; - - getMaxMinerFee(): number; - setMaxMinerFee(value: number): void; - - getLoopOutChannel(): number; - setLoopOutChannel(value: number): void; - - clearOutgoingChanSetList(): void; - getOutgoingChanSetList(): Array; - setOutgoingChanSetList(value: Array): void; - addOutgoingChanSet(value: number, index?: number): number; - - getSweepConfTarget(): number; - setSweepConfTarget(value: number): void; - - getHtlcConfirmations(): number; - setHtlcConfirmations(value: number): void; - - getSwapPublicationDeadline(): number; - setSwapPublicationDeadline(value: number): void; - - getLabel(): string; - setLabel(value: string): void; - - getInitiator(): string; - setInitiator(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): LoopOutRequest.AsObject; - static toObject(includeInstance: boolean, msg: LoopOutRequest): LoopOutRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: LoopOutRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): LoopOutRequest; - static deserializeBinaryFromReader(message: LoopOutRequest, reader: jspb.BinaryReader): LoopOutRequest; -} - -export namespace LoopOutRequest { - export type AsObject = { - amt: number, - dest: string, - maxSwapRoutingFee: number, - maxPrepayRoutingFee: number, - maxSwapFee: number, - maxPrepayAmt: number, - maxMinerFee: number, - loopOutChannel: number, - outgoingChanSet: Array, - sweepConfTarget: number, - htlcConfirmations: number, - swapPublicationDeadline: number, - label: string, - initiator: string, - } -} - -export class LoopInRequest extends jspb.Message { - getAmt(): number; - setAmt(value: number): void; - - getMaxSwapFee(): number; - setMaxSwapFee(value: number): void; - - getMaxMinerFee(): number; - setMaxMinerFee(value: number): void; - - getLastHop(): Uint8Array | string; - getLastHop_asU8(): Uint8Array; - getLastHop_asB64(): string; - setLastHop(value: Uint8Array | string): void; - - getExternalHtlc(): boolean; - setExternalHtlc(value: boolean): void; - - getHtlcConfTarget(): number; - setHtlcConfTarget(value: number): void; - - getLabel(): string; - setLabel(value: string): void; - - getInitiator(): string; - setInitiator(value: string): void; - - clearRouteHintsList(): void; - getRouteHintsList(): Array; - setRouteHintsList(value: Array): void; - addRouteHints(value?: swapserverrpc_common_pb.RouteHint, index?: number): swapserverrpc_common_pb.RouteHint; - - getPrivate(): boolean; - setPrivate(value: boolean): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): LoopInRequest.AsObject; - static toObject(includeInstance: boolean, msg: LoopInRequest): LoopInRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: LoopInRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): LoopInRequest; - static deserializeBinaryFromReader(message: LoopInRequest, reader: jspb.BinaryReader): LoopInRequest; -} - -export namespace LoopInRequest { - export type AsObject = { - amt: number, - maxSwapFee: number, - maxMinerFee: number, - lastHop: Uint8Array | string, - externalHtlc: boolean, - htlcConfTarget: number, - label: string, - initiator: string, - routeHints: Array, - pb_private: boolean, - } -} - -export class SwapResponse extends jspb.Message { - getId(): string; - setId(value: string): void; - - getIdBytes(): Uint8Array | string; - getIdBytes_asU8(): Uint8Array; - getIdBytes_asB64(): string; - setIdBytes(value: Uint8Array | string): void; - - getHtlcAddress(): string; - setHtlcAddress(value: string): void; - - getHtlcAddressNp2wsh(): string; - setHtlcAddressNp2wsh(value: string): void; - - getHtlcAddressP2wsh(): string; - setHtlcAddressP2wsh(value: string): void; - - getServerMessage(): string; - setServerMessage(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): SwapResponse.AsObject; - static toObject(includeInstance: boolean, msg: SwapResponse): SwapResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: SwapResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): SwapResponse; - static deserializeBinaryFromReader(message: SwapResponse, reader: jspb.BinaryReader): SwapResponse; -} - -export namespace SwapResponse { - export type AsObject = { - id: string, - idBytes: Uint8Array | string, - htlcAddress: string, - htlcAddressNp2wsh: string, - htlcAddressP2wsh: string, - serverMessage: string, - } -} - -export class MonitorRequest extends jspb.Message { - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): MonitorRequest.AsObject; - static toObject(includeInstance: boolean, msg: MonitorRequest): MonitorRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: MonitorRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): MonitorRequest; - static deserializeBinaryFromReader(message: MonitorRequest, reader: jspb.BinaryReader): MonitorRequest; -} - -export namespace MonitorRequest { - export type AsObject = { - } -} - -export class SwapStatus extends jspb.Message { - getAmt(): number; - setAmt(value: number): void; - - getId(): string; - setId(value: string): void; - - getIdBytes(): Uint8Array | string; - getIdBytes_asU8(): Uint8Array; - getIdBytes_asB64(): string; - setIdBytes(value: Uint8Array | string): void; - - getType(): SwapTypeMap[keyof SwapTypeMap]; - setType(value: SwapTypeMap[keyof SwapTypeMap]): void; - - getState(): SwapStateMap[keyof SwapStateMap]; - setState(value: SwapStateMap[keyof SwapStateMap]): void; - - getFailureReason(): FailureReasonMap[keyof FailureReasonMap]; - setFailureReason(value: FailureReasonMap[keyof FailureReasonMap]): void; - - getInitiationTime(): number; - setInitiationTime(value: number): void; - - getLastUpdateTime(): number; - setLastUpdateTime(value: number): void; - - getHtlcAddress(): string; - setHtlcAddress(value: string): void; - - getHtlcAddressP2wsh(): string; - setHtlcAddressP2wsh(value: string): void; - - getHtlcAddressNp2wsh(): string; - setHtlcAddressNp2wsh(value: string): void; - - getCostServer(): number; - setCostServer(value: number): void; - - getCostOnchain(): number; - setCostOnchain(value: number): void; - - getCostOffchain(): number; - setCostOffchain(value: number): void; - - getLastHop(): Uint8Array | string; - getLastHop_asU8(): Uint8Array; - getLastHop_asB64(): string; - setLastHop(value: Uint8Array | string): void; - - clearOutgoingChanSetList(): void; - getOutgoingChanSetList(): Array; - setOutgoingChanSetList(value: Array): void; - addOutgoingChanSet(value: number, index?: number): number; - - getLabel(): string; - setLabel(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): SwapStatus.AsObject; - static toObject(includeInstance: boolean, msg: SwapStatus): SwapStatus.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: SwapStatus, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): SwapStatus; - static deserializeBinaryFromReader(message: SwapStatus, reader: jspb.BinaryReader): SwapStatus; -} - -export namespace SwapStatus { - export type AsObject = { - amt: number, - id: string, - idBytes: Uint8Array | string, - type: SwapTypeMap[keyof SwapTypeMap], - state: SwapStateMap[keyof SwapStateMap], - failureReason: FailureReasonMap[keyof FailureReasonMap], - initiationTime: number, - lastUpdateTime: number, - htlcAddress: string, - htlcAddressP2wsh: string, - htlcAddressNp2wsh: string, - costServer: number, - costOnchain: number, - costOffchain: number, - lastHop: Uint8Array | string, - outgoingChanSet: Array, - label: string, - } -} - -export class ListSwapsRequest extends jspb.Message { - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ListSwapsRequest.AsObject; - static toObject(includeInstance: boolean, msg: ListSwapsRequest): ListSwapsRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ListSwapsRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ListSwapsRequest; - static deserializeBinaryFromReader(message: ListSwapsRequest, reader: jspb.BinaryReader): ListSwapsRequest; -} - -export namespace ListSwapsRequest { - export type AsObject = { - } -} - -export class ListSwapsResponse extends jspb.Message { - clearSwapsList(): void; - getSwapsList(): Array; - setSwapsList(value: Array): void; - addSwaps(value?: SwapStatus, index?: number): SwapStatus; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ListSwapsResponse.AsObject; - static toObject(includeInstance: boolean, msg: ListSwapsResponse): ListSwapsResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ListSwapsResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ListSwapsResponse; - static deserializeBinaryFromReader(message: ListSwapsResponse, reader: jspb.BinaryReader): ListSwapsResponse; -} - -export namespace ListSwapsResponse { - export type AsObject = { - swaps: Array, - } -} - -export class SwapInfoRequest extends jspb.Message { - getId(): Uint8Array | string; - getId_asU8(): Uint8Array; - getId_asB64(): string; - setId(value: Uint8Array | string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): SwapInfoRequest.AsObject; - static toObject(includeInstance: boolean, msg: SwapInfoRequest): SwapInfoRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: SwapInfoRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): SwapInfoRequest; - static deserializeBinaryFromReader(message: SwapInfoRequest, reader: jspb.BinaryReader): SwapInfoRequest; -} - -export namespace SwapInfoRequest { - export type AsObject = { - id: Uint8Array | string, - } -} - -export class TermsRequest extends jspb.Message { - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): TermsRequest.AsObject; - static toObject(includeInstance: boolean, msg: TermsRequest): TermsRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: TermsRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): TermsRequest; - static deserializeBinaryFromReader(message: TermsRequest, reader: jspb.BinaryReader): TermsRequest; -} - -export namespace TermsRequest { - export type AsObject = { - } -} - -export class InTermsResponse extends jspb.Message { - getMinSwapAmount(): number; - setMinSwapAmount(value: number): void; - - getMaxSwapAmount(): number; - setMaxSwapAmount(value: number): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): InTermsResponse.AsObject; - static toObject(includeInstance: boolean, msg: InTermsResponse): InTermsResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: InTermsResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): InTermsResponse; - static deserializeBinaryFromReader(message: InTermsResponse, reader: jspb.BinaryReader): InTermsResponse; -} - -export namespace InTermsResponse { - export type AsObject = { - minSwapAmount: number, - maxSwapAmount: number, - } -} - -export class OutTermsResponse extends jspb.Message { - getMinSwapAmount(): number; - setMinSwapAmount(value: number): void; - - getMaxSwapAmount(): number; - setMaxSwapAmount(value: number): void; - - getMinCltvDelta(): number; - setMinCltvDelta(value: number): void; - - getMaxCltvDelta(): number; - setMaxCltvDelta(value: number): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): OutTermsResponse.AsObject; - static toObject(includeInstance: boolean, msg: OutTermsResponse): OutTermsResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: OutTermsResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): OutTermsResponse; - static deserializeBinaryFromReader(message: OutTermsResponse, reader: jspb.BinaryReader): OutTermsResponse; -} - -export namespace OutTermsResponse { - export type AsObject = { - minSwapAmount: number, - maxSwapAmount: number, - minCltvDelta: number, - maxCltvDelta: number, - } -} - -export class QuoteRequest extends jspb.Message { - getAmt(): number; - setAmt(value: number): void; - - getConfTarget(): number; - setConfTarget(value: number): void; - - getExternalHtlc(): boolean; - setExternalHtlc(value: boolean): void; - - getSwapPublicationDeadline(): number; - setSwapPublicationDeadline(value: number): void; - - getLoopInLastHop(): Uint8Array | string; - getLoopInLastHop_asU8(): Uint8Array; - getLoopInLastHop_asB64(): string; - setLoopInLastHop(value: Uint8Array | string): void; - - clearLoopInRouteHintsList(): void; - getLoopInRouteHintsList(): Array; - setLoopInRouteHintsList(value: Array): void; - addLoopInRouteHints(value?: swapserverrpc_common_pb.RouteHint, index?: number): swapserverrpc_common_pb.RouteHint; - - getPrivate(): boolean; - setPrivate(value: boolean): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): QuoteRequest.AsObject; - static toObject(includeInstance: boolean, msg: QuoteRequest): QuoteRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: QuoteRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): QuoteRequest; - static deserializeBinaryFromReader(message: QuoteRequest, reader: jspb.BinaryReader): QuoteRequest; -} - -export namespace QuoteRequest { - export type AsObject = { - amt: number, - confTarget: number, - externalHtlc: boolean, - swapPublicationDeadline: number, - loopInLastHop: Uint8Array | string, - loopInRouteHints: Array, - pb_private: boolean, - } -} - -export class InQuoteResponse extends jspb.Message { - getSwapFeeSat(): number; - setSwapFeeSat(value: number): void; - - getHtlcPublishFeeSat(): number; - setHtlcPublishFeeSat(value: number): void; - - getCltvDelta(): number; - setCltvDelta(value: number): void; - - getConfTarget(): number; - setConfTarget(value: number): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): InQuoteResponse.AsObject; - static toObject(includeInstance: boolean, msg: InQuoteResponse): InQuoteResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: InQuoteResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): InQuoteResponse; - static deserializeBinaryFromReader(message: InQuoteResponse, reader: jspb.BinaryReader): InQuoteResponse; -} - -export namespace InQuoteResponse { - export type AsObject = { - swapFeeSat: number, - htlcPublishFeeSat: number, - cltvDelta: number, - confTarget: number, - } -} - -export class OutQuoteResponse extends jspb.Message { - getSwapFeeSat(): number; - setSwapFeeSat(value: number): void; - - getPrepayAmtSat(): number; - setPrepayAmtSat(value: number): void; - - getHtlcSweepFeeSat(): number; - setHtlcSweepFeeSat(value: number): void; - - getSwapPaymentDest(): Uint8Array | string; - getSwapPaymentDest_asU8(): Uint8Array; - getSwapPaymentDest_asB64(): string; - setSwapPaymentDest(value: Uint8Array | string): void; - - getCltvDelta(): number; - setCltvDelta(value: number): void; - - getConfTarget(): number; - setConfTarget(value: number): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): OutQuoteResponse.AsObject; - static toObject(includeInstance: boolean, msg: OutQuoteResponse): OutQuoteResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: OutQuoteResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): OutQuoteResponse; - static deserializeBinaryFromReader(message: OutQuoteResponse, reader: jspb.BinaryReader): OutQuoteResponse; -} - -export namespace OutQuoteResponse { - export type AsObject = { - swapFeeSat: number, - prepayAmtSat: number, - htlcSweepFeeSat: number, - swapPaymentDest: Uint8Array | string, - cltvDelta: number, - confTarget: number, - } -} - -export class ProbeRequest extends jspb.Message { - getAmt(): number; - setAmt(value: number): void; - - getLastHop(): Uint8Array | string; - getLastHop_asU8(): Uint8Array; - getLastHop_asB64(): string; - setLastHop(value: Uint8Array | string): void; - - clearRouteHintsList(): void; - getRouteHintsList(): Array; - setRouteHintsList(value: Array): void; - addRouteHints(value?: swapserverrpc_common_pb.RouteHint, index?: number): swapserverrpc_common_pb.RouteHint; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ProbeRequest.AsObject; - static toObject(includeInstance: boolean, msg: ProbeRequest): ProbeRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ProbeRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ProbeRequest; - static deserializeBinaryFromReader(message: ProbeRequest, reader: jspb.BinaryReader): ProbeRequest; -} - -export namespace ProbeRequest { - export type AsObject = { - amt: number, - lastHop: Uint8Array | string, - routeHints: Array, - } -} - -export class ProbeResponse extends jspb.Message { - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ProbeResponse.AsObject; - static toObject(includeInstance: boolean, msg: ProbeResponse): ProbeResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ProbeResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ProbeResponse; - static deserializeBinaryFromReader(message: ProbeResponse, reader: jspb.BinaryReader): ProbeResponse; -} - -export namespace ProbeResponse { - export type AsObject = { - } -} - -export class TokensRequest extends jspb.Message { - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): TokensRequest.AsObject; - static toObject(includeInstance: boolean, msg: TokensRequest): TokensRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: TokensRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): TokensRequest; - static deserializeBinaryFromReader(message: TokensRequest, reader: jspb.BinaryReader): TokensRequest; -} - -export namespace TokensRequest { - export type AsObject = { - } -} - -export class TokensResponse extends jspb.Message { - clearTokensList(): void; - getTokensList(): Array; - setTokensList(value: Array): void; - addTokens(value?: LsatToken, index?: number): LsatToken; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): TokensResponse.AsObject; - static toObject(includeInstance: boolean, msg: TokensResponse): TokensResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: TokensResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): TokensResponse; - static deserializeBinaryFromReader(message: TokensResponse, reader: jspb.BinaryReader): TokensResponse; -} - -export namespace TokensResponse { - export type AsObject = { - tokens: Array, - } -} - -export class LsatToken extends jspb.Message { - getBaseMacaroon(): Uint8Array | string; - getBaseMacaroon_asU8(): Uint8Array; - getBaseMacaroon_asB64(): string; - setBaseMacaroon(value: Uint8Array | string): void; - - getPaymentHash(): Uint8Array | string; - getPaymentHash_asU8(): Uint8Array; - getPaymentHash_asB64(): string; - setPaymentHash(value: Uint8Array | string): void; - - getPaymentPreimage(): Uint8Array | string; - getPaymentPreimage_asU8(): Uint8Array; - getPaymentPreimage_asB64(): string; - setPaymentPreimage(value: Uint8Array | string): void; - - getAmountPaidMsat(): number; - setAmountPaidMsat(value: number): void; - - getRoutingFeePaidMsat(): number; - setRoutingFeePaidMsat(value: number): void; - - getTimeCreated(): number; - setTimeCreated(value: number): void; - - getExpired(): boolean; - setExpired(value: boolean): void; - - getStorageName(): string; - setStorageName(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): LsatToken.AsObject; - static toObject(includeInstance: boolean, msg: LsatToken): LsatToken.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: LsatToken, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): LsatToken; - static deserializeBinaryFromReader(message: LsatToken, reader: jspb.BinaryReader): LsatToken; -} - -export namespace LsatToken { - export type AsObject = { - baseMacaroon: Uint8Array | string, - paymentHash: Uint8Array | string, - paymentPreimage: Uint8Array | string, - amountPaidMsat: number, - routingFeePaidMsat: number, - timeCreated: number, - expired: boolean, - storageName: string, - } -} - -export class GetLiquidityParamsRequest extends jspb.Message { - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GetLiquidityParamsRequest.AsObject; - static toObject(includeInstance: boolean, msg: GetLiquidityParamsRequest): GetLiquidityParamsRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: GetLiquidityParamsRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GetLiquidityParamsRequest; - static deserializeBinaryFromReader(message: GetLiquidityParamsRequest, reader: jspb.BinaryReader): GetLiquidityParamsRequest; -} - -export namespace GetLiquidityParamsRequest { - export type AsObject = { - } -} - -export class LiquidityParameters extends jspb.Message { - clearRulesList(): void; - getRulesList(): Array; - setRulesList(value: Array): void; - addRules(value?: LiquidityRule, index?: number): LiquidityRule; - - getFeePpm(): number; - setFeePpm(value: number): void; - - getSweepFeeRateSatPerVbyte(): number; - setSweepFeeRateSatPerVbyte(value: number): void; - - getMaxSwapFeePpm(): number; - setMaxSwapFeePpm(value: number): void; - - getMaxRoutingFeePpm(): number; - setMaxRoutingFeePpm(value: number): void; - - getMaxPrepayRoutingFeePpm(): number; - setMaxPrepayRoutingFeePpm(value: number): void; - - getMaxPrepaySat(): number; - setMaxPrepaySat(value: number): void; - - getMaxMinerFeeSat(): number; - setMaxMinerFeeSat(value: number): void; - - getSweepConfTarget(): number; - setSweepConfTarget(value: number): void; - - getFailureBackoffSec(): number; - setFailureBackoffSec(value: number): void; - - getAutoloop(): boolean; - setAutoloop(value: boolean): void; - - getAutoloopBudgetSat(): number; - setAutoloopBudgetSat(value: number): void; - - getAutoloopBudgetStartSec(): number; - setAutoloopBudgetStartSec(value: number): void; - - getAutoMaxInFlight(): number; - setAutoMaxInFlight(value: number): void; - - getMinSwapAmount(): number; - setMinSwapAmount(value: number): void; - - getMaxSwapAmount(): number; - setMaxSwapAmount(value: number): void; - - getHtlcConfTarget(): number; - setHtlcConfTarget(value: number): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): LiquidityParameters.AsObject; - static toObject(includeInstance: boolean, msg: LiquidityParameters): LiquidityParameters.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: LiquidityParameters, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): LiquidityParameters; - static deserializeBinaryFromReader(message: LiquidityParameters, reader: jspb.BinaryReader): LiquidityParameters; -} - -export namespace LiquidityParameters { - export type AsObject = { - rules: Array, - feePpm: number, - sweepFeeRateSatPerVbyte: number, - maxSwapFeePpm: number, - maxRoutingFeePpm: number, - maxPrepayRoutingFeePpm: number, - maxPrepaySat: number, - maxMinerFeeSat: number, - sweepConfTarget: number, - failureBackoffSec: number, - autoloop: boolean, - autoloopBudgetSat: number, - autoloopBudgetStartSec: number, - autoMaxInFlight: number, - minSwapAmount: number, - maxSwapAmount: number, - htlcConfTarget: number, - } -} - -export class LiquidityRule extends jspb.Message { - getChannelId(): number; - setChannelId(value: number): void; - - getSwapType(): SwapTypeMap[keyof SwapTypeMap]; - setSwapType(value: SwapTypeMap[keyof SwapTypeMap]): void; - - getPubkey(): Uint8Array | string; - getPubkey_asU8(): Uint8Array; - getPubkey_asB64(): string; - setPubkey(value: Uint8Array | string): void; - - getType(): LiquidityRuleTypeMap[keyof LiquidityRuleTypeMap]; - setType(value: LiquidityRuleTypeMap[keyof LiquidityRuleTypeMap]): void; - - getIncomingThreshold(): number; - setIncomingThreshold(value: number): void; - - getOutgoingThreshold(): number; - setOutgoingThreshold(value: number): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): LiquidityRule.AsObject; - static toObject(includeInstance: boolean, msg: LiquidityRule): LiquidityRule.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: LiquidityRule, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): LiquidityRule; - static deserializeBinaryFromReader(message: LiquidityRule, reader: jspb.BinaryReader): LiquidityRule; -} - -export namespace LiquidityRule { - export type AsObject = { - channelId: number, - swapType: SwapTypeMap[keyof SwapTypeMap], - pubkey: Uint8Array | string, - type: LiquidityRuleTypeMap[keyof LiquidityRuleTypeMap], - incomingThreshold: number, - outgoingThreshold: number, - } -} - -export class SetLiquidityParamsRequest extends jspb.Message { - hasParameters(): boolean; - clearParameters(): void; - getParameters(): LiquidityParameters | undefined; - setParameters(value?: LiquidityParameters): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): SetLiquidityParamsRequest.AsObject; - static toObject(includeInstance: boolean, msg: SetLiquidityParamsRequest): SetLiquidityParamsRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: SetLiquidityParamsRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): SetLiquidityParamsRequest; - static deserializeBinaryFromReader(message: SetLiquidityParamsRequest, reader: jspb.BinaryReader): SetLiquidityParamsRequest; -} - -export namespace SetLiquidityParamsRequest { - export type AsObject = { - parameters?: LiquidityParameters.AsObject, - } -} - -export class SetLiquidityParamsResponse extends jspb.Message { - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): SetLiquidityParamsResponse.AsObject; - static toObject(includeInstance: boolean, msg: SetLiquidityParamsResponse): SetLiquidityParamsResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: SetLiquidityParamsResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): SetLiquidityParamsResponse; - static deserializeBinaryFromReader(message: SetLiquidityParamsResponse, reader: jspb.BinaryReader): SetLiquidityParamsResponse; -} - -export namespace SetLiquidityParamsResponse { - export type AsObject = { - } -} - -export class SuggestSwapsRequest extends jspb.Message { - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): SuggestSwapsRequest.AsObject; - static toObject(includeInstance: boolean, msg: SuggestSwapsRequest): SuggestSwapsRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: SuggestSwapsRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): SuggestSwapsRequest; - static deserializeBinaryFromReader(message: SuggestSwapsRequest, reader: jspb.BinaryReader): SuggestSwapsRequest; -} - -export namespace SuggestSwapsRequest { - export type AsObject = { - } -} - -export class Disqualified extends jspb.Message { - getChannelId(): number; - setChannelId(value: number): void; - - getPubkey(): Uint8Array | string; - getPubkey_asU8(): Uint8Array; - getPubkey_asB64(): string; - setPubkey(value: Uint8Array | string): void; - - getReason(): AutoReasonMap[keyof AutoReasonMap]; - setReason(value: AutoReasonMap[keyof AutoReasonMap]): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Disqualified.AsObject; - static toObject(includeInstance: boolean, msg: Disqualified): Disqualified.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: Disqualified, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Disqualified; - static deserializeBinaryFromReader(message: Disqualified, reader: jspb.BinaryReader): Disqualified; -} - -export namespace Disqualified { - export type AsObject = { - channelId: number, - pubkey: Uint8Array | string, - reason: AutoReasonMap[keyof AutoReasonMap], - } -} - -export class SuggestSwapsResponse extends jspb.Message { - clearLoopOutList(): void; - getLoopOutList(): Array; - setLoopOutList(value: Array): void; - addLoopOut(value?: LoopOutRequest, index?: number): LoopOutRequest; - - clearLoopInList(): void; - getLoopInList(): Array; - setLoopInList(value: Array): void; - addLoopIn(value?: LoopInRequest, index?: number): LoopInRequest; - - clearDisqualifiedList(): void; - getDisqualifiedList(): Array; - setDisqualifiedList(value: Array): void; - addDisqualified(value?: Disqualified, index?: number): Disqualified; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): SuggestSwapsResponse.AsObject; - static toObject(includeInstance: boolean, msg: SuggestSwapsResponse): SuggestSwapsResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: SuggestSwapsResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): SuggestSwapsResponse; - static deserializeBinaryFromReader(message: SuggestSwapsResponse, reader: jspb.BinaryReader): SuggestSwapsResponse; -} - -export namespace SuggestSwapsResponse { - export type AsObject = { - loopOut: Array, - loopIn: Array, - disqualified: Array, - } -} - -export interface SwapTypeMap { - LOOP_OUT: 0; - LOOP_IN: 1; -} - -export const SwapType: SwapTypeMap; - -export interface SwapStateMap { - INITIATED: 0; - PREIMAGE_REVEALED: 1; - HTLC_PUBLISHED: 2; - SUCCESS: 3; - FAILED: 4; - INVOICE_SETTLED: 5; -} - -export const SwapState: SwapStateMap; - -export interface FailureReasonMap { - FAILURE_REASON_NONE: 0; - FAILURE_REASON_OFFCHAIN: 1; - FAILURE_REASON_TIMEOUT: 2; - FAILURE_REASON_SWEEP_TIMEOUT: 3; - FAILURE_REASON_INSUFFICIENT_VALUE: 4; - FAILURE_REASON_TEMPORARY: 5; - FAILURE_REASON_INCORRECT_AMOUNT: 6; -} - -export const FailureReason: FailureReasonMap; - -export interface LiquidityRuleTypeMap { - UNKNOWN: 0; - THRESHOLD: 1; -} - -export const LiquidityRuleType: LiquidityRuleTypeMap; - -export interface AutoReasonMap { - AUTO_REASON_UNKNOWN: 0; - AUTO_REASON_BUDGET_NOT_STARTED: 1; - AUTO_REASON_SWEEP_FEES: 2; - AUTO_REASON_BUDGET_ELAPSED: 3; - AUTO_REASON_IN_FLIGHT: 4; - AUTO_REASON_SWAP_FEE: 5; - AUTO_REASON_MINER_FEE: 6; - AUTO_REASON_PREPAY: 7; - AUTO_REASON_FAILURE_BACKOFF: 8; - AUTO_REASON_LOOP_OUT: 9; - AUTO_REASON_LOOP_IN: 10; - AUTO_REASON_LIQUIDITY_OK: 11; - AUTO_REASON_BUDGET_INSUFFICIENT: 12; - AUTO_REASON_FEE_INSUFFICIENT: 13; -} - -export const AutoReason: AutoReasonMap; - diff --git a/lib/types/generated/client_pb.js b/lib/types/generated/client_pb.js deleted file mode 100644 index a95aabc..0000000 --- a/lib/types/generated/client_pb.js +++ /dev/null @@ -1,7453 +0,0 @@ -// source: client.proto -/** - * @fileoverview - * @enhanceable - * @suppress {missingRequire} reports error on implicit type usages. - * @suppress {messageConventions} JS Compiler reports an error if a variable or - * field starts with 'MSG_' and isn't a translatable message. - * @public - */ -// GENERATED CODE -- DO NOT EDIT! -/* eslint-disable */ -// @ts-nocheck - -var jspb = require('google-protobuf'); -var goog = jspb; -var global = Function('return this')(); - -var swapserverrpc_common_pb = require('./swapserverrpc/common_pb.js'); -goog.object.extend(proto, swapserverrpc_common_pb); -goog.exportSymbol('proto.looprpc.AutoReason', null, global); -goog.exportSymbol('proto.looprpc.Disqualified', null, global); -goog.exportSymbol('proto.looprpc.FailureReason', null, global); -goog.exportSymbol('proto.looprpc.GetLiquidityParamsRequest', null, global); -goog.exportSymbol('proto.looprpc.InQuoteResponse', null, global); -goog.exportSymbol('proto.looprpc.InTermsResponse', null, global); -goog.exportSymbol('proto.looprpc.LiquidityParameters', null, global); -goog.exportSymbol('proto.looprpc.LiquidityRule', null, global); -goog.exportSymbol('proto.looprpc.LiquidityRuleType', null, global); -goog.exportSymbol('proto.looprpc.ListSwapsRequest', null, global); -goog.exportSymbol('proto.looprpc.ListSwapsResponse', null, global); -goog.exportSymbol('proto.looprpc.LoopInRequest', null, global); -goog.exportSymbol('proto.looprpc.LoopOutRequest', null, global); -goog.exportSymbol('proto.looprpc.LsatToken', null, global); -goog.exportSymbol('proto.looprpc.MonitorRequest', null, global); -goog.exportSymbol('proto.looprpc.OutQuoteResponse', null, global); -goog.exportSymbol('proto.looprpc.OutTermsResponse', null, global); -goog.exportSymbol('proto.looprpc.ProbeRequest', null, global); -goog.exportSymbol('proto.looprpc.ProbeResponse', null, global); -goog.exportSymbol('proto.looprpc.QuoteRequest', null, global); -goog.exportSymbol('proto.looprpc.SetLiquidityParamsRequest', null, global); -goog.exportSymbol('proto.looprpc.SetLiquidityParamsResponse', null, global); -goog.exportSymbol('proto.looprpc.SuggestSwapsRequest', null, global); -goog.exportSymbol('proto.looprpc.SuggestSwapsResponse', null, global); -goog.exportSymbol('proto.looprpc.SwapInfoRequest', null, global); -goog.exportSymbol('proto.looprpc.SwapResponse', null, global); -goog.exportSymbol('proto.looprpc.SwapState', null, global); -goog.exportSymbol('proto.looprpc.SwapStatus', null, global); -goog.exportSymbol('proto.looprpc.SwapType', null, global); -goog.exportSymbol('proto.looprpc.TermsRequest', null, global); -goog.exportSymbol('proto.looprpc.TokensRequest', null, global); -goog.exportSymbol('proto.looprpc.TokensResponse', null, global); -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.looprpc.LoopOutRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.looprpc.LoopOutRequest.repeatedFields_, null); -}; -goog.inherits(proto.looprpc.LoopOutRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.looprpc.LoopOutRequest.displayName = 'proto.looprpc.LoopOutRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.looprpc.LoopInRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.looprpc.LoopInRequest.repeatedFields_, null); -}; -goog.inherits(proto.looprpc.LoopInRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.looprpc.LoopInRequest.displayName = 'proto.looprpc.LoopInRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.looprpc.SwapResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.looprpc.SwapResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.looprpc.SwapResponse.displayName = 'proto.looprpc.SwapResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.looprpc.MonitorRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.looprpc.MonitorRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.looprpc.MonitorRequest.displayName = 'proto.looprpc.MonitorRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.looprpc.SwapStatus = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.looprpc.SwapStatus.repeatedFields_, null); -}; -goog.inherits(proto.looprpc.SwapStatus, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.looprpc.SwapStatus.displayName = 'proto.looprpc.SwapStatus'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.looprpc.ListSwapsRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.looprpc.ListSwapsRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.looprpc.ListSwapsRequest.displayName = 'proto.looprpc.ListSwapsRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.looprpc.ListSwapsResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.looprpc.ListSwapsResponse.repeatedFields_, null); -}; -goog.inherits(proto.looprpc.ListSwapsResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.looprpc.ListSwapsResponse.displayName = 'proto.looprpc.ListSwapsResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.looprpc.SwapInfoRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.looprpc.SwapInfoRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.looprpc.SwapInfoRequest.displayName = 'proto.looprpc.SwapInfoRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.looprpc.TermsRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.looprpc.TermsRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.looprpc.TermsRequest.displayName = 'proto.looprpc.TermsRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.looprpc.InTermsResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.looprpc.InTermsResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.looprpc.InTermsResponse.displayName = 'proto.looprpc.InTermsResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.looprpc.OutTermsResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.looprpc.OutTermsResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.looprpc.OutTermsResponse.displayName = 'proto.looprpc.OutTermsResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.looprpc.QuoteRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.looprpc.QuoteRequest.repeatedFields_, null); -}; -goog.inherits(proto.looprpc.QuoteRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.looprpc.QuoteRequest.displayName = 'proto.looprpc.QuoteRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.looprpc.InQuoteResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.looprpc.InQuoteResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.looprpc.InQuoteResponse.displayName = 'proto.looprpc.InQuoteResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.looprpc.OutQuoteResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.looprpc.OutQuoteResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.looprpc.OutQuoteResponse.displayName = 'proto.looprpc.OutQuoteResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.looprpc.ProbeRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.looprpc.ProbeRequest.repeatedFields_, null); -}; -goog.inherits(proto.looprpc.ProbeRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.looprpc.ProbeRequest.displayName = 'proto.looprpc.ProbeRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.looprpc.ProbeResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.looprpc.ProbeResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.looprpc.ProbeResponse.displayName = 'proto.looprpc.ProbeResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.looprpc.TokensRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.looprpc.TokensRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.looprpc.TokensRequest.displayName = 'proto.looprpc.TokensRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.looprpc.TokensResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.looprpc.TokensResponse.repeatedFields_, null); -}; -goog.inherits(proto.looprpc.TokensResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.looprpc.TokensResponse.displayName = 'proto.looprpc.TokensResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.looprpc.LsatToken = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.looprpc.LsatToken, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.looprpc.LsatToken.displayName = 'proto.looprpc.LsatToken'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.looprpc.GetLiquidityParamsRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.looprpc.GetLiquidityParamsRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.looprpc.GetLiquidityParamsRequest.displayName = 'proto.looprpc.GetLiquidityParamsRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.looprpc.LiquidityParameters = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.looprpc.LiquidityParameters.repeatedFields_, null); -}; -goog.inherits(proto.looprpc.LiquidityParameters, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.looprpc.LiquidityParameters.displayName = 'proto.looprpc.LiquidityParameters'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.looprpc.LiquidityRule = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.looprpc.LiquidityRule, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.looprpc.LiquidityRule.displayName = 'proto.looprpc.LiquidityRule'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.looprpc.SetLiquidityParamsRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.looprpc.SetLiquidityParamsRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.looprpc.SetLiquidityParamsRequest.displayName = 'proto.looprpc.SetLiquidityParamsRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.looprpc.SetLiquidityParamsResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.looprpc.SetLiquidityParamsResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.looprpc.SetLiquidityParamsResponse.displayName = 'proto.looprpc.SetLiquidityParamsResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.looprpc.SuggestSwapsRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.looprpc.SuggestSwapsRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.looprpc.SuggestSwapsRequest.displayName = 'proto.looprpc.SuggestSwapsRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.looprpc.Disqualified = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.looprpc.Disqualified, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.looprpc.Disqualified.displayName = 'proto.looprpc.Disqualified'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.looprpc.SuggestSwapsResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.looprpc.SuggestSwapsResponse.repeatedFields_, null); -}; -goog.inherits(proto.looprpc.SuggestSwapsResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.looprpc.SuggestSwapsResponse.displayName = 'proto.looprpc.SuggestSwapsResponse'; -} - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.looprpc.LoopOutRequest.repeatedFields_ = [11]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.looprpc.LoopOutRequest.prototype.toObject = function(opt_includeInstance) { - return proto.looprpc.LoopOutRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.looprpc.LoopOutRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.looprpc.LoopOutRequest.toObject = function(includeInstance, msg) { - var f, obj = { - amt: jspb.Message.getFieldWithDefault(msg, 1, 0), - dest: jspb.Message.getFieldWithDefault(msg, 2, ""), - maxSwapRoutingFee: jspb.Message.getFieldWithDefault(msg, 3, 0), - maxPrepayRoutingFee: jspb.Message.getFieldWithDefault(msg, 4, 0), - maxSwapFee: jspb.Message.getFieldWithDefault(msg, 5, 0), - maxPrepayAmt: jspb.Message.getFieldWithDefault(msg, 6, 0), - maxMinerFee: jspb.Message.getFieldWithDefault(msg, 7, 0), - loopOutChannel: jspb.Message.getFieldWithDefault(msg, 8, 0), - outgoingChanSetList: (f = jspb.Message.getRepeatedField(msg, 11)) == null ? undefined : f, - sweepConfTarget: jspb.Message.getFieldWithDefault(msg, 9, 0), - htlcConfirmations: jspb.Message.getFieldWithDefault(msg, 13, 0), - swapPublicationDeadline: jspb.Message.getFieldWithDefault(msg, 10, 0), - label: jspb.Message.getFieldWithDefault(msg, 12, ""), - initiator: jspb.Message.getFieldWithDefault(msg, 14, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.looprpc.LoopOutRequest} - */ -proto.looprpc.LoopOutRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.looprpc.LoopOutRequest; - return proto.looprpc.LoopOutRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.looprpc.LoopOutRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.looprpc.LoopOutRequest} - */ -proto.looprpc.LoopOutRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readInt64()); - msg.setAmt(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setDest(value); - break; - case 3: - var value = /** @type {number} */ (reader.readInt64()); - msg.setMaxSwapRoutingFee(value); - break; - case 4: - var value = /** @type {number} */ (reader.readInt64()); - msg.setMaxPrepayRoutingFee(value); - break; - case 5: - var value = /** @type {number} */ (reader.readInt64()); - msg.setMaxSwapFee(value); - break; - case 6: - var value = /** @type {number} */ (reader.readInt64()); - msg.setMaxPrepayAmt(value); - break; - case 7: - var value = /** @type {number} */ (reader.readInt64()); - msg.setMaxMinerFee(value); - break; - case 8: - var value = /** @type {number} */ (reader.readUint64()); - msg.setLoopOutChannel(value); - break; - case 11: - var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedUint64() : [reader.readUint64()]); - for (var i = 0; i < values.length; i++) { - msg.addOutgoingChanSet(values[i]); - } - break; - case 9: - var value = /** @type {number} */ (reader.readInt32()); - msg.setSweepConfTarget(value); - break; - case 13: - var value = /** @type {number} */ (reader.readInt32()); - msg.setHtlcConfirmations(value); - break; - case 10: - var value = /** @type {number} */ (reader.readUint64()); - msg.setSwapPublicationDeadline(value); - break; - case 12: - var value = /** @type {string} */ (reader.readString()); - msg.setLabel(value); - break; - case 14: - var value = /** @type {string} */ (reader.readString()); - msg.setInitiator(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.looprpc.LoopOutRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.looprpc.LoopOutRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.looprpc.LoopOutRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.looprpc.LoopOutRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getAmt(); - if (f !== 0) { - writer.writeInt64( - 1, - f - ); - } - f = message.getDest(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getMaxSwapRoutingFee(); - if (f !== 0) { - writer.writeInt64( - 3, - f - ); - } - f = message.getMaxPrepayRoutingFee(); - if (f !== 0) { - writer.writeInt64( - 4, - f - ); - } - f = message.getMaxSwapFee(); - if (f !== 0) { - writer.writeInt64( - 5, - f - ); - } - f = message.getMaxPrepayAmt(); - if (f !== 0) { - writer.writeInt64( - 6, - f - ); - } - f = message.getMaxMinerFee(); - if (f !== 0) { - writer.writeInt64( - 7, - f - ); - } - f = message.getLoopOutChannel(); - if (f !== 0) { - writer.writeUint64( - 8, - f - ); - } - f = message.getOutgoingChanSetList(); - if (f.length > 0) { - writer.writePackedUint64( - 11, - f - ); - } - f = message.getSweepConfTarget(); - if (f !== 0) { - writer.writeInt32( - 9, - f - ); - } - f = message.getHtlcConfirmations(); - if (f !== 0) { - writer.writeInt32( - 13, - f - ); - } - f = message.getSwapPublicationDeadline(); - if (f !== 0) { - writer.writeUint64( - 10, - f - ); - } - f = message.getLabel(); - if (f.length > 0) { - writer.writeString( - 12, - f - ); - } - f = message.getInitiator(); - if (f.length > 0) { - writer.writeString( - 14, - f - ); - } -}; - - -/** - * optional int64 amt = 1; - * @return {number} - */ -proto.looprpc.LoopOutRequest.prototype.getAmt = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.looprpc.LoopOutRequest} returns this - */ -proto.looprpc.LoopOutRequest.prototype.setAmt = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); -}; - - -/** - * optional string dest = 2; - * @return {string} - */ -proto.looprpc.LoopOutRequest.prototype.getDest = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.looprpc.LoopOutRequest} returns this - */ -proto.looprpc.LoopOutRequest.prototype.setDest = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional int64 max_swap_routing_fee = 3; - * @return {number} - */ -proto.looprpc.LoopOutRequest.prototype.getMaxSwapRoutingFee = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.looprpc.LoopOutRequest} returns this - */ -proto.looprpc.LoopOutRequest.prototype.setMaxSwapRoutingFee = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - -/** - * optional int64 max_prepay_routing_fee = 4; - * @return {number} - */ -proto.looprpc.LoopOutRequest.prototype.getMaxPrepayRoutingFee = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.looprpc.LoopOutRequest} returns this - */ -proto.looprpc.LoopOutRequest.prototype.setMaxPrepayRoutingFee = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); -}; - - -/** - * optional int64 max_swap_fee = 5; - * @return {number} - */ -proto.looprpc.LoopOutRequest.prototype.getMaxSwapFee = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.looprpc.LoopOutRequest} returns this - */ -proto.looprpc.LoopOutRequest.prototype.setMaxSwapFee = function(value) { - return jspb.Message.setProto3IntField(this, 5, value); -}; - - -/** - * optional int64 max_prepay_amt = 6; - * @return {number} - */ -proto.looprpc.LoopOutRequest.prototype.getMaxPrepayAmt = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.looprpc.LoopOutRequest} returns this - */ -proto.looprpc.LoopOutRequest.prototype.setMaxPrepayAmt = function(value) { - return jspb.Message.setProto3IntField(this, 6, value); -}; - - -/** - * optional int64 max_miner_fee = 7; - * @return {number} - */ -proto.looprpc.LoopOutRequest.prototype.getMaxMinerFee = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.looprpc.LoopOutRequest} returns this - */ -proto.looprpc.LoopOutRequest.prototype.setMaxMinerFee = function(value) { - return jspb.Message.setProto3IntField(this, 7, value); -}; - - -/** - * optional uint64 loop_out_channel = 8; - * @return {number} - */ -proto.looprpc.LoopOutRequest.prototype.getLoopOutChannel = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.looprpc.LoopOutRequest} returns this - */ -proto.looprpc.LoopOutRequest.prototype.setLoopOutChannel = function(value) { - return jspb.Message.setProto3IntField(this, 8, value); -}; - - -/** - * repeated uint64 outgoing_chan_set = 11; - * @return {!Array} - */ -proto.looprpc.LoopOutRequest.prototype.getOutgoingChanSetList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 11)); -}; - - -/** - * @param {!Array} value - * @return {!proto.looprpc.LoopOutRequest} returns this - */ -proto.looprpc.LoopOutRequest.prototype.setOutgoingChanSetList = function(value) { - return jspb.Message.setField(this, 11, value || []); -}; - - -/** - * @param {number} value - * @param {number=} opt_index - * @return {!proto.looprpc.LoopOutRequest} returns this - */ -proto.looprpc.LoopOutRequest.prototype.addOutgoingChanSet = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 11, value, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.looprpc.LoopOutRequest} returns this - */ -proto.looprpc.LoopOutRequest.prototype.clearOutgoingChanSetList = function() { - return this.setOutgoingChanSetList([]); -}; - - -/** - * optional int32 sweep_conf_target = 9; - * @return {number} - */ -proto.looprpc.LoopOutRequest.prototype.getSweepConfTarget = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.looprpc.LoopOutRequest} returns this - */ -proto.looprpc.LoopOutRequest.prototype.setSweepConfTarget = function(value) { - return jspb.Message.setProto3IntField(this, 9, value); -}; - - -/** - * optional int32 htlc_confirmations = 13; - * @return {number} - */ -proto.looprpc.LoopOutRequest.prototype.getHtlcConfirmations = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 13, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.looprpc.LoopOutRequest} returns this - */ -proto.looprpc.LoopOutRequest.prototype.setHtlcConfirmations = function(value) { - return jspb.Message.setProto3IntField(this, 13, value); -}; - - -/** - * optional uint64 swap_publication_deadline = 10; - * @return {number} - */ -proto.looprpc.LoopOutRequest.prototype.getSwapPublicationDeadline = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 10, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.looprpc.LoopOutRequest} returns this - */ -proto.looprpc.LoopOutRequest.prototype.setSwapPublicationDeadline = function(value) { - return jspb.Message.setProto3IntField(this, 10, value); -}; - - -/** - * optional string label = 12; - * @return {string} - */ -proto.looprpc.LoopOutRequest.prototype.getLabel = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 12, "")); -}; - - -/** - * @param {string} value - * @return {!proto.looprpc.LoopOutRequest} returns this - */ -proto.looprpc.LoopOutRequest.prototype.setLabel = function(value) { - return jspb.Message.setProto3StringField(this, 12, value); -}; - - -/** - * optional string initiator = 14; - * @return {string} - */ -proto.looprpc.LoopOutRequest.prototype.getInitiator = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 14, "")); -}; - - -/** - * @param {string} value - * @return {!proto.looprpc.LoopOutRequest} returns this - */ -proto.looprpc.LoopOutRequest.prototype.setInitiator = function(value) { - return jspb.Message.setProto3StringField(this, 14, value); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.looprpc.LoopInRequest.repeatedFields_ = [9]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.looprpc.LoopInRequest.prototype.toObject = function(opt_includeInstance) { - return proto.looprpc.LoopInRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.looprpc.LoopInRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.looprpc.LoopInRequest.toObject = function(includeInstance, msg) { - var f, obj = { - amt: jspb.Message.getFieldWithDefault(msg, 1, 0), - maxSwapFee: jspb.Message.getFieldWithDefault(msg, 2, 0), - maxMinerFee: jspb.Message.getFieldWithDefault(msg, 3, 0), - lastHop: msg.getLastHop_asB64(), - externalHtlc: jspb.Message.getBooleanFieldWithDefault(msg, 5, false), - htlcConfTarget: jspb.Message.getFieldWithDefault(msg, 6, 0), - label: jspb.Message.getFieldWithDefault(msg, 7, ""), - initiator: jspb.Message.getFieldWithDefault(msg, 8, ""), - routeHintsList: jspb.Message.toObjectList(msg.getRouteHintsList(), - swapserverrpc_common_pb.RouteHint.toObject, includeInstance), - pb_private: jspb.Message.getBooleanFieldWithDefault(msg, 10, false) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.looprpc.LoopInRequest} - */ -proto.looprpc.LoopInRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.looprpc.LoopInRequest; - return proto.looprpc.LoopInRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.looprpc.LoopInRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.looprpc.LoopInRequest} - */ -proto.looprpc.LoopInRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readInt64()); - msg.setAmt(value); - break; - case 2: - var value = /** @type {number} */ (reader.readInt64()); - msg.setMaxSwapFee(value); - break; - case 3: - var value = /** @type {number} */ (reader.readInt64()); - msg.setMaxMinerFee(value); - break; - case 4: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setLastHop(value); - break; - case 5: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setExternalHtlc(value); - break; - case 6: - var value = /** @type {number} */ (reader.readInt32()); - msg.setHtlcConfTarget(value); - break; - case 7: - var value = /** @type {string} */ (reader.readString()); - msg.setLabel(value); - break; - case 8: - var value = /** @type {string} */ (reader.readString()); - msg.setInitiator(value); - break; - case 9: - var value = new swapserverrpc_common_pb.RouteHint; - reader.readMessage(value,swapserverrpc_common_pb.RouteHint.deserializeBinaryFromReader); - msg.addRouteHints(value); - break; - case 10: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setPrivate(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.looprpc.LoopInRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.looprpc.LoopInRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.looprpc.LoopInRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.looprpc.LoopInRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getAmt(); - if (f !== 0) { - writer.writeInt64( - 1, - f - ); - } - f = message.getMaxSwapFee(); - if (f !== 0) { - writer.writeInt64( - 2, - f - ); - } - f = message.getMaxMinerFee(); - if (f !== 0) { - writer.writeInt64( - 3, - f - ); - } - f = message.getLastHop_asU8(); - if (f.length > 0) { - writer.writeBytes( - 4, - f - ); - } - f = message.getExternalHtlc(); - if (f) { - writer.writeBool( - 5, - f - ); - } - f = message.getHtlcConfTarget(); - if (f !== 0) { - writer.writeInt32( - 6, - f - ); - } - f = message.getLabel(); - if (f.length > 0) { - writer.writeString( - 7, - f - ); - } - f = message.getInitiator(); - if (f.length > 0) { - writer.writeString( - 8, - f - ); - } - f = message.getRouteHintsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 9, - f, - swapserverrpc_common_pb.RouteHint.serializeBinaryToWriter - ); - } - f = message.getPrivate(); - if (f) { - writer.writeBool( - 10, - f - ); - } -}; - - -/** - * optional int64 amt = 1; - * @return {number} - */ -proto.looprpc.LoopInRequest.prototype.getAmt = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.looprpc.LoopInRequest} returns this - */ -proto.looprpc.LoopInRequest.prototype.setAmt = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); -}; - - -/** - * optional int64 max_swap_fee = 2; - * @return {number} - */ -proto.looprpc.LoopInRequest.prototype.getMaxSwapFee = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.looprpc.LoopInRequest} returns this - */ -proto.looprpc.LoopInRequest.prototype.setMaxSwapFee = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * optional int64 max_miner_fee = 3; - * @return {number} - */ -proto.looprpc.LoopInRequest.prototype.getMaxMinerFee = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.looprpc.LoopInRequest} returns this - */ -proto.looprpc.LoopInRequest.prototype.setMaxMinerFee = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - -/** - * optional bytes last_hop = 4; - * @return {!(string|Uint8Array)} - */ -proto.looprpc.LoopInRequest.prototype.getLastHop = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 4, "")); -}; - - -/** - * optional bytes last_hop = 4; - * This is a type-conversion wrapper around `getLastHop()` - * @return {string} - */ -proto.looprpc.LoopInRequest.prototype.getLastHop_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getLastHop())); -}; - - -/** - * optional bytes last_hop = 4; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getLastHop()` - * @return {!Uint8Array} - */ -proto.looprpc.LoopInRequest.prototype.getLastHop_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getLastHop())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.looprpc.LoopInRequest} returns this - */ -proto.looprpc.LoopInRequest.prototype.setLastHop = function(value) { - return jspb.Message.setProto3BytesField(this, 4, value); -}; - - -/** - * optional bool external_htlc = 5; - * @return {boolean} - */ -proto.looprpc.LoopInRequest.prototype.getExternalHtlc = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 5, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.looprpc.LoopInRequest} returns this - */ -proto.looprpc.LoopInRequest.prototype.setExternalHtlc = function(value) { - return jspb.Message.setProto3BooleanField(this, 5, value); -}; - - -/** - * optional int32 htlc_conf_target = 6; - * @return {number} - */ -proto.looprpc.LoopInRequest.prototype.getHtlcConfTarget = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.looprpc.LoopInRequest} returns this - */ -proto.looprpc.LoopInRequest.prototype.setHtlcConfTarget = function(value) { - return jspb.Message.setProto3IntField(this, 6, value); -}; - - -/** - * optional string label = 7; - * @return {string} - */ -proto.looprpc.LoopInRequest.prototype.getLabel = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); -}; - - -/** - * @param {string} value - * @return {!proto.looprpc.LoopInRequest} returns this - */ -proto.looprpc.LoopInRequest.prototype.setLabel = function(value) { - return jspb.Message.setProto3StringField(this, 7, value); -}; - - -/** - * optional string initiator = 8; - * @return {string} - */ -proto.looprpc.LoopInRequest.prototype.getInitiator = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, "")); -}; - - -/** - * @param {string} value - * @return {!proto.looprpc.LoopInRequest} returns this - */ -proto.looprpc.LoopInRequest.prototype.setInitiator = function(value) { - return jspb.Message.setProto3StringField(this, 8, value); -}; - - -/** - * repeated RouteHint route_hints = 9; - * @return {!Array} - */ -proto.looprpc.LoopInRequest.prototype.getRouteHintsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, swapserverrpc_common_pb.RouteHint, 9)); -}; - - -/** - * @param {!Array} value - * @return {!proto.looprpc.LoopInRequest} returns this -*/ -proto.looprpc.LoopInRequest.prototype.setRouteHintsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 9, value); -}; - - -/** - * @param {!proto.looprpc.RouteHint=} opt_value - * @param {number=} opt_index - * @return {!proto.looprpc.RouteHint} - */ -proto.looprpc.LoopInRequest.prototype.addRouteHints = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 9, opt_value, proto.looprpc.RouteHint, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.looprpc.LoopInRequest} returns this - */ -proto.looprpc.LoopInRequest.prototype.clearRouteHintsList = function() { - return this.setRouteHintsList([]); -}; - - -/** - * optional bool private = 10; - * @return {boolean} - */ -proto.looprpc.LoopInRequest.prototype.getPrivate = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 10, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.looprpc.LoopInRequest} returns this - */ -proto.looprpc.LoopInRequest.prototype.setPrivate = function(value) { - return jspb.Message.setProto3BooleanField(this, 10, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.looprpc.SwapResponse.prototype.toObject = function(opt_includeInstance) { - return proto.looprpc.SwapResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.looprpc.SwapResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.looprpc.SwapResponse.toObject = function(includeInstance, msg) { - var f, obj = { - id: jspb.Message.getFieldWithDefault(msg, 1, ""), - idBytes: msg.getIdBytes_asB64(), - htlcAddress: jspb.Message.getFieldWithDefault(msg, 2, ""), - htlcAddressNp2wsh: jspb.Message.getFieldWithDefault(msg, 4, ""), - htlcAddressP2wsh: jspb.Message.getFieldWithDefault(msg, 5, ""), - serverMessage: jspb.Message.getFieldWithDefault(msg, 6, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.looprpc.SwapResponse} - */ -proto.looprpc.SwapResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.looprpc.SwapResponse; - return proto.looprpc.SwapResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.looprpc.SwapResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.looprpc.SwapResponse} - */ -proto.looprpc.SwapResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setId(value); - break; - case 3: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setIdBytes(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setHtlcAddress(value); - break; - case 4: - var value = /** @type {string} */ (reader.readString()); - msg.setHtlcAddressNp2wsh(value); - break; - case 5: - var value = /** @type {string} */ (reader.readString()); - msg.setHtlcAddressP2wsh(value); - break; - case 6: - var value = /** @type {string} */ (reader.readString()); - msg.setServerMessage(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.looprpc.SwapResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.looprpc.SwapResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.looprpc.SwapResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.looprpc.SwapResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getId(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getIdBytes_asU8(); - if (f.length > 0) { - writer.writeBytes( - 3, - f - ); - } - f = message.getHtlcAddress(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getHtlcAddressNp2wsh(); - if (f.length > 0) { - writer.writeString( - 4, - f - ); - } - f = message.getHtlcAddressP2wsh(); - if (f.length > 0) { - writer.writeString( - 5, - f - ); - } - f = message.getServerMessage(); - if (f.length > 0) { - writer.writeString( - 6, - f - ); - } -}; - - -/** - * optional string id = 1; - * @return {string} - */ -proto.looprpc.SwapResponse.prototype.getId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.looprpc.SwapResponse} returns this - */ -proto.looprpc.SwapResponse.prototype.setId = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional bytes id_bytes = 3; - * @return {!(string|Uint8Array)} - */ -proto.looprpc.SwapResponse.prototype.getIdBytes = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * optional bytes id_bytes = 3; - * This is a type-conversion wrapper around `getIdBytes()` - * @return {string} - */ -proto.looprpc.SwapResponse.prototype.getIdBytes_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getIdBytes())); -}; - - -/** - * optional bytes id_bytes = 3; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getIdBytes()` - * @return {!Uint8Array} - */ -proto.looprpc.SwapResponse.prototype.getIdBytes_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getIdBytes())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.looprpc.SwapResponse} returns this - */ -proto.looprpc.SwapResponse.prototype.setIdBytes = function(value) { - return jspb.Message.setProto3BytesField(this, 3, value); -}; - - -/** - * optional string htlc_address = 2; - * @return {string} - */ -proto.looprpc.SwapResponse.prototype.getHtlcAddress = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.looprpc.SwapResponse} returns this - */ -proto.looprpc.SwapResponse.prototype.setHtlcAddress = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional string htlc_address_np2wsh = 4; - * @return {string} - */ -proto.looprpc.SwapResponse.prototype.getHtlcAddressNp2wsh = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); -}; - - -/** - * @param {string} value - * @return {!proto.looprpc.SwapResponse} returns this - */ -proto.looprpc.SwapResponse.prototype.setHtlcAddressNp2wsh = function(value) { - return jspb.Message.setProto3StringField(this, 4, value); -}; - - -/** - * optional string htlc_address_p2wsh = 5; - * @return {string} - */ -proto.looprpc.SwapResponse.prototype.getHtlcAddressP2wsh = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); -}; - - -/** - * @param {string} value - * @return {!proto.looprpc.SwapResponse} returns this - */ -proto.looprpc.SwapResponse.prototype.setHtlcAddressP2wsh = function(value) { - return jspb.Message.setProto3StringField(this, 5, value); -}; - - -/** - * optional string server_message = 6; - * @return {string} - */ -proto.looprpc.SwapResponse.prototype.getServerMessage = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); -}; - - -/** - * @param {string} value - * @return {!proto.looprpc.SwapResponse} returns this - */ -proto.looprpc.SwapResponse.prototype.setServerMessage = function(value) { - return jspb.Message.setProto3StringField(this, 6, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.looprpc.MonitorRequest.prototype.toObject = function(opt_includeInstance) { - return proto.looprpc.MonitorRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.looprpc.MonitorRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.looprpc.MonitorRequest.toObject = function(includeInstance, msg) { - var f, obj = { - - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.looprpc.MonitorRequest} - */ -proto.looprpc.MonitorRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.looprpc.MonitorRequest; - return proto.looprpc.MonitorRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.looprpc.MonitorRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.looprpc.MonitorRequest} - */ -proto.looprpc.MonitorRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.looprpc.MonitorRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.looprpc.MonitorRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.looprpc.MonitorRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.looprpc.MonitorRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.looprpc.SwapStatus.repeatedFields_ = [17]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.looprpc.SwapStatus.prototype.toObject = function(opt_includeInstance) { - return proto.looprpc.SwapStatus.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.looprpc.SwapStatus} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.looprpc.SwapStatus.toObject = function(includeInstance, msg) { - var f, obj = { - amt: jspb.Message.getFieldWithDefault(msg, 1, 0), - id: jspb.Message.getFieldWithDefault(msg, 2, ""), - idBytes: msg.getIdBytes_asB64(), - type: jspb.Message.getFieldWithDefault(msg, 3, 0), - state: jspb.Message.getFieldWithDefault(msg, 4, 0), - failureReason: jspb.Message.getFieldWithDefault(msg, 14, 0), - initiationTime: jspb.Message.getFieldWithDefault(msg, 5, 0), - lastUpdateTime: jspb.Message.getFieldWithDefault(msg, 6, 0), - htlcAddress: jspb.Message.getFieldWithDefault(msg, 7, ""), - htlcAddressP2wsh: jspb.Message.getFieldWithDefault(msg, 12, ""), - htlcAddressNp2wsh: jspb.Message.getFieldWithDefault(msg, 13, ""), - costServer: jspb.Message.getFieldWithDefault(msg, 8, 0), - costOnchain: jspb.Message.getFieldWithDefault(msg, 9, 0), - costOffchain: jspb.Message.getFieldWithDefault(msg, 10, 0), - lastHop: msg.getLastHop_asB64(), - outgoingChanSetList: (f = jspb.Message.getRepeatedField(msg, 17)) == null ? undefined : f, - label: jspb.Message.getFieldWithDefault(msg, 15, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.looprpc.SwapStatus} - */ -proto.looprpc.SwapStatus.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.looprpc.SwapStatus; - return proto.looprpc.SwapStatus.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.looprpc.SwapStatus} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.looprpc.SwapStatus} - */ -proto.looprpc.SwapStatus.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readInt64()); - msg.setAmt(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setId(value); - break; - case 11: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setIdBytes(value); - break; - case 3: - var value = /** @type {!proto.looprpc.SwapType} */ (reader.readEnum()); - msg.setType(value); - break; - case 4: - var value = /** @type {!proto.looprpc.SwapState} */ (reader.readEnum()); - msg.setState(value); - break; - case 14: - var value = /** @type {!proto.looprpc.FailureReason} */ (reader.readEnum()); - msg.setFailureReason(value); - break; - case 5: - var value = /** @type {number} */ (reader.readInt64()); - msg.setInitiationTime(value); - break; - case 6: - var value = /** @type {number} */ (reader.readInt64()); - msg.setLastUpdateTime(value); - break; - case 7: - var value = /** @type {string} */ (reader.readString()); - msg.setHtlcAddress(value); - break; - case 12: - var value = /** @type {string} */ (reader.readString()); - msg.setHtlcAddressP2wsh(value); - break; - case 13: - var value = /** @type {string} */ (reader.readString()); - msg.setHtlcAddressNp2wsh(value); - break; - case 8: - var value = /** @type {number} */ (reader.readInt64()); - msg.setCostServer(value); - break; - case 9: - var value = /** @type {number} */ (reader.readInt64()); - msg.setCostOnchain(value); - break; - case 10: - var value = /** @type {number} */ (reader.readInt64()); - msg.setCostOffchain(value); - break; - case 16: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setLastHop(value); - break; - case 17: - var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedUint64() : [reader.readUint64()]); - for (var i = 0; i < values.length; i++) { - msg.addOutgoingChanSet(values[i]); - } - break; - case 15: - var value = /** @type {string} */ (reader.readString()); - msg.setLabel(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.looprpc.SwapStatus.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.looprpc.SwapStatus.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.looprpc.SwapStatus} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.looprpc.SwapStatus.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getAmt(); - if (f !== 0) { - writer.writeInt64( - 1, - f - ); - } - f = message.getId(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getIdBytes_asU8(); - if (f.length > 0) { - writer.writeBytes( - 11, - f - ); - } - f = message.getType(); - if (f !== 0.0) { - writer.writeEnum( - 3, - f - ); - } - f = message.getState(); - if (f !== 0.0) { - writer.writeEnum( - 4, - f - ); - } - f = message.getFailureReason(); - if (f !== 0.0) { - writer.writeEnum( - 14, - f - ); - } - f = message.getInitiationTime(); - if (f !== 0) { - writer.writeInt64( - 5, - f - ); - } - f = message.getLastUpdateTime(); - if (f !== 0) { - writer.writeInt64( - 6, - f - ); - } - f = message.getHtlcAddress(); - if (f.length > 0) { - writer.writeString( - 7, - f - ); - } - f = message.getHtlcAddressP2wsh(); - if (f.length > 0) { - writer.writeString( - 12, - f - ); - } - f = message.getHtlcAddressNp2wsh(); - if (f.length > 0) { - writer.writeString( - 13, - f - ); - } - f = message.getCostServer(); - if (f !== 0) { - writer.writeInt64( - 8, - f - ); - } - f = message.getCostOnchain(); - if (f !== 0) { - writer.writeInt64( - 9, - f - ); - } - f = message.getCostOffchain(); - if (f !== 0) { - writer.writeInt64( - 10, - f - ); - } - f = message.getLastHop_asU8(); - if (f.length > 0) { - writer.writeBytes( - 16, - f - ); - } - f = message.getOutgoingChanSetList(); - if (f.length > 0) { - writer.writePackedUint64( - 17, - f - ); - } - f = message.getLabel(); - if (f.length > 0) { - writer.writeString( - 15, - f - ); - } -}; - - -/** - * optional int64 amt = 1; - * @return {number} - */ -proto.looprpc.SwapStatus.prototype.getAmt = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.looprpc.SwapStatus} returns this - */ -proto.looprpc.SwapStatus.prototype.setAmt = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); -}; - - -/** - * optional string id = 2; - * @return {string} - */ -proto.looprpc.SwapStatus.prototype.getId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.looprpc.SwapStatus} returns this - */ -proto.looprpc.SwapStatus.prototype.setId = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional bytes id_bytes = 11; - * @return {!(string|Uint8Array)} - */ -proto.looprpc.SwapStatus.prototype.getIdBytes = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 11, "")); -}; - - -/** - * optional bytes id_bytes = 11; - * This is a type-conversion wrapper around `getIdBytes()` - * @return {string} - */ -proto.looprpc.SwapStatus.prototype.getIdBytes_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getIdBytes())); -}; - - -/** - * optional bytes id_bytes = 11; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getIdBytes()` - * @return {!Uint8Array} - */ -proto.looprpc.SwapStatus.prototype.getIdBytes_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getIdBytes())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.looprpc.SwapStatus} returns this - */ -proto.looprpc.SwapStatus.prototype.setIdBytes = function(value) { - return jspb.Message.setProto3BytesField(this, 11, value); -}; - - -/** - * optional SwapType type = 3; - * @return {!proto.looprpc.SwapType} - */ -proto.looprpc.SwapStatus.prototype.getType = function() { - return /** @type {!proto.looprpc.SwapType} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {!proto.looprpc.SwapType} value - * @return {!proto.looprpc.SwapStatus} returns this - */ -proto.looprpc.SwapStatus.prototype.setType = function(value) { - return jspb.Message.setProto3EnumField(this, 3, value); -}; - - -/** - * optional SwapState state = 4; - * @return {!proto.looprpc.SwapState} - */ -proto.looprpc.SwapStatus.prototype.getState = function() { - return /** @type {!proto.looprpc.SwapState} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** - * @param {!proto.looprpc.SwapState} value - * @return {!proto.looprpc.SwapStatus} returns this - */ -proto.looprpc.SwapStatus.prototype.setState = function(value) { - return jspb.Message.setProto3EnumField(this, 4, value); -}; - - -/** - * optional FailureReason failure_reason = 14; - * @return {!proto.looprpc.FailureReason} - */ -proto.looprpc.SwapStatus.prototype.getFailureReason = function() { - return /** @type {!proto.looprpc.FailureReason} */ (jspb.Message.getFieldWithDefault(this, 14, 0)); -}; - - -/** - * @param {!proto.looprpc.FailureReason} value - * @return {!proto.looprpc.SwapStatus} returns this - */ -proto.looprpc.SwapStatus.prototype.setFailureReason = function(value) { - return jspb.Message.setProto3EnumField(this, 14, value); -}; - - -/** - * optional int64 initiation_time = 5; - * @return {number} - */ -proto.looprpc.SwapStatus.prototype.getInitiationTime = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.looprpc.SwapStatus} returns this - */ -proto.looprpc.SwapStatus.prototype.setInitiationTime = function(value) { - return jspb.Message.setProto3IntField(this, 5, value); -}; - - -/** - * optional int64 last_update_time = 6; - * @return {number} - */ -proto.looprpc.SwapStatus.prototype.getLastUpdateTime = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.looprpc.SwapStatus} returns this - */ -proto.looprpc.SwapStatus.prototype.setLastUpdateTime = function(value) { - return jspb.Message.setProto3IntField(this, 6, value); -}; - - -/** - * optional string htlc_address = 7; - * @return {string} - */ -proto.looprpc.SwapStatus.prototype.getHtlcAddress = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); -}; - - -/** - * @param {string} value - * @return {!proto.looprpc.SwapStatus} returns this - */ -proto.looprpc.SwapStatus.prototype.setHtlcAddress = function(value) { - return jspb.Message.setProto3StringField(this, 7, value); -}; - - -/** - * optional string htlc_address_p2wsh = 12; - * @return {string} - */ -proto.looprpc.SwapStatus.prototype.getHtlcAddressP2wsh = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 12, "")); -}; - - -/** - * @param {string} value - * @return {!proto.looprpc.SwapStatus} returns this - */ -proto.looprpc.SwapStatus.prototype.setHtlcAddressP2wsh = function(value) { - return jspb.Message.setProto3StringField(this, 12, value); -}; - - -/** - * optional string htlc_address_np2wsh = 13; - * @return {string} - */ -proto.looprpc.SwapStatus.prototype.getHtlcAddressNp2wsh = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 13, "")); -}; - - -/** - * @param {string} value - * @return {!proto.looprpc.SwapStatus} returns this - */ -proto.looprpc.SwapStatus.prototype.setHtlcAddressNp2wsh = function(value) { - return jspb.Message.setProto3StringField(this, 13, value); -}; - - -/** - * optional int64 cost_server = 8; - * @return {number} - */ -proto.looprpc.SwapStatus.prototype.getCostServer = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.looprpc.SwapStatus} returns this - */ -proto.looprpc.SwapStatus.prototype.setCostServer = function(value) { - return jspb.Message.setProto3IntField(this, 8, value); -}; - - -/** - * optional int64 cost_onchain = 9; - * @return {number} - */ -proto.looprpc.SwapStatus.prototype.getCostOnchain = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.looprpc.SwapStatus} returns this - */ -proto.looprpc.SwapStatus.prototype.setCostOnchain = function(value) { - return jspb.Message.setProto3IntField(this, 9, value); -}; - - -/** - * optional int64 cost_offchain = 10; - * @return {number} - */ -proto.looprpc.SwapStatus.prototype.getCostOffchain = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 10, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.looprpc.SwapStatus} returns this - */ -proto.looprpc.SwapStatus.prototype.setCostOffchain = function(value) { - return jspb.Message.setProto3IntField(this, 10, value); -}; - - -/** - * optional bytes last_hop = 16; - * @return {!(string|Uint8Array)} - */ -proto.looprpc.SwapStatus.prototype.getLastHop = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 16, "")); -}; - - -/** - * optional bytes last_hop = 16; - * This is a type-conversion wrapper around `getLastHop()` - * @return {string} - */ -proto.looprpc.SwapStatus.prototype.getLastHop_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getLastHop())); -}; - - -/** - * optional bytes last_hop = 16; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getLastHop()` - * @return {!Uint8Array} - */ -proto.looprpc.SwapStatus.prototype.getLastHop_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getLastHop())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.looprpc.SwapStatus} returns this - */ -proto.looprpc.SwapStatus.prototype.setLastHop = function(value) { - return jspb.Message.setProto3BytesField(this, 16, value); -}; - - -/** - * repeated uint64 outgoing_chan_set = 17; - * @return {!Array} - */ -proto.looprpc.SwapStatus.prototype.getOutgoingChanSetList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 17)); -}; - - -/** - * @param {!Array} value - * @return {!proto.looprpc.SwapStatus} returns this - */ -proto.looprpc.SwapStatus.prototype.setOutgoingChanSetList = function(value) { - return jspb.Message.setField(this, 17, value || []); -}; - - -/** - * @param {number} value - * @param {number=} opt_index - * @return {!proto.looprpc.SwapStatus} returns this - */ -proto.looprpc.SwapStatus.prototype.addOutgoingChanSet = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 17, value, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.looprpc.SwapStatus} returns this - */ -proto.looprpc.SwapStatus.prototype.clearOutgoingChanSetList = function() { - return this.setOutgoingChanSetList([]); -}; - - -/** - * optional string label = 15; - * @return {string} - */ -proto.looprpc.SwapStatus.prototype.getLabel = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 15, "")); -}; - - -/** - * @param {string} value - * @return {!proto.looprpc.SwapStatus} returns this - */ -proto.looprpc.SwapStatus.prototype.setLabel = function(value) { - return jspb.Message.setProto3StringField(this, 15, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.looprpc.ListSwapsRequest.prototype.toObject = function(opt_includeInstance) { - return proto.looprpc.ListSwapsRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.looprpc.ListSwapsRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.looprpc.ListSwapsRequest.toObject = function(includeInstance, msg) { - var f, obj = { - - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.looprpc.ListSwapsRequest} - */ -proto.looprpc.ListSwapsRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.looprpc.ListSwapsRequest; - return proto.looprpc.ListSwapsRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.looprpc.ListSwapsRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.looprpc.ListSwapsRequest} - */ -proto.looprpc.ListSwapsRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.looprpc.ListSwapsRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.looprpc.ListSwapsRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.looprpc.ListSwapsRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.looprpc.ListSwapsRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.looprpc.ListSwapsResponse.repeatedFields_ = [1]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.looprpc.ListSwapsResponse.prototype.toObject = function(opt_includeInstance) { - return proto.looprpc.ListSwapsResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.looprpc.ListSwapsResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.looprpc.ListSwapsResponse.toObject = function(includeInstance, msg) { - var f, obj = { - swapsList: jspb.Message.toObjectList(msg.getSwapsList(), - proto.looprpc.SwapStatus.toObject, includeInstance) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.looprpc.ListSwapsResponse} - */ -proto.looprpc.ListSwapsResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.looprpc.ListSwapsResponse; - return proto.looprpc.ListSwapsResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.looprpc.ListSwapsResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.looprpc.ListSwapsResponse} - */ -proto.looprpc.ListSwapsResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.looprpc.SwapStatus; - reader.readMessage(value,proto.looprpc.SwapStatus.deserializeBinaryFromReader); - msg.addSwaps(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.looprpc.ListSwapsResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.looprpc.ListSwapsResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.looprpc.ListSwapsResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.looprpc.ListSwapsResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getSwapsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 1, - f, - proto.looprpc.SwapStatus.serializeBinaryToWriter - ); - } -}; - - -/** - * repeated SwapStatus swaps = 1; - * @return {!Array} - */ -proto.looprpc.ListSwapsResponse.prototype.getSwapsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.looprpc.SwapStatus, 1)); -}; - - -/** - * @param {!Array} value - * @return {!proto.looprpc.ListSwapsResponse} returns this -*/ -proto.looprpc.ListSwapsResponse.prototype.setSwapsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); -}; - - -/** - * @param {!proto.looprpc.SwapStatus=} opt_value - * @param {number=} opt_index - * @return {!proto.looprpc.SwapStatus} - */ -proto.looprpc.ListSwapsResponse.prototype.addSwaps = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.looprpc.SwapStatus, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.looprpc.ListSwapsResponse} returns this - */ -proto.looprpc.ListSwapsResponse.prototype.clearSwapsList = function() { - return this.setSwapsList([]); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.looprpc.SwapInfoRequest.prototype.toObject = function(opt_includeInstance) { - return proto.looprpc.SwapInfoRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.looprpc.SwapInfoRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.looprpc.SwapInfoRequest.toObject = function(includeInstance, msg) { - var f, obj = { - id: msg.getId_asB64() - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.looprpc.SwapInfoRequest} - */ -proto.looprpc.SwapInfoRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.looprpc.SwapInfoRequest; - return proto.looprpc.SwapInfoRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.looprpc.SwapInfoRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.looprpc.SwapInfoRequest} - */ -proto.looprpc.SwapInfoRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setId(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.looprpc.SwapInfoRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.looprpc.SwapInfoRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.looprpc.SwapInfoRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.looprpc.SwapInfoRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getId_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } -}; - - -/** - * optional bytes id = 1; - * @return {!(string|Uint8Array)} - */ -proto.looprpc.SwapInfoRequest.prototype.getId = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes id = 1; - * This is a type-conversion wrapper around `getId()` - * @return {string} - */ -proto.looprpc.SwapInfoRequest.prototype.getId_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getId())); -}; - - -/** - * optional bytes id = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getId()` - * @return {!Uint8Array} - */ -proto.looprpc.SwapInfoRequest.prototype.getId_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getId())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.looprpc.SwapInfoRequest} returns this - */ -proto.looprpc.SwapInfoRequest.prototype.setId = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.looprpc.TermsRequest.prototype.toObject = function(opt_includeInstance) { - return proto.looprpc.TermsRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.looprpc.TermsRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.looprpc.TermsRequest.toObject = function(includeInstance, msg) { - var f, obj = { - - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.looprpc.TermsRequest} - */ -proto.looprpc.TermsRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.looprpc.TermsRequest; - return proto.looprpc.TermsRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.looprpc.TermsRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.looprpc.TermsRequest} - */ -proto.looprpc.TermsRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.looprpc.TermsRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.looprpc.TermsRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.looprpc.TermsRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.looprpc.TermsRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.looprpc.InTermsResponse.prototype.toObject = function(opt_includeInstance) { - return proto.looprpc.InTermsResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.looprpc.InTermsResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.looprpc.InTermsResponse.toObject = function(includeInstance, msg) { - var f, obj = { - minSwapAmount: jspb.Message.getFieldWithDefault(msg, 5, 0), - maxSwapAmount: jspb.Message.getFieldWithDefault(msg, 6, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.looprpc.InTermsResponse} - */ -proto.looprpc.InTermsResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.looprpc.InTermsResponse; - return proto.looprpc.InTermsResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.looprpc.InTermsResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.looprpc.InTermsResponse} - */ -proto.looprpc.InTermsResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 5: - var value = /** @type {number} */ (reader.readInt64()); - msg.setMinSwapAmount(value); - break; - case 6: - var value = /** @type {number} */ (reader.readInt64()); - msg.setMaxSwapAmount(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.looprpc.InTermsResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.looprpc.InTermsResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.looprpc.InTermsResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.looprpc.InTermsResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getMinSwapAmount(); - if (f !== 0) { - writer.writeInt64( - 5, - f - ); - } - f = message.getMaxSwapAmount(); - if (f !== 0) { - writer.writeInt64( - 6, - f - ); - } -}; - - -/** - * optional int64 min_swap_amount = 5; - * @return {number} - */ -proto.looprpc.InTermsResponse.prototype.getMinSwapAmount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.looprpc.InTermsResponse} returns this - */ -proto.looprpc.InTermsResponse.prototype.setMinSwapAmount = function(value) { - return jspb.Message.setProto3IntField(this, 5, value); -}; - - -/** - * optional int64 max_swap_amount = 6; - * @return {number} - */ -proto.looprpc.InTermsResponse.prototype.getMaxSwapAmount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.looprpc.InTermsResponse} returns this - */ -proto.looprpc.InTermsResponse.prototype.setMaxSwapAmount = function(value) { - return jspb.Message.setProto3IntField(this, 6, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.looprpc.OutTermsResponse.prototype.toObject = function(opt_includeInstance) { - return proto.looprpc.OutTermsResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.looprpc.OutTermsResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.looprpc.OutTermsResponse.toObject = function(includeInstance, msg) { - var f, obj = { - minSwapAmount: jspb.Message.getFieldWithDefault(msg, 5, 0), - maxSwapAmount: jspb.Message.getFieldWithDefault(msg, 6, 0), - minCltvDelta: jspb.Message.getFieldWithDefault(msg, 8, 0), - maxCltvDelta: jspb.Message.getFieldWithDefault(msg, 9, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.looprpc.OutTermsResponse} - */ -proto.looprpc.OutTermsResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.looprpc.OutTermsResponse; - return proto.looprpc.OutTermsResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.looprpc.OutTermsResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.looprpc.OutTermsResponse} - */ -proto.looprpc.OutTermsResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 5: - var value = /** @type {number} */ (reader.readInt64()); - msg.setMinSwapAmount(value); - break; - case 6: - var value = /** @type {number} */ (reader.readInt64()); - msg.setMaxSwapAmount(value); - break; - case 8: - var value = /** @type {number} */ (reader.readInt32()); - msg.setMinCltvDelta(value); - break; - case 9: - var value = /** @type {number} */ (reader.readInt32()); - msg.setMaxCltvDelta(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.looprpc.OutTermsResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.looprpc.OutTermsResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.looprpc.OutTermsResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.looprpc.OutTermsResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getMinSwapAmount(); - if (f !== 0) { - writer.writeInt64( - 5, - f - ); - } - f = message.getMaxSwapAmount(); - if (f !== 0) { - writer.writeInt64( - 6, - f - ); - } - f = message.getMinCltvDelta(); - if (f !== 0) { - writer.writeInt32( - 8, - f - ); - } - f = message.getMaxCltvDelta(); - if (f !== 0) { - writer.writeInt32( - 9, - f - ); - } -}; - - -/** - * optional int64 min_swap_amount = 5; - * @return {number} - */ -proto.looprpc.OutTermsResponse.prototype.getMinSwapAmount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.looprpc.OutTermsResponse} returns this - */ -proto.looprpc.OutTermsResponse.prototype.setMinSwapAmount = function(value) { - return jspb.Message.setProto3IntField(this, 5, value); -}; - - -/** - * optional int64 max_swap_amount = 6; - * @return {number} - */ -proto.looprpc.OutTermsResponse.prototype.getMaxSwapAmount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.looprpc.OutTermsResponse} returns this - */ -proto.looprpc.OutTermsResponse.prototype.setMaxSwapAmount = function(value) { - return jspb.Message.setProto3IntField(this, 6, value); -}; - - -/** - * optional int32 min_cltv_delta = 8; - * @return {number} - */ -proto.looprpc.OutTermsResponse.prototype.getMinCltvDelta = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.looprpc.OutTermsResponse} returns this - */ -proto.looprpc.OutTermsResponse.prototype.setMinCltvDelta = function(value) { - return jspb.Message.setProto3IntField(this, 8, value); -}; - - -/** - * optional int32 max_cltv_delta = 9; - * @return {number} - */ -proto.looprpc.OutTermsResponse.prototype.getMaxCltvDelta = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.looprpc.OutTermsResponse} returns this - */ -proto.looprpc.OutTermsResponse.prototype.setMaxCltvDelta = function(value) { - return jspb.Message.setProto3IntField(this, 9, value); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.looprpc.QuoteRequest.repeatedFields_ = [6]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.looprpc.QuoteRequest.prototype.toObject = function(opt_includeInstance) { - return proto.looprpc.QuoteRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.looprpc.QuoteRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.looprpc.QuoteRequest.toObject = function(includeInstance, msg) { - var f, obj = { - amt: jspb.Message.getFieldWithDefault(msg, 1, 0), - confTarget: jspb.Message.getFieldWithDefault(msg, 2, 0), - externalHtlc: jspb.Message.getBooleanFieldWithDefault(msg, 3, false), - swapPublicationDeadline: jspb.Message.getFieldWithDefault(msg, 4, 0), - loopInLastHop: msg.getLoopInLastHop_asB64(), - loopInRouteHintsList: jspb.Message.toObjectList(msg.getLoopInRouteHintsList(), - swapserverrpc_common_pb.RouteHint.toObject, includeInstance), - pb_private: jspb.Message.getBooleanFieldWithDefault(msg, 7, false) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.looprpc.QuoteRequest} - */ -proto.looprpc.QuoteRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.looprpc.QuoteRequest; - return proto.looprpc.QuoteRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.looprpc.QuoteRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.looprpc.QuoteRequest} - */ -proto.looprpc.QuoteRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readInt64()); - msg.setAmt(value); - break; - case 2: - var value = /** @type {number} */ (reader.readInt32()); - msg.setConfTarget(value); - break; - case 3: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setExternalHtlc(value); - break; - case 4: - var value = /** @type {number} */ (reader.readUint64()); - msg.setSwapPublicationDeadline(value); - break; - case 5: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setLoopInLastHop(value); - break; - case 6: - var value = new swapserverrpc_common_pb.RouteHint; - reader.readMessage(value,swapserverrpc_common_pb.RouteHint.deserializeBinaryFromReader); - msg.addLoopInRouteHints(value); - break; - case 7: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setPrivate(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.looprpc.QuoteRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.looprpc.QuoteRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.looprpc.QuoteRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.looprpc.QuoteRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getAmt(); - if (f !== 0) { - writer.writeInt64( - 1, - f - ); - } - f = message.getConfTarget(); - if (f !== 0) { - writer.writeInt32( - 2, - f - ); - } - f = message.getExternalHtlc(); - if (f) { - writer.writeBool( - 3, - f - ); - } - f = message.getSwapPublicationDeadline(); - if (f !== 0) { - writer.writeUint64( - 4, - f - ); - } - f = message.getLoopInLastHop_asU8(); - if (f.length > 0) { - writer.writeBytes( - 5, - f - ); - } - f = message.getLoopInRouteHintsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 6, - f, - swapserverrpc_common_pb.RouteHint.serializeBinaryToWriter - ); - } - f = message.getPrivate(); - if (f) { - writer.writeBool( - 7, - f - ); - } -}; - - -/** - * optional int64 amt = 1; - * @return {number} - */ -proto.looprpc.QuoteRequest.prototype.getAmt = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.looprpc.QuoteRequest} returns this - */ -proto.looprpc.QuoteRequest.prototype.setAmt = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); -}; - - -/** - * optional int32 conf_target = 2; - * @return {number} - */ -proto.looprpc.QuoteRequest.prototype.getConfTarget = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.looprpc.QuoteRequest} returns this - */ -proto.looprpc.QuoteRequest.prototype.setConfTarget = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * optional bool external_htlc = 3; - * @return {boolean} - */ -proto.looprpc.QuoteRequest.prototype.getExternalHtlc = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.looprpc.QuoteRequest} returns this - */ -proto.looprpc.QuoteRequest.prototype.setExternalHtlc = function(value) { - return jspb.Message.setProto3BooleanField(this, 3, value); -}; - - -/** - * optional uint64 swap_publication_deadline = 4; - * @return {number} - */ -proto.looprpc.QuoteRequest.prototype.getSwapPublicationDeadline = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.looprpc.QuoteRequest} returns this - */ -proto.looprpc.QuoteRequest.prototype.setSwapPublicationDeadline = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); -}; - - -/** - * optional bytes loop_in_last_hop = 5; - * @return {!(string|Uint8Array)} - */ -proto.looprpc.QuoteRequest.prototype.getLoopInLastHop = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 5, "")); -}; - - -/** - * optional bytes loop_in_last_hop = 5; - * This is a type-conversion wrapper around `getLoopInLastHop()` - * @return {string} - */ -proto.looprpc.QuoteRequest.prototype.getLoopInLastHop_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getLoopInLastHop())); -}; - - -/** - * optional bytes loop_in_last_hop = 5; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getLoopInLastHop()` - * @return {!Uint8Array} - */ -proto.looprpc.QuoteRequest.prototype.getLoopInLastHop_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getLoopInLastHop())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.looprpc.QuoteRequest} returns this - */ -proto.looprpc.QuoteRequest.prototype.setLoopInLastHop = function(value) { - return jspb.Message.setProto3BytesField(this, 5, value); -}; - - -/** - * repeated RouteHint loop_in_route_hints = 6; - * @return {!Array} - */ -proto.looprpc.QuoteRequest.prototype.getLoopInRouteHintsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, swapserverrpc_common_pb.RouteHint, 6)); -}; - - -/** - * @param {!Array} value - * @return {!proto.looprpc.QuoteRequest} returns this -*/ -proto.looprpc.QuoteRequest.prototype.setLoopInRouteHintsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 6, value); -}; - - -/** - * @param {!proto.looprpc.RouteHint=} opt_value - * @param {number=} opt_index - * @return {!proto.looprpc.RouteHint} - */ -proto.looprpc.QuoteRequest.prototype.addLoopInRouteHints = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 6, opt_value, proto.looprpc.RouteHint, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.looprpc.QuoteRequest} returns this - */ -proto.looprpc.QuoteRequest.prototype.clearLoopInRouteHintsList = function() { - return this.setLoopInRouteHintsList([]); -}; - - -/** - * optional bool private = 7; - * @return {boolean} - */ -proto.looprpc.QuoteRequest.prototype.getPrivate = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 7, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.looprpc.QuoteRequest} returns this - */ -proto.looprpc.QuoteRequest.prototype.setPrivate = function(value) { - return jspb.Message.setProto3BooleanField(this, 7, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.looprpc.InQuoteResponse.prototype.toObject = function(opt_includeInstance) { - return proto.looprpc.InQuoteResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.looprpc.InQuoteResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.looprpc.InQuoteResponse.toObject = function(includeInstance, msg) { - var f, obj = { - swapFeeSat: jspb.Message.getFieldWithDefault(msg, 1, 0), - htlcPublishFeeSat: jspb.Message.getFieldWithDefault(msg, 3, 0), - cltvDelta: jspb.Message.getFieldWithDefault(msg, 5, 0), - confTarget: jspb.Message.getFieldWithDefault(msg, 6, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.looprpc.InQuoteResponse} - */ -proto.looprpc.InQuoteResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.looprpc.InQuoteResponse; - return proto.looprpc.InQuoteResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.looprpc.InQuoteResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.looprpc.InQuoteResponse} - */ -proto.looprpc.InQuoteResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readInt64()); - msg.setSwapFeeSat(value); - break; - case 3: - var value = /** @type {number} */ (reader.readInt64()); - msg.setHtlcPublishFeeSat(value); - break; - case 5: - var value = /** @type {number} */ (reader.readInt32()); - msg.setCltvDelta(value); - break; - case 6: - var value = /** @type {number} */ (reader.readInt32()); - msg.setConfTarget(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.looprpc.InQuoteResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.looprpc.InQuoteResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.looprpc.InQuoteResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.looprpc.InQuoteResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getSwapFeeSat(); - if (f !== 0) { - writer.writeInt64( - 1, - f - ); - } - f = message.getHtlcPublishFeeSat(); - if (f !== 0) { - writer.writeInt64( - 3, - f - ); - } - f = message.getCltvDelta(); - if (f !== 0) { - writer.writeInt32( - 5, - f - ); - } - f = message.getConfTarget(); - if (f !== 0) { - writer.writeInt32( - 6, - f - ); - } -}; - - -/** - * optional int64 swap_fee_sat = 1; - * @return {number} - */ -proto.looprpc.InQuoteResponse.prototype.getSwapFeeSat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.looprpc.InQuoteResponse} returns this - */ -proto.looprpc.InQuoteResponse.prototype.setSwapFeeSat = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); -}; - - -/** - * optional int64 htlc_publish_fee_sat = 3; - * @return {number} - */ -proto.looprpc.InQuoteResponse.prototype.getHtlcPublishFeeSat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.looprpc.InQuoteResponse} returns this - */ -proto.looprpc.InQuoteResponse.prototype.setHtlcPublishFeeSat = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - -/** - * optional int32 cltv_delta = 5; - * @return {number} - */ -proto.looprpc.InQuoteResponse.prototype.getCltvDelta = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.looprpc.InQuoteResponse} returns this - */ -proto.looprpc.InQuoteResponse.prototype.setCltvDelta = function(value) { - return jspb.Message.setProto3IntField(this, 5, value); -}; - - -/** - * optional int32 conf_target = 6; - * @return {number} - */ -proto.looprpc.InQuoteResponse.prototype.getConfTarget = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.looprpc.InQuoteResponse} returns this - */ -proto.looprpc.InQuoteResponse.prototype.setConfTarget = function(value) { - return jspb.Message.setProto3IntField(this, 6, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.looprpc.OutQuoteResponse.prototype.toObject = function(opt_includeInstance) { - return proto.looprpc.OutQuoteResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.looprpc.OutQuoteResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.looprpc.OutQuoteResponse.toObject = function(includeInstance, msg) { - var f, obj = { - swapFeeSat: jspb.Message.getFieldWithDefault(msg, 1, 0), - prepayAmtSat: jspb.Message.getFieldWithDefault(msg, 2, 0), - htlcSweepFeeSat: jspb.Message.getFieldWithDefault(msg, 3, 0), - swapPaymentDest: msg.getSwapPaymentDest_asB64(), - cltvDelta: jspb.Message.getFieldWithDefault(msg, 5, 0), - confTarget: jspb.Message.getFieldWithDefault(msg, 6, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.looprpc.OutQuoteResponse} - */ -proto.looprpc.OutQuoteResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.looprpc.OutQuoteResponse; - return proto.looprpc.OutQuoteResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.looprpc.OutQuoteResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.looprpc.OutQuoteResponse} - */ -proto.looprpc.OutQuoteResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readInt64()); - msg.setSwapFeeSat(value); - break; - case 2: - var value = /** @type {number} */ (reader.readInt64()); - msg.setPrepayAmtSat(value); - break; - case 3: - var value = /** @type {number} */ (reader.readInt64()); - msg.setHtlcSweepFeeSat(value); - break; - case 4: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setSwapPaymentDest(value); - break; - case 5: - var value = /** @type {number} */ (reader.readInt32()); - msg.setCltvDelta(value); - break; - case 6: - var value = /** @type {number} */ (reader.readInt32()); - msg.setConfTarget(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.looprpc.OutQuoteResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.looprpc.OutQuoteResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.looprpc.OutQuoteResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.looprpc.OutQuoteResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getSwapFeeSat(); - if (f !== 0) { - writer.writeInt64( - 1, - f - ); - } - f = message.getPrepayAmtSat(); - if (f !== 0) { - writer.writeInt64( - 2, - f - ); - } - f = message.getHtlcSweepFeeSat(); - if (f !== 0) { - writer.writeInt64( - 3, - f - ); - } - f = message.getSwapPaymentDest_asU8(); - if (f.length > 0) { - writer.writeBytes( - 4, - f - ); - } - f = message.getCltvDelta(); - if (f !== 0) { - writer.writeInt32( - 5, - f - ); - } - f = message.getConfTarget(); - if (f !== 0) { - writer.writeInt32( - 6, - f - ); - } -}; - - -/** - * optional int64 swap_fee_sat = 1; - * @return {number} - */ -proto.looprpc.OutQuoteResponse.prototype.getSwapFeeSat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.looprpc.OutQuoteResponse} returns this - */ -proto.looprpc.OutQuoteResponse.prototype.setSwapFeeSat = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); -}; - - -/** - * optional int64 prepay_amt_sat = 2; - * @return {number} - */ -proto.looprpc.OutQuoteResponse.prototype.getPrepayAmtSat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.looprpc.OutQuoteResponse} returns this - */ -proto.looprpc.OutQuoteResponse.prototype.setPrepayAmtSat = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * optional int64 htlc_sweep_fee_sat = 3; - * @return {number} - */ -proto.looprpc.OutQuoteResponse.prototype.getHtlcSweepFeeSat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.looprpc.OutQuoteResponse} returns this - */ -proto.looprpc.OutQuoteResponse.prototype.setHtlcSweepFeeSat = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - -/** - * optional bytes swap_payment_dest = 4; - * @return {!(string|Uint8Array)} - */ -proto.looprpc.OutQuoteResponse.prototype.getSwapPaymentDest = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 4, "")); -}; - - -/** - * optional bytes swap_payment_dest = 4; - * This is a type-conversion wrapper around `getSwapPaymentDest()` - * @return {string} - */ -proto.looprpc.OutQuoteResponse.prototype.getSwapPaymentDest_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getSwapPaymentDest())); -}; - - -/** - * optional bytes swap_payment_dest = 4; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getSwapPaymentDest()` - * @return {!Uint8Array} - */ -proto.looprpc.OutQuoteResponse.prototype.getSwapPaymentDest_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getSwapPaymentDest())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.looprpc.OutQuoteResponse} returns this - */ -proto.looprpc.OutQuoteResponse.prototype.setSwapPaymentDest = function(value) { - return jspb.Message.setProto3BytesField(this, 4, value); -}; - - -/** - * optional int32 cltv_delta = 5; - * @return {number} - */ -proto.looprpc.OutQuoteResponse.prototype.getCltvDelta = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.looprpc.OutQuoteResponse} returns this - */ -proto.looprpc.OutQuoteResponse.prototype.setCltvDelta = function(value) { - return jspb.Message.setProto3IntField(this, 5, value); -}; - - -/** - * optional int32 conf_target = 6; - * @return {number} - */ -proto.looprpc.OutQuoteResponse.prototype.getConfTarget = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.looprpc.OutQuoteResponse} returns this - */ -proto.looprpc.OutQuoteResponse.prototype.setConfTarget = function(value) { - return jspb.Message.setProto3IntField(this, 6, value); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.looprpc.ProbeRequest.repeatedFields_ = [3]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.looprpc.ProbeRequest.prototype.toObject = function(opt_includeInstance) { - return proto.looprpc.ProbeRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.looprpc.ProbeRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.looprpc.ProbeRequest.toObject = function(includeInstance, msg) { - var f, obj = { - amt: jspb.Message.getFieldWithDefault(msg, 1, 0), - lastHop: msg.getLastHop_asB64(), - routeHintsList: jspb.Message.toObjectList(msg.getRouteHintsList(), - swapserverrpc_common_pb.RouteHint.toObject, includeInstance) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.looprpc.ProbeRequest} - */ -proto.looprpc.ProbeRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.looprpc.ProbeRequest; - return proto.looprpc.ProbeRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.looprpc.ProbeRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.looprpc.ProbeRequest} - */ -proto.looprpc.ProbeRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readInt64()); - msg.setAmt(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setLastHop(value); - break; - case 3: - var value = new swapserverrpc_common_pb.RouteHint; - reader.readMessage(value,swapserverrpc_common_pb.RouteHint.deserializeBinaryFromReader); - msg.addRouteHints(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.looprpc.ProbeRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.looprpc.ProbeRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.looprpc.ProbeRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.looprpc.ProbeRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getAmt(); - if (f !== 0) { - writer.writeInt64( - 1, - f - ); - } - f = message.getLastHop_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } - f = message.getRouteHintsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 3, - f, - swapserverrpc_common_pb.RouteHint.serializeBinaryToWriter - ); - } -}; - - -/** - * optional int64 amt = 1; - * @return {number} - */ -proto.looprpc.ProbeRequest.prototype.getAmt = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.looprpc.ProbeRequest} returns this - */ -proto.looprpc.ProbeRequest.prototype.setAmt = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); -}; - - -/** - * optional bytes last_hop = 2; - * @return {!(string|Uint8Array)} - */ -proto.looprpc.ProbeRequest.prototype.getLastHop = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes last_hop = 2; - * This is a type-conversion wrapper around `getLastHop()` - * @return {string} - */ -proto.looprpc.ProbeRequest.prototype.getLastHop_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getLastHop())); -}; - - -/** - * optional bytes last_hop = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getLastHop()` - * @return {!Uint8Array} - */ -proto.looprpc.ProbeRequest.prototype.getLastHop_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getLastHop())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.looprpc.ProbeRequest} returns this - */ -proto.looprpc.ProbeRequest.prototype.setLastHop = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); -}; - - -/** - * repeated RouteHint route_hints = 3; - * @return {!Array} - */ -proto.looprpc.ProbeRequest.prototype.getRouteHintsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, swapserverrpc_common_pb.RouteHint, 3)); -}; - - -/** - * @param {!Array} value - * @return {!proto.looprpc.ProbeRequest} returns this -*/ -proto.looprpc.ProbeRequest.prototype.setRouteHintsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 3, value); -}; - - -/** - * @param {!proto.looprpc.RouteHint=} opt_value - * @param {number=} opt_index - * @return {!proto.looprpc.RouteHint} - */ -proto.looprpc.ProbeRequest.prototype.addRouteHints = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.looprpc.RouteHint, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.looprpc.ProbeRequest} returns this - */ -proto.looprpc.ProbeRequest.prototype.clearRouteHintsList = function() { - return this.setRouteHintsList([]); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.looprpc.ProbeResponse.prototype.toObject = function(opt_includeInstance) { - return proto.looprpc.ProbeResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.looprpc.ProbeResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.looprpc.ProbeResponse.toObject = function(includeInstance, msg) { - var f, obj = { - - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.looprpc.ProbeResponse} - */ -proto.looprpc.ProbeResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.looprpc.ProbeResponse; - return proto.looprpc.ProbeResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.looprpc.ProbeResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.looprpc.ProbeResponse} - */ -proto.looprpc.ProbeResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.looprpc.ProbeResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.looprpc.ProbeResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.looprpc.ProbeResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.looprpc.ProbeResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.looprpc.TokensRequest.prototype.toObject = function(opt_includeInstance) { - return proto.looprpc.TokensRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.looprpc.TokensRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.looprpc.TokensRequest.toObject = function(includeInstance, msg) { - var f, obj = { - - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.looprpc.TokensRequest} - */ -proto.looprpc.TokensRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.looprpc.TokensRequest; - return proto.looprpc.TokensRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.looprpc.TokensRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.looprpc.TokensRequest} - */ -proto.looprpc.TokensRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.looprpc.TokensRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.looprpc.TokensRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.looprpc.TokensRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.looprpc.TokensRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.looprpc.TokensResponse.repeatedFields_ = [1]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.looprpc.TokensResponse.prototype.toObject = function(opt_includeInstance) { - return proto.looprpc.TokensResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.looprpc.TokensResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.looprpc.TokensResponse.toObject = function(includeInstance, msg) { - var f, obj = { - tokensList: jspb.Message.toObjectList(msg.getTokensList(), - proto.looprpc.LsatToken.toObject, includeInstance) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.looprpc.TokensResponse} - */ -proto.looprpc.TokensResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.looprpc.TokensResponse; - return proto.looprpc.TokensResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.looprpc.TokensResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.looprpc.TokensResponse} - */ -proto.looprpc.TokensResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.looprpc.LsatToken; - reader.readMessage(value,proto.looprpc.LsatToken.deserializeBinaryFromReader); - msg.addTokens(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.looprpc.TokensResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.looprpc.TokensResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.looprpc.TokensResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.looprpc.TokensResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getTokensList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 1, - f, - proto.looprpc.LsatToken.serializeBinaryToWriter - ); - } -}; - - -/** - * repeated LsatToken tokens = 1; - * @return {!Array} - */ -proto.looprpc.TokensResponse.prototype.getTokensList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.looprpc.LsatToken, 1)); -}; - - -/** - * @param {!Array} value - * @return {!proto.looprpc.TokensResponse} returns this -*/ -proto.looprpc.TokensResponse.prototype.setTokensList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); -}; - - -/** - * @param {!proto.looprpc.LsatToken=} opt_value - * @param {number=} opt_index - * @return {!proto.looprpc.LsatToken} - */ -proto.looprpc.TokensResponse.prototype.addTokens = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.looprpc.LsatToken, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.looprpc.TokensResponse} returns this - */ -proto.looprpc.TokensResponse.prototype.clearTokensList = function() { - return this.setTokensList([]); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.looprpc.LsatToken.prototype.toObject = function(opt_includeInstance) { - return proto.looprpc.LsatToken.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.looprpc.LsatToken} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.looprpc.LsatToken.toObject = function(includeInstance, msg) { - var f, obj = { - baseMacaroon: msg.getBaseMacaroon_asB64(), - paymentHash: msg.getPaymentHash_asB64(), - paymentPreimage: msg.getPaymentPreimage_asB64(), - amountPaidMsat: jspb.Message.getFieldWithDefault(msg, 4, 0), - routingFeePaidMsat: jspb.Message.getFieldWithDefault(msg, 5, 0), - timeCreated: jspb.Message.getFieldWithDefault(msg, 6, 0), - expired: jspb.Message.getBooleanFieldWithDefault(msg, 7, false), - storageName: jspb.Message.getFieldWithDefault(msg, 8, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.looprpc.LsatToken} - */ -proto.looprpc.LsatToken.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.looprpc.LsatToken; - return proto.looprpc.LsatToken.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.looprpc.LsatToken} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.looprpc.LsatToken} - */ -proto.looprpc.LsatToken.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setBaseMacaroon(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setPaymentHash(value); - break; - case 3: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setPaymentPreimage(value); - break; - case 4: - var value = /** @type {number} */ (reader.readInt64()); - msg.setAmountPaidMsat(value); - break; - case 5: - var value = /** @type {number} */ (reader.readInt64()); - msg.setRoutingFeePaidMsat(value); - break; - case 6: - var value = /** @type {number} */ (reader.readInt64()); - msg.setTimeCreated(value); - break; - case 7: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setExpired(value); - break; - case 8: - var value = /** @type {string} */ (reader.readString()); - msg.setStorageName(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.looprpc.LsatToken.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.looprpc.LsatToken.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.looprpc.LsatToken} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.looprpc.LsatToken.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getBaseMacaroon_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getPaymentHash_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } - f = message.getPaymentPreimage_asU8(); - if (f.length > 0) { - writer.writeBytes( - 3, - f - ); - } - f = message.getAmountPaidMsat(); - if (f !== 0) { - writer.writeInt64( - 4, - f - ); - } - f = message.getRoutingFeePaidMsat(); - if (f !== 0) { - writer.writeInt64( - 5, - f - ); - } - f = message.getTimeCreated(); - if (f !== 0) { - writer.writeInt64( - 6, - f - ); - } - f = message.getExpired(); - if (f) { - writer.writeBool( - 7, - f - ); - } - f = message.getStorageName(); - if (f.length > 0) { - writer.writeString( - 8, - f - ); - } -}; - - -/** - * optional bytes base_macaroon = 1; - * @return {!(string|Uint8Array)} - */ -proto.looprpc.LsatToken.prototype.getBaseMacaroon = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes base_macaroon = 1; - * This is a type-conversion wrapper around `getBaseMacaroon()` - * @return {string} - */ -proto.looprpc.LsatToken.prototype.getBaseMacaroon_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getBaseMacaroon())); -}; - - -/** - * optional bytes base_macaroon = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getBaseMacaroon()` - * @return {!Uint8Array} - */ -proto.looprpc.LsatToken.prototype.getBaseMacaroon_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getBaseMacaroon())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.looprpc.LsatToken} returns this - */ -proto.looprpc.LsatToken.prototype.setBaseMacaroon = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional bytes payment_hash = 2; - * @return {!(string|Uint8Array)} - */ -proto.looprpc.LsatToken.prototype.getPaymentHash = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes payment_hash = 2; - * This is a type-conversion wrapper around `getPaymentHash()` - * @return {string} - */ -proto.looprpc.LsatToken.prototype.getPaymentHash_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getPaymentHash())); -}; - - -/** - * optional bytes payment_hash = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getPaymentHash()` - * @return {!Uint8Array} - */ -proto.looprpc.LsatToken.prototype.getPaymentHash_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getPaymentHash())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.looprpc.LsatToken} returns this - */ -proto.looprpc.LsatToken.prototype.setPaymentHash = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); -}; - - -/** - * optional bytes payment_preimage = 3; - * @return {!(string|Uint8Array)} - */ -proto.looprpc.LsatToken.prototype.getPaymentPreimage = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * optional bytes payment_preimage = 3; - * This is a type-conversion wrapper around `getPaymentPreimage()` - * @return {string} - */ -proto.looprpc.LsatToken.prototype.getPaymentPreimage_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getPaymentPreimage())); -}; - - -/** - * optional bytes payment_preimage = 3; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getPaymentPreimage()` - * @return {!Uint8Array} - */ -proto.looprpc.LsatToken.prototype.getPaymentPreimage_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getPaymentPreimage())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.looprpc.LsatToken} returns this - */ -proto.looprpc.LsatToken.prototype.setPaymentPreimage = function(value) { - return jspb.Message.setProto3BytesField(this, 3, value); -}; - - -/** - * optional int64 amount_paid_msat = 4; - * @return {number} - */ -proto.looprpc.LsatToken.prototype.getAmountPaidMsat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.looprpc.LsatToken} returns this - */ -proto.looprpc.LsatToken.prototype.setAmountPaidMsat = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); -}; - - -/** - * optional int64 routing_fee_paid_msat = 5; - * @return {number} - */ -proto.looprpc.LsatToken.prototype.getRoutingFeePaidMsat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.looprpc.LsatToken} returns this - */ -proto.looprpc.LsatToken.prototype.setRoutingFeePaidMsat = function(value) { - return jspb.Message.setProto3IntField(this, 5, value); -}; - - -/** - * optional int64 time_created = 6; - * @return {number} - */ -proto.looprpc.LsatToken.prototype.getTimeCreated = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.looprpc.LsatToken} returns this - */ -proto.looprpc.LsatToken.prototype.setTimeCreated = function(value) { - return jspb.Message.setProto3IntField(this, 6, value); -}; - - -/** - * optional bool expired = 7; - * @return {boolean} - */ -proto.looprpc.LsatToken.prototype.getExpired = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 7, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.looprpc.LsatToken} returns this - */ -proto.looprpc.LsatToken.prototype.setExpired = function(value) { - return jspb.Message.setProto3BooleanField(this, 7, value); -}; - - -/** - * optional string storage_name = 8; - * @return {string} - */ -proto.looprpc.LsatToken.prototype.getStorageName = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, "")); -}; - - -/** - * @param {string} value - * @return {!proto.looprpc.LsatToken} returns this - */ -proto.looprpc.LsatToken.prototype.setStorageName = function(value) { - return jspb.Message.setProto3StringField(this, 8, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.looprpc.GetLiquidityParamsRequest.prototype.toObject = function(opt_includeInstance) { - return proto.looprpc.GetLiquidityParamsRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.looprpc.GetLiquidityParamsRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.looprpc.GetLiquidityParamsRequest.toObject = function(includeInstance, msg) { - var f, obj = { - - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.looprpc.GetLiquidityParamsRequest} - */ -proto.looprpc.GetLiquidityParamsRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.looprpc.GetLiquidityParamsRequest; - return proto.looprpc.GetLiquidityParamsRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.looprpc.GetLiquidityParamsRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.looprpc.GetLiquidityParamsRequest} - */ -proto.looprpc.GetLiquidityParamsRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.looprpc.GetLiquidityParamsRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.looprpc.GetLiquidityParamsRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.looprpc.GetLiquidityParamsRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.looprpc.GetLiquidityParamsRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.looprpc.LiquidityParameters.repeatedFields_ = [1]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.looprpc.LiquidityParameters.prototype.toObject = function(opt_includeInstance) { - return proto.looprpc.LiquidityParameters.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.looprpc.LiquidityParameters} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.looprpc.LiquidityParameters.toObject = function(includeInstance, msg) { - var f, obj = { - rulesList: jspb.Message.toObjectList(msg.getRulesList(), - proto.looprpc.LiquidityRule.toObject, includeInstance), - feePpm: jspb.Message.getFieldWithDefault(msg, 16, 0), - sweepFeeRateSatPerVbyte: jspb.Message.getFieldWithDefault(msg, 2, 0), - maxSwapFeePpm: jspb.Message.getFieldWithDefault(msg, 3, 0), - maxRoutingFeePpm: jspb.Message.getFieldWithDefault(msg, 4, 0), - maxPrepayRoutingFeePpm: jspb.Message.getFieldWithDefault(msg, 5, 0), - maxPrepaySat: jspb.Message.getFieldWithDefault(msg, 6, 0), - maxMinerFeeSat: jspb.Message.getFieldWithDefault(msg, 7, 0), - sweepConfTarget: jspb.Message.getFieldWithDefault(msg, 8, 0), - failureBackoffSec: jspb.Message.getFieldWithDefault(msg, 9, 0), - autoloop: jspb.Message.getBooleanFieldWithDefault(msg, 10, false), - autoloopBudgetSat: jspb.Message.getFieldWithDefault(msg, 11, 0), - autoloopBudgetStartSec: jspb.Message.getFieldWithDefault(msg, 12, 0), - autoMaxInFlight: jspb.Message.getFieldWithDefault(msg, 13, 0), - minSwapAmount: jspb.Message.getFieldWithDefault(msg, 14, 0), - maxSwapAmount: jspb.Message.getFieldWithDefault(msg, 15, 0), - htlcConfTarget: jspb.Message.getFieldWithDefault(msg, 17, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.looprpc.LiquidityParameters} - */ -proto.looprpc.LiquidityParameters.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.looprpc.LiquidityParameters; - return proto.looprpc.LiquidityParameters.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.looprpc.LiquidityParameters} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.looprpc.LiquidityParameters} - */ -proto.looprpc.LiquidityParameters.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.looprpc.LiquidityRule; - reader.readMessage(value,proto.looprpc.LiquidityRule.deserializeBinaryFromReader); - msg.addRules(value); - break; - case 16: - var value = /** @type {number} */ (reader.readUint64()); - msg.setFeePpm(value); - break; - case 2: - var value = /** @type {number} */ (reader.readUint64()); - msg.setSweepFeeRateSatPerVbyte(value); - break; - case 3: - var value = /** @type {number} */ (reader.readUint64()); - msg.setMaxSwapFeePpm(value); - break; - case 4: - var value = /** @type {number} */ (reader.readUint64()); - msg.setMaxRoutingFeePpm(value); - break; - case 5: - var value = /** @type {number} */ (reader.readUint64()); - msg.setMaxPrepayRoutingFeePpm(value); - break; - case 6: - var value = /** @type {number} */ (reader.readUint64()); - msg.setMaxPrepaySat(value); - break; - case 7: - var value = /** @type {number} */ (reader.readUint64()); - msg.setMaxMinerFeeSat(value); - break; - case 8: - var value = /** @type {number} */ (reader.readInt32()); - msg.setSweepConfTarget(value); - break; - case 9: - var value = /** @type {number} */ (reader.readUint64()); - msg.setFailureBackoffSec(value); - break; - case 10: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setAutoloop(value); - break; - case 11: - var value = /** @type {number} */ (reader.readUint64()); - msg.setAutoloopBudgetSat(value); - break; - case 12: - var value = /** @type {number} */ (reader.readUint64()); - msg.setAutoloopBudgetStartSec(value); - break; - case 13: - var value = /** @type {number} */ (reader.readUint64()); - msg.setAutoMaxInFlight(value); - break; - case 14: - var value = /** @type {number} */ (reader.readUint64()); - msg.setMinSwapAmount(value); - break; - case 15: - var value = /** @type {number} */ (reader.readUint64()); - msg.setMaxSwapAmount(value); - break; - case 17: - var value = /** @type {number} */ (reader.readInt32()); - msg.setHtlcConfTarget(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.looprpc.LiquidityParameters.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.looprpc.LiquidityParameters.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.looprpc.LiquidityParameters} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.looprpc.LiquidityParameters.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getRulesList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 1, - f, - proto.looprpc.LiquidityRule.serializeBinaryToWriter - ); - } - f = message.getFeePpm(); - if (f !== 0) { - writer.writeUint64( - 16, - f - ); - } - f = message.getSweepFeeRateSatPerVbyte(); - if (f !== 0) { - writer.writeUint64( - 2, - f - ); - } - f = message.getMaxSwapFeePpm(); - if (f !== 0) { - writer.writeUint64( - 3, - f - ); - } - f = message.getMaxRoutingFeePpm(); - if (f !== 0) { - writer.writeUint64( - 4, - f - ); - } - f = message.getMaxPrepayRoutingFeePpm(); - if (f !== 0) { - writer.writeUint64( - 5, - f - ); - } - f = message.getMaxPrepaySat(); - if (f !== 0) { - writer.writeUint64( - 6, - f - ); - } - f = message.getMaxMinerFeeSat(); - if (f !== 0) { - writer.writeUint64( - 7, - f - ); - } - f = message.getSweepConfTarget(); - if (f !== 0) { - writer.writeInt32( - 8, - f - ); - } - f = message.getFailureBackoffSec(); - if (f !== 0) { - writer.writeUint64( - 9, - f - ); - } - f = message.getAutoloop(); - if (f) { - writer.writeBool( - 10, - f - ); - } - f = message.getAutoloopBudgetSat(); - if (f !== 0) { - writer.writeUint64( - 11, - f - ); - } - f = message.getAutoloopBudgetStartSec(); - if (f !== 0) { - writer.writeUint64( - 12, - f - ); - } - f = message.getAutoMaxInFlight(); - if (f !== 0) { - writer.writeUint64( - 13, - f - ); - } - f = message.getMinSwapAmount(); - if (f !== 0) { - writer.writeUint64( - 14, - f - ); - } - f = message.getMaxSwapAmount(); - if (f !== 0) { - writer.writeUint64( - 15, - f - ); - } - f = message.getHtlcConfTarget(); - if (f !== 0) { - writer.writeInt32( - 17, - f - ); - } -}; - - -/** - * repeated LiquidityRule rules = 1; - * @return {!Array} - */ -proto.looprpc.LiquidityParameters.prototype.getRulesList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.looprpc.LiquidityRule, 1)); -}; - - -/** - * @param {!Array} value - * @return {!proto.looprpc.LiquidityParameters} returns this -*/ -proto.looprpc.LiquidityParameters.prototype.setRulesList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); -}; - - -/** - * @param {!proto.looprpc.LiquidityRule=} opt_value - * @param {number=} opt_index - * @return {!proto.looprpc.LiquidityRule} - */ -proto.looprpc.LiquidityParameters.prototype.addRules = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.looprpc.LiquidityRule, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.looprpc.LiquidityParameters} returns this - */ -proto.looprpc.LiquidityParameters.prototype.clearRulesList = function() { - return this.setRulesList([]); -}; - - -/** - * optional uint64 fee_ppm = 16; - * @return {number} - */ -proto.looprpc.LiquidityParameters.prototype.getFeePpm = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 16, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.looprpc.LiquidityParameters} returns this - */ -proto.looprpc.LiquidityParameters.prototype.setFeePpm = function(value) { - return jspb.Message.setProto3IntField(this, 16, value); -}; - - -/** - * optional uint64 sweep_fee_rate_sat_per_vbyte = 2; - * @return {number} - */ -proto.looprpc.LiquidityParameters.prototype.getSweepFeeRateSatPerVbyte = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.looprpc.LiquidityParameters} returns this - */ -proto.looprpc.LiquidityParameters.prototype.setSweepFeeRateSatPerVbyte = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * optional uint64 max_swap_fee_ppm = 3; - * @return {number} - */ -proto.looprpc.LiquidityParameters.prototype.getMaxSwapFeePpm = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.looprpc.LiquidityParameters} returns this - */ -proto.looprpc.LiquidityParameters.prototype.setMaxSwapFeePpm = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - -/** - * optional uint64 max_routing_fee_ppm = 4; - * @return {number} - */ -proto.looprpc.LiquidityParameters.prototype.getMaxRoutingFeePpm = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.looprpc.LiquidityParameters} returns this - */ -proto.looprpc.LiquidityParameters.prototype.setMaxRoutingFeePpm = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); -}; - - -/** - * optional uint64 max_prepay_routing_fee_ppm = 5; - * @return {number} - */ -proto.looprpc.LiquidityParameters.prototype.getMaxPrepayRoutingFeePpm = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.looprpc.LiquidityParameters} returns this - */ -proto.looprpc.LiquidityParameters.prototype.setMaxPrepayRoutingFeePpm = function(value) { - return jspb.Message.setProto3IntField(this, 5, value); -}; - - -/** - * optional uint64 max_prepay_sat = 6; - * @return {number} - */ -proto.looprpc.LiquidityParameters.prototype.getMaxPrepaySat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.looprpc.LiquidityParameters} returns this - */ -proto.looprpc.LiquidityParameters.prototype.setMaxPrepaySat = function(value) { - return jspb.Message.setProto3IntField(this, 6, value); -}; - - -/** - * optional uint64 max_miner_fee_sat = 7; - * @return {number} - */ -proto.looprpc.LiquidityParameters.prototype.getMaxMinerFeeSat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.looprpc.LiquidityParameters} returns this - */ -proto.looprpc.LiquidityParameters.prototype.setMaxMinerFeeSat = function(value) { - return jspb.Message.setProto3IntField(this, 7, value); -}; - - -/** - * optional int32 sweep_conf_target = 8; - * @return {number} - */ -proto.looprpc.LiquidityParameters.prototype.getSweepConfTarget = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.looprpc.LiquidityParameters} returns this - */ -proto.looprpc.LiquidityParameters.prototype.setSweepConfTarget = function(value) { - return jspb.Message.setProto3IntField(this, 8, value); -}; - - -/** - * optional uint64 failure_backoff_sec = 9; - * @return {number} - */ -proto.looprpc.LiquidityParameters.prototype.getFailureBackoffSec = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.looprpc.LiquidityParameters} returns this - */ -proto.looprpc.LiquidityParameters.prototype.setFailureBackoffSec = function(value) { - return jspb.Message.setProto3IntField(this, 9, value); -}; - - -/** - * optional bool autoloop = 10; - * @return {boolean} - */ -proto.looprpc.LiquidityParameters.prototype.getAutoloop = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 10, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.looprpc.LiquidityParameters} returns this - */ -proto.looprpc.LiquidityParameters.prototype.setAutoloop = function(value) { - return jspb.Message.setProto3BooleanField(this, 10, value); -}; - - -/** - * optional uint64 autoloop_budget_sat = 11; - * @return {number} - */ -proto.looprpc.LiquidityParameters.prototype.getAutoloopBudgetSat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 11, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.looprpc.LiquidityParameters} returns this - */ -proto.looprpc.LiquidityParameters.prototype.setAutoloopBudgetSat = function(value) { - return jspb.Message.setProto3IntField(this, 11, value); -}; - - -/** - * optional uint64 autoloop_budget_start_sec = 12; - * @return {number} - */ -proto.looprpc.LiquidityParameters.prototype.getAutoloopBudgetStartSec = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 12, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.looprpc.LiquidityParameters} returns this - */ -proto.looprpc.LiquidityParameters.prototype.setAutoloopBudgetStartSec = function(value) { - return jspb.Message.setProto3IntField(this, 12, value); -}; - - -/** - * optional uint64 auto_max_in_flight = 13; - * @return {number} - */ -proto.looprpc.LiquidityParameters.prototype.getAutoMaxInFlight = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 13, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.looprpc.LiquidityParameters} returns this - */ -proto.looprpc.LiquidityParameters.prototype.setAutoMaxInFlight = function(value) { - return jspb.Message.setProto3IntField(this, 13, value); -}; - - -/** - * optional uint64 min_swap_amount = 14; - * @return {number} - */ -proto.looprpc.LiquidityParameters.prototype.getMinSwapAmount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 14, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.looprpc.LiquidityParameters} returns this - */ -proto.looprpc.LiquidityParameters.prototype.setMinSwapAmount = function(value) { - return jspb.Message.setProto3IntField(this, 14, value); -}; - - -/** - * optional uint64 max_swap_amount = 15; - * @return {number} - */ -proto.looprpc.LiquidityParameters.prototype.getMaxSwapAmount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 15, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.looprpc.LiquidityParameters} returns this - */ -proto.looprpc.LiquidityParameters.prototype.setMaxSwapAmount = function(value) { - return jspb.Message.setProto3IntField(this, 15, value); -}; - - -/** - * optional int32 htlc_conf_target = 17; - * @return {number} - */ -proto.looprpc.LiquidityParameters.prototype.getHtlcConfTarget = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 17, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.looprpc.LiquidityParameters} returns this - */ -proto.looprpc.LiquidityParameters.prototype.setHtlcConfTarget = function(value) { - return jspb.Message.setProto3IntField(this, 17, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.looprpc.LiquidityRule.prototype.toObject = function(opt_includeInstance) { - return proto.looprpc.LiquidityRule.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.looprpc.LiquidityRule} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.looprpc.LiquidityRule.toObject = function(includeInstance, msg) { - var f, obj = { - channelId: jspb.Message.getFieldWithDefault(msg, 1, 0), - swapType: jspb.Message.getFieldWithDefault(msg, 6, 0), - pubkey: msg.getPubkey_asB64(), - type: jspb.Message.getFieldWithDefault(msg, 2, 0), - incomingThreshold: jspb.Message.getFieldWithDefault(msg, 3, 0), - outgoingThreshold: jspb.Message.getFieldWithDefault(msg, 4, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.looprpc.LiquidityRule} - */ -proto.looprpc.LiquidityRule.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.looprpc.LiquidityRule; - return proto.looprpc.LiquidityRule.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.looprpc.LiquidityRule} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.looprpc.LiquidityRule} - */ -proto.looprpc.LiquidityRule.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readUint64()); - msg.setChannelId(value); - break; - case 6: - var value = /** @type {!proto.looprpc.SwapType} */ (reader.readEnum()); - msg.setSwapType(value); - break; - case 5: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setPubkey(value); - break; - case 2: - var value = /** @type {!proto.looprpc.LiquidityRuleType} */ (reader.readEnum()); - msg.setType(value); - break; - case 3: - var value = /** @type {number} */ (reader.readUint32()); - msg.setIncomingThreshold(value); - break; - case 4: - var value = /** @type {number} */ (reader.readUint32()); - msg.setOutgoingThreshold(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.looprpc.LiquidityRule.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.looprpc.LiquidityRule.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.looprpc.LiquidityRule} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.looprpc.LiquidityRule.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getChannelId(); - if (f !== 0) { - writer.writeUint64( - 1, - f - ); - } - f = message.getSwapType(); - if (f !== 0.0) { - writer.writeEnum( - 6, - f - ); - } - f = message.getPubkey_asU8(); - if (f.length > 0) { - writer.writeBytes( - 5, - f - ); - } - f = message.getType(); - if (f !== 0.0) { - writer.writeEnum( - 2, - f - ); - } - f = message.getIncomingThreshold(); - if (f !== 0) { - writer.writeUint32( - 3, - f - ); - } - f = message.getOutgoingThreshold(); - if (f !== 0) { - writer.writeUint32( - 4, - f - ); - } -}; - - -/** - * optional uint64 channel_id = 1; - * @return {number} - */ -proto.looprpc.LiquidityRule.prototype.getChannelId = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.looprpc.LiquidityRule} returns this - */ -proto.looprpc.LiquidityRule.prototype.setChannelId = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); -}; - - -/** - * optional SwapType swap_type = 6; - * @return {!proto.looprpc.SwapType} - */ -proto.looprpc.LiquidityRule.prototype.getSwapType = function() { - return /** @type {!proto.looprpc.SwapType} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); -}; - - -/** - * @param {!proto.looprpc.SwapType} value - * @return {!proto.looprpc.LiquidityRule} returns this - */ -proto.looprpc.LiquidityRule.prototype.setSwapType = function(value) { - return jspb.Message.setProto3EnumField(this, 6, value); -}; - - -/** - * optional bytes pubkey = 5; - * @return {!(string|Uint8Array)} - */ -proto.looprpc.LiquidityRule.prototype.getPubkey = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 5, "")); -}; - - -/** - * optional bytes pubkey = 5; - * This is a type-conversion wrapper around `getPubkey()` - * @return {string} - */ -proto.looprpc.LiquidityRule.prototype.getPubkey_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getPubkey())); -}; - - -/** - * optional bytes pubkey = 5; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getPubkey()` - * @return {!Uint8Array} - */ -proto.looprpc.LiquidityRule.prototype.getPubkey_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getPubkey())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.looprpc.LiquidityRule} returns this - */ -proto.looprpc.LiquidityRule.prototype.setPubkey = function(value) { - return jspb.Message.setProto3BytesField(this, 5, value); -}; - - -/** - * optional LiquidityRuleType type = 2; - * @return {!proto.looprpc.LiquidityRuleType} - */ -proto.looprpc.LiquidityRule.prototype.getType = function() { - return /** @type {!proto.looprpc.LiquidityRuleType} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {!proto.looprpc.LiquidityRuleType} value - * @return {!proto.looprpc.LiquidityRule} returns this - */ -proto.looprpc.LiquidityRule.prototype.setType = function(value) { - return jspb.Message.setProto3EnumField(this, 2, value); -}; - - -/** - * optional uint32 incoming_threshold = 3; - * @return {number} - */ -proto.looprpc.LiquidityRule.prototype.getIncomingThreshold = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.looprpc.LiquidityRule} returns this - */ -proto.looprpc.LiquidityRule.prototype.setIncomingThreshold = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - -/** - * optional uint32 outgoing_threshold = 4; - * @return {number} - */ -proto.looprpc.LiquidityRule.prototype.getOutgoingThreshold = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.looprpc.LiquidityRule} returns this - */ -proto.looprpc.LiquidityRule.prototype.setOutgoingThreshold = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.looprpc.SetLiquidityParamsRequest.prototype.toObject = function(opt_includeInstance) { - return proto.looprpc.SetLiquidityParamsRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.looprpc.SetLiquidityParamsRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.looprpc.SetLiquidityParamsRequest.toObject = function(includeInstance, msg) { - var f, obj = { - parameters: (f = msg.getParameters()) && proto.looprpc.LiquidityParameters.toObject(includeInstance, f) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.looprpc.SetLiquidityParamsRequest} - */ -proto.looprpc.SetLiquidityParamsRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.looprpc.SetLiquidityParamsRequest; - return proto.looprpc.SetLiquidityParamsRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.looprpc.SetLiquidityParamsRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.looprpc.SetLiquidityParamsRequest} - */ -proto.looprpc.SetLiquidityParamsRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.looprpc.LiquidityParameters; - reader.readMessage(value,proto.looprpc.LiquidityParameters.deserializeBinaryFromReader); - msg.setParameters(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.looprpc.SetLiquidityParamsRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.looprpc.SetLiquidityParamsRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.looprpc.SetLiquidityParamsRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.looprpc.SetLiquidityParamsRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getParameters(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.looprpc.LiquidityParameters.serializeBinaryToWriter - ); - } -}; - - -/** - * optional LiquidityParameters parameters = 1; - * @return {?proto.looprpc.LiquidityParameters} - */ -proto.looprpc.SetLiquidityParamsRequest.prototype.getParameters = function() { - return /** @type{?proto.looprpc.LiquidityParameters} */ ( - jspb.Message.getWrapperField(this, proto.looprpc.LiquidityParameters, 1)); -}; - - -/** - * @param {?proto.looprpc.LiquidityParameters|undefined} value - * @return {!proto.looprpc.SetLiquidityParamsRequest} returns this -*/ -proto.looprpc.SetLiquidityParamsRequest.prototype.setParameters = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.looprpc.SetLiquidityParamsRequest} returns this - */ -proto.looprpc.SetLiquidityParamsRequest.prototype.clearParameters = function() { - return this.setParameters(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.looprpc.SetLiquidityParamsRequest.prototype.hasParameters = function() { - return jspb.Message.getField(this, 1) != null; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.looprpc.SetLiquidityParamsResponse.prototype.toObject = function(opt_includeInstance) { - return proto.looprpc.SetLiquidityParamsResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.looprpc.SetLiquidityParamsResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.looprpc.SetLiquidityParamsResponse.toObject = function(includeInstance, msg) { - var f, obj = { - - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.looprpc.SetLiquidityParamsResponse} - */ -proto.looprpc.SetLiquidityParamsResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.looprpc.SetLiquidityParamsResponse; - return proto.looprpc.SetLiquidityParamsResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.looprpc.SetLiquidityParamsResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.looprpc.SetLiquidityParamsResponse} - */ -proto.looprpc.SetLiquidityParamsResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.looprpc.SetLiquidityParamsResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.looprpc.SetLiquidityParamsResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.looprpc.SetLiquidityParamsResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.looprpc.SetLiquidityParamsResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.looprpc.SuggestSwapsRequest.prototype.toObject = function(opt_includeInstance) { - return proto.looprpc.SuggestSwapsRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.looprpc.SuggestSwapsRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.looprpc.SuggestSwapsRequest.toObject = function(includeInstance, msg) { - var f, obj = { - - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.looprpc.SuggestSwapsRequest} - */ -proto.looprpc.SuggestSwapsRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.looprpc.SuggestSwapsRequest; - return proto.looprpc.SuggestSwapsRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.looprpc.SuggestSwapsRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.looprpc.SuggestSwapsRequest} - */ -proto.looprpc.SuggestSwapsRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.looprpc.SuggestSwapsRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.looprpc.SuggestSwapsRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.looprpc.SuggestSwapsRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.looprpc.SuggestSwapsRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.looprpc.Disqualified.prototype.toObject = function(opt_includeInstance) { - return proto.looprpc.Disqualified.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.looprpc.Disqualified} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.looprpc.Disqualified.toObject = function(includeInstance, msg) { - var f, obj = { - channelId: jspb.Message.getFieldWithDefault(msg, 1, 0), - pubkey: msg.getPubkey_asB64(), - reason: jspb.Message.getFieldWithDefault(msg, 2, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.looprpc.Disqualified} - */ -proto.looprpc.Disqualified.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.looprpc.Disqualified; - return proto.looprpc.Disqualified.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.looprpc.Disqualified} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.looprpc.Disqualified} - */ -proto.looprpc.Disqualified.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readUint64()); - msg.setChannelId(value); - break; - case 3: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setPubkey(value); - break; - case 2: - var value = /** @type {!proto.looprpc.AutoReason} */ (reader.readEnum()); - msg.setReason(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.looprpc.Disqualified.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.looprpc.Disqualified.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.looprpc.Disqualified} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.looprpc.Disqualified.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getChannelId(); - if (f !== 0) { - writer.writeUint64( - 1, - f - ); - } - f = message.getPubkey_asU8(); - if (f.length > 0) { - writer.writeBytes( - 3, - f - ); - } - f = message.getReason(); - if (f !== 0.0) { - writer.writeEnum( - 2, - f - ); - } -}; - - -/** - * optional uint64 channel_id = 1; - * @return {number} - */ -proto.looprpc.Disqualified.prototype.getChannelId = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.looprpc.Disqualified} returns this - */ -proto.looprpc.Disqualified.prototype.setChannelId = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); -}; - - -/** - * optional bytes pubkey = 3; - * @return {!(string|Uint8Array)} - */ -proto.looprpc.Disqualified.prototype.getPubkey = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * optional bytes pubkey = 3; - * This is a type-conversion wrapper around `getPubkey()` - * @return {string} - */ -proto.looprpc.Disqualified.prototype.getPubkey_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getPubkey())); -}; - - -/** - * optional bytes pubkey = 3; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getPubkey()` - * @return {!Uint8Array} - */ -proto.looprpc.Disqualified.prototype.getPubkey_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getPubkey())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.looprpc.Disqualified} returns this - */ -proto.looprpc.Disqualified.prototype.setPubkey = function(value) { - return jspb.Message.setProto3BytesField(this, 3, value); -}; - - -/** - * optional AutoReason reason = 2; - * @return {!proto.looprpc.AutoReason} - */ -proto.looprpc.Disqualified.prototype.getReason = function() { - return /** @type {!proto.looprpc.AutoReason} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {!proto.looprpc.AutoReason} value - * @return {!proto.looprpc.Disqualified} returns this - */ -proto.looprpc.Disqualified.prototype.setReason = function(value) { - return jspb.Message.setProto3EnumField(this, 2, value); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.looprpc.SuggestSwapsResponse.repeatedFields_ = [1,3,2]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.looprpc.SuggestSwapsResponse.prototype.toObject = function(opt_includeInstance) { - return proto.looprpc.SuggestSwapsResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.looprpc.SuggestSwapsResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.looprpc.SuggestSwapsResponse.toObject = function(includeInstance, msg) { - var f, obj = { - loopOutList: jspb.Message.toObjectList(msg.getLoopOutList(), - proto.looprpc.LoopOutRequest.toObject, includeInstance), - loopInList: jspb.Message.toObjectList(msg.getLoopInList(), - proto.looprpc.LoopInRequest.toObject, includeInstance), - disqualifiedList: jspb.Message.toObjectList(msg.getDisqualifiedList(), - proto.looprpc.Disqualified.toObject, includeInstance) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.looprpc.SuggestSwapsResponse} - */ -proto.looprpc.SuggestSwapsResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.looprpc.SuggestSwapsResponse; - return proto.looprpc.SuggestSwapsResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.looprpc.SuggestSwapsResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.looprpc.SuggestSwapsResponse} - */ -proto.looprpc.SuggestSwapsResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.looprpc.LoopOutRequest; - reader.readMessage(value,proto.looprpc.LoopOutRequest.deserializeBinaryFromReader); - msg.addLoopOut(value); - break; - case 3: - var value = new proto.looprpc.LoopInRequest; - reader.readMessage(value,proto.looprpc.LoopInRequest.deserializeBinaryFromReader); - msg.addLoopIn(value); - break; - case 2: - var value = new proto.looprpc.Disqualified; - reader.readMessage(value,proto.looprpc.Disqualified.deserializeBinaryFromReader); - msg.addDisqualified(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.looprpc.SuggestSwapsResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.looprpc.SuggestSwapsResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.looprpc.SuggestSwapsResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.looprpc.SuggestSwapsResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getLoopOutList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 1, - f, - proto.looprpc.LoopOutRequest.serializeBinaryToWriter - ); - } - f = message.getLoopInList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 3, - f, - proto.looprpc.LoopInRequest.serializeBinaryToWriter - ); - } - f = message.getDisqualifiedList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 2, - f, - proto.looprpc.Disqualified.serializeBinaryToWriter - ); - } -}; - - -/** - * repeated LoopOutRequest loop_out = 1; - * @return {!Array} - */ -proto.looprpc.SuggestSwapsResponse.prototype.getLoopOutList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.looprpc.LoopOutRequest, 1)); -}; - - -/** - * @param {!Array} value - * @return {!proto.looprpc.SuggestSwapsResponse} returns this -*/ -proto.looprpc.SuggestSwapsResponse.prototype.setLoopOutList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); -}; - - -/** - * @param {!proto.looprpc.LoopOutRequest=} opt_value - * @param {number=} opt_index - * @return {!proto.looprpc.LoopOutRequest} - */ -proto.looprpc.SuggestSwapsResponse.prototype.addLoopOut = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.looprpc.LoopOutRequest, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.looprpc.SuggestSwapsResponse} returns this - */ -proto.looprpc.SuggestSwapsResponse.prototype.clearLoopOutList = function() { - return this.setLoopOutList([]); -}; - - -/** - * repeated LoopInRequest loop_in = 3; - * @return {!Array} - */ -proto.looprpc.SuggestSwapsResponse.prototype.getLoopInList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.looprpc.LoopInRequest, 3)); -}; - - -/** - * @param {!Array} value - * @return {!proto.looprpc.SuggestSwapsResponse} returns this -*/ -proto.looprpc.SuggestSwapsResponse.prototype.setLoopInList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 3, value); -}; - - -/** - * @param {!proto.looprpc.LoopInRequest=} opt_value - * @param {number=} opt_index - * @return {!proto.looprpc.LoopInRequest} - */ -proto.looprpc.SuggestSwapsResponse.prototype.addLoopIn = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.looprpc.LoopInRequest, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.looprpc.SuggestSwapsResponse} returns this - */ -proto.looprpc.SuggestSwapsResponse.prototype.clearLoopInList = function() { - return this.setLoopInList([]); -}; - - -/** - * repeated Disqualified disqualified = 2; - * @return {!Array} - */ -proto.looprpc.SuggestSwapsResponse.prototype.getDisqualifiedList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.looprpc.Disqualified, 2)); -}; - - -/** - * @param {!Array} value - * @return {!proto.looprpc.SuggestSwapsResponse} returns this -*/ -proto.looprpc.SuggestSwapsResponse.prototype.setDisqualifiedList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 2, value); -}; - - -/** - * @param {!proto.looprpc.Disqualified=} opt_value - * @param {number=} opt_index - * @return {!proto.looprpc.Disqualified} - */ -proto.looprpc.SuggestSwapsResponse.prototype.addDisqualified = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.looprpc.Disqualified, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.looprpc.SuggestSwapsResponse} returns this - */ -proto.looprpc.SuggestSwapsResponse.prototype.clearDisqualifiedList = function() { - return this.setDisqualifiedList([]); -}; - - -/** - * @enum {number} - */ -proto.looprpc.SwapType = { - LOOP_OUT: 0, - LOOP_IN: 1 -}; - -/** - * @enum {number} - */ -proto.looprpc.SwapState = { - INITIATED: 0, - PREIMAGE_REVEALED: 1, - HTLC_PUBLISHED: 2, - SUCCESS: 3, - FAILED: 4, - INVOICE_SETTLED: 5 -}; - -/** - * @enum {number} - */ -proto.looprpc.FailureReason = { - FAILURE_REASON_NONE: 0, - FAILURE_REASON_OFFCHAIN: 1, - FAILURE_REASON_TIMEOUT: 2, - FAILURE_REASON_SWEEP_TIMEOUT: 3, - FAILURE_REASON_INSUFFICIENT_VALUE: 4, - FAILURE_REASON_TEMPORARY: 5, - FAILURE_REASON_INCORRECT_AMOUNT: 6 -}; - -/** - * @enum {number} - */ -proto.looprpc.LiquidityRuleType = { - UNKNOWN: 0, - THRESHOLD: 1 -}; - -/** - * @enum {number} - */ -proto.looprpc.AutoReason = { - AUTO_REASON_UNKNOWN: 0, - AUTO_REASON_BUDGET_NOT_STARTED: 1, - AUTO_REASON_SWEEP_FEES: 2, - AUTO_REASON_BUDGET_ELAPSED: 3, - AUTO_REASON_IN_FLIGHT: 4, - AUTO_REASON_SWAP_FEE: 5, - AUTO_REASON_MINER_FEE: 6, - AUTO_REASON_PREPAY: 7, - AUTO_REASON_FAILURE_BACKOFF: 8, - AUTO_REASON_LOOP_OUT: 9, - AUTO_REASON_LOOP_IN: 10, - AUTO_REASON_LIQUIDITY_OK: 11, - AUTO_REASON_BUDGET_INSUFFICIENT: 12, - AUTO_REASON_FEE_INSUFFICIENT: 13 -}; - -goog.object.extend(exports, proto.looprpc); diff --git a/lib/types/generated/client_pb_service.d.ts b/lib/types/generated/client_pb_service.d.ts deleted file mode 100644 index 47493fa..0000000 --- a/lib/types/generated/client_pb_service.d.ts +++ /dev/null @@ -1,302 +0,0 @@ -// package: looprpc -// file: client.proto - -import * as client_pb from "./client_pb"; -import {grpc} from "@improbable-eng/grpc-web"; - -type SwapClientLoopOut = { - readonly methodName: string; - readonly service: typeof SwapClient; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof client_pb.LoopOutRequest; - readonly responseType: typeof client_pb.SwapResponse; -}; - -type SwapClientLoopIn = { - readonly methodName: string; - readonly service: typeof SwapClient; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof client_pb.LoopInRequest; - readonly responseType: typeof client_pb.SwapResponse; -}; - -type SwapClientMonitor = { - readonly methodName: string; - readonly service: typeof SwapClient; - readonly requestStream: false; - readonly responseStream: true; - readonly requestType: typeof client_pb.MonitorRequest; - readonly responseType: typeof client_pb.SwapStatus; -}; - -type SwapClientListSwaps = { - readonly methodName: string; - readonly service: typeof SwapClient; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof client_pb.ListSwapsRequest; - readonly responseType: typeof client_pb.ListSwapsResponse; -}; - -type SwapClientSwapInfo = { - readonly methodName: string; - readonly service: typeof SwapClient; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof client_pb.SwapInfoRequest; - readonly responseType: typeof client_pb.SwapStatus; -}; - -type SwapClientLoopOutTerms = { - readonly methodName: string; - readonly service: typeof SwapClient; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof client_pb.TermsRequest; - readonly responseType: typeof client_pb.OutTermsResponse; -}; - -type SwapClientLoopOutQuote = { - readonly methodName: string; - readonly service: typeof SwapClient; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof client_pb.QuoteRequest; - readonly responseType: typeof client_pb.OutQuoteResponse; -}; - -type SwapClientGetLoopInTerms = { - readonly methodName: string; - readonly service: typeof SwapClient; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof client_pb.TermsRequest; - readonly responseType: typeof client_pb.InTermsResponse; -}; - -type SwapClientGetLoopInQuote = { - readonly methodName: string; - readonly service: typeof SwapClient; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof client_pb.QuoteRequest; - readonly responseType: typeof client_pb.InQuoteResponse; -}; - -type SwapClientProbe = { - readonly methodName: string; - readonly service: typeof SwapClient; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof client_pb.ProbeRequest; - readonly responseType: typeof client_pb.ProbeResponse; -}; - -type SwapClientGetLsatTokens = { - readonly methodName: string; - readonly service: typeof SwapClient; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof client_pb.TokensRequest; - readonly responseType: typeof client_pb.TokensResponse; -}; - -type SwapClientGetLiquidityParams = { - readonly methodName: string; - readonly service: typeof SwapClient; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof client_pb.GetLiquidityParamsRequest; - readonly responseType: typeof client_pb.LiquidityParameters; -}; - -type SwapClientSetLiquidityParams = { - readonly methodName: string; - readonly service: typeof SwapClient; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof client_pb.SetLiquidityParamsRequest; - readonly responseType: typeof client_pb.SetLiquidityParamsResponse; -}; - -type SwapClientSuggestSwaps = { - readonly methodName: string; - readonly service: typeof SwapClient; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof client_pb.SuggestSwapsRequest; - readonly responseType: typeof client_pb.SuggestSwapsResponse; -}; - -export class SwapClient { - static readonly serviceName: string; - static readonly LoopOut: SwapClientLoopOut; - static readonly LoopIn: SwapClientLoopIn; - static readonly Monitor: SwapClientMonitor; - static readonly ListSwaps: SwapClientListSwaps; - static readonly SwapInfo: SwapClientSwapInfo; - static readonly LoopOutTerms: SwapClientLoopOutTerms; - static readonly LoopOutQuote: SwapClientLoopOutQuote; - static readonly GetLoopInTerms: SwapClientGetLoopInTerms; - static readonly GetLoopInQuote: SwapClientGetLoopInQuote; - static readonly Probe: SwapClientProbe; - static readonly GetLsatTokens: SwapClientGetLsatTokens; - static readonly GetLiquidityParams: SwapClientGetLiquidityParams; - static readonly SetLiquidityParams: SwapClientSetLiquidityParams; - static readonly SuggestSwaps: SwapClientSuggestSwaps; -} - -export type ServiceError = { message: string, code: number; metadata: grpc.Metadata } -export type Status = { details: string, code: number; metadata: grpc.Metadata } - -interface UnaryResponse { - cancel(): void; -} -interface ResponseStream { - cancel(): void; - on(type: 'data', handler: (message: T) => void): ResponseStream; - on(type: 'end', handler: (status?: Status) => void): ResponseStream; - on(type: 'status', handler: (status: Status) => void): ResponseStream; -} -interface RequestStream { - write(message: T): RequestStream; - end(): void; - cancel(): void; - on(type: 'end', handler: (status?: Status) => void): RequestStream; - on(type: 'status', handler: (status: Status) => void): RequestStream; -} -interface BidirectionalStream { - write(message: ReqT): BidirectionalStream; - end(): void; - cancel(): void; - on(type: 'data', handler: (message: ResT) => void): BidirectionalStream; - on(type: 'end', handler: (status?: Status) => void): BidirectionalStream; - on(type: 'status', handler: (status: Status) => void): BidirectionalStream; -} - -export class SwapClientClient { - readonly serviceHost: string; - - constructor(serviceHost: string, options?: grpc.RpcOptions); - loopOut( - requestMessage: client_pb.LoopOutRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: client_pb.SwapResponse|null) => void - ): UnaryResponse; - loopOut( - requestMessage: client_pb.LoopOutRequest, - callback: (error: ServiceError|null, responseMessage: client_pb.SwapResponse|null) => void - ): UnaryResponse; - loopIn( - requestMessage: client_pb.LoopInRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: client_pb.SwapResponse|null) => void - ): UnaryResponse; - loopIn( - requestMessage: client_pb.LoopInRequest, - callback: (error: ServiceError|null, responseMessage: client_pb.SwapResponse|null) => void - ): UnaryResponse; - monitor(requestMessage: client_pb.MonitorRequest, metadata?: grpc.Metadata): ResponseStream; - listSwaps( - requestMessage: client_pb.ListSwapsRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: client_pb.ListSwapsResponse|null) => void - ): UnaryResponse; - listSwaps( - requestMessage: client_pb.ListSwapsRequest, - callback: (error: ServiceError|null, responseMessage: client_pb.ListSwapsResponse|null) => void - ): UnaryResponse; - swapInfo( - requestMessage: client_pb.SwapInfoRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: client_pb.SwapStatus|null) => void - ): UnaryResponse; - swapInfo( - requestMessage: client_pb.SwapInfoRequest, - callback: (error: ServiceError|null, responseMessage: client_pb.SwapStatus|null) => void - ): UnaryResponse; - loopOutTerms( - requestMessage: client_pb.TermsRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: client_pb.OutTermsResponse|null) => void - ): UnaryResponse; - loopOutTerms( - requestMessage: client_pb.TermsRequest, - callback: (error: ServiceError|null, responseMessage: client_pb.OutTermsResponse|null) => void - ): UnaryResponse; - loopOutQuote( - requestMessage: client_pb.QuoteRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: client_pb.OutQuoteResponse|null) => void - ): UnaryResponse; - loopOutQuote( - requestMessage: client_pb.QuoteRequest, - callback: (error: ServiceError|null, responseMessage: client_pb.OutQuoteResponse|null) => void - ): UnaryResponse; - getLoopInTerms( - requestMessage: client_pb.TermsRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: client_pb.InTermsResponse|null) => void - ): UnaryResponse; - getLoopInTerms( - requestMessage: client_pb.TermsRequest, - callback: (error: ServiceError|null, responseMessage: client_pb.InTermsResponse|null) => void - ): UnaryResponse; - getLoopInQuote( - requestMessage: client_pb.QuoteRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: client_pb.InQuoteResponse|null) => void - ): UnaryResponse; - getLoopInQuote( - requestMessage: client_pb.QuoteRequest, - callback: (error: ServiceError|null, responseMessage: client_pb.InQuoteResponse|null) => void - ): UnaryResponse; - probe( - requestMessage: client_pb.ProbeRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: client_pb.ProbeResponse|null) => void - ): UnaryResponse; - probe( - requestMessage: client_pb.ProbeRequest, - callback: (error: ServiceError|null, responseMessage: client_pb.ProbeResponse|null) => void - ): UnaryResponse; - getLsatTokens( - requestMessage: client_pb.TokensRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: client_pb.TokensResponse|null) => void - ): UnaryResponse; - getLsatTokens( - requestMessage: client_pb.TokensRequest, - callback: (error: ServiceError|null, responseMessage: client_pb.TokensResponse|null) => void - ): UnaryResponse; - getLiquidityParams( - requestMessage: client_pb.GetLiquidityParamsRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: client_pb.LiquidityParameters|null) => void - ): UnaryResponse; - getLiquidityParams( - requestMessage: client_pb.GetLiquidityParamsRequest, - callback: (error: ServiceError|null, responseMessage: client_pb.LiquidityParameters|null) => void - ): UnaryResponse; - setLiquidityParams( - requestMessage: client_pb.SetLiquidityParamsRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: client_pb.SetLiquidityParamsResponse|null) => void - ): UnaryResponse; - setLiquidityParams( - requestMessage: client_pb.SetLiquidityParamsRequest, - callback: (error: ServiceError|null, responseMessage: client_pb.SetLiquidityParamsResponse|null) => void - ): UnaryResponse; - suggestSwaps( - requestMessage: client_pb.SuggestSwapsRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: client_pb.SuggestSwapsResponse|null) => void - ): UnaryResponse; - suggestSwaps( - requestMessage: client_pb.SuggestSwapsRequest, - callback: (error: ServiceError|null, responseMessage: client_pb.SuggestSwapsResponse|null) => void - ): UnaryResponse; -} - diff --git a/lib/types/generated/client_pb_service.js b/lib/types/generated/client_pb_service.js deleted file mode 100644 index 536fe62..0000000 --- a/lib/types/generated/client_pb_service.js +++ /dev/null @@ -1,589 +0,0 @@ -// package: looprpc -// file: client.proto - -var client_pb = require("./client_pb"); -var grpc = require("@improbable-eng/grpc-web").grpc; - -var SwapClient = (function () { - function SwapClient() {} - SwapClient.serviceName = "looprpc.SwapClient"; - return SwapClient; -}()); - -SwapClient.LoopOut = { - methodName: "LoopOut", - service: SwapClient, - requestStream: false, - responseStream: false, - requestType: client_pb.LoopOutRequest, - responseType: client_pb.SwapResponse -}; - -SwapClient.LoopIn = { - methodName: "LoopIn", - service: SwapClient, - requestStream: false, - responseStream: false, - requestType: client_pb.LoopInRequest, - responseType: client_pb.SwapResponse -}; - -SwapClient.Monitor = { - methodName: "Monitor", - service: SwapClient, - requestStream: false, - responseStream: true, - requestType: client_pb.MonitorRequest, - responseType: client_pb.SwapStatus -}; - -SwapClient.ListSwaps = { - methodName: "ListSwaps", - service: SwapClient, - requestStream: false, - responseStream: false, - requestType: client_pb.ListSwapsRequest, - responseType: client_pb.ListSwapsResponse -}; - -SwapClient.SwapInfo = { - methodName: "SwapInfo", - service: SwapClient, - requestStream: false, - responseStream: false, - requestType: client_pb.SwapInfoRequest, - responseType: client_pb.SwapStatus -}; - -SwapClient.LoopOutTerms = { - methodName: "LoopOutTerms", - service: SwapClient, - requestStream: false, - responseStream: false, - requestType: client_pb.TermsRequest, - responseType: client_pb.OutTermsResponse -}; - -SwapClient.LoopOutQuote = { - methodName: "LoopOutQuote", - service: SwapClient, - requestStream: false, - responseStream: false, - requestType: client_pb.QuoteRequest, - responseType: client_pb.OutQuoteResponse -}; - -SwapClient.GetLoopInTerms = { - methodName: "GetLoopInTerms", - service: SwapClient, - requestStream: false, - responseStream: false, - requestType: client_pb.TermsRequest, - responseType: client_pb.InTermsResponse -}; - -SwapClient.GetLoopInQuote = { - methodName: "GetLoopInQuote", - service: SwapClient, - requestStream: false, - responseStream: false, - requestType: client_pb.QuoteRequest, - responseType: client_pb.InQuoteResponse -}; - -SwapClient.Probe = { - methodName: "Probe", - service: SwapClient, - requestStream: false, - responseStream: false, - requestType: client_pb.ProbeRequest, - responseType: client_pb.ProbeResponse -}; - -SwapClient.GetLsatTokens = { - methodName: "GetLsatTokens", - service: SwapClient, - requestStream: false, - responseStream: false, - requestType: client_pb.TokensRequest, - responseType: client_pb.TokensResponse -}; - -SwapClient.GetLiquidityParams = { - methodName: "GetLiquidityParams", - service: SwapClient, - requestStream: false, - responseStream: false, - requestType: client_pb.GetLiquidityParamsRequest, - responseType: client_pb.LiquidityParameters -}; - -SwapClient.SetLiquidityParams = { - methodName: "SetLiquidityParams", - service: SwapClient, - requestStream: false, - responseStream: false, - requestType: client_pb.SetLiquidityParamsRequest, - responseType: client_pb.SetLiquidityParamsResponse -}; - -SwapClient.SuggestSwaps = { - methodName: "SuggestSwaps", - service: SwapClient, - requestStream: false, - responseStream: false, - requestType: client_pb.SuggestSwapsRequest, - responseType: client_pb.SuggestSwapsResponse -}; - -exports.SwapClient = SwapClient; - -function SwapClientClient(serviceHost, options) { - this.serviceHost = serviceHost; - this.options = options || {}; -} - -SwapClientClient.prototype.loopOut = function loopOut(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(SwapClient.LoopOut, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -SwapClientClient.prototype.loopIn = function loopIn(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(SwapClient.LoopIn, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -SwapClientClient.prototype.monitor = function monitor(requestMessage, metadata) { - var listeners = { - data: [], - end: [], - status: [] - }; - var client = grpc.invoke(SwapClient.Monitor, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onMessage: function (responseMessage) { - listeners.data.forEach(function (handler) { - handler(responseMessage); - }); - }, - onEnd: function (status, statusMessage, trailers) { - listeners.status.forEach(function (handler) { - handler({ code: status, details: statusMessage, metadata: trailers }); - }); - listeners.end.forEach(function (handler) { - handler({ code: status, details: statusMessage, metadata: trailers }); - }); - listeners = null; - } - }); - return { - on: function (type, handler) { - listeners[type].push(handler); - return this; - }, - cancel: function () { - listeners = null; - client.close(); - } - }; -}; - -SwapClientClient.prototype.listSwaps = function listSwaps(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(SwapClient.ListSwaps, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -SwapClientClient.prototype.swapInfo = function swapInfo(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(SwapClient.SwapInfo, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -SwapClientClient.prototype.loopOutTerms = function loopOutTerms(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(SwapClient.LoopOutTerms, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -SwapClientClient.prototype.loopOutQuote = function loopOutQuote(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(SwapClient.LoopOutQuote, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -SwapClientClient.prototype.getLoopInTerms = function getLoopInTerms(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(SwapClient.GetLoopInTerms, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -SwapClientClient.prototype.getLoopInQuote = function getLoopInQuote(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(SwapClient.GetLoopInQuote, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -SwapClientClient.prototype.probe = function probe(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(SwapClient.Probe, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -SwapClientClient.prototype.getLsatTokens = function getLsatTokens(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(SwapClient.GetLsatTokens, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -SwapClientClient.prototype.getLiquidityParams = function getLiquidityParams(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(SwapClient.GetLiquidityParams, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -SwapClientClient.prototype.setLiquidityParams = function setLiquidityParams(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(SwapClient.SetLiquidityParams, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -SwapClientClient.prototype.suggestSwaps = function suggestSwaps(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(SwapClient.SuggestSwaps, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -exports.SwapClientClient = SwapClientClient; - diff --git a/lib/types/generated/debug_pb.d.ts b/lib/types/generated/debug_pb.d.ts deleted file mode 100644 index e3892ed..0000000 --- a/lib/types/generated/debug_pb.d.ts +++ /dev/null @@ -1,37 +0,0 @@ -// package: looprpc -// file: debug.proto - -import * as jspb from "google-protobuf"; - -export class ForceAutoLoopRequest extends jspb.Message { - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ForceAutoLoopRequest.AsObject; - static toObject(includeInstance: boolean, msg: ForceAutoLoopRequest): ForceAutoLoopRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ForceAutoLoopRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ForceAutoLoopRequest; - static deserializeBinaryFromReader(message: ForceAutoLoopRequest, reader: jspb.BinaryReader): ForceAutoLoopRequest; -} - -export namespace ForceAutoLoopRequest { - export type AsObject = { - } -} - -export class ForceAutoLoopResponse extends jspb.Message { - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ForceAutoLoopResponse.AsObject; - static toObject(includeInstance: boolean, msg: ForceAutoLoopResponse): ForceAutoLoopResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ForceAutoLoopResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ForceAutoLoopResponse; - static deserializeBinaryFromReader(message: ForceAutoLoopResponse, reader: jspb.BinaryReader): ForceAutoLoopResponse; -} - -export namespace ForceAutoLoopResponse { - export type AsObject = { - } -} - diff --git a/lib/types/generated/debug_pb.js b/lib/types/generated/debug_pb.js deleted file mode 100644 index 63c7d5c..0000000 --- a/lib/types/generated/debug_pb.js +++ /dev/null @@ -1,264 +0,0 @@ -// source: debug.proto -/** - * @fileoverview - * @enhanceable - * @suppress {missingRequire} reports error on implicit type usages. - * @suppress {messageConventions} JS Compiler reports an error if a variable or - * field starts with 'MSG_' and isn't a translatable message. - * @public - */ -// GENERATED CODE -- DO NOT EDIT! -/* eslint-disable */ -// @ts-nocheck - -var jspb = require('google-protobuf'); -var goog = jspb; -var global = Function('return this')(); - -goog.exportSymbol('proto.looprpc.ForceAutoLoopRequest', null, global); -goog.exportSymbol('proto.looprpc.ForceAutoLoopResponse', null, global); -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.looprpc.ForceAutoLoopRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.looprpc.ForceAutoLoopRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.looprpc.ForceAutoLoopRequest.displayName = 'proto.looprpc.ForceAutoLoopRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.looprpc.ForceAutoLoopResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.looprpc.ForceAutoLoopResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.looprpc.ForceAutoLoopResponse.displayName = 'proto.looprpc.ForceAutoLoopResponse'; -} - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.looprpc.ForceAutoLoopRequest.prototype.toObject = function(opt_includeInstance) { - return proto.looprpc.ForceAutoLoopRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.looprpc.ForceAutoLoopRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.looprpc.ForceAutoLoopRequest.toObject = function(includeInstance, msg) { - var f, obj = { - - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.looprpc.ForceAutoLoopRequest} - */ -proto.looprpc.ForceAutoLoopRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.looprpc.ForceAutoLoopRequest; - return proto.looprpc.ForceAutoLoopRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.looprpc.ForceAutoLoopRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.looprpc.ForceAutoLoopRequest} - */ -proto.looprpc.ForceAutoLoopRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.looprpc.ForceAutoLoopRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.looprpc.ForceAutoLoopRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.looprpc.ForceAutoLoopRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.looprpc.ForceAutoLoopRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.looprpc.ForceAutoLoopResponse.prototype.toObject = function(opt_includeInstance) { - return proto.looprpc.ForceAutoLoopResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.looprpc.ForceAutoLoopResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.looprpc.ForceAutoLoopResponse.toObject = function(includeInstance, msg) { - var f, obj = { - - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.looprpc.ForceAutoLoopResponse} - */ -proto.looprpc.ForceAutoLoopResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.looprpc.ForceAutoLoopResponse; - return proto.looprpc.ForceAutoLoopResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.looprpc.ForceAutoLoopResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.looprpc.ForceAutoLoopResponse} - */ -proto.looprpc.ForceAutoLoopResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.looprpc.ForceAutoLoopResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.looprpc.ForceAutoLoopResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.looprpc.ForceAutoLoopResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.looprpc.ForceAutoLoopResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; -}; - - -goog.object.extend(exports, proto.looprpc); diff --git a/lib/types/generated/debug_pb_service.d.ts b/lib/types/generated/debug_pb_service.d.ts deleted file mode 100644 index 3a31845..0000000 --- a/lib/types/generated/debug_pb_service.d.ts +++ /dev/null @@ -1,63 +0,0 @@ -// package: looprpc -// file: debug.proto - -import * as debug_pb from "./debug_pb"; -import {grpc} from "@improbable-eng/grpc-web"; - -type DebugForceAutoLoop = { - readonly methodName: string; - readonly service: typeof Debug; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof debug_pb.ForceAutoLoopRequest; - readonly responseType: typeof debug_pb.ForceAutoLoopResponse; -}; - -export class Debug { - static readonly serviceName: string; - static readonly ForceAutoLoop: DebugForceAutoLoop; -} - -export type ServiceError = { message: string, code: number; metadata: grpc.Metadata } -export type Status = { details: string, code: number; metadata: grpc.Metadata } - -interface UnaryResponse { - cancel(): void; -} -interface ResponseStream { - cancel(): void; - on(type: 'data', handler: (message: T) => void): ResponseStream; - on(type: 'end', handler: (status?: Status) => void): ResponseStream; - on(type: 'status', handler: (status: Status) => void): ResponseStream; -} -interface RequestStream { - write(message: T): RequestStream; - end(): void; - cancel(): void; - on(type: 'end', handler: (status?: Status) => void): RequestStream; - on(type: 'status', handler: (status: Status) => void): RequestStream; -} -interface BidirectionalStream { - write(message: ReqT): BidirectionalStream; - end(): void; - cancel(): void; - on(type: 'data', handler: (message: ResT) => void): BidirectionalStream; - on(type: 'end', handler: (status?: Status) => void): BidirectionalStream; - on(type: 'status', handler: (status: Status) => void): BidirectionalStream; -} - -export class DebugClient { - readonly serviceHost: string; - - constructor(serviceHost: string, options?: grpc.RpcOptions); - forceAutoLoop( - requestMessage: debug_pb.ForceAutoLoopRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: debug_pb.ForceAutoLoopResponse|null) => void - ): UnaryResponse; - forceAutoLoop( - requestMessage: debug_pb.ForceAutoLoopRequest, - callback: (error: ServiceError|null, responseMessage: debug_pb.ForceAutoLoopResponse|null) => void - ): UnaryResponse; -} - diff --git a/lib/types/generated/debug_pb_service.js b/lib/types/generated/debug_pb_service.js deleted file mode 100644 index 33911f4..0000000 --- a/lib/types/generated/debug_pb_service.js +++ /dev/null @@ -1,61 +0,0 @@ -// package: looprpc -// file: debug.proto - -var debug_pb = require("./debug_pb"); -var grpc = require("@improbable-eng/grpc-web").grpc; - -var Debug = (function () { - function Debug() {} - Debug.serviceName = "looprpc.Debug"; - return Debug; -}()); - -Debug.ForceAutoLoop = { - methodName: "ForceAutoLoop", - service: Debug, - requestStream: false, - responseStream: false, - requestType: debug_pb.ForceAutoLoopRequest, - responseType: debug_pb.ForceAutoLoopResponse -}; - -exports.Debug = Debug; - -function DebugClient(serviceHost, options) { - this.serviceHost = serviceHost; - this.options = options || {}; -} - -DebugClient.prototype.forceAutoLoop = function forceAutoLoop(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(Debug.ForceAutoLoop, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -exports.DebugClient = DebugClient; - diff --git a/lib/types/generated/faraday_pb.d.ts b/lib/types/generated/faraday_pb.d.ts deleted file mode 100644 index 7c40c2e..0000000 --- a/lib/types/generated/faraday_pb.d.ts +++ /dev/null @@ -1,712 +0,0 @@ -// package: frdrpc -// file: faraday.proto - -import * as jspb from "google-protobuf"; - -export class CloseRecommendationRequest extends jspb.Message { - getMinimumMonitored(): number; - setMinimumMonitored(value: number): void; - - getMetric(): CloseRecommendationRequest.MetricMap[keyof CloseRecommendationRequest.MetricMap]; - setMetric(value: CloseRecommendationRequest.MetricMap[keyof CloseRecommendationRequest.MetricMap]): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): CloseRecommendationRequest.AsObject; - static toObject(includeInstance: boolean, msg: CloseRecommendationRequest): CloseRecommendationRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: CloseRecommendationRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): CloseRecommendationRequest; - static deserializeBinaryFromReader(message: CloseRecommendationRequest, reader: jspb.BinaryReader): CloseRecommendationRequest; -} - -export namespace CloseRecommendationRequest { - export type AsObject = { - minimumMonitored: number, - metric: CloseRecommendationRequest.MetricMap[keyof CloseRecommendationRequest.MetricMap], - } - - export interface MetricMap { - UNKNOWN: 0; - UPTIME: 1; - REVENUE: 2; - INCOMING_VOLUME: 3; - OUTGOING_VOLUME: 4; - TOTAL_VOLUME: 5; - } - - export const Metric: MetricMap; -} - -export class OutlierRecommendationsRequest extends jspb.Message { - hasRecRequest(): boolean; - clearRecRequest(): void; - getRecRequest(): CloseRecommendationRequest | undefined; - setRecRequest(value?: CloseRecommendationRequest): void; - - getOutlierMultiplier(): number; - setOutlierMultiplier(value: number): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): OutlierRecommendationsRequest.AsObject; - static toObject(includeInstance: boolean, msg: OutlierRecommendationsRequest): OutlierRecommendationsRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: OutlierRecommendationsRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): OutlierRecommendationsRequest; - static deserializeBinaryFromReader(message: OutlierRecommendationsRequest, reader: jspb.BinaryReader): OutlierRecommendationsRequest; -} - -export namespace OutlierRecommendationsRequest { - export type AsObject = { - recRequest?: CloseRecommendationRequest.AsObject, - outlierMultiplier: number, - } -} - -export class ThresholdRecommendationsRequest extends jspb.Message { - hasRecRequest(): boolean; - clearRecRequest(): void; - getRecRequest(): CloseRecommendationRequest | undefined; - setRecRequest(value?: CloseRecommendationRequest): void; - - getThresholdValue(): number; - setThresholdValue(value: number): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ThresholdRecommendationsRequest.AsObject; - static toObject(includeInstance: boolean, msg: ThresholdRecommendationsRequest): ThresholdRecommendationsRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ThresholdRecommendationsRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ThresholdRecommendationsRequest; - static deserializeBinaryFromReader(message: ThresholdRecommendationsRequest, reader: jspb.BinaryReader): ThresholdRecommendationsRequest; -} - -export namespace ThresholdRecommendationsRequest { - export type AsObject = { - recRequest?: CloseRecommendationRequest.AsObject, - thresholdValue: number, - } -} - -export class CloseRecommendationsResponse extends jspb.Message { - getTotalChannels(): number; - setTotalChannels(value: number): void; - - getConsideredChannels(): number; - setConsideredChannels(value: number): void; - - clearRecommendationsList(): void; - getRecommendationsList(): Array; - setRecommendationsList(value: Array): void; - addRecommendations(value?: Recommendation, index?: number): Recommendation; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): CloseRecommendationsResponse.AsObject; - static toObject(includeInstance: boolean, msg: CloseRecommendationsResponse): CloseRecommendationsResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: CloseRecommendationsResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): CloseRecommendationsResponse; - static deserializeBinaryFromReader(message: CloseRecommendationsResponse, reader: jspb.BinaryReader): CloseRecommendationsResponse; -} - -export namespace CloseRecommendationsResponse { - export type AsObject = { - totalChannels: number, - consideredChannels: number, - recommendations: Array, - } -} - -export class Recommendation extends jspb.Message { - getChanPoint(): string; - setChanPoint(value: string): void; - - getValue(): number; - setValue(value: number): void; - - getRecommendClose(): boolean; - setRecommendClose(value: boolean): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Recommendation.AsObject; - static toObject(includeInstance: boolean, msg: Recommendation): Recommendation.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: Recommendation, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Recommendation; - static deserializeBinaryFromReader(message: Recommendation, reader: jspb.BinaryReader): Recommendation; -} - -export namespace Recommendation { - export type AsObject = { - chanPoint: string, - value: number, - recommendClose: boolean, - } -} - -export class RevenueReportRequest extends jspb.Message { - clearChanPointsList(): void; - getChanPointsList(): Array; - setChanPointsList(value: Array): void; - addChanPoints(value: string, index?: number): string; - - getStartTime(): number; - setStartTime(value: number): void; - - getEndTime(): number; - setEndTime(value: number): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): RevenueReportRequest.AsObject; - static toObject(includeInstance: boolean, msg: RevenueReportRequest): RevenueReportRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: RevenueReportRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): RevenueReportRequest; - static deserializeBinaryFromReader(message: RevenueReportRequest, reader: jspb.BinaryReader): RevenueReportRequest; -} - -export namespace RevenueReportRequest { - export type AsObject = { - chanPoints: Array, - startTime: number, - endTime: number, - } -} - -export class RevenueReportResponse extends jspb.Message { - clearReportsList(): void; - getReportsList(): Array; - setReportsList(value: Array): void; - addReports(value?: RevenueReport, index?: number): RevenueReport; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): RevenueReportResponse.AsObject; - static toObject(includeInstance: boolean, msg: RevenueReportResponse): RevenueReportResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: RevenueReportResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): RevenueReportResponse; - static deserializeBinaryFromReader(message: RevenueReportResponse, reader: jspb.BinaryReader): RevenueReportResponse; -} - -export namespace RevenueReportResponse { - export type AsObject = { - reports: Array, - } -} - -export class RevenueReport extends jspb.Message { - getTargetChannel(): string; - setTargetChannel(value: string): void; - - getPairReportsMap(): jspb.Map; - clearPairReportsMap(): void; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): RevenueReport.AsObject; - static toObject(includeInstance: boolean, msg: RevenueReport): RevenueReport.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: RevenueReport, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): RevenueReport; - static deserializeBinaryFromReader(message: RevenueReport, reader: jspb.BinaryReader): RevenueReport; -} - -export namespace RevenueReport { - export type AsObject = { - targetChannel: string, - pairReports: Array<[string, PairReport.AsObject]>, - } -} - -export class PairReport extends jspb.Message { - getAmountOutgoingMsat(): number; - setAmountOutgoingMsat(value: number): void; - - getFeesOutgoingMsat(): number; - setFeesOutgoingMsat(value: number): void; - - getAmountIncomingMsat(): number; - setAmountIncomingMsat(value: number): void; - - getFeesIncomingMsat(): number; - setFeesIncomingMsat(value: number): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): PairReport.AsObject; - static toObject(includeInstance: boolean, msg: PairReport): PairReport.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: PairReport, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): PairReport; - static deserializeBinaryFromReader(message: PairReport, reader: jspb.BinaryReader): PairReport; -} - -export namespace PairReport { - export type AsObject = { - amountOutgoingMsat: number, - feesOutgoingMsat: number, - amountIncomingMsat: number, - feesIncomingMsat: number, - } -} - -export class ChannelInsightsRequest extends jspb.Message { - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ChannelInsightsRequest.AsObject; - static toObject(includeInstance: boolean, msg: ChannelInsightsRequest): ChannelInsightsRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ChannelInsightsRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ChannelInsightsRequest; - static deserializeBinaryFromReader(message: ChannelInsightsRequest, reader: jspb.BinaryReader): ChannelInsightsRequest; -} - -export namespace ChannelInsightsRequest { - export type AsObject = { - } -} - -export class ChannelInsightsResponse extends jspb.Message { - clearChannelInsightsList(): void; - getChannelInsightsList(): Array; - setChannelInsightsList(value: Array): void; - addChannelInsights(value?: ChannelInsight, index?: number): ChannelInsight; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ChannelInsightsResponse.AsObject; - static toObject(includeInstance: boolean, msg: ChannelInsightsResponse): ChannelInsightsResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ChannelInsightsResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ChannelInsightsResponse; - static deserializeBinaryFromReader(message: ChannelInsightsResponse, reader: jspb.BinaryReader): ChannelInsightsResponse; -} - -export namespace ChannelInsightsResponse { - export type AsObject = { - channelInsights: Array, - } -} - -export class ChannelInsight extends jspb.Message { - getChanPoint(): string; - setChanPoint(value: string): void; - - getMonitoredSeconds(): number; - setMonitoredSeconds(value: number): void; - - getUptimeSeconds(): number; - setUptimeSeconds(value: number): void; - - getVolumeIncomingMsat(): number; - setVolumeIncomingMsat(value: number): void; - - getVolumeOutgoingMsat(): number; - setVolumeOutgoingMsat(value: number): void; - - getFeesEarnedMsat(): number; - setFeesEarnedMsat(value: number): void; - - getConfirmations(): number; - setConfirmations(value: number): void; - - getPrivate(): boolean; - setPrivate(value: boolean): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ChannelInsight.AsObject; - static toObject(includeInstance: boolean, msg: ChannelInsight): ChannelInsight.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ChannelInsight, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ChannelInsight; - static deserializeBinaryFromReader(message: ChannelInsight, reader: jspb.BinaryReader): ChannelInsight; -} - -export namespace ChannelInsight { - export type AsObject = { - chanPoint: string, - monitoredSeconds: number, - uptimeSeconds: number, - volumeIncomingMsat: number, - volumeOutgoingMsat: number, - feesEarnedMsat: number, - confirmations: number, - pb_private: boolean, - } -} - -export class ExchangeRateRequest extends jspb.Message { - clearTimestampsList(): void; - getTimestampsList(): Array; - setTimestampsList(value: Array): void; - addTimestamps(value: number, index?: number): number; - - getGranularity(): GranularityMap[keyof GranularityMap]; - setGranularity(value: GranularityMap[keyof GranularityMap]): void; - - getFiatBackend(): FiatBackendMap[keyof FiatBackendMap]; - setFiatBackend(value: FiatBackendMap[keyof FiatBackendMap]): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ExchangeRateRequest.AsObject; - static toObject(includeInstance: boolean, msg: ExchangeRateRequest): ExchangeRateRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ExchangeRateRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ExchangeRateRequest; - static deserializeBinaryFromReader(message: ExchangeRateRequest, reader: jspb.BinaryReader): ExchangeRateRequest; -} - -export namespace ExchangeRateRequest { - export type AsObject = { - timestamps: Array, - granularity: GranularityMap[keyof GranularityMap], - fiatBackend: FiatBackendMap[keyof FiatBackendMap], - } -} - -export class ExchangeRateResponse extends jspb.Message { - clearRatesList(): void; - getRatesList(): Array; - setRatesList(value: Array): void; - addRates(value?: ExchangeRate, index?: number): ExchangeRate; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ExchangeRateResponse.AsObject; - static toObject(includeInstance: boolean, msg: ExchangeRateResponse): ExchangeRateResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ExchangeRateResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ExchangeRateResponse; - static deserializeBinaryFromReader(message: ExchangeRateResponse, reader: jspb.BinaryReader): ExchangeRateResponse; -} - -export namespace ExchangeRateResponse { - export type AsObject = { - rates: Array, - } -} - -export class BitcoinPrice extends jspb.Message { - getPrice(): string; - setPrice(value: string): void; - - getPriceTimestamp(): number; - setPriceTimestamp(value: number): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): BitcoinPrice.AsObject; - static toObject(includeInstance: boolean, msg: BitcoinPrice): BitcoinPrice.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: BitcoinPrice, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): BitcoinPrice; - static deserializeBinaryFromReader(message: BitcoinPrice, reader: jspb.BinaryReader): BitcoinPrice; -} - -export namespace BitcoinPrice { - export type AsObject = { - price: string, - priceTimestamp: number, - } -} - -export class ExchangeRate extends jspb.Message { - getTimestamp(): number; - setTimestamp(value: number): void; - - hasBtcPrice(): boolean; - clearBtcPrice(): void; - getBtcPrice(): BitcoinPrice | undefined; - setBtcPrice(value?: BitcoinPrice): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ExchangeRate.AsObject; - static toObject(includeInstance: boolean, msg: ExchangeRate): ExchangeRate.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ExchangeRate, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ExchangeRate; - static deserializeBinaryFromReader(message: ExchangeRate, reader: jspb.BinaryReader): ExchangeRate; -} - -export namespace ExchangeRate { - export type AsObject = { - timestamp: number, - btcPrice?: BitcoinPrice.AsObject, - } -} - -export class NodeAuditRequest extends jspb.Message { - getStartTime(): number; - setStartTime(value: number): void; - - getEndTime(): number; - setEndTime(value: number): void; - - getDisableFiat(): boolean; - setDisableFiat(value: boolean): void; - - getGranularity(): GranularityMap[keyof GranularityMap]; - setGranularity(value: GranularityMap[keyof GranularityMap]): void; - - clearCustomCategoriesList(): void; - getCustomCategoriesList(): Array; - setCustomCategoriesList(value: Array): void; - addCustomCategories(value?: CustomCategory, index?: number): CustomCategory; - - getFiatBackend(): FiatBackendMap[keyof FiatBackendMap]; - setFiatBackend(value: FiatBackendMap[keyof FiatBackendMap]): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): NodeAuditRequest.AsObject; - static toObject(includeInstance: boolean, msg: NodeAuditRequest): NodeAuditRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: NodeAuditRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): NodeAuditRequest; - static deserializeBinaryFromReader(message: NodeAuditRequest, reader: jspb.BinaryReader): NodeAuditRequest; -} - -export namespace NodeAuditRequest { - export type AsObject = { - startTime: number, - endTime: number, - disableFiat: boolean, - granularity: GranularityMap[keyof GranularityMap], - customCategories: Array, - fiatBackend: FiatBackendMap[keyof FiatBackendMap], - } -} - -export class CustomCategory extends jspb.Message { - getName(): string; - setName(value: string): void; - - getOnChain(): boolean; - setOnChain(value: boolean): void; - - getOffChain(): boolean; - setOffChain(value: boolean): void; - - clearLabelPatternsList(): void; - getLabelPatternsList(): Array; - setLabelPatternsList(value: Array): void; - addLabelPatterns(value: string, index?: number): string; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): CustomCategory.AsObject; - static toObject(includeInstance: boolean, msg: CustomCategory): CustomCategory.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: CustomCategory, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): CustomCategory; - static deserializeBinaryFromReader(message: CustomCategory, reader: jspb.BinaryReader): CustomCategory; -} - -export namespace CustomCategory { - export type AsObject = { - name: string, - onChain: boolean, - offChain: boolean, - labelPatterns: Array, - } -} - -export class ReportEntry extends jspb.Message { - getTimestamp(): number; - setTimestamp(value: number): void; - - getOnChain(): boolean; - setOnChain(value: boolean): void; - - getAmount(): number; - setAmount(value: number): void; - - getCredit(): boolean; - setCredit(value: boolean): void; - - getAsset(): string; - setAsset(value: string): void; - - getType(): EntryTypeMap[keyof EntryTypeMap]; - setType(value: EntryTypeMap[keyof EntryTypeMap]): void; - - getCustomCategory(): string; - setCustomCategory(value: string): void; - - getTxid(): string; - setTxid(value: string): void; - - getFiat(): string; - setFiat(value: string): void; - - getReference(): string; - setReference(value: string): void; - - getNote(): string; - setNote(value: string): void; - - hasBtcPrice(): boolean; - clearBtcPrice(): void; - getBtcPrice(): BitcoinPrice | undefined; - setBtcPrice(value?: BitcoinPrice): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ReportEntry.AsObject; - static toObject(includeInstance: boolean, msg: ReportEntry): ReportEntry.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ReportEntry, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ReportEntry; - static deserializeBinaryFromReader(message: ReportEntry, reader: jspb.BinaryReader): ReportEntry; -} - -export namespace ReportEntry { - export type AsObject = { - timestamp: number, - onChain: boolean, - amount: number, - credit: boolean, - asset: string, - type: EntryTypeMap[keyof EntryTypeMap], - customCategory: string, - txid: string, - fiat: string, - reference: string, - note: string, - btcPrice?: BitcoinPrice.AsObject, - } -} - -export class NodeAuditResponse extends jspb.Message { - clearReportsList(): void; - getReportsList(): Array; - setReportsList(value: Array): void; - addReports(value?: ReportEntry, index?: number): ReportEntry; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): NodeAuditResponse.AsObject; - static toObject(includeInstance: boolean, msg: NodeAuditResponse): NodeAuditResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: NodeAuditResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): NodeAuditResponse; - static deserializeBinaryFromReader(message: NodeAuditResponse, reader: jspb.BinaryReader): NodeAuditResponse; -} - -export namespace NodeAuditResponse { - export type AsObject = { - reports: Array, - } -} - -export class CloseReportRequest extends jspb.Message { - getChannelPoint(): string; - setChannelPoint(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): CloseReportRequest.AsObject; - static toObject(includeInstance: boolean, msg: CloseReportRequest): CloseReportRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: CloseReportRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): CloseReportRequest; - static deserializeBinaryFromReader(message: CloseReportRequest, reader: jspb.BinaryReader): CloseReportRequest; -} - -export namespace CloseReportRequest { - export type AsObject = { - channelPoint: string, - } -} - -export class CloseReportResponse extends jspb.Message { - getChannelPoint(): string; - setChannelPoint(value: string): void; - - getChannelInitiator(): boolean; - setChannelInitiator(value: boolean): void; - - getCloseType(): string; - setCloseType(value: string): void; - - getCloseTxid(): string; - setCloseTxid(value: string): void; - - getOpenFee(): string; - setOpenFee(value: string): void; - - getCloseFee(): string; - setCloseFee(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): CloseReportResponse.AsObject; - static toObject(includeInstance: boolean, msg: CloseReportResponse): CloseReportResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: CloseReportResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): CloseReportResponse; - static deserializeBinaryFromReader(message: CloseReportResponse, reader: jspb.BinaryReader): CloseReportResponse; -} - -export namespace CloseReportResponse { - export type AsObject = { - channelPoint: string, - channelInitiator: boolean, - closeType: string, - closeTxid: string, - openFee: string, - closeFee: string, - } -} - -export interface GranularityMap { - UNKNOWN_GRANULARITY: 0; - MINUTE: 1; - FIVE_MINUTES: 2; - FIFTEEN_MINUTES: 3; - THIRTY_MINUTES: 4; - HOUR: 5; - SIX_HOURS: 6; - TWELVE_HOURS: 7; - DAY: 8; -} - -export const Granularity: GranularityMap; - -export interface FiatBackendMap { - UNKNOWN_FIATBACKEND: 0; - COINCAP: 1; - COINDESK: 2; -} - -export const FiatBackend: FiatBackendMap; - -export interface EntryTypeMap { - UNKNOWN: 0; - LOCAL_CHANNEL_OPEN: 1; - REMOTE_CHANNEL_OPEN: 2; - CHANNEL_OPEN_FEE: 3; - CHANNEL_CLOSE: 4; - RECEIPT: 5; - PAYMENT: 6; - FEE: 7; - CIRCULAR_RECEIPT: 8; - FORWARD: 9; - FORWARD_FEE: 10; - CIRCULAR_PAYMENT: 11; - CIRCULAR_FEE: 12; - SWEEP: 13; - SWEEP_FEE: 14; - CHANNEL_CLOSE_FEE: 15; -} - -export const EntryType: EntryTypeMap; - diff --git a/lib/types/generated/faraday_pb.js b/lib/types/generated/faraday_pb.js deleted file mode 100644 index 40bceec..0000000 --- a/lib/types/generated/faraday_pb.js +++ /dev/null @@ -1,5182 +0,0 @@ -// source: faraday.proto -/** - * @fileoverview - * @enhanceable - * @suppress {missingRequire} reports error on implicit type usages. - * @suppress {messageConventions} JS Compiler reports an error if a variable or - * field starts with 'MSG_' and isn't a translatable message. - * @public - */ -// GENERATED CODE -- DO NOT EDIT! -/* eslint-disable */ -// @ts-nocheck - -var jspb = require('google-protobuf'); -var goog = jspb; -var global = Function('return this')(); - -goog.exportSymbol('proto.frdrpc.BitcoinPrice', null, global); -goog.exportSymbol('proto.frdrpc.ChannelInsight', null, global); -goog.exportSymbol('proto.frdrpc.ChannelInsightsRequest', null, global); -goog.exportSymbol('proto.frdrpc.ChannelInsightsResponse', null, global); -goog.exportSymbol('proto.frdrpc.CloseRecommendationRequest', null, global); -goog.exportSymbol('proto.frdrpc.CloseRecommendationRequest.Metric', null, global); -goog.exportSymbol('proto.frdrpc.CloseRecommendationsResponse', null, global); -goog.exportSymbol('proto.frdrpc.CloseReportRequest', null, global); -goog.exportSymbol('proto.frdrpc.CloseReportResponse', null, global); -goog.exportSymbol('proto.frdrpc.CustomCategory', null, global); -goog.exportSymbol('proto.frdrpc.EntryType', null, global); -goog.exportSymbol('proto.frdrpc.ExchangeRate', null, global); -goog.exportSymbol('proto.frdrpc.ExchangeRateRequest', null, global); -goog.exportSymbol('proto.frdrpc.ExchangeRateResponse', null, global); -goog.exportSymbol('proto.frdrpc.FiatBackend', null, global); -goog.exportSymbol('proto.frdrpc.Granularity', null, global); -goog.exportSymbol('proto.frdrpc.NodeAuditRequest', null, global); -goog.exportSymbol('proto.frdrpc.NodeAuditResponse', null, global); -goog.exportSymbol('proto.frdrpc.OutlierRecommendationsRequest', null, global); -goog.exportSymbol('proto.frdrpc.PairReport', null, global); -goog.exportSymbol('proto.frdrpc.Recommendation', null, global); -goog.exportSymbol('proto.frdrpc.ReportEntry', null, global); -goog.exportSymbol('proto.frdrpc.RevenueReport', null, global); -goog.exportSymbol('proto.frdrpc.RevenueReportRequest', null, global); -goog.exportSymbol('proto.frdrpc.RevenueReportResponse', null, global); -goog.exportSymbol('proto.frdrpc.ThresholdRecommendationsRequest', null, global); -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.frdrpc.CloseRecommendationRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.frdrpc.CloseRecommendationRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.frdrpc.CloseRecommendationRequest.displayName = 'proto.frdrpc.CloseRecommendationRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.frdrpc.OutlierRecommendationsRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.frdrpc.OutlierRecommendationsRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.frdrpc.OutlierRecommendationsRequest.displayName = 'proto.frdrpc.OutlierRecommendationsRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.frdrpc.ThresholdRecommendationsRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.frdrpc.ThresholdRecommendationsRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.frdrpc.ThresholdRecommendationsRequest.displayName = 'proto.frdrpc.ThresholdRecommendationsRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.frdrpc.CloseRecommendationsResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.frdrpc.CloseRecommendationsResponse.repeatedFields_, null); -}; -goog.inherits(proto.frdrpc.CloseRecommendationsResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.frdrpc.CloseRecommendationsResponse.displayName = 'proto.frdrpc.CloseRecommendationsResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.frdrpc.Recommendation = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.frdrpc.Recommendation, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.frdrpc.Recommendation.displayName = 'proto.frdrpc.Recommendation'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.frdrpc.RevenueReportRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.frdrpc.RevenueReportRequest.repeatedFields_, null); -}; -goog.inherits(proto.frdrpc.RevenueReportRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.frdrpc.RevenueReportRequest.displayName = 'proto.frdrpc.RevenueReportRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.frdrpc.RevenueReportResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.frdrpc.RevenueReportResponse.repeatedFields_, null); -}; -goog.inherits(proto.frdrpc.RevenueReportResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.frdrpc.RevenueReportResponse.displayName = 'proto.frdrpc.RevenueReportResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.frdrpc.RevenueReport = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.frdrpc.RevenueReport, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.frdrpc.RevenueReport.displayName = 'proto.frdrpc.RevenueReport'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.frdrpc.PairReport = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.frdrpc.PairReport, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.frdrpc.PairReport.displayName = 'proto.frdrpc.PairReport'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.frdrpc.ChannelInsightsRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.frdrpc.ChannelInsightsRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.frdrpc.ChannelInsightsRequest.displayName = 'proto.frdrpc.ChannelInsightsRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.frdrpc.ChannelInsightsResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.frdrpc.ChannelInsightsResponse.repeatedFields_, null); -}; -goog.inherits(proto.frdrpc.ChannelInsightsResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.frdrpc.ChannelInsightsResponse.displayName = 'proto.frdrpc.ChannelInsightsResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.frdrpc.ChannelInsight = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.frdrpc.ChannelInsight, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.frdrpc.ChannelInsight.displayName = 'proto.frdrpc.ChannelInsight'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.frdrpc.ExchangeRateRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.frdrpc.ExchangeRateRequest.repeatedFields_, null); -}; -goog.inherits(proto.frdrpc.ExchangeRateRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.frdrpc.ExchangeRateRequest.displayName = 'proto.frdrpc.ExchangeRateRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.frdrpc.ExchangeRateResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.frdrpc.ExchangeRateResponse.repeatedFields_, null); -}; -goog.inherits(proto.frdrpc.ExchangeRateResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.frdrpc.ExchangeRateResponse.displayName = 'proto.frdrpc.ExchangeRateResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.frdrpc.BitcoinPrice = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.frdrpc.BitcoinPrice, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.frdrpc.BitcoinPrice.displayName = 'proto.frdrpc.BitcoinPrice'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.frdrpc.ExchangeRate = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.frdrpc.ExchangeRate, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.frdrpc.ExchangeRate.displayName = 'proto.frdrpc.ExchangeRate'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.frdrpc.NodeAuditRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.frdrpc.NodeAuditRequest.repeatedFields_, null); -}; -goog.inherits(proto.frdrpc.NodeAuditRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.frdrpc.NodeAuditRequest.displayName = 'proto.frdrpc.NodeAuditRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.frdrpc.CustomCategory = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.frdrpc.CustomCategory.repeatedFields_, null); -}; -goog.inherits(proto.frdrpc.CustomCategory, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.frdrpc.CustomCategory.displayName = 'proto.frdrpc.CustomCategory'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.frdrpc.ReportEntry = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.frdrpc.ReportEntry, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.frdrpc.ReportEntry.displayName = 'proto.frdrpc.ReportEntry'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.frdrpc.NodeAuditResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.frdrpc.NodeAuditResponse.repeatedFields_, null); -}; -goog.inherits(proto.frdrpc.NodeAuditResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.frdrpc.NodeAuditResponse.displayName = 'proto.frdrpc.NodeAuditResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.frdrpc.CloseReportRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.frdrpc.CloseReportRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.frdrpc.CloseReportRequest.displayName = 'proto.frdrpc.CloseReportRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.frdrpc.CloseReportResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.frdrpc.CloseReportResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.frdrpc.CloseReportResponse.displayName = 'proto.frdrpc.CloseReportResponse'; -} - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.frdrpc.CloseRecommendationRequest.prototype.toObject = function(opt_includeInstance) { - return proto.frdrpc.CloseRecommendationRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.frdrpc.CloseRecommendationRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.frdrpc.CloseRecommendationRequest.toObject = function(includeInstance, msg) { - var f, obj = { - minimumMonitored: jspb.Message.getFieldWithDefault(msg, 1, 0), - metric: jspb.Message.getFieldWithDefault(msg, 2, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.frdrpc.CloseRecommendationRequest} - */ -proto.frdrpc.CloseRecommendationRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.frdrpc.CloseRecommendationRequest; - return proto.frdrpc.CloseRecommendationRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.frdrpc.CloseRecommendationRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.frdrpc.CloseRecommendationRequest} - */ -proto.frdrpc.CloseRecommendationRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readInt64()); - msg.setMinimumMonitored(value); - break; - case 2: - var value = /** @type {!proto.frdrpc.CloseRecommendationRequest.Metric} */ (reader.readEnum()); - msg.setMetric(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.frdrpc.CloseRecommendationRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.frdrpc.CloseRecommendationRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.frdrpc.CloseRecommendationRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.frdrpc.CloseRecommendationRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getMinimumMonitored(); - if (f !== 0) { - writer.writeInt64( - 1, - f - ); - } - f = message.getMetric(); - if (f !== 0.0) { - writer.writeEnum( - 2, - f - ); - } -}; - - -/** - * @enum {number} - */ -proto.frdrpc.CloseRecommendationRequest.Metric = { - UNKNOWN: 0, - UPTIME: 1, - REVENUE: 2, - INCOMING_VOLUME: 3, - OUTGOING_VOLUME: 4, - TOTAL_VOLUME: 5 -}; - -/** - * optional int64 minimum_monitored = 1; - * @return {number} - */ -proto.frdrpc.CloseRecommendationRequest.prototype.getMinimumMonitored = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.frdrpc.CloseRecommendationRequest} returns this - */ -proto.frdrpc.CloseRecommendationRequest.prototype.setMinimumMonitored = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); -}; - - -/** - * optional Metric metric = 2; - * @return {!proto.frdrpc.CloseRecommendationRequest.Metric} - */ -proto.frdrpc.CloseRecommendationRequest.prototype.getMetric = function() { - return /** @type {!proto.frdrpc.CloseRecommendationRequest.Metric} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {!proto.frdrpc.CloseRecommendationRequest.Metric} value - * @return {!proto.frdrpc.CloseRecommendationRequest} returns this - */ -proto.frdrpc.CloseRecommendationRequest.prototype.setMetric = function(value) { - return jspb.Message.setProto3EnumField(this, 2, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.frdrpc.OutlierRecommendationsRequest.prototype.toObject = function(opt_includeInstance) { - return proto.frdrpc.OutlierRecommendationsRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.frdrpc.OutlierRecommendationsRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.frdrpc.OutlierRecommendationsRequest.toObject = function(includeInstance, msg) { - var f, obj = { - recRequest: (f = msg.getRecRequest()) && proto.frdrpc.CloseRecommendationRequest.toObject(includeInstance, f), - outlierMultiplier: jspb.Message.getFloatingPointFieldWithDefault(msg, 2, 0.0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.frdrpc.OutlierRecommendationsRequest} - */ -proto.frdrpc.OutlierRecommendationsRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.frdrpc.OutlierRecommendationsRequest; - return proto.frdrpc.OutlierRecommendationsRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.frdrpc.OutlierRecommendationsRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.frdrpc.OutlierRecommendationsRequest} - */ -proto.frdrpc.OutlierRecommendationsRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.frdrpc.CloseRecommendationRequest; - reader.readMessage(value,proto.frdrpc.CloseRecommendationRequest.deserializeBinaryFromReader); - msg.setRecRequest(value); - break; - case 2: - var value = /** @type {number} */ (reader.readFloat()); - msg.setOutlierMultiplier(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.frdrpc.OutlierRecommendationsRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.frdrpc.OutlierRecommendationsRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.frdrpc.OutlierRecommendationsRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.frdrpc.OutlierRecommendationsRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getRecRequest(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.frdrpc.CloseRecommendationRequest.serializeBinaryToWriter - ); - } - f = message.getOutlierMultiplier(); - if (f !== 0.0) { - writer.writeFloat( - 2, - f - ); - } -}; - - -/** - * optional CloseRecommendationRequest rec_request = 1; - * @return {?proto.frdrpc.CloseRecommendationRequest} - */ -proto.frdrpc.OutlierRecommendationsRequest.prototype.getRecRequest = function() { - return /** @type{?proto.frdrpc.CloseRecommendationRequest} */ ( - jspb.Message.getWrapperField(this, proto.frdrpc.CloseRecommendationRequest, 1)); -}; - - -/** - * @param {?proto.frdrpc.CloseRecommendationRequest|undefined} value - * @return {!proto.frdrpc.OutlierRecommendationsRequest} returns this -*/ -proto.frdrpc.OutlierRecommendationsRequest.prototype.setRecRequest = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.frdrpc.OutlierRecommendationsRequest} returns this - */ -proto.frdrpc.OutlierRecommendationsRequest.prototype.clearRecRequest = function() { - return this.setRecRequest(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.frdrpc.OutlierRecommendationsRequest.prototype.hasRecRequest = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional float outlier_multiplier = 2; - * @return {number} - */ -proto.frdrpc.OutlierRecommendationsRequest.prototype.getOutlierMultiplier = function() { - return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 2, 0.0)); -}; - - -/** - * @param {number} value - * @return {!proto.frdrpc.OutlierRecommendationsRequest} returns this - */ -proto.frdrpc.OutlierRecommendationsRequest.prototype.setOutlierMultiplier = function(value) { - return jspb.Message.setProto3FloatField(this, 2, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.frdrpc.ThresholdRecommendationsRequest.prototype.toObject = function(opt_includeInstance) { - return proto.frdrpc.ThresholdRecommendationsRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.frdrpc.ThresholdRecommendationsRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.frdrpc.ThresholdRecommendationsRequest.toObject = function(includeInstance, msg) { - var f, obj = { - recRequest: (f = msg.getRecRequest()) && proto.frdrpc.CloseRecommendationRequest.toObject(includeInstance, f), - thresholdValue: jspb.Message.getFloatingPointFieldWithDefault(msg, 2, 0.0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.frdrpc.ThresholdRecommendationsRequest} - */ -proto.frdrpc.ThresholdRecommendationsRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.frdrpc.ThresholdRecommendationsRequest; - return proto.frdrpc.ThresholdRecommendationsRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.frdrpc.ThresholdRecommendationsRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.frdrpc.ThresholdRecommendationsRequest} - */ -proto.frdrpc.ThresholdRecommendationsRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.frdrpc.CloseRecommendationRequest; - reader.readMessage(value,proto.frdrpc.CloseRecommendationRequest.deserializeBinaryFromReader); - msg.setRecRequest(value); - break; - case 2: - var value = /** @type {number} */ (reader.readFloat()); - msg.setThresholdValue(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.frdrpc.ThresholdRecommendationsRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.frdrpc.ThresholdRecommendationsRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.frdrpc.ThresholdRecommendationsRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.frdrpc.ThresholdRecommendationsRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getRecRequest(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.frdrpc.CloseRecommendationRequest.serializeBinaryToWriter - ); - } - f = message.getThresholdValue(); - if (f !== 0.0) { - writer.writeFloat( - 2, - f - ); - } -}; - - -/** - * optional CloseRecommendationRequest rec_request = 1; - * @return {?proto.frdrpc.CloseRecommendationRequest} - */ -proto.frdrpc.ThresholdRecommendationsRequest.prototype.getRecRequest = function() { - return /** @type{?proto.frdrpc.CloseRecommendationRequest} */ ( - jspb.Message.getWrapperField(this, proto.frdrpc.CloseRecommendationRequest, 1)); -}; - - -/** - * @param {?proto.frdrpc.CloseRecommendationRequest|undefined} value - * @return {!proto.frdrpc.ThresholdRecommendationsRequest} returns this -*/ -proto.frdrpc.ThresholdRecommendationsRequest.prototype.setRecRequest = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.frdrpc.ThresholdRecommendationsRequest} returns this - */ -proto.frdrpc.ThresholdRecommendationsRequest.prototype.clearRecRequest = function() { - return this.setRecRequest(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.frdrpc.ThresholdRecommendationsRequest.prototype.hasRecRequest = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional float threshold_value = 2; - * @return {number} - */ -proto.frdrpc.ThresholdRecommendationsRequest.prototype.getThresholdValue = function() { - return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 2, 0.0)); -}; - - -/** - * @param {number} value - * @return {!proto.frdrpc.ThresholdRecommendationsRequest} returns this - */ -proto.frdrpc.ThresholdRecommendationsRequest.prototype.setThresholdValue = function(value) { - return jspb.Message.setProto3FloatField(this, 2, value); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.frdrpc.CloseRecommendationsResponse.repeatedFields_ = [3]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.frdrpc.CloseRecommendationsResponse.prototype.toObject = function(opt_includeInstance) { - return proto.frdrpc.CloseRecommendationsResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.frdrpc.CloseRecommendationsResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.frdrpc.CloseRecommendationsResponse.toObject = function(includeInstance, msg) { - var f, obj = { - totalChannels: jspb.Message.getFieldWithDefault(msg, 1, 0), - consideredChannels: jspb.Message.getFieldWithDefault(msg, 2, 0), - recommendationsList: jspb.Message.toObjectList(msg.getRecommendationsList(), - proto.frdrpc.Recommendation.toObject, includeInstance) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.frdrpc.CloseRecommendationsResponse} - */ -proto.frdrpc.CloseRecommendationsResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.frdrpc.CloseRecommendationsResponse; - return proto.frdrpc.CloseRecommendationsResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.frdrpc.CloseRecommendationsResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.frdrpc.CloseRecommendationsResponse} - */ -proto.frdrpc.CloseRecommendationsResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readInt32()); - msg.setTotalChannels(value); - break; - case 2: - var value = /** @type {number} */ (reader.readInt32()); - msg.setConsideredChannels(value); - break; - case 3: - var value = new proto.frdrpc.Recommendation; - reader.readMessage(value,proto.frdrpc.Recommendation.deserializeBinaryFromReader); - msg.addRecommendations(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.frdrpc.CloseRecommendationsResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.frdrpc.CloseRecommendationsResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.frdrpc.CloseRecommendationsResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.frdrpc.CloseRecommendationsResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getTotalChannels(); - if (f !== 0) { - writer.writeInt32( - 1, - f - ); - } - f = message.getConsideredChannels(); - if (f !== 0) { - writer.writeInt32( - 2, - f - ); - } - f = message.getRecommendationsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 3, - f, - proto.frdrpc.Recommendation.serializeBinaryToWriter - ); - } -}; - - -/** - * optional int32 total_channels = 1; - * @return {number} - */ -proto.frdrpc.CloseRecommendationsResponse.prototype.getTotalChannels = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.frdrpc.CloseRecommendationsResponse} returns this - */ -proto.frdrpc.CloseRecommendationsResponse.prototype.setTotalChannels = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); -}; - - -/** - * optional int32 considered_channels = 2; - * @return {number} - */ -proto.frdrpc.CloseRecommendationsResponse.prototype.getConsideredChannels = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.frdrpc.CloseRecommendationsResponse} returns this - */ -proto.frdrpc.CloseRecommendationsResponse.prototype.setConsideredChannels = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * repeated Recommendation recommendations = 3; - * @return {!Array} - */ -proto.frdrpc.CloseRecommendationsResponse.prototype.getRecommendationsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.frdrpc.Recommendation, 3)); -}; - - -/** - * @param {!Array} value - * @return {!proto.frdrpc.CloseRecommendationsResponse} returns this -*/ -proto.frdrpc.CloseRecommendationsResponse.prototype.setRecommendationsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 3, value); -}; - - -/** - * @param {!proto.frdrpc.Recommendation=} opt_value - * @param {number=} opt_index - * @return {!proto.frdrpc.Recommendation} - */ -proto.frdrpc.CloseRecommendationsResponse.prototype.addRecommendations = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.frdrpc.Recommendation, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.frdrpc.CloseRecommendationsResponse} returns this - */ -proto.frdrpc.CloseRecommendationsResponse.prototype.clearRecommendationsList = function() { - return this.setRecommendationsList([]); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.frdrpc.Recommendation.prototype.toObject = function(opt_includeInstance) { - return proto.frdrpc.Recommendation.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.frdrpc.Recommendation} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.frdrpc.Recommendation.toObject = function(includeInstance, msg) { - var f, obj = { - chanPoint: jspb.Message.getFieldWithDefault(msg, 1, ""), - value: jspb.Message.getFloatingPointFieldWithDefault(msg, 2, 0.0), - recommendClose: jspb.Message.getBooleanFieldWithDefault(msg, 3, false) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.frdrpc.Recommendation} - */ -proto.frdrpc.Recommendation.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.frdrpc.Recommendation; - return proto.frdrpc.Recommendation.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.frdrpc.Recommendation} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.frdrpc.Recommendation} - */ -proto.frdrpc.Recommendation.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setChanPoint(value); - break; - case 2: - var value = /** @type {number} */ (reader.readFloat()); - msg.setValue(value); - break; - case 3: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setRecommendClose(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.frdrpc.Recommendation.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.frdrpc.Recommendation.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.frdrpc.Recommendation} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.frdrpc.Recommendation.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getChanPoint(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getValue(); - if (f !== 0.0) { - writer.writeFloat( - 2, - f - ); - } - f = message.getRecommendClose(); - if (f) { - writer.writeBool( - 3, - f - ); - } -}; - - -/** - * optional string chan_point = 1; - * @return {string} - */ -proto.frdrpc.Recommendation.prototype.getChanPoint = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.frdrpc.Recommendation} returns this - */ -proto.frdrpc.Recommendation.prototype.setChanPoint = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional float value = 2; - * @return {number} - */ -proto.frdrpc.Recommendation.prototype.getValue = function() { - return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 2, 0.0)); -}; - - -/** - * @param {number} value - * @return {!proto.frdrpc.Recommendation} returns this - */ -proto.frdrpc.Recommendation.prototype.setValue = function(value) { - return jspb.Message.setProto3FloatField(this, 2, value); -}; - - -/** - * optional bool recommend_close = 3; - * @return {boolean} - */ -proto.frdrpc.Recommendation.prototype.getRecommendClose = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.frdrpc.Recommendation} returns this - */ -proto.frdrpc.Recommendation.prototype.setRecommendClose = function(value) { - return jspb.Message.setProto3BooleanField(this, 3, value); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.frdrpc.RevenueReportRequest.repeatedFields_ = [1]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.frdrpc.RevenueReportRequest.prototype.toObject = function(opt_includeInstance) { - return proto.frdrpc.RevenueReportRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.frdrpc.RevenueReportRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.frdrpc.RevenueReportRequest.toObject = function(includeInstance, msg) { - var f, obj = { - chanPointsList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : f, - startTime: jspb.Message.getFieldWithDefault(msg, 2, 0), - endTime: jspb.Message.getFieldWithDefault(msg, 3, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.frdrpc.RevenueReportRequest} - */ -proto.frdrpc.RevenueReportRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.frdrpc.RevenueReportRequest; - return proto.frdrpc.RevenueReportRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.frdrpc.RevenueReportRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.frdrpc.RevenueReportRequest} - */ -proto.frdrpc.RevenueReportRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.addChanPoints(value); - break; - case 2: - var value = /** @type {number} */ (reader.readUint64()); - msg.setStartTime(value); - break; - case 3: - var value = /** @type {number} */ (reader.readUint64()); - msg.setEndTime(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.frdrpc.RevenueReportRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.frdrpc.RevenueReportRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.frdrpc.RevenueReportRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.frdrpc.RevenueReportRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getChanPointsList(); - if (f.length > 0) { - writer.writeRepeatedString( - 1, - f - ); - } - f = message.getStartTime(); - if (f !== 0) { - writer.writeUint64( - 2, - f - ); - } - f = message.getEndTime(); - if (f !== 0) { - writer.writeUint64( - 3, - f - ); - } -}; - - -/** - * repeated string chan_points = 1; - * @return {!Array} - */ -proto.frdrpc.RevenueReportRequest.prototype.getChanPointsList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); -}; - - -/** - * @param {!Array} value - * @return {!proto.frdrpc.RevenueReportRequest} returns this - */ -proto.frdrpc.RevenueReportRequest.prototype.setChanPointsList = function(value) { - return jspb.Message.setField(this, 1, value || []); -}; - - -/** - * @param {string} value - * @param {number=} opt_index - * @return {!proto.frdrpc.RevenueReportRequest} returns this - */ -proto.frdrpc.RevenueReportRequest.prototype.addChanPoints = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 1, value, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.frdrpc.RevenueReportRequest} returns this - */ -proto.frdrpc.RevenueReportRequest.prototype.clearChanPointsList = function() { - return this.setChanPointsList([]); -}; - - -/** - * optional uint64 start_time = 2; - * @return {number} - */ -proto.frdrpc.RevenueReportRequest.prototype.getStartTime = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.frdrpc.RevenueReportRequest} returns this - */ -proto.frdrpc.RevenueReportRequest.prototype.setStartTime = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * optional uint64 end_time = 3; - * @return {number} - */ -proto.frdrpc.RevenueReportRequest.prototype.getEndTime = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.frdrpc.RevenueReportRequest} returns this - */ -proto.frdrpc.RevenueReportRequest.prototype.setEndTime = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.frdrpc.RevenueReportResponse.repeatedFields_ = [1]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.frdrpc.RevenueReportResponse.prototype.toObject = function(opt_includeInstance) { - return proto.frdrpc.RevenueReportResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.frdrpc.RevenueReportResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.frdrpc.RevenueReportResponse.toObject = function(includeInstance, msg) { - var f, obj = { - reportsList: jspb.Message.toObjectList(msg.getReportsList(), - proto.frdrpc.RevenueReport.toObject, includeInstance) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.frdrpc.RevenueReportResponse} - */ -proto.frdrpc.RevenueReportResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.frdrpc.RevenueReportResponse; - return proto.frdrpc.RevenueReportResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.frdrpc.RevenueReportResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.frdrpc.RevenueReportResponse} - */ -proto.frdrpc.RevenueReportResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.frdrpc.RevenueReport; - reader.readMessage(value,proto.frdrpc.RevenueReport.deserializeBinaryFromReader); - msg.addReports(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.frdrpc.RevenueReportResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.frdrpc.RevenueReportResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.frdrpc.RevenueReportResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.frdrpc.RevenueReportResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getReportsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 1, - f, - proto.frdrpc.RevenueReport.serializeBinaryToWriter - ); - } -}; - - -/** - * repeated RevenueReport reports = 1; - * @return {!Array} - */ -proto.frdrpc.RevenueReportResponse.prototype.getReportsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.frdrpc.RevenueReport, 1)); -}; - - -/** - * @param {!Array} value - * @return {!proto.frdrpc.RevenueReportResponse} returns this -*/ -proto.frdrpc.RevenueReportResponse.prototype.setReportsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); -}; - - -/** - * @param {!proto.frdrpc.RevenueReport=} opt_value - * @param {number=} opt_index - * @return {!proto.frdrpc.RevenueReport} - */ -proto.frdrpc.RevenueReportResponse.prototype.addReports = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.frdrpc.RevenueReport, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.frdrpc.RevenueReportResponse} returns this - */ -proto.frdrpc.RevenueReportResponse.prototype.clearReportsList = function() { - return this.setReportsList([]); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.frdrpc.RevenueReport.prototype.toObject = function(opt_includeInstance) { - return proto.frdrpc.RevenueReport.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.frdrpc.RevenueReport} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.frdrpc.RevenueReport.toObject = function(includeInstance, msg) { - var f, obj = { - targetChannel: jspb.Message.getFieldWithDefault(msg, 1, ""), - pairReportsMap: (f = msg.getPairReportsMap()) ? f.toObject(includeInstance, proto.frdrpc.PairReport.toObject) : [] - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.frdrpc.RevenueReport} - */ -proto.frdrpc.RevenueReport.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.frdrpc.RevenueReport; - return proto.frdrpc.RevenueReport.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.frdrpc.RevenueReport} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.frdrpc.RevenueReport} - */ -proto.frdrpc.RevenueReport.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setTargetChannel(value); - break; - case 2: - var value = msg.getPairReportsMap(); - reader.readMessage(value, function(message, reader) { - jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readMessage, proto.frdrpc.PairReport.deserializeBinaryFromReader, "", new proto.frdrpc.PairReport()); - }); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.frdrpc.RevenueReport.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.frdrpc.RevenueReport.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.frdrpc.RevenueReport} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.frdrpc.RevenueReport.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getTargetChannel(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getPairReportsMap(true); - if (f && f.getLength() > 0) { - f.serializeBinary(2, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeMessage, proto.frdrpc.PairReport.serializeBinaryToWriter); - } -}; - - -/** - * optional string target_channel = 1; - * @return {string} - */ -proto.frdrpc.RevenueReport.prototype.getTargetChannel = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.frdrpc.RevenueReport} returns this - */ -proto.frdrpc.RevenueReport.prototype.setTargetChannel = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * map pair_reports = 2; - * @param {boolean=} opt_noLazyCreate Do not create the map if - * empty, instead returning `undefined` - * @return {!jspb.Map} - */ -proto.frdrpc.RevenueReport.prototype.getPairReportsMap = function(opt_noLazyCreate) { - return /** @type {!jspb.Map} */ ( - jspb.Message.getMapField(this, 2, opt_noLazyCreate, - proto.frdrpc.PairReport)); -}; - - -/** - * Clears values from the map. The map will be non-null. - * @return {!proto.frdrpc.RevenueReport} returns this - */ -proto.frdrpc.RevenueReport.prototype.clearPairReportsMap = function() { - this.getPairReportsMap().clear(); - return this;}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.frdrpc.PairReport.prototype.toObject = function(opt_includeInstance) { - return proto.frdrpc.PairReport.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.frdrpc.PairReport} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.frdrpc.PairReport.toObject = function(includeInstance, msg) { - var f, obj = { - amountOutgoingMsat: jspb.Message.getFieldWithDefault(msg, 1, 0), - feesOutgoingMsat: jspb.Message.getFieldWithDefault(msg, 2, 0), - amountIncomingMsat: jspb.Message.getFieldWithDefault(msg, 3, 0), - feesIncomingMsat: jspb.Message.getFieldWithDefault(msg, 4, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.frdrpc.PairReport} - */ -proto.frdrpc.PairReport.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.frdrpc.PairReport; - return proto.frdrpc.PairReport.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.frdrpc.PairReport} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.frdrpc.PairReport} - */ -proto.frdrpc.PairReport.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readInt64()); - msg.setAmountOutgoingMsat(value); - break; - case 2: - var value = /** @type {number} */ (reader.readInt64()); - msg.setFeesOutgoingMsat(value); - break; - case 3: - var value = /** @type {number} */ (reader.readInt64()); - msg.setAmountIncomingMsat(value); - break; - case 4: - var value = /** @type {number} */ (reader.readInt64()); - msg.setFeesIncomingMsat(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.frdrpc.PairReport.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.frdrpc.PairReport.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.frdrpc.PairReport} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.frdrpc.PairReport.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getAmountOutgoingMsat(); - if (f !== 0) { - writer.writeInt64( - 1, - f - ); - } - f = message.getFeesOutgoingMsat(); - if (f !== 0) { - writer.writeInt64( - 2, - f - ); - } - f = message.getAmountIncomingMsat(); - if (f !== 0) { - writer.writeInt64( - 3, - f - ); - } - f = message.getFeesIncomingMsat(); - if (f !== 0) { - writer.writeInt64( - 4, - f - ); - } -}; - - -/** - * optional int64 amount_outgoing_msat = 1; - * @return {number} - */ -proto.frdrpc.PairReport.prototype.getAmountOutgoingMsat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.frdrpc.PairReport} returns this - */ -proto.frdrpc.PairReport.prototype.setAmountOutgoingMsat = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); -}; - - -/** - * optional int64 fees_outgoing_msat = 2; - * @return {number} - */ -proto.frdrpc.PairReport.prototype.getFeesOutgoingMsat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.frdrpc.PairReport} returns this - */ -proto.frdrpc.PairReport.prototype.setFeesOutgoingMsat = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * optional int64 amount_incoming_msat = 3; - * @return {number} - */ -proto.frdrpc.PairReport.prototype.getAmountIncomingMsat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.frdrpc.PairReport} returns this - */ -proto.frdrpc.PairReport.prototype.setAmountIncomingMsat = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - -/** - * optional int64 fees_incoming_msat = 4; - * @return {number} - */ -proto.frdrpc.PairReport.prototype.getFeesIncomingMsat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.frdrpc.PairReport} returns this - */ -proto.frdrpc.PairReport.prototype.setFeesIncomingMsat = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.frdrpc.ChannelInsightsRequest.prototype.toObject = function(opt_includeInstance) { - return proto.frdrpc.ChannelInsightsRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.frdrpc.ChannelInsightsRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.frdrpc.ChannelInsightsRequest.toObject = function(includeInstance, msg) { - var f, obj = { - - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.frdrpc.ChannelInsightsRequest} - */ -proto.frdrpc.ChannelInsightsRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.frdrpc.ChannelInsightsRequest; - return proto.frdrpc.ChannelInsightsRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.frdrpc.ChannelInsightsRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.frdrpc.ChannelInsightsRequest} - */ -proto.frdrpc.ChannelInsightsRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.frdrpc.ChannelInsightsRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.frdrpc.ChannelInsightsRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.frdrpc.ChannelInsightsRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.frdrpc.ChannelInsightsRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.frdrpc.ChannelInsightsResponse.repeatedFields_ = [1]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.frdrpc.ChannelInsightsResponse.prototype.toObject = function(opt_includeInstance) { - return proto.frdrpc.ChannelInsightsResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.frdrpc.ChannelInsightsResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.frdrpc.ChannelInsightsResponse.toObject = function(includeInstance, msg) { - var f, obj = { - channelInsightsList: jspb.Message.toObjectList(msg.getChannelInsightsList(), - proto.frdrpc.ChannelInsight.toObject, includeInstance) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.frdrpc.ChannelInsightsResponse} - */ -proto.frdrpc.ChannelInsightsResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.frdrpc.ChannelInsightsResponse; - return proto.frdrpc.ChannelInsightsResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.frdrpc.ChannelInsightsResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.frdrpc.ChannelInsightsResponse} - */ -proto.frdrpc.ChannelInsightsResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.frdrpc.ChannelInsight; - reader.readMessage(value,proto.frdrpc.ChannelInsight.deserializeBinaryFromReader); - msg.addChannelInsights(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.frdrpc.ChannelInsightsResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.frdrpc.ChannelInsightsResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.frdrpc.ChannelInsightsResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.frdrpc.ChannelInsightsResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getChannelInsightsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 1, - f, - proto.frdrpc.ChannelInsight.serializeBinaryToWriter - ); - } -}; - - -/** - * repeated ChannelInsight channel_insights = 1; - * @return {!Array} - */ -proto.frdrpc.ChannelInsightsResponse.prototype.getChannelInsightsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.frdrpc.ChannelInsight, 1)); -}; - - -/** - * @param {!Array} value - * @return {!proto.frdrpc.ChannelInsightsResponse} returns this -*/ -proto.frdrpc.ChannelInsightsResponse.prototype.setChannelInsightsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); -}; - - -/** - * @param {!proto.frdrpc.ChannelInsight=} opt_value - * @param {number=} opt_index - * @return {!proto.frdrpc.ChannelInsight} - */ -proto.frdrpc.ChannelInsightsResponse.prototype.addChannelInsights = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.frdrpc.ChannelInsight, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.frdrpc.ChannelInsightsResponse} returns this - */ -proto.frdrpc.ChannelInsightsResponse.prototype.clearChannelInsightsList = function() { - return this.setChannelInsightsList([]); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.frdrpc.ChannelInsight.prototype.toObject = function(opt_includeInstance) { - return proto.frdrpc.ChannelInsight.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.frdrpc.ChannelInsight} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.frdrpc.ChannelInsight.toObject = function(includeInstance, msg) { - var f, obj = { - chanPoint: jspb.Message.getFieldWithDefault(msg, 1, ""), - monitoredSeconds: jspb.Message.getFieldWithDefault(msg, 2, 0), - uptimeSeconds: jspb.Message.getFieldWithDefault(msg, 3, 0), - volumeIncomingMsat: jspb.Message.getFieldWithDefault(msg, 4, 0), - volumeOutgoingMsat: jspb.Message.getFieldWithDefault(msg, 5, 0), - feesEarnedMsat: jspb.Message.getFieldWithDefault(msg, 6, 0), - confirmations: jspb.Message.getFieldWithDefault(msg, 7, 0), - pb_private: jspb.Message.getBooleanFieldWithDefault(msg, 8, false) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.frdrpc.ChannelInsight} - */ -proto.frdrpc.ChannelInsight.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.frdrpc.ChannelInsight; - return proto.frdrpc.ChannelInsight.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.frdrpc.ChannelInsight} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.frdrpc.ChannelInsight} - */ -proto.frdrpc.ChannelInsight.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setChanPoint(value); - break; - case 2: - var value = /** @type {number} */ (reader.readUint64()); - msg.setMonitoredSeconds(value); - break; - case 3: - var value = /** @type {number} */ (reader.readUint64()); - msg.setUptimeSeconds(value); - break; - case 4: - var value = /** @type {number} */ (reader.readInt64()); - msg.setVolumeIncomingMsat(value); - break; - case 5: - var value = /** @type {number} */ (reader.readInt64()); - msg.setVolumeOutgoingMsat(value); - break; - case 6: - var value = /** @type {number} */ (reader.readInt64()); - msg.setFeesEarnedMsat(value); - break; - case 7: - var value = /** @type {number} */ (reader.readUint32()); - msg.setConfirmations(value); - break; - case 8: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setPrivate(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.frdrpc.ChannelInsight.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.frdrpc.ChannelInsight.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.frdrpc.ChannelInsight} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.frdrpc.ChannelInsight.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getChanPoint(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getMonitoredSeconds(); - if (f !== 0) { - writer.writeUint64( - 2, - f - ); - } - f = message.getUptimeSeconds(); - if (f !== 0) { - writer.writeUint64( - 3, - f - ); - } - f = message.getVolumeIncomingMsat(); - if (f !== 0) { - writer.writeInt64( - 4, - f - ); - } - f = message.getVolumeOutgoingMsat(); - if (f !== 0) { - writer.writeInt64( - 5, - f - ); - } - f = message.getFeesEarnedMsat(); - if (f !== 0) { - writer.writeInt64( - 6, - f - ); - } - f = message.getConfirmations(); - if (f !== 0) { - writer.writeUint32( - 7, - f - ); - } - f = message.getPrivate(); - if (f) { - writer.writeBool( - 8, - f - ); - } -}; - - -/** - * optional string chan_point = 1; - * @return {string} - */ -proto.frdrpc.ChannelInsight.prototype.getChanPoint = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.frdrpc.ChannelInsight} returns this - */ -proto.frdrpc.ChannelInsight.prototype.setChanPoint = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional uint64 monitored_seconds = 2; - * @return {number} - */ -proto.frdrpc.ChannelInsight.prototype.getMonitoredSeconds = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.frdrpc.ChannelInsight} returns this - */ -proto.frdrpc.ChannelInsight.prototype.setMonitoredSeconds = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * optional uint64 uptime_seconds = 3; - * @return {number} - */ -proto.frdrpc.ChannelInsight.prototype.getUptimeSeconds = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.frdrpc.ChannelInsight} returns this - */ -proto.frdrpc.ChannelInsight.prototype.setUptimeSeconds = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - -/** - * optional int64 volume_incoming_msat = 4; - * @return {number} - */ -proto.frdrpc.ChannelInsight.prototype.getVolumeIncomingMsat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.frdrpc.ChannelInsight} returns this - */ -proto.frdrpc.ChannelInsight.prototype.setVolumeIncomingMsat = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); -}; - - -/** - * optional int64 volume_outgoing_msat = 5; - * @return {number} - */ -proto.frdrpc.ChannelInsight.prototype.getVolumeOutgoingMsat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.frdrpc.ChannelInsight} returns this - */ -proto.frdrpc.ChannelInsight.prototype.setVolumeOutgoingMsat = function(value) { - return jspb.Message.setProto3IntField(this, 5, value); -}; - - -/** - * optional int64 fees_earned_msat = 6; - * @return {number} - */ -proto.frdrpc.ChannelInsight.prototype.getFeesEarnedMsat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.frdrpc.ChannelInsight} returns this - */ -proto.frdrpc.ChannelInsight.prototype.setFeesEarnedMsat = function(value) { - return jspb.Message.setProto3IntField(this, 6, value); -}; - - -/** - * optional uint32 confirmations = 7; - * @return {number} - */ -proto.frdrpc.ChannelInsight.prototype.getConfirmations = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.frdrpc.ChannelInsight} returns this - */ -proto.frdrpc.ChannelInsight.prototype.setConfirmations = function(value) { - return jspb.Message.setProto3IntField(this, 7, value); -}; - - -/** - * optional bool private = 8; - * @return {boolean} - */ -proto.frdrpc.ChannelInsight.prototype.getPrivate = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 8, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.frdrpc.ChannelInsight} returns this - */ -proto.frdrpc.ChannelInsight.prototype.setPrivate = function(value) { - return jspb.Message.setProto3BooleanField(this, 8, value); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.frdrpc.ExchangeRateRequest.repeatedFields_ = [3]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.frdrpc.ExchangeRateRequest.prototype.toObject = function(opt_includeInstance) { - return proto.frdrpc.ExchangeRateRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.frdrpc.ExchangeRateRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.frdrpc.ExchangeRateRequest.toObject = function(includeInstance, msg) { - var f, obj = { - timestampsList: (f = jspb.Message.getRepeatedField(msg, 3)) == null ? undefined : f, - granularity: jspb.Message.getFieldWithDefault(msg, 4, 0), - fiatBackend: jspb.Message.getFieldWithDefault(msg, 5, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.frdrpc.ExchangeRateRequest} - */ -proto.frdrpc.ExchangeRateRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.frdrpc.ExchangeRateRequest; - return proto.frdrpc.ExchangeRateRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.frdrpc.ExchangeRateRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.frdrpc.ExchangeRateRequest} - */ -proto.frdrpc.ExchangeRateRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 3: - var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedUint64() : [reader.readUint64()]); - for (var i = 0; i < values.length; i++) { - msg.addTimestamps(values[i]); - } - break; - case 4: - var value = /** @type {!proto.frdrpc.Granularity} */ (reader.readEnum()); - msg.setGranularity(value); - break; - case 5: - var value = /** @type {!proto.frdrpc.FiatBackend} */ (reader.readEnum()); - msg.setFiatBackend(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.frdrpc.ExchangeRateRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.frdrpc.ExchangeRateRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.frdrpc.ExchangeRateRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.frdrpc.ExchangeRateRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getTimestampsList(); - if (f.length > 0) { - writer.writePackedUint64( - 3, - f - ); - } - f = message.getGranularity(); - if (f !== 0.0) { - writer.writeEnum( - 4, - f - ); - } - f = message.getFiatBackend(); - if (f !== 0.0) { - writer.writeEnum( - 5, - f - ); - } -}; - - -/** - * repeated uint64 timestamps = 3; - * @return {!Array} - */ -proto.frdrpc.ExchangeRateRequest.prototype.getTimestampsList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 3)); -}; - - -/** - * @param {!Array} value - * @return {!proto.frdrpc.ExchangeRateRequest} returns this - */ -proto.frdrpc.ExchangeRateRequest.prototype.setTimestampsList = function(value) { - return jspb.Message.setField(this, 3, value || []); -}; - - -/** - * @param {number} value - * @param {number=} opt_index - * @return {!proto.frdrpc.ExchangeRateRequest} returns this - */ -proto.frdrpc.ExchangeRateRequest.prototype.addTimestamps = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 3, value, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.frdrpc.ExchangeRateRequest} returns this - */ -proto.frdrpc.ExchangeRateRequest.prototype.clearTimestampsList = function() { - return this.setTimestampsList([]); -}; - - -/** - * optional Granularity granularity = 4; - * @return {!proto.frdrpc.Granularity} - */ -proto.frdrpc.ExchangeRateRequest.prototype.getGranularity = function() { - return /** @type {!proto.frdrpc.Granularity} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** - * @param {!proto.frdrpc.Granularity} value - * @return {!proto.frdrpc.ExchangeRateRequest} returns this - */ -proto.frdrpc.ExchangeRateRequest.prototype.setGranularity = function(value) { - return jspb.Message.setProto3EnumField(this, 4, value); -}; - - -/** - * optional FiatBackend fiat_backend = 5; - * @return {!proto.frdrpc.FiatBackend} - */ -proto.frdrpc.ExchangeRateRequest.prototype.getFiatBackend = function() { - return /** @type {!proto.frdrpc.FiatBackend} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); -}; - - -/** - * @param {!proto.frdrpc.FiatBackend} value - * @return {!proto.frdrpc.ExchangeRateRequest} returns this - */ -proto.frdrpc.ExchangeRateRequest.prototype.setFiatBackend = function(value) { - return jspb.Message.setProto3EnumField(this, 5, value); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.frdrpc.ExchangeRateResponse.repeatedFields_ = [2]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.frdrpc.ExchangeRateResponse.prototype.toObject = function(opt_includeInstance) { - return proto.frdrpc.ExchangeRateResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.frdrpc.ExchangeRateResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.frdrpc.ExchangeRateResponse.toObject = function(includeInstance, msg) { - var f, obj = { - ratesList: jspb.Message.toObjectList(msg.getRatesList(), - proto.frdrpc.ExchangeRate.toObject, includeInstance) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.frdrpc.ExchangeRateResponse} - */ -proto.frdrpc.ExchangeRateResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.frdrpc.ExchangeRateResponse; - return proto.frdrpc.ExchangeRateResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.frdrpc.ExchangeRateResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.frdrpc.ExchangeRateResponse} - */ -proto.frdrpc.ExchangeRateResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 2: - var value = new proto.frdrpc.ExchangeRate; - reader.readMessage(value,proto.frdrpc.ExchangeRate.deserializeBinaryFromReader); - msg.addRates(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.frdrpc.ExchangeRateResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.frdrpc.ExchangeRateResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.frdrpc.ExchangeRateResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.frdrpc.ExchangeRateResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getRatesList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 2, - f, - proto.frdrpc.ExchangeRate.serializeBinaryToWriter - ); - } -}; - - -/** - * repeated ExchangeRate rates = 2; - * @return {!Array} - */ -proto.frdrpc.ExchangeRateResponse.prototype.getRatesList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.frdrpc.ExchangeRate, 2)); -}; - - -/** - * @param {!Array} value - * @return {!proto.frdrpc.ExchangeRateResponse} returns this -*/ -proto.frdrpc.ExchangeRateResponse.prototype.setRatesList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 2, value); -}; - - -/** - * @param {!proto.frdrpc.ExchangeRate=} opt_value - * @param {number=} opt_index - * @return {!proto.frdrpc.ExchangeRate} - */ -proto.frdrpc.ExchangeRateResponse.prototype.addRates = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.frdrpc.ExchangeRate, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.frdrpc.ExchangeRateResponse} returns this - */ -proto.frdrpc.ExchangeRateResponse.prototype.clearRatesList = function() { - return this.setRatesList([]); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.frdrpc.BitcoinPrice.prototype.toObject = function(opt_includeInstance) { - return proto.frdrpc.BitcoinPrice.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.frdrpc.BitcoinPrice} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.frdrpc.BitcoinPrice.toObject = function(includeInstance, msg) { - var f, obj = { - price: jspb.Message.getFieldWithDefault(msg, 1, ""), - priceTimestamp: jspb.Message.getFieldWithDefault(msg, 2, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.frdrpc.BitcoinPrice} - */ -proto.frdrpc.BitcoinPrice.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.frdrpc.BitcoinPrice; - return proto.frdrpc.BitcoinPrice.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.frdrpc.BitcoinPrice} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.frdrpc.BitcoinPrice} - */ -proto.frdrpc.BitcoinPrice.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setPrice(value); - break; - case 2: - var value = /** @type {number} */ (reader.readUint64()); - msg.setPriceTimestamp(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.frdrpc.BitcoinPrice.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.frdrpc.BitcoinPrice.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.frdrpc.BitcoinPrice} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.frdrpc.BitcoinPrice.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getPrice(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getPriceTimestamp(); - if (f !== 0) { - writer.writeUint64( - 2, - f - ); - } -}; - - -/** - * optional string price = 1; - * @return {string} - */ -proto.frdrpc.BitcoinPrice.prototype.getPrice = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.frdrpc.BitcoinPrice} returns this - */ -proto.frdrpc.BitcoinPrice.prototype.setPrice = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional uint64 price_timestamp = 2; - * @return {number} - */ -proto.frdrpc.BitcoinPrice.prototype.getPriceTimestamp = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.frdrpc.BitcoinPrice} returns this - */ -proto.frdrpc.BitcoinPrice.prototype.setPriceTimestamp = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.frdrpc.ExchangeRate.prototype.toObject = function(opt_includeInstance) { - return proto.frdrpc.ExchangeRate.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.frdrpc.ExchangeRate} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.frdrpc.ExchangeRate.toObject = function(includeInstance, msg) { - var f, obj = { - timestamp: jspb.Message.getFieldWithDefault(msg, 1, 0), - btcPrice: (f = msg.getBtcPrice()) && proto.frdrpc.BitcoinPrice.toObject(includeInstance, f) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.frdrpc.ExchangeRate} - */ -proto.frdrpc.ExchangeRate.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.frdrpc.ExchangeRate; - return proto.frdrpc.ExchangeRate.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.frdrpc.ExchangeRate} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.frdrpc.ExchangeRate} - */ -proto.frdrpc.ExchangeRate.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readUint64()); - msg.setTimestamp(value); - break; - case 2: - var value = new proto.frdrpc.BitcoinPrice; - reader.readMessage(value,proto.frdrpc.BitcoinPrice.deserializeBinaryFromReader); - msg.setBtcPrice(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.frdrpc.ExchangeRate.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.frdrpc.ExchangeRate.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.frdrpc.ExchangeRate} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.frdrpc.ExchangeRate.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getTimestamp(); - if (f !== 0) { - writer.writeUint64( - 1, - f - ); - } - f = message.getBtcPrice(); - if (f != null) { - writer.writeMessage( - 2, - f, - proto.frdrpc.BitcoinPrice.serializeBinaryToWriter - ); - } -}; - - -/** - * optional uint64 timestamp = 1; - * @return {number} - */ -proto.frdrpc.ExchangeRate.prototype.getTimestamp = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.frdrpc.ExchangeRate} returns this - */ -proto.frdrpc.ExchangeRate.prototype.setTimestamp = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); -}; - - -/** - * optional BitcoinPrice btc_price = 2; - * @return {?proto.frdrpc.BitcoinPrice} - */ -proto.frdrpc.ExchangeRate.prototype.getBtcPrice = function() { - return /** @type{?proto.frdrpc.BitcoinPrice} */ ( - jspb.Message.getWrapperField(this, proto.frdrpc.BitcoinPrice, 2)); -}; - - -/** - * @param {?proto.frdrpc.BitcoinPrice|undefined} value - * @return {!proto.frdrpc.ExchangeRate} returns this -*/ -proto.frdrpc.ExchangeRate.prototype.setBtcPrice = function(value) { - return jspb.Message.setWrapperField(this, 2, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.frdrpc.ExchangeRate} returns this - */ -proto.frdrpc.ExchangeRate.prototype.clearBtcPrice = function() { - return this.setBtcPrice(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.frdrpc.ExchangeRate.prototype.hasBtcPrice = function() { - return jspb.Message.getField(this, 2) != null; -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.frdrpc.NodeAuditRequest.repeatedFields_ = [6]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.frdrpc.NodeAuditRequest.prototype.toObject = function(opt_includeInstance) { - return proto.frdrpc.NodeAuditRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.frdrpc.NodeAuditRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.frdrpc.NodeAuditRequest.toObject = function(includeInstance, msg) { - var f, obj = { - startTime: jspb.Message.getFieldWithDefault(msg, 1, 0), - endTime: jspb.Message.getFieldWithDefault(msg, 2, 0), - disableFiat: jspb.Message.getBooleanFieldWithDefault(msg, 4, false), - granularity: jspb.Message.getFieldWithDefault(msg, 5, 0), - customCategoriesList: jspb.Message.toObjectList(msg.getCustomCategoriesList(), - proto.frdrpc.CustomCategory.toObject, includeInstance), - fiatBackend: jspb.Message.getFieldWithDefault(msg, 7, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.frdrpc.NodeAuditRequest} - */ -proto.frdrpc.NodeAuditRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.frdrpc.NodeAuditRequest; - return proto.frdrpc.NodeAuditRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.frdrpc.NodeAuditRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.frdrpc.NodeAuditRequest} - */ -proto.frdrpc.NodeAuditRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readUint64()); - msg.setStartTime(value); - break; - case 2: - var value = /** @type {number} */ (reader.readUint64()); - msg.setEndTime(value); - break; - case 4: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setDisableFiat(value); - break; - case 5: - var value = /** @type {!proto.frdrpc.Granularity} */ (reader.readEnum()); - msg.setGranularity(value); - break; - case 6: - var value = new proto.frdrpc.CustomCategory; - reader.readMessage(value,proto.frdrpc.CustomCategory.deserializeBinaryFromReader); - msg.addCustomCategories(value); - break; - case 7: - var value = /** @type {!proto.frdrpc.FiatBackend} */ (reader.readEnum()); - msg.setFiatBackend(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.frdrpc.NodeAuditRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.frdrpc.NodeAuditRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.frdrpc.NodeAuditRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.frdrpc.NodeAuditRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getStartTime(); - if (f !== 0) { - writer.writeUint64( - 1, - f - ); - } - f = message.getEndTime(); - if (f !== 0) { - writer.writeUint64( - 2, - f - ); - } - f = message.getDisableFiat(); - if (f) { - writer.writeBool( - 4, - f - ); - } - f = message.getGranularity(); - if (f !== 0.0) { - writer.writeEnum( - 5, - f - ); - } - f = message.getCustomCategoriesList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 6, - f, - proto.frdrpc.CustomCategory.serializeBinaryToWriter - ); - } - f = message.getFiatBackend(); - if (f !== 0.0) { - writer.writeEnum( - 7, - f - ); - } -}; - - -/** - * optional uint64 start_time = 1; - * @return {number} - */ -proto.frdrpc.NodeAuditRequest.prototype.getStartTime = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.frdrpc.NodeAuditRequest} returns this - */ -proto.frdrpc.NodeAuditRequest.prototype.setStartTime = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); -}; - - -/** - * optional uint64 end_time = 2; - * @return {number} - */ -proto.frdrpc.NodeAuditRequest.prototype.getEndTime = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.frdrpc.NodeAuditRequest} returns this - */ -proto.frdrpc.NodeAuditRequest.prototype.setEndTime = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * optional bool disable_fiat = 4; - * @return {boolean} - */ -proto.frdrpc.NodeAuditRequest.prototype.getDisableFiat = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 4, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.frdrpc.NodeAuditRequest} returns this - */ -proto.frdrpc.NodeAuditRequest.prototype.setDisableFiat = function(value) { - return jspb.Message.setProto3BooleanField(this, 4, value); -}; - - -/** - * optional Granularity granularity = 5; - * @return {!proto.frdrpc.Granularity} - */ -proto.frdrpc.NodeAuditRequest.prototype.getGranularity = function() { - return /** @type {!proto.frdrpc.Granularity} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); -}; - - -/** - * @param {!proto.frdrpc.Granularity} value - * @return {!proto.frdrpc.NodeAuditRequest} returns this - */ -proto.frdrpc.NodeAuditRequest.prototype.setGranularity = function(value) { - return jspb.Message.setProto3EnumField(this, 5, value); -}; - - -/** - * repeated CustomCategory custom_categories = 6; - * @return {!Array} - */ -proto.frdrpc.NodeAuditRequest.prototype.getCustomCategoriesList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.frdrpc.CustomCategory, 6)); -}; - - -/** - * @param {!Array} value - * @return {!proto.frdrpc.NodeAuditRequest} returns this -*/ -proto.frdrpc.NodeAuditRequest.prototype.setCustomCategoriesList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 6, value); -}; - - -/** - * @param {!proto.frdrpc.CustomCategory=} opt_value - * @param {number=} opt_index - * @return {!proto.frdrpc.CustomCategory} - */ -proto.frdrpc.NodeAuditRequest.prototype.addCustomCategories = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 6, opt_value, proto.frdrpc.CustomCategory, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.frdrpc.NodeAuditRequest} returns this - */ -proto.frdrpc.NodeAuditRequest.prototype.clearCustomCategoriesList = function() { - return this.setCustomCategoriesList([]); -}; - - -/** - * optional FiatBackend fiat_backend = 7; - * @return {!proto.frdrpc.FiatBackend} - */ -proto.frdrpc.NodeAuditRequest.prototype.getFiatBackend = function() { - return /** @type {!proto.frdrpc.FiatBackend} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); -}; - - -/** - * @param {!proto.frdrpc.FiatBackend} value - * @return {!proto.frdrpc.NodeAuditRequest} returns this - */ -proto.frdrpc.NodeAuditRequest.prototype.setFiatBackend = function(value) { - return jspb.Message.setProto3EnumField(this, 7, value); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.frdrpc.CustomCategory.repeatedFields_ = [5]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.frdrpc.CustomCategory.prototype.toObject = function(opt_includeInstance) { - return proto.frdrpc.CustomCategory.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.frdrpc.CustomCategory} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.frdrpc.CustomCategory.toObject = function(includeInstance, msg) { - var f, obj = { - name: jspb.Message.getFieldWithDefault(msg, 1, ""), - onChain: jspb.Message.getBooleanFieldWithDefault(msg, 2, false), - offChain: jspb.Message.getBooleanFieldWithDefault(msg, 3, false), - labelPatternsList: (f = jspb.Message.getRepeatedField(msg, 5)) == null ? undefined : f - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.frdrpc.CustomCategory} - */ -proto.frdrpc.CustomCategory.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.frdrpc.CustomCategory; - return proto.frdrpc.CustomCategory.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.frdrpc.CustomCategory} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.frdrpc.CustomCategory} - */ -proto.frdrpc.CustomCategory.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setName(value); - break; - case 2: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setOnChain(value); - break; - case 3: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setOffChain(value); - break; - case 5: - var value = /** @type {string} */ (reader.readString()); - msg.addLabelPatterns(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.frdrpc.CustomCategory.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.frdrpc.CustomCategory.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.frdrpc.CustomCategory} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.frdrpc.CustomCategory.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getName(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getOnChain(); - if (f) { - writer.writeBool( - 2, - f - ); - } - f = message.getOffChain(); - if (f) { - writer.writeBool( - 3, - f - ); - } - f = message.getLabelPatternsList(); - if (f.length > 0) { - writer.writeRepeatedString( - 5, - f - ); - } -}; - - -/** - * optional string name = 1; - * @return {string} - */ -proto.frdrpc.CustomCategory.prototype.getName = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.frdrpc.CustomCategory} returns this - */ -proto.frdrpc.CustomCategory.prototype.setName = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional bool on_chain = 2; - * @return {boolean} - */ -proto.frdrpc.CustomCategory.prototype.getOnChain = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.frdrpc.CustomCategory} returns this - */ -proto.frdrpc.CustomCategory.prototype.setOnChain = function(value) { - return jspb.Message.setProto3BooleanField(this, 2, value); -}; - - -/** - * optional bool off_chain = 3; - * @return {boolean} - */ -proto.frdrpc.CustomCategory.prototype.getOffChain = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.frdrpc.CustomCategory} returns this - */ -proto.frdrpc.CustomCategory.prototype.setOffChain = function(value) { - return jspb.Message.setProto3BooleanField(this, 3, value); -}; - - -/** - * repeated string label_patterns = 5; - * @return {!Array} - */ -proto.frdrpc.CustomCategory.prototype.getLabelPatternsList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 5)); -}; - - -/** - * @param {!Array} value - * @return {!proto.frdrpc.CustomCategory} returns this - */ -proto.frdrpc.CustomCategory.prototype.setLabelPatternsList = function(value) { - return jspb.Message.setField(this, 5, value || []); -}; - - -/** - * @param {string} value - * @param {number=} opt_index - * @return {!proto.frdrpc.CustomCategory} returns this - */ -proto.frdrpc.CustomCategory.prototype.addLabelPatterns = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 5, value, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.frdrpc.CustomCategory} returns this - */ -proto.frdrpc.CustomCategory.prototype.clearLabelPatternsList = function() { - return this.setLabelPatternsList([]); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.frdrpc.ReportEntry.prototype.toObject = function(opt_includeInstance) { - return proto.frdrpc.ReportEntry.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.frdrpc.ReportEntry} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.frdrpc.ReportEntry.toObject = function(includeInstance, msg) { - var f, obj = { - timestamp: jspb.Message.getFieldWithDefault(msg, 1, 0), - onChain: jspb.Message.getBooleanFieldWithDefault(msg, 2, false), - amount: jspb.Message.getFieldWithDefault(msg, 3, 0), - credit: jspb.Message.getBooleanFieldWithDefault(msg, 4, false), - asset: jspb.Message.getFieldWithDefault(msg, 5, ""), - type: jspb.Message.getFieldWithDefault(msg, 6, 0), - customCategory: jspb.Message.getFieldWithDefault(msg, 12, ""), - txid: jspb.Message.getFieldWithDefault(msg, 7, ""), - fiat: jspb.Message.getFieldWithDefault(msg, 8, ""), - reference: jspb.Message.getFieldWithDefault(msg, 9, ""), - note: jspb.Message.getFieldWithDefault(msg, 10, ""), - btcPrice: (f = msg.getBtcPrice()) && proto.frdrpc.BitcoinPrice.toObject(includeInstance, f) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.frdrpc.ReportEntry} - */ -proto.frdrpc.ReportEntry.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.frdrpc.ReportEntry; - return proto.frdrpc.ReportEntry.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.frdrpc.ReportEntry} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.frdrpc.ReportEntry} - */ -proto.frdrpc.ReportEntry.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readUint64()); - msg.setTimestamp(value); - break; - case 2: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setOnChain(value); - break; - case 3: - var value = /** @type {number} */ (reader.readUint64()); - msg.setAmount(value); - break; - case 4: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setCredit(value); - break; - case 5: - var value = /** @type {string} */ (reader.readString()); - msg.setAsset(value); - break; - case 6: - var value = /** @type {!proto.frdrpc.EntryType} */ (reader.readEnum()); - msg.setType(value); - break; - case 12: - var value = /** @type {string} */ (reader.readString()); - msg.setCustomCategory(value); - break; - case 7: - var value = /** @type {string} */ (reader.readString()); - msg.setTxid(value); - break; - case 8: - var value = /** @type {string} */ (reader.readString()); - msg.setFiat(value); - break; - case 9: - var value = /** @type {string} */ (reader.readString()); - msg.setReference(value); - break; - case 10: - var value = /** @type {string} */ (reader.readString()); - msg.setNote(value); - break; - case 11: - var value = new proto.frdrpc.BitcoinPrice; - reader.readMessage(value,proto.frdrpc.BitcoinPrice.deserializeBinaryFromReader); - msg.setBtcPrice(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.frdrpc.ReportEntry.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.frdrpc.ReportEntry.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.frdrpc.ReportEntry} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.frdrpc.ReportEntry.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getTimestamp(); - if (f !== 0) { - writer.writeUint64( - 1, - f - ); - } - f = message.getOnChain(); - if (f) { - writer.writeBool( - 2, - f - ); - } - f = message.getAmount(); - if (f !== 0) { - writer.writeUint64( - 3, - f - ); - } - f = message.getCredit(); - if (f) { - writer.writeBool( - 4, - f - ); - } - f = message.getAsset(); - if (f.length > 0) { - writer.writeString( - 5, - f - ); - } - f = message.getType(); - if (f !== 0.0) { - writer.writeEnum( - 6, - f - ); - } - f = message.getCustomCategory(); - if (f.length > 0) { - writer.writeString( - 12, - f - ); - } - f = message.getTxid(); - if (f.length > 0) { - writer.writeString( - 7, - f - ); - } - f = message.getFiat(); - if (f.length > 0) { - writer.writeString( - 8, - f - ); - } - f = message.getReference(); - if (f.length > 0) { - writer.writeString( - 9, - f - ); - } - f = message.getNote(); - if (f.length > 0) { - writer.writeString( - 10, - f - ); - } - f = message.getBtcPrice(); - if (f != null) { - writer.writeMessage( - 11, - f, - proto.frdrpc.BitcoinPrice.serializeBinaryToWriter - ); - } -}; - - -/** - * optional uint64 timestamp = 1; - * @return {number} - */ -proto.frdrpc.ReportEntry.prototype.getTimestamp = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.frdrpc.ReportEntry} returns this - */ -proto.frdrpc.ReportEntry.prototype.setTimestamp = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); -}; - - -/** - * optional bool on_chain = 2; - * @return {boolean} - */ -proto.frdrpc.ReportEntry.prototype.getOnChain = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.frdrpc.ReportEntry} returns this - */ -proto.frdrpc.ReportEntry.prototype.setOnChain = function(value) { - return jspb.Message.setProto3BooleanField(this, 2, value); -}; - - -/** - * optional uint64 amount = 3; - * @return {number} - */ -proto.frdrpc.ReportEntry.prototype.getAmount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.frdrpc.ReportEntry} returns this - */ -proto.frdrpc.ReportEntry.prototype.setAmount = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - -/** - * optional bool credit = 4; - * @return {boolean} - */ -proto.frdrpc.ReportEntry.prototype.getCredit = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 4, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.frdrpc.ReportEntry} returns this - */ -proto.frdrpc.ReportEntry.prototype.setCredit = function(value) { - return jspb.Message.setProto3BooleanField(this, 4, value); -}; - - -/** - * optional string asset = 5; - * @return {string} - */ -proto.frdrpc.ReportEntry.prototype.getAsset = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); -}; - - -/** - * @param {string} value - * @return {!proto.frdrpc.ReportEntry} returns this - */ -proto.frdrpc.ReportEntry.prototype.setAsset = function(value) { - return jspb.Message.setProto3StringField(this, 5, value); -}; - - -/** - * optional EntryType type = 6; - * @return {!proto.frdrpc.EntryType} - */ -proto.frdrpc.ReportEntry.prototype.getType = function() { - return /** @type {!proto.frdrpc.EntryType} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); -}; - - -/** - * @param {!proto.frdrpc.EntryType} value - * @return {!proto.frdrpc.ReportEntry} returns this - */ -proto.frdrpc.ReportEntry.prototype.setType = function(value) { - return jspb.Message.setProto3EnumField(this, 6, value); -}; - - -/** - * optional string custom_category = 12; - * @return {string} - */ -proto.frdrpc.ReportEntry.prototype.getCustomCategory = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 12, "")); -}; - - -/** - * @param {string} value - * @return {!proto.frdrpc.ReportEntry} returns this - */ -proto.frdrpc.ReportEntry.prototype.setCustomCategory = function(value) { - return jspb.Message.setProto3StringField(this, 12, value); -}; - - -/** - * optional string txid = 7; - * @return {string} - */ -proto.frdrpc.ReportEntry.prototype.getTxid = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); -}; - - -/** - * @param {string} value - * @return {!proto.frdrpc.ReportEntry} returns this - */ -proto.frdrpc.ReportEntry.prototype.setTxid = function(value) { - return jspb.Message.setProto3StringField(this, 7, value); -}; - - -/** - * optional string fiat = 8; - * @return {string} - */ -proto.frdrpc.ReportEntry.prototype.getFiat = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, "")); -}; - - -/** - * @param {string} value - * @return {!proto.frdrpc.ReportEntry} returns this - */ -proto.frdrpc.ReportEntry.prototype.setFiat = function(value) { - return jspb.Message.setProto3StringField(this, 8, value); -}; - - -/** - * optional string reference = 9; - * @return {string} - */ -proto.frdrpc.ReportEntry.prototype.getReference = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 9, "")); -}; - - -/** - * @param {string} value - * @return {!proto.frdrpc.ReportEntry} returns this - */ -proto.frdrpc.ReportEntry.prototype.setReference = function(value) { - return jspb.Message.setProto3StringField(this, 9, value); -}; - - -/** - * optional string note = 10; - * @return {string} - */ -proto.frdrpc.ReportEntry.prototype.getNote = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 10, "")); -}; - - -/** - * @param {string} value - * @return {!proto.frdrpc.ReportEntry} returns this - */ -proto.frdrpc.ReportEntry.prototype.setNote = function(value) { - return jspb.Message.setProto3StringField(this, 10, value); -}; - - -/** - * optional BitcoinPrice btc_price = 11; - * @return {?proto.frdrpc.BitcoinPrice} - */ -proto.frdrpc.ReportEntry.prototype.getBtcPrice = function() { - return /** @type{?proto.frdrpc.BitcoinPrice} */ ( - jspb.Message.getWrapperField(this, proto.frdrpc.BitcoinPrice, 11)); -}; - - -/** - * @param {?proto.frdrpc.BitcoinPrice|undefined} value - * @return {!proto.frdrpc.ReportEntry} returns this -*/ -proto.frdrpc.ReportEntry.prototype.setBtcPrice = function(value) { - return jspb.Message.setWrapperField(this, 11, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.frdrpc.ReportEntry} returns this - */ -proto.frdrpc.ReportEntry.prototype.clearBtcPrice = function() { - return this.setBtcPrice(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.frdrpc.ReportEntry.prototype.hasBtcPrice = function() { - return jspb.Message.getField(this, 11) != null; -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.frdrpc.NodeAuditResponse.repeatedFields_ = [1]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.frdrpc.NodeAuditResponse.prototype.toObject = function(opt_includeInstance) { - return proto.frdrpc.NodeAuditResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.frdrpc.NodeAuditResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.frdrpc.NodeAuditResponse.toObject = function(includeInstance, msg) { - var f, obj = { - reportsList: jspb.Message.toObjectList(msg.getReportsList(), - proto.frdrpc.ReportEntry.toObject, includeInstance) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.frdrpc.NodeAuditResponse} - */ -proto.frdrpc.NodeAuditResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.frdrpc.NodeAuditResponse; - return proto.frdrpc.NodeAuditResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.frdrpc.NodeAuditResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.frdrpc.NodeAuditResponse} - */ -proto.frdrpc.NodeAuditResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.frdrpc.ReportEntry; - reader.readMessage(value,proto.frdrpc.ReportEntry.deserializeBinaryFromReader); - msg.addReports(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.frdrpc.NodeAuditResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.frdrpc.NodeAuditResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.frdrpc.NodeAuditResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.frdrpc.NodeAuditResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getReportsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 1, - f, - proto.frdrpc.ReportEntry.serializeBinaryToWriter - ); - } -}; - - -/** - * repeated ReportEntry reports = 1; - * @return {!Array} - */ -proto.frdrpc.NodeAuditResponse.prototype.getReportsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.frdrpc.ReportEntry, 1)); -}; - - -/** - * @param {!Array} value - * @return {!proto.frdrpc.NodeAuditResponse} returns this -*/ -proto.frdrpc.NodeAuditResponse.prototype.setReportsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); -}; - - -/** - * @param {!proto.frdrpc.ReportEntry=} opt_value - * @param {number=} opt_index - * @return {!proto.frdrpc.ReportEntry} - */ -proto.frdrpc.NodeAuditResponse.prototype.addReports = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.frdrpc.ReportEntry, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.frdrpc.NodeAuditResponse} returns this - */ -proto.frdrpc.NodeAuditResponse.prototype.clearReportsList = function() { - return this.setReportsList([]); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.frdrpc.CloseReportRequest.prototype.toObject = function(opt_includeInstance) { - return proto.frdrpc.CloseReportRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.frdrpc.CloseReportRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.frdrpc.CloseReportRequest.toObject = function(includeInstance, msg) { - var f, obj = { - channelPoint: jspb.Message.getFieldWithDefault(msg, 1, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.frdrpc.CloseReportRequest} - */ -proto.frdrpc.CloseReportRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.frdrpc.CloseReportRequest; - return proto.frdrpc.CloseReportRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.frdrpc.CloseReportRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.frdrpc.CloseReportRequest} - */ -proto.frdrpc.CloseReportRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setChannelPoint(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.frdrpc.CloseReportRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.frdrpc.CloseReportRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.frdrpc.CloseReportRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.frdrpc.CloseReportRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getChannelPoint(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } -}; - - -/** - * optional string channel_point = 1; - * @return {string} - */ -proto.frdrpc.CloseReportRequest.prototype.getChannelPoint = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.frdrpc.CloseReportRequest} returns this - */ -proto.frdrpc.CloseReportRequest.prototype.setChannelPoint = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.frdrpc.CloseReportResponse.prototype.toObject = function(opt_includeInstance) { - return proto.frdrpc.CloseReportResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.frdrpc.CloseReportResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.frdrpc.CloseReportResponse.toObject = function(includeInstance, msg) { - var f, obj = { - channelPoint: jspb.Message.getFieldWithDefault(msg, 1, ""), - channelInitiator: jspb.Message.getBooleanFieldWithDefault(msg, 2, false), - closeType: jspb.Message.getFieldWithDefault(msg, 3, ""), - closeTxid: jspb.Message.getFieldWithDefault(msg, 4, ""), - openFee: jspb.Message.getFieldWithDefault(msg, 5, ""), - closeFee: jspb.Message.getFieldWithDefault(msg, 6, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.frdrpc.CloseReportResponse} - */ -proto.frdrpc.CloseReportResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.frdrpc.CloseReportResponse; - return proto.frdrpc.CloseReportResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.frdrpc.CloseReportResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.frdrpc.CloseReportResponse} - */ -proto.frdrpc.CloseReportResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setChannelPoint(value); - break; - case 2: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setChannelInitiator(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setCloseType(value); - break; - case 4: - var value = /** @type {string} */ (reader.readString()); - msg.setCloseTxid(value); - break; - case 5: - var value = /** @type {string} */ (reader.readString()); - msg.setOpenFee(value); - break; - case 6: - var value = /** @type {string} */ (reader.readString()); - msg.setCloseFee(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.frdrpc.CloseReportResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.frdrpc.CloseReportResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.frdrpc.CloseReportResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.frdrpc.CloseReportResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getChannelPoint(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getChannelInitiator(); - if (f) { - writer.writeBool( - 2, - f - ); - } - f = message.getCloseType(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } - f = message.getCloseTxid(); - if (f.length > 0) { - writer.writeString( - 4, - f - ); - } - f = message.getOpenFee(); - if (f.length > 0) { - writer.writeString( - 5, - f - ); - } - f = message.getCloseFee(); - if (f.length > 0) { - writer.writeString( - 6, - f - ); - } -}; - - -/** - * optional string channel_point = 1; - * @return {string} - */ -proto.frdrpc.CloseReportResponse.prototype.getChannelPoint = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.frdrpc.CloseReportResponse} returns this - */ -proto.frdrpc.CloseReportResponse.prototype.setChannelPoint = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional bool channel_initiator = 2; - * @return {boolean} - */ -proto.frdrpc.CloseReportResponse.prototype.getChannelInitiator = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.frdrpc.CloseReportResponse} returns this - */ -proto.frdrpc.CloseReportResponse.prototype.setChannelInitiator = function(value) { - return jspb.Message.setProto3BooleanField(this, 2, value); -}; - - -/** - * optional string close_type = 3; - * @return {string} - */ -proto.frdrpc.CloseReportResponse.prototype.getCloseType = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * @param {string} value - * @return {!proto.frdrpc.CloseReportResponse} returns this - */ -proto.frdrpc.CloseReportResponse.prototype.setCloseType = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); -}; - - -/** - * optional string close_txid = 4; - * @return {string} - */ -proto.frdrpc.CloseReportResponse.prototype.getCloseTxid = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); -}; - - -/** - * @param {string} value - * @return {!proto.frdrpc.CloseReportResponse} returns this - */ -proto.frdrpc.CloseReportResponse.prototype.setCloseTxid = function(value) { - return jspb.Message.setProto3StringField(this, 4, value); -}; - - -/** - * optional string open_fee = 5; - * @return {string} - */ -proto.frdrpc.CloseReportResponse.prototype.getOpenFee = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); -}; - - -/** - * @param {string} value - * @return {!proto.frdrpc.CloseReportResponse} returns this - */ -proto.frdrpc.CloseReportResponse.prototype.setOpenFee = function(value) { - return jspb.Message.setProto3StringField(this, 5, value); -}; - - -/** - * optional string close_fee = 6; - * @return {string} - */ -proto.frdrpc.CloseReportResponse.prototype.getCloseFee = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); -}; - - -/** - * @param {string} value - * @return {!proto.frdrpc.CloseReportResponse} returns this - */ -proto.frdrpc.CloseReportResponse.prototype.setCloseFee = function(value) { - return jspb.Message.setProto3StringField(this, 6, value); -}; - - -/** - * @enum {number} - */ -proto.frdrpc.Granularity = { - UNKNOWN_GRANULARITY: 0, - MINUTE: 1, - FIVE_MINUTES: 2, - FIFTEEN_MINUTES: 3, - THIRTY_MINUTES: 4, - HOUR: 5, - SIX_HOURS: 6, - TWELVE_HOURS: 7, - DAY: 8 -}; - -/** - * @enum {number} - */ -proto.frdrpc.FiatBackend = { - UNKNOWN_FIATBACKEND: 0, - COINCAP: 1, - COINDESK: 2 -}; - -/** - * @enum {number} - */ -proto.frdrpc.EntryType = { - UNKNOWN: 0, - LOCAL_CHANNEL_OPEN: 1, - REMOTE_CHANNEL_OPEN: 2, - CHANNEL_OPEN_FEE: 3, - CHANNEL_CLOSE: 4, - RECEIPT: 5, - PAYMENT: 6, - FEE: 7, - CIRCULAR_RECEIPT: 8, - FORWARD: 9, - FORWARD_FEE: 10, - CIRCULAR_PAYMENT: 11, - CIRCULAR_FEE: 12, - SWEEP: 13, - SWEEP_FEE: 14, - CHANNEL_CLOSE_FEE: 15 -}; - -goog.object.extend(exports, proto.frdrpc); diff --git a/lib/types/generated/faraday_pb_service.d.ts b/lib/types/generated/faraday_pb_service.d.ts deleted file mode 100644 index 9cb24c0..0000000 --- a/lib/types/generated/faraday_pb_service.d.ts +++ /dev/null @@ -1,177 +0,0 @@ -// package: frdrpc -// file: faraday.proto - -import * as faraday_pb from "./faraday_pb"; -import {grpc} from "@improbable-eng/grpc-web"; - -type FaradayServerOutlierRecommendations = { - readonly methodName: string; - readonly service: typeof FaradayServer; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof faraday_pb.OutlierRecommendationsRequest; - readonly responseType: typeof faraday_pb.CloseRecommendationsResponse; -}; - -type FaradayServerThresholdRecommendations = { - readonly methodName: string; - readonly service: typeof FaradayServer; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof faraday_pb.ThresholdRecommendationsRequest; - readonly responseType: typeof faraday_pb.CloseRecommendationsResponse; -}; - -type FaradayServerRevenueReport = { - readonly methodName: string; - readonly service: typeof FaradayServer; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof faraday_pb.RevenueReportRequest; - readonly responseType: typeof faraday_pb.RevenueReportResponse; -}; - -type FaradayServerChannelInsights = { - readonly methodName: string; - readonly service: typeof FaradayServer; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof faraday_pb.ChannelInsightsRequest; - readonly responseType: typeof faraday_pb.ChannelInsightsResponse; -}; - -type FaradayServerExchangeRate = { - readonly methodName: string; - readonly service: typeof FaradayServer; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof faraday_pb.ExchangeRateRequest; - readonly responseType: typeof faraday_pb.ExchangeRateResponse; -}; - -type FaradayServerNodeAudit = { - readonly methodName: string; - readonly service: typeof FaradayServer; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof faraday_pb.NodeAuditRequest; - readonly responseType: typeof faraday_pb.NodeAuditResponse; -}; - -type FaradayServerCloseReport = { - readonly methodName: string; - readonly service: typeof FaradayServer; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof faraday_pb.CloseReportRequest; - readonly responseType: typeof faraday_pb.CloseReportResponse; -}; - -export class FaradayServer { - static readonly serviceName: string; - static readonly OutlierRecommendations: FaradayServerOutlierRecommendations; - static readonly ThresholdRecommendations: FaradayServerThresholdRecommendations; - static readonly RevenueReport: FaradayServerRevenueReport; - static readonly ChannelInsights: FaradayServerChannelInsights; - static readonly ExchangeRate: FaradayServerExchangeRate; - static readonly NodeAudit: FaradayServerNodeAudit; - static readonly CloseReport: FaradayServerCloseReport; -} - -export type ServiceError = { message: string, code: number; metadata: grpc.Metadata } -export type Status = { details: string, code: number; metadata: grpc.Metadata } - -interface UnaryResponse { - cancel(): void; -} -interface ResponseStream { - cancel(): void; - on(type: 'data', handler: (message: T) => void): ResponseStream; - on(type: 'end', handler: (status?: Status) => void): ResponseStream; - on(type: 'status', handler: (status: Status) => void): ResponseStream; -} -interface RequestStream { - write(message: T): RequestStream; - end(): void; - cancel(): void; - on(type: 'end', handler: (status?: Status) => void): RequestStream; - on(type: 'status', handler: (status: Status) => void): RequestStream; -} -interface BidirectionalStream { - write(message: ReqT): BidirectionalStream; - end(): void; - cancel(): void; - on(type: 'data', handler: (message: ResT) => void): BidirectionalStream; - on(type: 'end', handler: (status?: Status) => void): BidirectionalStream; - on(type: 'status', handler: (status: Status) => void): BidirectionalStream; -} - -export class FaradayServerClient { - readonly serviceHost: string; - - constructor(serviceHost: string, options?: grpc.RpcOptions); - outlierRecommendations( - requestMessage: faraday_pb.OutlierRecommendationsRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: faraday_pb.CloseRecommendationsResponse|null) => void - ): UnaryResponse; - outlierRecommendations( - requestMessage: faraday_pb.OutlierRecommendationsRequest, - callback: (error: ServiceError|null, responseMessage: faraday_pb.CloseRecommendationsResponse|null) => void - ): UnaryResponse; - thresholdRecommendations( - requestMessage: faraday_pb.ThresholdRecommendationsRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: faraday_pb.CloseRecommendationsResponse|null) => void - ): UnaryResponse; - thresholdRecommendations( - requestMessage: faraday_pb.ThresholdRecommendationsRequest, - callback: (error: ServiceError|null, responseMessage: faraday_pb.CloseRecommendationsResponse|null) => void - ): UnaryResponse; - revenueReport( - requestMessage: faraday_pb.RevenueReportRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: faraday_pb.RevenueReportResponse|null) => void - ): UnaryResponse; - revenueReport( - requestMessage: faraday_pb.RevenueReportRequest, - callback: (error: ServiceError|null, responseMessage: faraday_pb.RevenueReportResponse|null) => void - ): UnaryResponse; - channelInsights( - requestMessage: faraday_pb.ChannelInsightsRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: faraday_pb.ChannelInsightsResponse|null) => void - ): UnaryResponse; - channelInsights( - requestMessage: faraday_pb.ChannelInsightsRequest, - callback: (error: ServiceError|null, responseMessage: faraday_pb.ChannelInsightsResponse|null) => void - ): UnaryResponse; - exchangeRate( - requestMessage: faraday_pb.ExchangeRateRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: faraday_pb.ExchangeRateResponse|null) => void - ): UnaryResponse; - exchangeRate( - requestMessage: faraday_pb.ExchangeRateRequest, - callback: (error: ServiceError|null, responseMessage: faraday_pb.ExchangeRateResponse|null) => void - ): UnaryResponse; - nodeAudit( - requestMessage: faraday_pb.NodeAuditRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: faraday_pb.NodeAuditResponse|null) => void - ): UnaryResponse; - nodeAudit( - requestMessage: faraday_pb.NodeAuditRequest, - callback: (error: ServiceError|null, responseMessage: faraday_pb.NodeAuditResponse|null) => void - ): UnaryResponse; - closeReport( - requestMessage: faraday_pb.CloseReportRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: faraday_pb.CloseReportResponse|null) => void - ): UnaryResponse; - closeReport( - requestMessage: faraday_pb.CloseReportRequest, - callback: (error: ServiceError|null, responseMessage: faraday_pb.CloseReportResponse|null) => void - ): UnaryResponse; -} - diff --git a/lib/types/generated/faraday_pb_service.js b/lib/types/generated/faraday_pb_service.js deleted file mode 100644 index 7bf9ad0..0000000 --- a/lib/types/generated/faraday_pb_service.js +++ /dev/null @@ -1,301 +0,0 @@ -// package: frdrpc -// file: faraday.proto - -var faraday_pb = require("./faraday_pb"); -var grpc = require("@improbable-eng/grpc-web").grpc; - -var FaradayServer = (function () { - function FaradayServer() {} - FaradayServer.serviceName = "frdrpc.FaradayServer"; - return FaradayServer; -}()); - -FaradayServer.OutlierRecommendations = { - methodName: "OutlierRecommendations", - service: FaradayServer, - requestStream: false, - responseStream: false, - requestType: faraday_pb.OutlierRecommendationsRequest, - responseType: faraday_pb.CloseRecommendationsResponse -}; - -FaradayServer.ThresholdRecommendations = { - methodName: "ThresholdRecommendations", - service: FaradayServer, - requestStream: false, - responseStream: false, - requestType: faraday_pb.ThresholdRecommendationsRequest, - responseType: faraday_pb.CloseRecommendationsResponse -}; - -FaradayServer.RevenueReport = { - methodName: "RevenueReport", - service: FaradayServer, - requestStream: false, - responseStream: false, - requestType: faraday_pb.RevenueReportRequest, - responseType: faraday_pb.RevenueReportResponse -}; - -FaradayServer.ChannelInsights = { - methodName: "ChannelInsights", - service: FaradayServer, - requestStream: false, - responseStream: false, - requestType: faraday_pb.ChannelInsightsRequest, - responseType: faraday_pb.ChannelInsightsResponse -}; - -FaradayServer.ExchangeRate = { - methodName: "ExchangeRate", - service: FaradayServer, - requestStream: false, - responseStream: false, - requestType: faraday_pb.ExchangeRateRequest, - responseType: faraday_pb.ExchangeRateResponse -}; - -FaradayServer.NodeAudit = { - methodName: "NodeAudit", - service: FaradayServer, - requestStream: false, - responseStream: false, - requestType: faraday_pb.NodeAuditRequest, - responseType: faraday_pb.NodeAuditResponse -}; - -FaradayServer.CloseReport = { - methodName: "CloseReport", - service: FaradayServer, - requestStream: false, - responseStream: false, - requestType: faraday_pb.CloseReportRequest, - responseType: faraday_pb.CloseReportResponse -}; - -exports.FaradayServer = FaradayServer; - -function FaradayServerClient(serviceHost, options) { - this.serviceHost = serviceHost; - this.options = options || {}; -} - -FaradayServerClient.prototype.outlierRecommendations = function outlierRecommendations(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(FaradayServer.OutlierRecommendations, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -FaradayServerClient.prototype.thresholdRecommendations = function thresholdRecommendations(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(FaradayServer.ThresholdRecommendations, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -FaradayServerClient.prototype.revenueReport = function revenueReport(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(FaradayServer.RevenueReport, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -FaradayServerClient.prototype.channelInsights = function channelInsights(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(FaradayServer.ChannelInsights, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -FaradayServerClient.prototype.exchangeRate = function exchangeRate(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(FaradayServer.ExchangeRate, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -FaradayServerClient.prototype.nodeAudit = function nodeAudit(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(FaradayServer.NodeAudit, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -FaradayServerClient.prototype.closeReport = function closeReport(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(FaradayServer.CloseReport, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -exports.FaradayServerClient = FaradayServerClient; - diff --git a/lib/types/generated/invoicesrpc/invoices_pb.d.ts b/lib/types/generated/invoicesrpc/invoices_pb.d.ts deleted file mode 100644 index 2e174a8..0000000 --- a/lib/types/generated/invoicesrpc/invoices_pb.d.ts +++ /dev/null @@ -1,256 +0,0 @@ -// package: invoicesrpc -// file: invoicesrpc/invoices.proto - -import * as jspb from "google-protobuf"; -import * as lightning_pb from "../lightning_pb"; - -export class CancelInvoiceMsg extends jspb.Message { - getPaymentHash(): Uint8Array | string; - getPaymentHash_asU8(): Uint8Array; - getPaymentHash_asB64(): string; - setPaymentHash(value: Uint8Array | string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): CancelInvoiceMsg.AsObject; - static toObject(includeInstance: boolean, msg: CancelInvoiceMsg): CancelInvoiceMsg.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: CancelInvoiceMsg, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): CancelInvoiceMsg; - static deserializeBinaryFromReader(message: CancelInvoiceMsg, reader: jspb.BinaryReader): CancelInvoiceMsg; -} - -export namespace CancelInvoiceMsg { - export type AsObject = { - paymentHash: Uint8Array | string, - } -} - -export class CancelInvoiceResp extends jspb.Message { - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): CancelInvoiceResp.AsObject; - static toObject(includeInstance: boolean, msg: CancelInvoiceResp): CancelInvoiceResp.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: CancelInvoiceResp, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): CancelInvoiceResp; - static deserializeBinaryFromReader(message: CancelInvoiceResp, reader: jspb.BinaryReader): CancelInvoiceResp; -} - -export namespace CancelInvoiceResp { - export type AsObject = { - } -} - -export class AddHoldInvoiceRequest extends jspb.Message { - getMemo(): string; - setMemo(value: string): void; - - getHash(): Uint8Array | string; - getHash_asU8(): Uint8Array; - getHash_asB64(): string; - setHash(value: Uint8Array | string): void; - - getValue(): number; - setValue(value: number): void; - - getValueMsat(): number; - setValueMsat(value: number): void; - - getDescriptionHash(): Uint8Array | string; - getDescriptionHash_asU8(): Uint8Array; - getDescriptionHash_asB64(): string; - setDescriptionHash(value: Uint8Array | string): void; - - getExpiry(): number; - setExpiry(value: number): void; - - getFallbackAddr(): string; - setFallbackAddr(value: string): void; - - getCltvExpiry(): number; - setCltvExpiry(value: number): void; - - clearRouteHintsList(): void; - getRouteHintsList(): Array; - setRouteHintsList(value: Array): void; - addRouteHints(value?: lightning_pb.RouteHint, index?: number): lightning_pb.RouteHint; - - getPrivate(): boolean; - setPrivate(value: boolean): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): AddHoldInvoiceRequest.AsObject; - static toObject(includeInstance: boolean, msg: AddHoldInvoiceRequest): AddHoldInvoiceRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: AddHoldInvoiceRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): AddHoldInvoiceRequest; - static deserializeBinaryFromReader(message: AddHoldInvoiceRequest, reader: jspb.BinaryReader): AddHoldInvoiceRequest; -} - -export namespace AddHoldInvoiceRequest { - export type AsObject = { - memo: string, - hash: Uint8Array | string, - value: number, - valueMsat: number, - descriptionHash: Uint8Array | string, - expiry: number, - fallbackAddr: string, - cltvExpiry: number, - routeHints: Array, - pb_private: boolean, - } -} - -export class AddHoldInvoiceResp extends jspb.Message { - getPaymentRequest(): string; - setPaymentRequest(value: string): void; - - getAddIndex(): number; - setAddIndex(value: number): void; - - getPaymentAddr(): Uint8Array | string; - getPaymentAddr_asU8(): Uint8Array; - getPaymentAddr_asB64(): string; - setPaymentAddr(value: Uint8Array | string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): AddHoldInvoiceResp.AsObject; - static toObject(includeInstance: boolean, msg: AddHoldInvoiceResp): AddHoldInvoiceResp.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: AddHoldInvoiceResp, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): AddHoldInvoiceResp; - static deserializeBinaryFromReader(message: AddHoldInvoiceResp, reader: jspb.BinaryReader): AddHoldInvoiceResp; -} - -export namespace AddHoldInvoiceResp { - export type AsObject = { - paymentRequest: string, - addIndex: number, - paymentAddr: Uint8Array | string, - } -} - -export class SettleInvoiceMsg extends jspb.Message { - getPreimage(): Uint8Array | string; - getPreimage_asU8(): Uint8Array; - getPreimage_asB64(): string; - setPreimage(value: Uint8Array | string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): SettleInvoiceMsg.AsObject; - static toObject(includeInstance: boolean, msg: SettleInvoiceMsg): SettleInvoiceMsg.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: SettleInvoiceMsg, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): SettleInvoiceMsg; - static deserializeBinaryFromReader(message: SettleInvoiceMsg, reader: jspb.BinaryReader): SettleInvoiceMsg; -} - -export namespace SettleInvoiceMsg { - export type AsObject = { - preimage: Uint8Array | string, - } -} - -export class SettleInvoiceResp extends jspb.Message { - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): SettleInvoiceResp.AsObject; - static toObject(includeInstance: boolean, msg: SettleInvoiceResp): SettleInvoiceResp.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: SettleInvoiceResp, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): SettleInvoiceResp; - static deserializeBinaryFromReader(message: SettleInvoiceResp, reader: jspb.BinaryReader): SettleInvoiceResp; -} - -export namespace SettleInvoiceResp { - export type AsObject = { - } -} - -export class SubscribeSingleInvoiceRequest extends jspb.Message { - getRHash(): Uint8Array | string; - getRHash_asU8(): Uint8Array; - getRHash_asB64(): string; - setRHash(value: Uint8Array | string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): SubscribeSingleInvoiceRequest.AsObject; - static toObject(includeInstance: boolean, msg: SubscribeSingleInvoiceRequest): SubscribeSingleInvoiceRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: SubscribeSingleInvoiceRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): SubscribeSingleInvoiceRequest; - static deserializeBinaryFromReader(message: SubscribeSingleInvoiceRequest, reader: jspb.BinaryReader): SubscribeSingleInvoiceRequest; -} - -export namespace SubscribeSingleInvoiceRequest { - export type AsObject = { - rHash: Uint8Array | string, - } -} - -export class LookupInvoiceMsg extends jspb.Message { - hasPaymentHash(): boolean; - clearPaymentHash(): void; - getPaymentHash(): Uint8Array | string; - getPaymentHash_asU8(): Uint8Array; - getPaymentHash_asB64(): string; - setPaymentHash(value: Uint8Array | string): void; - - hasPaymentAddr(): boolean; - clearPaymentAddr(): void; - getPaymentAddr(): Uint8Array | string; - getPaymentAddr_asU8(): Uint8Array; - getPaymentAddr_asB64(): string; - setPaymentAddr(value: Uint8Array | string): void; - - hasSetId(): boolean; - clearSetId(): void; - getSetId(): Uint8Array | string; - getSetId_asU8(): Uint8Array; - getSetId_asB64(): string; - setSetId(value: Uint8Array | string): void; - - getLookupModifier(): LookupModifierMap[keyof LookupModifierMap]; - setLookupModifier(value: LookupModifierMap[keyof LookupModifierMap]): void; - - getInvoiceRefCase(): LookupInvoiceMsg.InvoiceRefCase; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): LookupInvoiceMsg.AsObject; - static toObject(includeInstance: boolean, msg: LookupInvoiceMsg): LookupInvoiceMsg.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: LookupInvoiceMsg, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): LookupInvoiceMsg; - static deserializeBinaryFromReader(message: LookupInvoiceMsg, reader: jspb.BinaryReader): LookupInvoiceMsg; -} - -export namespace LookupInvoiceMsg { - export type AsObject = { - paymentHash: Uint8Array | string, - paymentAddr: Uint8Array | string, - setId: Uint8Array | string, - lookupModifier: LookupModifierMap[keyof LookupModifierMap], - } - - export enum InvoiceRefCase { - INVOICE_REF_NOT_SET = 0, - PAYMENT_HASH = 1, - PAYMENT_ADDR = 2, - SET_ID = 3, - } -} - -export interface LookupModifierMap { - DEFAULT: 0; - HTLC_SET_ONLY: 1; - HTLC_SET_BLANK: 2; -} - -export const LookupModifier: LookupModifierMap; - diff --git a/lib/types/generated/invoicesrpc/invoices_pb.js b/lib/types/generated/invoicesrpc/invoices_pb.js deleted file mode 100644 index 6ac514f..0000000 --- a/lib/types/generated/invoicesrpc/invoices_pb.js +++ /dev/null @@ -1,1936 +0,0 @@ -// source: invoicesrpc/invoices.proto -/** - * @fileoverview - * @enhanceable - * @suppress {missingRequire} reports error on implicit type usages. - * @suppress {messageConventions} JS Compiler reports an error if a variable or - * field starts with 'MSG_' and isn't a translatable message. - * @public - */ -// GENERATED CODE -- DO NOT EDIT! -/* eslint-disable */ -// @ts-nocheck - -var jspb = require('google-protobuf'); -var goog = jspb; -var global = Function('return this')(); - -var lightning_pb = require('../lightning_pb.js'); -goog.object.extend(proto, lightning_pb); -goog.exportSymbol('proto.invoicesrpc.AddHoldInvoiceRequest', null, global); -goog.exportSymbol('proto.invoicesrpc.AddHoldInvoiceResp', null, global); -goog.exportSymbol('proto.invoicesrpc.CancelInvoiceMsg', null, global); -goog.exportSymbol('proto.invoicesrpc.CancelInvoiceResp', null, global); -goog.exportSymbol('proto.invoicesrpc.LookupInvoiceMsg', null, global); -goog.exportSymbol('proto.invoicesrpc.LookupInvoiceMsg.InvoiceRefCase', null, global); -goog.exportSymbol('proto.invoicesrpc.LookupModifier', null, global); -goog.exportSymbol('proto.invoicesrpc.SettleInvoiceMsg', null, global); -goog.exportSymbol('proto.invoicesrpc.SettleInvoiceResp', null, global); -goog.exportSymbol('proto.invoicesrpc.SubscribeSingleInvoiceRequest', null, global); -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.invoicesrpc.CancelInvoiceMsg = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.invoicesrpc.CancelInvoiceMsg, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.invoicesrpc.CancelInvoiceMsg.displayName = 'proto.invoicesrpc.CancelInvoiceMsg'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.invoicesrpc.CancelInvoiceResp = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.invoicesrpc.CancelInvoiceResp, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.invoicesrpc.CancelInvoiceResp.displayName = 'proto.invoicesrpc.CancelInvoiceResp'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.invoicesrpc.AddHoldInvoiceRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.invoicesrpc.AddHoldInvoiceRequest.repeatedFields_, null); -}; -goog.inherits(proto.invoicesrpc.AddHoldInvoiceRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.invoicesrpc.AddHoldInvoiceRequest.displayName = 'proto.invoicesrpc.AddHoldInvoiceRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.invoicesrpc.AddHoldInvoiceResp = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.invoicesrpc.AddHoldInvoiceResp, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.invoicesrpc.AddHoldInvoiceResp.displayName = 'proto.invoicesrpc.AddHoldInvoiceResp'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.invoicesrpc.SettleInvoiceMsg = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.invoicesrpc.SettleInvoiceMsg, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.invoicesrpc.SettleInvoiceMsg.displayName = 'proto.invoicesrpc.SettleInvoiceMsg'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.invoicesrpc.SettleInvoiceResp = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.invoicesrpc.SettleInvoiceResp, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.invoicesrpc.SettleInvoiceResp.displayName = 'proto.invoicesrpc.SettleInvoiceResp'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.invoicesrpc.SubscribeSingleInvoiceRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.invoicesrpc.SubscribeSingleInvoiceRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.invoicesrpc.SubscribeSingleInvoiceRequest.displayName = 'proto.invoicesrpc.SubscribeSingleInvoiceRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.invoicesrpc.LookupInvoiceMsg = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.invoicesrpc.LookupInvoiceMsg.oneofGroups_); -}; -goog.inherits(proto.invoicesrpc.LookupInvoiceMsg, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.invoicesrpc.LookupInvoiceMsg.displayName = 'proto.invoicesrpc.LookupInvoiceMsg'; -} - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.invoicesrpc.CancelInvoiceMsg.prototype.toObject = function(opt_includeInstance) { - return proto.invoicesrpc.CancelInvoiceMsg.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.invoicesrpc.CancelInvoiceMsg} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.invoicesrpc.CancelInvoiceMsg.toObject = function(includeInstance, msg) { - var f, obj = { - paymentHash: msg.getPaymentHash_asB64() - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.invoicesrpc.CancelInvoiceMsg} - */ -proto.invoicesrpc.CancelInvoiceMsg.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.invoicesrpc.CancelInvoiceMsg; - return proto.invoicesrpc.CancelInvoiceMsg.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.invoicesrpc.CancelInvoiceMsg} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.invoicesrpc.CancelInvoiceMsg} - */ -proto.invoicesrpc.CancelInvoiceMsg.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setPaymentHash(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.invoicesrpc.CancelInvoiceMsg.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.invoicesrpc.CancelInvoiceMsg.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.invoicesrpc.CancelInvoiceMsg} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.invoicesrpc.CancelInvoiceMsg.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getPaymentHash_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } -}; - - -/** - * optional bytes payment_hash = 1; - * @return {!(string|Uint8Array)} - */ -proto.invoicesrpc.CancelInvoiceMsg.prototype.getPaymentHash = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes payment_hash = 1; - * This is a type-conversion wrapper around `getPaymentHash()` - * @return {string} - */ -proto.invoicesrpc.CancelInvoiceMsg.prototype.getPaymentHash_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getPaymentHash())); -}; - - -/** - * optional bytes payment_hash = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getPaymentHash()` - * @return {!Uint8Array} - */ -proto.invoicesrpc.CancelInvoiceMsg.prototype.getPaymentHash_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getPaymentHash())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.invoicesrpc.CancelInvoiceMsg} returns this - */ -proto.invoicesrpc.CancelInvoiceMsg.prototype.setPaymentHash = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.invoicesrpc.CancelInvoiceResp.prototype.toObject = function(opt_includeInstance) { - return proto.invoicesrpc.CancelInvoiceResp.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.invoicesrpc.CancelInvoiceResp} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.invoicesrpc.CancelInvoiceResp.toObject = function(includeInstance, msg) { - var f, obj = { - - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.invoicesrpc.CancelInvoiceResp} - */ -proto.invoicesrpc.CancelInvoiceResp.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.invoicesrpc.CancelInvoiceResp; - return proto.invoicesrpc.CancelInvoiceResp.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.invoicesrpc.CancelInvoiceResp} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.invoicesrpc.CancelInvoiceResp} - */ -proto.invoicesrpc.CancelInvoiceResp.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.invoicesrpc.CancelInvoiceResp.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.invoicesrpc.CancelInvoiceResp.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.invoicesrpc.CancelInvoiceResp} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.invoicesrpc.CancelInvoiceResp.serializeBinaryToWriter = function(message, writer) { - var f = undefined; -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.invoicesrpc.AddHoldInvoiceRequest.repeatedFields_ = [8]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.invoicesrpc.AddHoldInvoiceRequest.prototype.toObject = function(opt_includeInstance) { - return proto.invoicesrpc.AddHoldInvoiceRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.invoicesrpc.AddHoldInvoiceRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.invoicesrpc.AddHoldInvoiceRequest.toObject = function(includeInstance, msg) { - var f, obj = { - memo: jspb.Message.getFieldWithDefault(msg, 1, ""), - hash: msg.getHash_asB64(), - value: jspb.Message.getFieldWithDefault(msg, 3, 0), - valueMsat: jspb.Message.getFieldWithDefault(msg, 10, 0), - descriptionHash: msg.getDescriptionHash_asB64(), - expiry: jspb.Message.getFieldWithDefault(msg, 5, 0), - fallbackAddr: jspb.Message.getFieldWithDefault(msg, 6, ""), - cltvExpiry: jspb.Message.getFieldWithDefault(msg, 7, 0), - routeHintsList: jspb.Message.toObjectList(msg.getRouteHintsList(), - lightning_pb.RouteHint.toObject, includeInstance), - pb_private: jspb.Message.getBooleanFieldWithDefault(msg, 9, false) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.invoicesrpc.AddHoldInvoiceRequest} - */ -proto.invoicesrpc.AddHoldInvoiceRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.invoicesrpc.AddHoldInvoiceRequest; - return proto.invoicesrpc.AddHoldInvoiceRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.invoicesrpc.AddHoldInvoiceRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.invoicesrpc.AddHoldInvoiceRequest} - */ -proto.invoicesrpc.AddHoldInvoiceRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setMemo(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setHash(value); - break; - case 3: - var value = /** @type {number} */ (reader.readInt64()); - msg.setValue(value); - break; - case 10: - var value = /** @type {number} */ (reader.readInt64()); - msg.setValueMsat(value); - break; - case 4: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setDescriptionHash(value); - break; - case 5: - var value = /** @type {number} */ (reader.readInt64()); - msg.setExpiry(value); - break; - case 6: - var value = /** @type {string} */ (reader.readString()); - msg.setFallbackAddr(value); - break; - case 7: - var value = /** @type {number} */ (reader.readUint64()); - msg.setCltvExpiry(value); - break; - case 8: - var value = new lightning_pb.RouteHint; - reader.readMessage(value,lightning_pb.RouteHint.deserializeBinaryFromReader); - msg.addRouteHints(value); - break; - case 9: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setPrivate(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.invoicesrpc.AddHoldInvoiceRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.invoicesrpc.AddHoldInvoiceRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.invoicesrpc.AddHoldInvoiceRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.invoicesrpc.AddHoldInvoiceRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getMemo(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getHash_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } - f = message.getValue(); - if (f !== 0) { - writer.writeInt64( - 3, - f - ); - } - f = message.getValueMsat(); - if (f !== 0) { - writer.writeInt64( - 10, - f - ); - } - f = message.getDescriptionHash_asU8(); - if (f.length > 0) { - writer.writeBytes( - 4, - f - ); - } - f = message.getExpiry(); - if (f !== 0) { - writer.writeInt64( - 5, - f - ); - } - f = message.getFallbackAddr(); - if (f.length > 0) { - writer.writeString( - 6, - f - ); - } - f = message.getCltvExpiry(); - if (f !== 0) { - writer.writeUint64( - 7, - f - ); - } - f = message.getRouteHintsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 8, - f, - lightning_pb.RouteHint.serializeBinaryToWriter - ); - } - f = message.getPrivate(); - if (f) { - writer.writeBool( - 9, - f - ); - } -}; - - -/** - * optional string memo = 1; - * @return {string} - */ -proto.invoicesrpc.AddHoldInvoiceRequest.prototype.getMemo = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.invoicesrpc.AddHoldInvoiceRequest} returns this - */ -proto.invoicesrpc.AddHoldInvoiceRequest.prototype.setMemo = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional bytes hash = 2; - * @return {!(string|Uint8Array)} - */ -proto.invoicesrpc.AddHoldInvoiceRequest.prototype.getHash = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes hash = 2; - * This is a type-conversion wrapper around `getHash()` - * @return {string} - */ -proto.invoicesrpc.AddHoldInvoiceRequest.prototype.getHash_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getHash())); -}; - - -/** - * optional bytes hash = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getHash()` - * @return {!Uint8Array} - */ -proto.invoicesrpc.AddHoldInvoiceRequest.prototype.getHash_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getHash())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.invoicesrpc.AddHoldInvoiceRequest} returns this - */ -proto.invoicesrpc.AddHoldInvoiceRequest.prototype.setHash = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); -}; - - -/** - * optional int64 value = 3; - * @return {number} - */ -proto.invoicesrpc.AddHoldInvoiceRequest.prototype.getValue = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.invoicesrpc.AddHoldInvoiceRequest} returns this - */ -proto.invoicesrpc.AddHoldInvoiceRequest.prototype.setValue = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - -/** - * optional int64 value_msat = 10; - * @return {number} - */ -proto.invoicesrpc.AddHoldInvoiceRequest.prototype.getValueMsat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 10, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.invoicesrpc.AddHoldInvoiceRequest} returns this - */ -proto.invoicesrpc.AddHoldInvoiceRequest.prototype.setValueMsat = function(value) { - return jspb.Message.setProto3IntField(this, 10, value); -}; - - -/** - * optional bytes description_hash = 4; - * @return {!(string|Uint8Array)} - */ -proto.invoicesrpc.AddHoldInvoiceRequest.prototype.getDescriptionHash = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 4, "")); -}; - - -/** - * optional bytes description_hash = 4; - * This is a type-conversion wrapper around `getDescriptionHash()` - * @return {string} - */ -proto.invoicesrpc.AddHoldInvoiceRequest.prototype.getDescriptionHash_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getDescriptionHash())); -}; - - -/** - * optional bytes description_hash = 4; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getDescriptionHash()` - * @return {!Uint8Array} - */ -proto.invoicesrpc.AddHoldInvoiceRequest.prototype.getDescriptionHash_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getDescriptionHash())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.invoicesrpc.AddHoldInvoiceRequest} returns this - */ -proto.invoicesrpc.AddHoldInvoiceRequest.prototype.setDescriptionHash = function(value) { - return jspb.Message.setProto3BytesField(this, 4, value); -}; - - -/** - * optional int64 expiry = 5; - * @return {number} - */ -proto.invoicesrpc.AddHoldInvoiceRequest.prototype.getExpiry = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.invoicesrpc.AddHoldInvoiceRequest} returns this - */ -proto.invoicesrpc.AddHoldInvoiceRequest.prototype.setExpiry = function(value) { - return jspb.Message.setProto3IntField(this, 5, value); -}; - - -/** - * optional string fallback_addr = 6; - * @return {string} - */ -proto.invoicesrpc.AddHoldInvoiceRequest.prototype.getFallbackAddr = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); -}; - - -/** - * @param {string} value - * @return {!proto.invoicesrpc.AddHoldInvoiceRequest} returns this - */ -proto.invoicesrpc.AddHoldInvoiceRequest.prototype.setFallbackAddr = function(value) { - return jspb.Message.setProto3StringField(this, 6, value); -}; - - -/** - * optional uint64 cltv_expiry = 7; - * @return {number} - */ -proto.invoicesrpc.AddHoldInvoiceRequest.prototype.getCltvExpiry = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.invoicesrpc.AddHoldInvoiceRequest} returns this - */ -proto.invoicesrpc.AddHoldInvoiceRequest.prototype.setCltvExpiry = function(value) { - return jspb.Message.setProto3IntField(this, 7, value); -}; - - -/** - * repeated lnrpc.RouteHint route_hints = 8; - * @return {!Array} - */ -proto.invoicesrpc.AddHoldInvoiceRequest.prototype.getRouteHintsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, lightning_pb.RouteHint, 8)); -}; - - -/** - * @param {!Array} value - * @return {!proto.invoicesrpc.AddHoldInvoiceRequest} returns this -*/ -proto.invoicesrpc.AddHoldInvoiceRequest.prototype.setRouteHintsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 8, value); -}; - - -/** - * @param {!proto.lnrpc.RouteHint=} opt_value - * @param {number=} opt_index - * @return {!proto.lnrpc.RouteHint} - */ -proto.invoicesrpc.AddHoldInvoiceRequest.prototype.addRouteHints = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 8, opt_value, proto.lnrpc.RouteHint, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.invoicesrpc.AddHoldInvoiceRequest} returns this - */ -proto.invoicesrpc.AddHoldInvoiceRequest.prototype.clearRouteHintsList = function() { - return this.setRouteHintsList([]); -}; - - -/** - * optional bool private = 9; - * @return {boolean} - */ -proto.invoicesrpc.AddHoldInvoiceRequest.prototype.getPrivate = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 9, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.invoicesrpc.AddHoldInvoiceRequest} returns this - */ -proto.invoicesrpc.AddHoldInvoiceRequest.prototype.setPrivate = function(value) { - return jspb.Message.setProto3BooleanField(this, 9, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.invoicesrpc.AddHoldInvoiceResp.prototype.toObject = function(opt_includeInstance) { - return proto.invoicesrpc.AddHoldInvoiceResp.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.invoicesrpc.AddHoldInvoiceResp} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.invoicesrpc.AddHoldInvoiceResp.toObject = function(includeInstance, msg) { - var f, obj = { - paymentRequest: jspb.Message.getFieldWithDefault(msg, 1, ""), - addIndex: jspb.Message.getFieldWithDefault(msg, 2, 0), - paymentAddr: msg.getPaymentAddr_asB64() - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.invoicesrpc.AddHoldInvoiceResp} - */ -proto.invoicesrpc.AddHoldInvoiceResp.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.invoicesrpc.AddHoldInvoiceResp; - return proto.invoicesrpc.AddHoldInvoiceResp.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.invoicesrpc.AddHoldInvoiceResp} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.invoicesrpc.AddHoldInvoiceResp} - */ -proto.invoicesrpc.AddHoldInvoiceResp.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setPaymentRequest(value); - break; - case 2: - var value = /** @type {number} */ (reader.readUint64()); - msg.setAddIndex(value); - break; - case 3: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setPaymentAddr(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.invoicesrpc.AddHoldInvoiceResp.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.invoicesrpc.AddHoldInvoiceResp.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.invoicesrpc.AddHoldInvoiceResp} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.invoicesrpc.AddHoldInvoiceResp.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getPaymentRequest(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getAddIndex(); - if (f !== 0) { - writer.writeUint64( - 2, - f - ); - } - f = message.getPaymentAddr_asU8(); - if (f.length > 0) { - writer.writeBytes( - 3, - f - ); - } -}; - - -/** - * optional string payment_request = 1; - * @return {string} - */ -proto.invoicesrpc.AddHoldInvoiceResp.prototype.getPaymentRequest = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.invoicesrpc.AddHoldInvoiceResp} returns this - */ -proto.invoicesrpc.AddHoldInvoiceResp.prototype.setPaymentRequest = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional uint64 add_index = 2; - * @return {number} - */ -proto.invoicesrpc.AddHoldInvoiceResp.prototype.getAddIndex = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.invoicesrpc.AddHoldInvoiceResp} returns this - */ -proto.invoicesrpc.AddHoldInvoiceResp.prototype.setAddIndex = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * optional bytes payment_addr = 3; - * @return {!(string|Uint8Array)} - */ -proto.invoicesrpc.AddHoldInvoiceResp.prototype.getPaymentAddr = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * optional bytes payment_addr = 3; - * This is a type-conversion wrapper around `getPaymentAddr()` - * @return {string} - */ -proto.invoicesrpc.AddHoldInvoiceResp.prototype.getPaymentAddr_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getPaymentAddr())); -}; - - -/** - * optional bytes payment_addr = 3; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getPaymentAddr()` - * @return {!Uint8Array} - */ -proto.invoicesrpc.AddHoldInvoiceResp.prototype.getPaymentAddr_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getPaymentAddr())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.invoicesrpc.AddHoldInvoiceResp} returns this - */ -proto.invoicesrpc.AddHoldInvoiceResp.prototype.setPaymentAddr = function(value) { - return jspb.Message.setProto3BytesField(this, 3, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.invoicesrpc.SettleInvoiceMsg.prototype.toObject = function(opt_includeInstance) { - return proto.invoicesrpc.SettleInvoiceMsg.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.invoicesrpc.SettleInvoiceMsg} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.invoicesrpc.SettleInvoiceMsg.toObject = function(includeInstance, msg) { - var f, obj = { - preimage: msg.getPreimage_asB64() - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.invoicesrpc.SettleInvoiceMsg} - */ -proto.invoicesrpc.SettleInvoiceMsg.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.invoicesrpc.SettleInvoiceMsg; - return proto.invoicesrpc.SettleInvoiceMsg.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.invoicesrpc.SettleInvoiceMsg} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.invoicesrpc.SettleInvoiceMsg} - */ -proto.invoicesrpc.SettleInvoiceMsg.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setPreimage(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.invoicesrpc.SettleInvoiceMsg.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.invoicesrpc.SettleInvoiceMsg.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.invoicesrpc.SettleInvoiceMsg} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.invoicesrpc.SettleInvoiceMsg.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getPreimage_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } -}; - - -/** - * optional bytes preimage = 1; - * @return {!(string|Uint8Array)} - */ -proto.invoicesrpc.SettleInvoiceMsg.prototype.getPreimage = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes preimage = 1; - * This is a type-conversion wrapper around `getPreimage()` - * @return {string} - */ -proto.invoicesrpc.SettleInvoiceMsg.prototype.getPreimage_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getPreimage())); -}; - - -/** - * optional bytes preimage = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getPreimage()` - * @return {!Uint8Array} - */ -proto.invoicesrpc.SettleInvoiceMsg.prototype.getPreimage_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getPreimage())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.invoicesrpc.SettleInvoiceMsg} returns this - */ -proto.invoicesrpc.SettleInvoiceMsg.prototype.setPreimage = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.invoicesrpc.SettleInvoiceResp.prototype.toObject = function(opt_includeInstance) { - return proto.invoicesrpc.SettleInvoiceResp.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.invoicesrpc.SettleInvoiceResp} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.invoicesrpc.SettleInvoiceResp.toObject = function(includeInstance, msg) { - var f, obj = { - - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.invoicesrpc.SettleInvoiceResp} - */ -proto.invoicesrpc.SettleInvoiceResp.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.invoicesrpc.SettleInvoiceResp; - return proto.invoicesrpc.SettleInvoiceResp.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.invoicesrpc.SettleInvoiceResp} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.invoicesrpc.SettleInvoiceResp} - */ -proto.invoicesrpc.SettleInvoiceResp.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.invoicesrpc.SettleInvoiceResp.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.invoicesrpc.SettleInvoiceResp.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.invoicesrpc.SettleInvoiceResp} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.invoicesrpc.SettleInvoiceResp.serializeBinaryToWriter = function(message, writer) { - var f = undefined; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.invoicesrpc.SubscribeSingleInvoiceRequest.prototype.toObject = function(opt_includeInstance) { - return proto.invoicesrpc.SubscribeSingleInvoiceRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.invoicesrpc.SubscribeSingleInvoiceRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.invoicesrpc.SubscribeSingleInvoiceRequest.toObject = function(includeInstance, msg) { - var f, obj = { - rHash: msg.getRHash_asB64() - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.invoicesrpc.SubscribeSingleInvoiceRequest} - */ -proto.invoicesrpc.SubscribeSingleInvoiceRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.invoicesrpc.SubscribeSingleInvoiceRequest; - return proto.invoicesrpc.SubscribeSingleInvoiceRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.invoicesrpc.SubscribeSingleInvoiceRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.invoicesrpc.SubscribeSingleInvoiceRequest} - */ -proto.invoicesrpc.SubscribeSingleInvoiceRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setRHash(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.invoicesrpc.SubscribeSingleInvoiceRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.invoicesrpc.SubscribeSingleInvoiceRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.invoicesrpc.SubscribeSingleInvoiceRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.invoicesrpc.SubscribeSingleInvoiceRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getRHash_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } -}; - - -/** - * optional bytes r_hash = 2; - * @return {!(string|Uint8Array)} - */ -proto.invoicesrpc.SubscribeSingleInvoiceRequest.prototype.getRHash = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes r_hash = 2; - * This is a type-conversion wrapper around `getRHash()` - * @return {string} - */ -proto.invoicesrpc.SubscribeSingleInvoiceRequest.prototype.getRHash_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getRHash())); -}; - - -/** - * optional bytes r_hash = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getRHash()` - * @return {!Uint8Array} - */ -proto.invoicesrpc.SubscribeSingleInvoiceRequest.prototype.getRHash_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getRHash())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.invoicesrpc.SubscribeSingleInvoiceRequest} returns this - */ -proto.invoicesrpc.SubscribeSingleInvoiceRequest.prototype.setRHash = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); -}; - - - -/** - * Oneof group definitions for this message. Each group defines the field - * numbers belonging to that group. When of these fields' value is set, all - * other fields in the group are cleared. During deserialization, if multiple - * fields are encountered for a group, only the last value seen will be kept. - * @private {!Array>} - * @const - */ -proto.invoicesrpc.LookupInvoiceMsg.oneofGroups_ = [[1,2,3]]; - -/** - * @enum {number} - */ -proto.invoicesrpc.LookupInvoiceMsg.InvoiceRefCase = { - INVOICE_REF_NOT_SET: 0, - PAYMENT_HASH: 1, - PAYMENT_ADDR: 2, - SET_ID: 3 -}; - -/** - * @return {proto.invoicesrpc.LookupInvoiceMsg.InvoiceRefCase} - */ -proto.invoicesrpc.LookupInvoiceMsg.prototype.getInvoiceRefCase = function() { - return /** @type {proto.invoicesrpc.LookupInvoiceMsg.InvoiceRefCase} */(jspb.Message.computeOneofCase(this, proto.invoicesrpc.LookupInvoiceMsg.oneofGroups_[0])); -}; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.invoicesrpc.LookupInvoiceMsg.prototype.toObject = function(opt_includeInstance) { - return proto.invoicesrpc.LookupInvoiceMsg.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.invoicesrpc.LookupInvoiceMsg} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.invoicesrpc.LookupInvoiceMsg.toObject = function(includeInstance, msg) { - var f, obj = { - paymentHash: msg.getPaymentHash_asB64(), - paymentAddr: msg.getPaymentAddr_asB64(), - setId: msg.getSetId_asB64(), - lookupModifier: jspb.Message.getFieldWithDefault(msg, 4, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.invoicesrpc.LookupInvoiceMsg} - */ -proto.invoicesrpc.LookupInvoiceMsg.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.invoicesrpc.LookupInvoiceMsg; - return proto.invoicesrpc.LookupInvoiceMsg.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.invoicesrpc.LookupInvoiceMsg} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.invoicesrpc.LookupInvoiceMsg} - */ -proto.invoicesrpc.LookupInvoiceMsg.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setPaymentHash(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setPaymentAddr(value); - break; - case 3: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setSetId(value); - break; - case 4: - var value = /** @type {!proto.invoicesrpc.LookupModifier} */ (reader.readEnum()); - msg.setLookupModifier(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.invoicesrpc.LookupInvoiceMsg.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.invoicesrpc.LookupInvoiceMsg.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.invoicesrpc.LookupInvoiceMsg} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.invoicesrpc.LookupInvoiceMsg.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 1)); - if (f != null) { - writer.writeBytes( - 1, - f - ); - } - f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 2)); - if (f != null) { - writer.writeBytes( - 2, - f - ); - } - f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 3)); - if (f != null) { - writer.writeBytes( - 3, - f - ); - } - f = message.getLookupModifier(); - if (f !== 0.0) { - writer.writeEnum( - 4, - f - ); - } -}; - - -/** - * optional bytes payment_hash = 1; - * @return {!(string|Uint8Array)} - */ -proto.invoicesrpc.LookupInvoiceMsg.prototype.getPaymentHash = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes payment_hash = 1; - * This is a type-conversion wrapper around `getPaymentHash()` - * @return {string} - */ -proto.invoicesrpc.LookupInvoiceMsg.prototype.getPaymentHash_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getPaymentHash())); -}; - - -/** - * optional bytes payment_hash = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getPaymentHash()` - * @return {!Uint8Array} - */ -proto.invoicesrpc.LookupInvoiceMsg.prototype.getPaymentHash_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getPaymentHash())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.invoicesrpc.LookupInvoiceMsg} returns this - */ -proto.invoicesrpc.LookupInvoiceMsg.prototype.setPaymentHash = function(value) { - return jspb.Message.setOneofField(this, 1, proto.invoicesrpc.LookupInvoiceMsg.oneofGroups_[0], value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.invoicesrpc.LookupInvoiceMsg} returns this - */ -proto.invoicesrpc.LookupInvoiceMsg.prototype.clearPaymentHash = function() { - return jspb.Message.setOneofField(this, 1, proto.invoicesrpc.LookupInvoiceMsg.oneofGroups_[0], undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.invoicesrpc.LookupInvoiceMsg.prototype.hasPaymentHash = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional bytes payment_addr = 2; - * @return {!(string|Uint8Array)} - */ -proto.invoicesrpc.LookupInvoiceMsg.prototype.getPaymentAddr = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes payment_addr = 2; - * This is a type-conversion wrapper around `getPaymentAddr()` - * @return {string} - */ -proto.invoicesrpc.LookupInvoiceMsg.prototype.getPaymentAddr_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getPaymentAddr())); -}; - - -/** - * optional bytes payment_addr = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getPaymentAddr()` - * @return {!Uint8Array} - */ -proto.invoicesrpc.LookupInvoiceMsg.prototype.getPaymentAddr_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getPaymentAddr())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.invoicesrpc.LookupInvoiceMsg} returns this - */ -proto.invoicesrpc.LookupInvoiceMsg.prototype.setPaymentAddr = function(value) { - return jspb.Message.setOneofField(this, 2, proto.invoicesrpc.LookupInvoiceMsg.oneofGroups_[0], value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.invoicesrpc.LookupInvoiceMsg} returns this - */ -proto.invoicesrpc.LookupInvoiceMsg.prototype.clearPaymentAddr = function() { - return jspb.Message.setOneofField(this, 2, proto.invoicesrpc.LookupInvoiceMsg.oneofGroups_[0], undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.invoicesrpc.LookupInvoiceMsg.prototype.hasPaymentAddr = function() { - return jspb.Message.getField(this, 2) != null; -}; - - -/** - * optional bytes set_id = 3; - * @return {!(string|Uint8Array)} - */ -proto.invoicesrpc.LookupInvoiceMsg.prototype.getSetId = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * optional bytes set_id = 3; - * This is a type-conversion wrapper around `getSetId()` - * @return {string} - */ -proto.invoicesrpc.LookupInvoiceMsg.prototype.getSetId_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getSetId())); -}; - - -/** - * optional bytes set_id = 3; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getSetId()` - * @return {!Uint8Array} - */ -proto.invoicesrpc.LookupInvoiceMsg.prototype.getSetId_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getSetId())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.invoicesrpc.LookupInvoiceMsg} returns this - */ -proto.invoicesrpc.LookupInvoiceMsg.prototype.setSetId = function(value) { - return jspb.Message.setOneofField(this, 3, proto.invoicesrpc.LookupInvoiceMsg.oneofGroups_[0], value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.invoicesrpc.LookupInvoiceMsg} returns this - */ -proto.invoicesrpc.LookupInvoiceMsg.prototype.clearSetId = function() { - return jspb.Message.setOneofField(this, 3, proto.invoicesrpc.LookupInvoiceMsg.oneofGroups_[0], undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.invoicesrpc.LookupInvoiceMsg.prototype.hasSetId = function() { - return jspb.Message.getField(this, 3) != null; -}; - - -/** - * optional LookupModifier lookup_modifier = 4; - * @return {!proto.invoicesrpc.LookupModifier} - */ -proto.invoicesrpc.LookupInvoiceMsg.prototype.getLookupModifier = function() { - return /** @type {!proto.invoicesrpc.LookupModifier} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** - * @param {!proto.invoicesrpc.LookupModifier} value - * @return {!proto.invoicesrpc.LookupInvoiceMsg} returns this - */ -proto.invoicesrpc.LookupInvoiceMsg.prototype.setLookupModifier = function(value) { - return jspb.Message.setProto3EnumField(this, 4, value); -}; - - -/** - * @enum {number} - */ -proto.invoicesrpc.LookupModifier = { - DEFAULT: 0, - HTLC_SET_ONLY: 1, - HTLC_SET_BLANK: 2 -}; - -goog.object.extend(exports, proto.invoicesrpc); diff --git a/lib/types/generated/invoicesrpc/invoices_pb_service.d.ts b/lib/types/generated/invoicesrpc/invoices_pb_service.d.ts deleted file mode 100644 index 7675a1a..0000000 --- a/lib/types/generated/invoicesrpc/invoices_pb_service.d.ts +++ /dev/null @@ -1,132 +0,0 @@ -// package: invoicesrpc -// file: invoicesrpc/invoices.proto - -import * as invoicesrpc_invoices_pb from "../invoicesrpc/invoices_pb"; -import * as lightning_pb from "../lightning_pb"; -import {grpc} from "@improbable-eng/grpc-web"; - -type InvoicesSubscribeSingleInvoice = { - readonly methodName: string; - readonly service: typeof Invoices; - readonly requestStream: false; - readonly responseStream: true; - readonly requestType: typeof invoicesrpc_invoices_pb.SubscribeSingleInvoiceRequest; - readonly responseType: typeof lightning_pb.Invoice; -}; - -type InvoicesCancelInvoice = { - readonly methodName: string; - readonly service: typeof Invoices; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof invoicesrpc_invoices_pb.CancelInvoiceMsg; - readonly responseType: typeof invoicesrpc_invoices_pb.CancelInvoiceResp; -}; - -type InvoicesAddHoldInvoice = { - readonly methodName: string; - readonly service: typeof Invoices; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof invoicesrpc_invoices_pb.AddHoldInvoiceRequest; - readonly responseType: typeof invoicesrpc_invoices_pb.AddHoldInvoiceResp; -}; - -type InvoicesSettleInvoice = { - readonly methodName: string; - readonly service: typeof Invoices; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof invoicesrpc_invoices_pb.SettleInvoiceMsg; - readonly responseType: typeof invoicesrpc_invoices_pb.SettleInvoiceResp; -}; - -type InvoicesLookupInvoiceV2 = { - readonly methodName: string; - readonly service: typeof Invoices; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof invoicesrpc_invoices_pb.LookupInvoiceMsg; - readonly responseType: typeof lightning_pb.Invoice; -}; - -export class Invoices { - static readonly serviceName: string; - static readonly SubscribeSingleInvoice: InvoicesSubscribeSingleInvoice; - static readonly CancelInvoice: InvoicesCancelInvoice; - static readonly AddHoldInvoice: InvoicesAddHoldInvoice; - static readonly SettleInvoice: InvoicesSettleInvoice; - static readonly LookupInvoiceV2: InvoicesLookupInvoiceV2; -} - -export type ServiceError = { message: string, code: number; metadata: grpc.Metadata } -export type Status = { details: string, code: number; metadata: grpc.Metadata } - -interface UnaryResponse { - cancel(): void; -} -interface ResponseStream { - cancel(): void; - on(type: 'data', handler: (message: T) => void): ResponseStream; - on(type: 'end', handler: (status?: Status) => void): ResponseStream; - on(type: 'status', handler: (status: Status) => void): ResponseStream; -} -interface RequestStream { - write(message: T): RequestStream; - end(): void; - cancel(): void; - on(type: 'end', handler: (status?: Status) => void): RequestStream; - on(type: 'status', handler: (status: Status) => void): RequestStream; -} -interface BidirectionalStream { - write(message: ReqT): BidirectionalStream; - end(): void; - cancel(): void; - on(type: 'data', handler: (message: ResT) => void): BidirectionalStream; - on(type: 'end', handler: (status?: Status) => void): BidirectionalStream; - on(type: 'status', handler: (status: Status) => void): BidirectionalStream; -} - -export class InvoicesClient { - readonly serviceHost: string; - - constructor(serviceHost: string, options?: grpc.RpcOptions); - subscribeSingleInvoice(requestMessage: invoicesrpc_invoices_pb.SubscribeSingleInvoiceRequest, metadata?: grpc.Metadata): ResponseStream; - cancelInvoice( - requestMessage: invoicesrpc_invoices_pb.CancelInvoiceMsg, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: invoicesrpc_invoices_pb.CancelInvoiceResp|null) => void - ): UnaryResponse; - cancelInvoice( - requestMessage: invoicesrpc_invoices_pb.CancelInvoiceMsg, - callback: (error: ServiceError|null, responseMessage: invoicesrpc_invoices_pb.CancelInvoiceResp|null) => void - ): UnaryResponse; - addHoldInvoice( - requestMessage: invoicesrpc_invoices_pb.AddHoldInvoiceRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: invoicesrpc_invoices_pb.AddHoldInvoiceResp|null) => void - ): UnaryResponse; - addHoldInvoice( - requestMessage: invoicesrpc_invoices_pb.AddHoldInvoiceRequest, - callback: (error: ServiceError|null, responseMessage: invoicesrpc_invoices_pb.AddHoldInvoiceResp|null) => void - ): UnaryResponse; - settleInvoice( - requestMessage: invoicesrpc_invoices_pb.SettleInvoiceMsg, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: invoicesrpc_invoices_pb.SettleInvoiceResp|null) => void - ): UnaryResponse; - settleInvoice( - requestMessage: invoicesrpc_invoices_pb.SettleInvoiceMsg, - callback: (error: ServiceError|null, responseMessage: invoicesrpc_invoices_pb.SettleInvoiceResp|null) => void - ): UnaryResponse; - lookupInvoiceV2( - requestMessage: invoicesrpc_invoices_pb.LookupInvoiceMsg, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: lightning_pb.Invoice|null) => void - ): UnaryResponse; - lookupInvoiceV2( - requestMessage: invoicesrpc_invoices_pb.LookupInvoiceMsg, - callback: (error: ServiceError|null, responseMessage: lightning_pb.Invoice|null) => void - ): UnaryResponse; -} - diff --git a/lib/types/generated/invoicesrpc/invoices_pb_service.js b/lib/types/generated/invoicesrpc/invoices_pb_service.js deleted file mode 100644 index 2191662..0000000 --- a/lib/types/generated/invoicesrpc/invoices_pb_service.js +++ /dev/null @@ -1,230 +0,0 @@ -// package: invoicesrpc -// file: invoicesrpc/invoices.proto - -var invoicesrpc_invoices_pb = require("../invoicesrpc/invoices_pb"); -var lightning_pb = require("../lightning_pb"); -var grpc = require("@improbable-eng/grpc-web").grpc; - -var Invoices = (function () { - function Invoices() {} - Invoices.serviceName = "invoicesrpc.Invoices"; - return Invoices; -}()); - -Invoices.SubscribeSingleInvoice = { - methodName: "SubscribeSingleInvoice", - service: Invoices, - requestStream: false, - responseStream: true, - requestType: invoicesrpc_invoices_pb.SubscribeSingleInvoiceRequest, - responseType: lightning_pb.Invoice -}; - -Invoices.CancelInvoice = { - methodName: "CancelInvoice", - service: Invoices, - requestStream: false, - responseStream: false, - requestType: invoicesrpc_invoices_pb.CancelInvoiceMsg, - responseType: invoicesrpc_invoices_pb.CancelInvoiceResp -}; - -Invoices.AddHoldInvoice = { - methodName: "AddHoldInvoice", - service: Invoices, - requestStream: false, - responseStream: false, - requestType: invoicesrpc_invoices_pb.AddHoldInvoiceRequest, - responseType: invoicesrpc_invoices_pb.AddHoldInvoiceResp -}; - -Invoices.SettleInvoice = { - methodName: "SettleInvoice", - service: Invoices, - requestStream: false, - responseStream: false, - requestType: invoicesrpc_invoices_pb.SettleInvoiceMsg, - responseType: invoicesrpc_invoices_pb.SettleInvoiceResp -}; - -Invoices.LookupInvoiceV2 = { - methodName: "LookupInvoiceV2", - service: Invoices, - requestStream: false, - responseStream: false, - requestType: invoicesrpc_invoices_pb.LookupInvoiceMsg, - responseType: lightning_pb.Invoice -}; - -exports.Invoices = Invoices; - -function InvoicesClient(serviceHost, options) { - this.serviceHost = serviceHost; - this.options = options || {}; -} - -InvoicesClient.prototype.subscribeSingleInvoice = function subscribeSingleInvoice(requestMessage, metadata) { - var listeners = { - data: [], - end: [], - status: [] - }; - var client = grpc.invoke(Invoices.SubscribeSingleInvoice, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onMessage: function (responseMessage) { - listeners.data.forEach(function (handler) { - handler(responseMessage); - }); - }, - onEnd: function (status, statusMessage, trailers) { - listeners.status.forEach(function (handler) { - handler({ code: status, details: statusMessage, metadata: trailers }); - }); - listeners.end.forEach(function (handler) { - handler({ code: status, details: statusMessage, metadata: trailers }); - }); - listeners = null; - } - }); - return { - on: function (type, handler) { - listeners[type].push(handler); - return this; - }, - cancel: function () { - listeners = null; - client.close(); - } - }; -}; - -InvoicesClient.prototype.cancelInvoice = function cancelInvoice(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(Invoices.CancelInvoice, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -InvoicesClient.prototype.addHoldInvoice = function addHoldInvoice(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(Invoices.AddHoldInvoice, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -InvoicesClient.prototype.settleInvoice = function settleInvoice(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(Invoices.SettleInvoice, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -InvoicesClient.prototype.lookupInvoiceV2 = function lookupInvoiceV2(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(Invoices.LookupInvoiceV2, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -exports.InvoicesClient = InvoicesClient; - diff --git a/lib/types/generated/lightning_pb.d.ts b/lib/types/generated/lightning_pb.d.ts deleted file mode 100644 index 9f117f4..0000000 --- a/lib/types/generated/lightning_pb.d.ts +++ /dev/null @@ -1,6743 +0,0 @@ -// package: lnrpc -// file: lightning.proto - -import * as jspb from "google-protobuf"; - -export class SubscribeCustomMessagesRequest extends jspb.Message { - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): SubscribeCustomMessagesRequest.AsObject; - static toObject(includeInstance: boolean, msg: SubscribeCustomMessagesRequest): SubscribeCustomMessagesRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: SubscribeCustomMessagesRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): SubscribeCustomMessagesRequest; - static deserializeBinaryFromReader(message: SubscribeCustomMessagesRequest, reader: jspb.BinaryReader): SubscribeCustomMessagesRequest; -} - -export namespace SubscribeCustomMessagesRequest { - export type AsObject = { - } -} - -export class CustomMessage extends jspb.Message { - getPeer(): Uint8Array | string; - getPeer_asU8(): Uint8Array; - getPeer_asB64(): string; - setPeer(value: Uint8Array | string): void; - - getType(): number; - setType(value: number): void; - - getData(): Uint8Array | string; - getData_asU8(): Uint8Array; - getData_asB64(): string; - setData(value: Uint8Array | string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): CustomMessage.AsObject; - static toObject(includeInstance: boolean, msg: CustomMessage): CustomMessage.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: CustomMessage, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): CustomMessage; - static deserializeBinaryFromReader(message: CustomMessage, reader: jspb.BinaryReader): CustomMessage; -} - -export namespace CustomMessage { - export type AsObject = { - peer: Uint8Array | string, - type: number, - data: Uint8Array | string, - } -} - -export class SendCustomMessageRequest extends jspb.Message { - getPeer(): Uint8Array | string; - getPeer_asU8(): Uint8Array; - getPeer_asB64(): string; - setPeer(value: Uint8Array | string): void; - - getType(): number; - setType(value: number): void; - - getData(): Uint8Array | string; - getData_asU8(): Uint8Array; - getData_asB64(): string; - setData(value: Uint8Array | string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): SendCustomMessageRequest.AsObject; - static toObject(includeInstance: boolean, msg: SendCustomMessageRequest): SendCustomMessageRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: SendCustomMessageRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): SendCustomMessageRequest; - static deserializeBinaryFromReader(message: SendCustomMessageRequest, reader: jspb.BinaryReader): SendCustomMessageRequest; -} - -export namespace SendCustomMessageRequest { - export type AsObject = { - peer: Uint8Array | string, - type: number, - data: Uint8Array | string, - } -} - -export class SendCustomMessageResponse extends jspb.Message { - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): SendCustomMessageResponse.AsObject; - static toObject(includeInstance: boolean, msg: SendCustomMessageResponse): SendCustomMessageResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: SendCustomMessageResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): SendCustomMessageResponse; - static deserializeBinaryFromReader(message: SendCustomMessageResponse, reader: jspb.BinaryReader): SendCustomMessageResponse; -} - -export namespace SendCustomMessageResponse { - export type AsObject = { - } -} - -export class Utxo extends jspb.Message { - getAddressType(): AddressTypeMap[keyof AddressTypeMap]; - setAddressType(value: AddressTypeMap[keyof AddressTypeMap]): void; - - getAddress(): string; - setAddress(value: string): void; - - getAmountSat(): number; - setAmountSat(value: number): void; - - getPkScript(): string; - setPkScript(value: string): void; - - hasOutpoint(): boolean; - clearOutpoint(): void; - getOutpoint(): OutPoint | undefined; - setOutpoint(value?: OutPoint): void; - - getConfirmations(): number; - setConfirmations(value: number): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Utxo.AsObject; - static toObject(includeInstance: boolean, msg: Utxo): Utxo.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: Utxo, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Utxo; - static deserializeBinaryFromReader(message: Utxo, reader: jspb.BinaryReader): Utxo; -} - -export namespace Utxo { - export type AsObject = { - addressType: AddressTypeMap[keyof AddressTypeMap], - address: string, - amountSat: number, - pkScript: string, - outpoint?: OutPoint.AsObject, - confirmations: number, - } -} - -export class Transaction extends jspb.Message { - getTxHash(): string; - setTxHash(value: string): void; - - getAmount(): number; - setAmount(value: number): void; - - getNumConfirmations(): number; - setNumConfirmations(value: number): void; - - getBlockHash(): string; - setBlockHash(value: string): void; - - getBlockHeight(): number; - setBlockHeight(value: number): void; - - getTimeStamp(): number; - setTimeStamp(value: number): void; - - getTotalFees(): number; - setTotalFees(value: number): void; - - clearDestAddressesList(): void; - getDestAddressesList(): Array; - setDestAddressesList(value: Array): void; - addDestAddresses(value: string, index?: number): string; - - getRawTxHex(): string; - setRawTxHex(value: string): void; - - getLabel(): string; - setLabel(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Transaction.AsObject; - static toObject(includeInstance: boolean, msg: Transaction): Transaction.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: Transaction, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Transaction; - static deserializeBinaryFromReader(message: Transaction, reader: jspb.BinaryReader): Transaction; -} - -export namespace Transaction { - export type AsObject = { - txHash: string, - amount: number, - numConfirmations: number, - blockHash: string, - blockHeight: number, - timeStamp: number, - totalFees: number, - destAddresses: Array, - rawTxHex: string, - label: string, - } -} - -export class GetTransactionsRequest extends jspb.Message { - getStartHeight(): number; - setStartHeight(value: number): void; - - getEndHeight(): number; - setEndHeight(value: number): void; - - getAccount(): string; - setAccount(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GetTransactionsRequest.AsObject; - static toObject(includeInstance: boolean, msg: GetTransactionsRequest): GetTransactionsRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: GetTransactionsRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GetTransactionsRequest; - static deserializeBinaryFromReader(message: GetTransactionsRequest, reader: jspb.BinaryReader): GetTransactionsRequest; -} - -export namespace GetTransactionsRequest { - export type AsObject = { - startHeight: number, - endHeight: number, - account: string, - } -} - -export class TransactionDetails extends jspb.Message { - clearTransactionsList(): void; - getTransactionsList(): Array; - setTransactionsList(value: Array): void; - addTransactions(value?: Transaction, index?: number): Transaction; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): TransactionDetails.AsObject; - static toObject(includeInstance: boolean, msg: TransactionDetails): TransactionDetails.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: TransactionDetails, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): TransactionDetails; - static deserializeBinaryFromReader(message: TransactionDetails, reader: jspb.BinaryReader): TransactionDetails; -} - -export namespace TransactionDetails { - export type AsObject = { - transactions: Array, - } -} - -export class FeeLimit extends jspb.Message { - hasFixed(): boolean; - clearFixed(): void; - getFixed(): number; - setFixed(value: number): void; - - hasFixedMsat(): boolean; - clearFixedMsat(): void; - getFixedMsat(): number; - setFixedMsat(value: number): void; - - hasPercent(): boolean; - clearPercent(): void; - getPercent(): number; - setPercent(value: number): void; - - getLimitCase(): FeeLimit.LimitCase; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): FeeLimit.AsObject; - static toObject(includeInstance: boolean, msg: FeeLimit): FeeLimit.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: FeeLimit, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): FeeLimit; - static deserializeBinaryFromReader(message: FeeLimit, reader: jspb.BinaryReader): FeeLimit; -} - -export namespace FeeLimit { - export type AsObject = { - fixed: number, - fixedMsat: number, - percent: number, - } - - export enum LimitCase { - LIMIT_NOT_SET = 0, - FIXED = 1, - FIXED_MSAT = 3, - PERCENT = 2, - } -} - -export class SendRequest extends jspb.Message { - getDest(): Uint8Array | string; - getDest_asU8(): Uint8Array; - getDest_asB64(): string; - setDest(value: Uint8Array | string): void; - - getDestString(): string; - setDestString(value: string): void; - - getAmt(): number; - setAmt(value: number): void; - - getAmtMsat(): number; - setAmtMsat(value: number): void; - - getPaymentHash(): Uint8Array | string; - getPaymentHash_asU8(): Uint8Array; - getPaymentHash_asB64(): string; - setPaymentHash(value: Uint8Array | string): void; - - getPaymentHashString(): string; - setPaymentHashString(value: string): void; - - getPaymentRequest(): string; - setPaymentRequest(value: string): void; - - getFinalCltvDelta(): number; - setFinalCltvDelta(value: number): void; - - hasFeeLimit(): boolean; - clearFeeLimit(): void; - getFeeLimit(): FeeLimit | undefined; - setFeeLimit(value?: FeeLimit): void; - - getOutgoingChanId(): string; - setOutgoingChanId(value: string): void; - - getLastHopPubkey(): Uint8Array | string; - getLastHopPubkey_asU8(): Uint8Array; - getLastHopPubkey_asB64(): string; - setLastHopPubkey(value: Uint8Array | string): void; - - getCltvLimit(): number; - setCltvLimit(value: number): void; - - getDestCustomRecordsMap(): jspb.Map; - clearDestCustomRecordsMap(): void; - getAllowSelfPayment(): boolean; - setAllowSelfPayment(value: boolean): void; - - clearDestFeaturesList(): void; - getDestFeaturesList(): Array; - setDestFeaturesList(value: Array): void; - addDestFeatures(value: FeatureBitMap[keyof FeatureBitMap], index?: number): FeatureBitMap[keyof FeatureBitMap]; - - getPaymentAddr(): Uint8Array | string; - getPaymentAddr_asU8(): Uint8Array; - getPaymentAddr_asB64(): string; - setPaymentAddr(value: Uint8Array | string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): SendRequest.AsObject; - static toObject(includeInstance: boolean, msg: SendRequest): SendRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: SendRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): SendRequest; - static deserializeBinaryFromReader(message: SendRequest, reader: jspb.BinaryReader): SendRequest; -} - -export namespace SendRequest { - export type AsObject = { - dest: Uint8Array | string, - destString: string, - amt: number, - amtMsat: number, - paymentHash: Uint8Array | string, - paymentHashString: string, - paymentRequest: string, - finalCltvDelta: number, - feeLimit?: FeeLimit.AsObject, - outgoingChanId: string, - lastHopPubkey: Uint8Array | string, - cltvLimit: number, - destCustomRecords: Array<[number, Uint8Array | string]>, - allowSelfPayment: boolean, - destFeatures: Array, - paymentAddr: Uint8Array | string, - } -} - -export class SendResponse extends jspb.Message { - getPaymentError(): string; - setPaymentError(value: string): void; - - getPaymentPreimage(): Uint8Array | string; - getPaymentPreimage_asU8(): Uint8Array; - getPaymentPreimage_asB64(): string; - setPaymentPreimage(value: Uint8Array | string): void; - - hasPaymentRoute(): boolean; - clearPaymentRoute(): void; - getPaymentRoute(): Route | undefined; - setPaymentRoute(value?: Route): void; - - getPaymentHash(): Uint8Array | string; - getPaymentHash_asU8(): Uint8Array; - getPaymentHash_asB64(): string; - setPaymentHash(value: Uint8Array | string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): SendResponse.AsObject; - static toObject(includeInstance: boolean, msg: SendResponse): SendResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: SendResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): SendResponse; - static deserializeBinaryFromReader(message: SendResponse, reader: jspb.BinaryReader): SendResponse; -} - -export namespace SendResponse { - export type AsObject = { - paymentError: string, - paymentPreimage: Uint8Array | string, - paymentRoute?: Route.AsObject, - paymentHash: Uint8Array | string, - } -} - -export class SendToRouteRequest extends jspb.Message { - getPaymentHash(): Uint8Array | string; - getPaymentHash_asU8(): Uint8Array; - getPaymentHash_asB64(): string; - setPaymentHash(value: Uint8Array | string): void; - - getPaymentHashString(): string; - setPaymentHashString(value: string): void; - - hasRoute(): boolean; - clearRoute(): void; - getRoute(): Route | undefined; - setRoute(value?: Route): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): SendToRouteRequest.AsObject; - static toObject(includeInstance: boolean, msg: SendToRouteRequest): SendToRouteRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: SendToRouteRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): SendToRouteRequest; - static deserializeBinaryFromReader(message: SendToRouteRequest, reader: jspb.BinaryReader): SendToRouteRequest; -} - -export namespace SendToRouteRequest { - export type AsObject = { - paymentHash: Uint8Array | string, - paymentHashString: string, - route?: Route.AsObject, - } -} - -export class ChannelAcceptRequest extends jspb.Message { - getNodePubkey(): Uint8Array | string; - getNodePubkey_asU8(): Uint8Array; - getNodePubkey_asB64(): string; - setNodePubkey(value: Uint8Array | string): void; - - getChainHash(): Uint8Array | string; - getChainHash_asU8(): Uint8Array; - getChainHash_asB64(): string; - setChainHash(value: Uint8Array | string): void; - - getPendingChanId(): Uint8Array | string; - getPendingChanId_asU8(): Uint8Array; - getPendingChanId_asB64(): string; - setPendingChanId(value: Uint8Array | string): void; - - getFundingAmt(): number; - setFundingAmt(value: number): void; - - getPushAmt(): number; - setPushAmt(value: number): void; - - getDustLimit(): number; - setDustLimit(value: number): void; - - getMaxValueInFlight(): number; - setMaxValueInFlight(value: number): void; - - getChannelReserve(): number; - setChannelReserve(value: number): void; - - getMinHtlc(): number; - setMinHtlc(value: number): void; - - getFeePerKw(): number; - setFeePerKw(value: number): void; - - getCsvDelay(): number; - setCsvDelay(value: number): void; - - getMaxAcceptedHtlcs(): number; - setMaxAcceptedHtlcs(value: number): void; - - getChannelFlags(): number; - setChannelFlags(value: number): void; - - getCommitmentType(): CommitmentTypeMap[keyof CommitmentTypeMap]; - setCommitmentType(value: CommitmentTypeMap[keyof CommitmentTypeMap]): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ChannelAcceptRequest.AsObject; - static toObject(includeInstance: boolean, msg: ChannelAcceptRequest): ChannelAcceptRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ChannelAcceptRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ChannelAcceptRequest; - static deserializeBinaryFromReader(message: ChannelAcceptRequest, reader: jspb.BinaryReader): ChannelAcceptRequest; -} - -export namespace ChannelAcceptRequest { - export type AsObject = { - nodePubkey: Uint8Array | string, - chainHash: Uint8Array | string, - pendingChanId: Uint8Array | string, - fundingAmt: number, - pushAmt: number, - dustLimit: number, - maxValueInFlight: number, - channelReserve: number, - minHtlc: number, - feePerKw: number, - csvDelay: number, - maxAcceptedHtlcs: number, - channelFlags: number, - commitmentType: CommitmentTypeMap[keyof CommitmentTypeMap], - } -} - -export class ChannelAcceptResponse extends jspb.Message { - getAccept(): boolean; - setAccept(value: boolean): void; - - getPendingChanId(): Uint8Array | string; - getPendingChanId_asU8(): Uint8Array; - getPendingChanId_asB64(): string; - setPendingChanId(value: Uint8Array | string): void; - - getError(): string; - setError(value: string): void; - - getUpfrontShutdown(): string; - setUpfrontShutdown(value: string): void; - - getCsvDelay(): number; - setCsvDelay(value: number): void; - - getReserveSat(): number; - setReserveSat(value: number): void; - - getInFlightMaxMsat(): number; - setInFlightMaxMsat(value: number): void; - - getMaxHtlcCount(): number; - setMaxHtlcCount(value: number): void; - - getMinHtlcIn(): number; - setMinHtlcIn(value: number): void; - - getMinAcceptDepth(): number; - setMinAcceptDepth(value: number): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ChannelAcceptResponse.AsObject; - static toObject(includeInstance: boolean, msg: ChannelAcceptResponse): ChannelAcceptResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ChannelAcceptResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ChannelAcceptResponse; - static deserializeBinaryFromReader(message: ChannelAcceptResponse, reader: jspb.BinaryReader): ChannelAcceptResponse; -} - -export namespace ChannelAcceptResponse { - export type AsObject = { - accept: boolean, - pendingChanId: Uint8Array | string, - error: string, - upfrontShutdown: string, - csvDelay: number, - reserveSat: number, - inFlightMaxMsat: number, - maxHtlcCount: number, - minHtlcIn: number, - minAcceptDepth: number, - } -} - -export class ChannelPoint extends jspb.Message { - hasFundingTxidBytes(): boolean; - clearFundingTxidBytes(): void; - getFundingTxidBytes(): Uint8Array | string; - getFundingTxidBytes_asU8(): Uint8Array; - getFundingTxidBytes_asB64(): string; - setFundingTxidBytes(value: Uint8Array | string): void; - - hasFundingTxidStr(): boolean; - clearFundingTxidStr(): void; - getFundingTxidStr(): string; - setFundingTxidStr(value: string): void; - - getOutputIndex(): number; - setOutputIndex(value: number): void; - - getFundingTxidCase(): ChannelPoint.FundingTxidCase; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ChannelPoint.AsObject; - static toObject(includeInstance: boolean, msg: ChannelPoint): ChannelPoint.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ChannelPoint, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ChannelPoint; - static deserializeBinaryFromReader(message: ChannelPoint, reader: jspb.BinaryReader): ChannelPoint; -} - -export namespace ChannelPoint { - export type AsObject = { - fundingTxidBytes: Uint8Array | string, - fundingTxidStr: string, - outputIndex: number, - } - - export enum FundingTxidCase { - FUNDING_TXID_NOT_SET = 0, - FUNDING_TXID_BYTES = 1, - FUNDING_TXID_STR = 2, - } -} - -export class OutPoint extends jspb.Message { - getTxidBytes(): Uint8Array | string; - getTxidBytes_asU8(): Uint8Array; - getTxidBytes_asB64(): string; - setTxidBytes(value: Uint8Array | string): void; - - getTxidStr(): string; - setTxidStr(value: string): void; - - getOutputIndex(): number; - setOutputIndex(value: number): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): OutPoint.AsObject; - static toObject(includeInstance: boolean, msg: OutPoint): OutPoint.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: OutPoint, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): OutPoint; - static deserializeBinaryFromReader(message: OutPoint, reader: jspb.BinaryReader): OutPoint; -} - -export namespace OutPoint { - export type AsObject = { - txidBytes: Uint8Array | string, - txidStr: string, - outputIndex: number, - } -} - -export class LightningAddress extends jspb.Message { - getPubkey(): string; - setPubkey(value: string): void; - - getHost(): string; - setHost(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): LightningAddress.AsObject; - static toObject(includeInstance: boolean, msg: LightningAddress): LightningAddress.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: LightningAddress, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): LightningAddress; - static deserializeBinaryFromReader(message: LightningAddress, reader: jspb.BinaryReader): LightningAddress; -} - -export namespace LightningAddress { - export type AsObject = { - pubkey: string, - host: string, - } -} - -export class EstimateFeeRequest extends jspb.Message { - getAddrtoamountMap(): jspb.Map; - clearAddrtoamountMap(): void; - getTargetConf(): number; - setTargetConf(value: number): void; - - getMinConfs(): number; - setMinConfs(value: number): void; - - getSpendUnconfirmed(): boolean; - setSpendUnconfirmed(value: boolean): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): EstimateFeeRequest.AsObject; - static toObject(includeInstance: boolean, msg: EstimateFeeRequest): EstimateFeeRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: EstimateFeeRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): EstimateFeeRequest; - static deserializeBinaryFromReader(message: EstimateFeeRequest, reader: jspb.BinaryReader): EstimateFeeRequest; -} - -export namespace EstimateFeeRequest { - export type AsObject = { - addrtoamount: Array<[string, number]>, - targetConf: number, - minConfs: number, - spendUnconfirmed: boolean, - } -} - -export class EstimateFeeResponse extends jspb.Message { - getFeeSat(): number; - setFeeSat(value: number): void; - - getFeerateSatPerByte(): number; - setFeerateSatPerByte(value: number): void; - - getSatPerVbyte(): number; - setSatPerVbyte(value: number): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): EstimateFeeResponse.AsObject; - static toObject(includeInstance: boolean, msg: EstimateFeeResponse): EstimateFeeResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: EstimateFeeResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): EstimateFeeResponse; - static deserializeBinaryFromReader(message: EstimateFeeResponse, reader: jspb.BinaryReader): EstimateFeeResponse; -} - -export namespace EstimateFeeResponse { - export type AsObject = { - feeSat: number, - feerateSatPerByte: number, - satPerVbyte: number, - } -} - -export class SendManyRequest extends jspb.Message { - getAddrtoamountMap(): jspb.Map; - clearAddrtoamountMap(): void; - getTargetConf(): number; - setTargetConf(value: number): void; - - getSatPerVbyte(): number; - setSatPerVbyte(value: number): void; - - getSatPerByte(): number; - setSatPerByte(value: number): void; - - getLabel(): string; - setLabel(value: string): void; - - getMinConfs(): number; - setMinConfs(value: number): void; - - getSpendUnconfirmed(): boolean; - setSpendUnconfirmed(value: boolean): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): SendManyRequest.AsObject; - static toObject(includeInstance: boolean, msg: SendManyRequest): SendManyRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: SendManyRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): SendManyRequest; - static deserializeBinaryFromReader(message: SendManyRequest, reader: jspb.BinaryReader): SendManyRequest; -} - -export namespace SendManyRequest { - export type AsObject = { - addrtoamount: Array<[string, number]>, - targetConf: number, - satPerVbyte: number, - satPerByte: number, - label: string, - minConfs: number, - spendUnconfirmed: boolean, - } -} - -export class SendManyResponse extends jspb.Message { - getTxid(): string; - setTxid(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): SendManyResponse.AsObject; - static toObject(includeInstance: boolean, msg: SendManyResponse): SendManyResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: SendManyResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): SendManyResponse; - static deserializeBinaryFromReader(message: SendManyResponse, reader: jspb.BinaryReader): SendManyResponse; -} - -export namespace SendManyResponse { - export type AsObject = { - txid: string, - } -} - -export class SendCoinsRequest extends jspb.Message { - getAddr(): string; - setAddr(value: string): void; - - getAmount(): number; - setAmount(value: number): void; - - getTargetConf(): number; - setTargetConf(value: number): void; - - getSatPerVbyte(): number; - setSatPerVbyte(value: number): void; - - getSatPerByte(): number; - setSatPerByte(value: number): void; - - getSendAll(): boolean; - setSendAll(value: boolean): void; - - getLabel(): string; - setLabel(value: string): void; - - getMinConfs(): number; - setMinConfs(value: number): void; - - getSpendUnconfirmed(): boolean; - setSpendUnconfirmed(value: boolean): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): SendCoinsRequest.AsObject; - static toObject(includeInstance: boolean, msg: SendCoinsRequest): SendCoinsRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: SendCoinsRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): SendCoinsRequest; - static deserializeBinaryFromReader(message: SendCoinsRequest, reader: jspb.BinaryReader): SendCoinsRequest; -} - -export namespace SendCoinsRequest { - export type AsObject = { - addr: string, - amount: number, - targetConf: number, - satPerVbyte: number, - satPerByte: number, - sendAll: boolean, - label: string, - minConfs: number, - spendUnconfirmed: boolean, - } -} - -export class SendCoinsResponse extends jspb.Message { - getTxid(): string; - setTxid(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): SendCoinsResponse.AsObject; - static toObject(includeInstance: boolean, msg: SendCoinsResponse): SendCoinsResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: SendCoinsResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): SendCoinsResponse; - static deserializeBinaryFromReader(message: SendCoinsResponse, reader: jspb.BinaryReader): SendCoinsResponse; -} - -export namespace SendCoinsResponse { - export type AsObject = { - txid: string, - } -} - -export class ListUnspentRequest extends jspb.Message { - getMinConfs(): number; - setMinConfs(value: number): void; - - getMaxConfs(): number; - setMaxConfs(value: number): void; - - getAccount(): string; - setAccount(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ListUnspentRequest.AsObject; - static toObject(includeInstance: boolean, msg: ListUnspentRequest): ListUnspentRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ListUnspentRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ListUnspentRequest; - static deserializeBinaryFromReader(message: ListUnspentRequest, reader: jspb.BinaryReader): ListUnspentRequest; -} - -export namespace ListUnspentRequest { - export type AsObject = { - minConfs: number, - maxConfs: number, - account: string, - } -} - -export class ListUnspentResponse extends jspb.Message { - clearUtxosList(): void; - getUtxosList(): Array; - setUtxosList(value: Array): void; - addUtxos(value?: Utxo, index?: number): Utxo; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ListUnspentResponse.AsObject; - static toObject(includeInstance: boolean, msg: ListUnspentResponse): ListUnspentResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ListUnspentResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ListUnspentResponse; - static deserializeBinaryFromReader(message: ListUnspentResponse, reader: jspb.BinaryReader): ListUnspentResponse; -} - -export namespace ListUnspentResponse { - export type AsObject = { - utxos: Array, - } -} - -export class NewAddressRequest extends jspb.Message { - getType(): AddressTypeMap[keyof AddressTypeMap]; - setType(value: AddressTypeMap[keyof AddressTypeMap]): void; - - getAccount(): string; - setAccount(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): NewAddressRequest.AsObject; - static toObject(includeInstance: boolean, msg: NewAddressRequest): NewAddressRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: NewAddressRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): NewAddressRequest; - static deserializeBinaryFromReader(message: NewAddressRequest, reader: jspb.BinaryReader): NewAddressRequest; -} - -export namespace NewAddressRequest { - export type AsObject = { - type: AddressTypeMap[keyof AddressTypeMap], - account: string, - } -} - -export class NewAddressResponse extends jspb.Message { - getAddress(): string; - setAddress(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): NewAddressResponse.AsObject; - static toObject(includeInstance: boolean, msg: NewAddressResponse): NewAddressResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: NewAddressResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): NewAddressResponse; - static deserializeBinaryFromReader(message: NewAddressResponse, reader: jspb.BinaryReader): NewAddressResponse; -} - -export namespace NewAddressResponse { - export type AsObject = { - address: string, - } -} - -export class SignMessageRequest extends jspb.Message { - getMsg(): Uint8Array | string; - getMsg_asU8(): Uint8Array; - getMsg_asB64(): string; - setMsg(value: Uint8Array | string): void; - - getSingleHash(): boolean; - setSingleHash(value: boolean): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): SignMessageRequest.AsObject; - static toObject(includeInstance: boolean, msg: SignMessageRequest): SignMessageRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: SignMessageRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): SignMessageRequest; - static deserializeBinaryFromReader(message: SignMessageRequest, reader: jspb.BinaryReader): SignMessageRequest; -} - -export namespace SignMessageRequest { - export type AsObject = { - msg: Uint8Array | string, - singleHash: boolean, - } -} - -export class SignMessageResponse extends jspb.Message { - getSignature(): string; - setSignature(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): SignMessageResponse.AsObject; - static toObject(includeInstance: boolean, msg: SignMessageResponse): SignMessageResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: SignMessageResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): SignMessageResponse; - static deserializeBinaryFromReader(message: SignMessageResponse, reader: jspb.BinaryReader): SignMessageResponse; -} - -export namespace SignMessageResponse { - export type AsObject = { - signature: string, - } -} - -export class VerifyMessageRequest extends jspb.Message { - getMsg(): Uint8Array | string; - getMsg_asU8(): Uint8Array; - getMsg_asB64(): string; - setMsg(value: Uint8Array | string): void; - - getSignature(): string; - setSignature(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): VerifyMessageRequest.AsObject; - static toObject(includeInstance: boolean, msg: VerifyMessageRequest): VerifyMessageRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: VerifyMessageRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): VerifyMessageRequest; - static deserializeBinaryFromReader(message: VerifyMessageRequest, reader: jspb.BinaryReader): VerifyMessageRequest; -} - -export namespace VerifyMessageRequest { - export type AsObject = { - msg: Uint8Array | string, - signature: string, - } -} - -export class VerifyMessageResponse extends jspb.Message { - getValid(): boolean; - setValid(value: boolean): void; - - getPubkey(): string; - setPubkey(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): VerifyMessageResponse.AsObject; - static toObject(includeInstance: boolean, msg: VerifyMessageResponse): VerifyMessageResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: VerifyMessageResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): VerifyMessageResponse; - static deserializeBinaryFromReader(message: VerifyMessageResponse, reader: jspb.BinaryReader): VerifyMessageResponse; -} - -export namespace VerifyMessageResponse { - export type AsObject = { - valid: boolean, - pubkey: string, - } -} - -export class ConnectPeerRequest extends jspb.Message { - hasAddr(): boolean; - clearAddr(): void; - getAddr(): LightningAddress | undefined; - setAddr(value?: LightningAddress): void; - - getPerm(): boolean; - setPerm(value: boolean): void; - - getTimeout(): number; - setTimeout(value: number): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ConnectPeerRequest.AsObject; - static toObject(includeInstance: boolean, msg: ConnectPeerRequest): ConnectPeerRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ConnectPeerRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ConnectPeerRequest; - static deserializeBinaryFromReader(message: ConnectPeerRequest, reader: jspb.BinaryReader): ConnectPeerRequest; -} - -export namespace ConnectPeerRequest { - export type AsObject = { - addr?: LightningAddress.AsObject, - perm: boolean, - timeout: number, - } -} - -export class ConnectPeerResponse extends jspb.Message { - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ConnectPeerResponse.AsObject; - static toObject(includeInstance: boolean, msg: ConnectPeerResponse): ConnectPeerResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ConnectPeerResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ConnectPeerResponse; - static deserializeBinaryFromReader(message: ConnectPeerResponse, reader: jspb.BinaryReader): ConnectPeerResponse; -} - -export namespace ConnectPeerResponse { - export type AsObject = { - } -} - -export class DisconnectPeerRequest extends jspb.Message { - getPubKey(): string; - setPubKey(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): DisconnectPeerRequest.AsObject; - static toObject(includeInstance: boolean, msg: DisconnectPeerRequest): DisconnectPeerRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: DisconnectPeerRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): DisconnectPeerRequest; - static deserializeBinaryFromReader(message: DisconnectPeerRequest, reader: jspb.BinaryReader): DisconnectPeerRequest; -} - -export namespace DisconnectPeerRequest { - export type AsObject = { - pubKey: string, - } -} - -export class DisconnectPeerResponse extends jspb.Message { - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): DisconnectPeerResponse.AsObject; - static toObject(includeInstance: boolean, msg: DisconnectPeerResponse): DisconnectPeerResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: DisconnectPeerResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): DisconnectPeerResponse; - static deserializeBinaryFromReader(message: DisconnectPeerResponse, reader: jspb.BinaryReader): DisconnectPeerResponse; -} - -export namespace DisconnectPeerResponse { - export type AsObject = { - } -} - -export class HTLC extends jspb.Message { - getIncoming(): boolean; - setIncoming(value: boolean): void; - - getAmount(): number; - setAmount(value: number): void; - - getHashLock(): Uint8Array | string; - getHashLock_asU8(): Uint8Array; - getHashLock_asB64(): string; - setHashLock(value: Uint8Array | string): void; - - getExpirationHeight(): number; - setExpirationHeight(value: number): void; - - getHtlcIndex(): number; - setHtlcIndex(value: number): void; - - getForwardingChannel(): number; - setForwardingChannel(value: number): void; - - getForwardingHtlcIndex(): number; - setForwardingHtlcIndex(value: number): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): HTLC.AsObject; - static toObject(includeInstance: boolean, msg: HTLC): HTLC.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: HTLC, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): HTLC; - static deserializeBinaryFromReader(message: HTLC, reader: jspb.BinaryReader): HTLC; -} - -export namespace HTLC { - export type AsObject = { - incoming: boolean, - amount: number, - hashLock: Uint8Array | string, - expirationHeight: number, - htlcIndex: number, - forwardingChannel: number, - forwardingHtlcIndex: number, - } -} - -export class ChannelConstraints extends jspb.Message { - getCsvDelay(): number; - setCsvDelay(value: number): void; - - getChanReserveSat(): number; - setChanReserveSat(value: number): void; - - getDustLimitSat(): number; - setDustLimitSat(value: number): void; - - getMaxPendingAmtMsat(): number; - setMaxPendingAmtMsat(value: number): void; - - getMinHtlcMsat(): number; - setMinHtlcMsat(value: number): void; - - getMaxAcceptedHtlcs(): number; - setMaxAcceptedHtlcs(value: number): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ChannelConstraints.AsObject; - static toObject(includeInstance: boolean, msg: ChannelConstraints): ChannelConstraints.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ChannelConstraints, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ChannelConstraints; - static deserializeBinaryFromReader(message: ChannelConstraints, reader: jspb.BinaryReader): ChannelConstraints; -} - -export namespace ChannelConstraints { - export type AsObject = { - csvDelay: number, - chanReserveSat: number, - dustLimitSat: number, - maxPendingAmtMsat: number, - minHtlcMsat: number, - maxAcceptedHtlcs: number, - } -} - -export class Channel extends jspb.Message { - getActive(): boolean; - setActive(value: boolean): void; - - getRemotePubkey(): string; - setRemotePubkey(value: string): void; - - getChannelPoint(): string; - setChannelPoint(value: string): void; - - getChanId(): string; - setChanId(value: string): void; - - getCapacity(): number; - setCapacity(value: number): void; - - getLocalBalance(): number; - setLocalBalance(value: number): void; - - getRemoteBalance(): number; - setRemoteBalance(value: number): void; - - getCommitFee(): number; - setCommitFee(value: number): void; - - getCommitWeight(): number; - setCommitWeight(value: number): void; - - getFeePerKw(): number; - setFeePerKw(value: number): void; - - getUnsettledBalance(): number; - setUnsettledBalance(value: number): void; - - getTotalSatoshisSent(): number; - setTotalSatoshisSent(value: number): void; - - getTotalSatoshisReceived(): number; - setTotalSatoshisReceived(value: number): void; - - getNumUpdates(): number; - setNumUpdates(value: number): void; - - clearPendingHtlcsList(): void; - getPendingHtlcsList(): Array; - setPendingHtlcsList(value: Array): void; - addPendingHtlcs(value?: HTLC, index?: number): HTLC; - - getCsvDelay(): number; - setCsvDelay(value: number): void; - - getPrivate(): boolean; - setPrivate(value: boolean): void; - - getInitiator(): boolean; - setInitiator(value: boolean): void; - - getChanStatusFlags(): string; - setChanStatusFlags(value: string): void; - - getLocalChanReserveSat(): number; - setLocalChanReserveSat(value: number): void; - - getRemoteChanReserveSat(): number; - setRemoteChanReserveSat(value: number): void; - - getStaticRemoteKey(): boolean; - setStaticRemoteKey(value: boolean): void; - - getCommitmentType(): CommitmentTypeMap[keyof CommitmentTypeMap]; - setCommitmentType(value: CommitmentTypeMap[keyof CommitmentTypeMap]): void; - - getLifetime(): number; - setLifetime(value: number): void; - - getUptime(): number; - setUptime(value: number): void; - - getCloseAddress(): string; - setCloseAddress(value: string): void; - - getPushAmountSat(): number; - setPushAmountSat(value: number): void; - - getThawHeight(): number; - setThawHeight(value: number): void; - - hasLocalConstraints(): boolean; - clearLocalConstraints(): void; - getLocalConstraints(): ChannelConstraints | undefined; - setLocalConstraints(value?: ChannelConstraints): void; - - hasRemoteConstraints(): boolean; - clearRemoteConstraints(): void; - getRemoteConstraints(): ChannelConstraints | undefined; - setRemoteConstraints(value?: ChannelConstraints): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Channel.AsObject; - static toObject(includeInstance: boolean, msg: Channel): Channel.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: Channel, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Channel; - static deserializeBinaryFromReader(message: Channel, reader: jspb.BinaryReader): Channel; -} - -export namespace Channel { - export type AsObject = { - active: boolean, - remotePubkey: string, - channelPoint: string, - chanId: string, - capacity: number, - localBalance: number, - remoteBalance: number, - commitFee: number, - commitWeight: number, - feePerKw: number, - unsettledBalance: number, - totalSatoshisSent: number, - totalSatoshisReceived: number, - numUpdates: number, - pendingHtlcs: Array, - csvDelay: number, - pb_private: boolean, - initiator: boolean, - chanStatusFlags: string, - localChanReserveSat: number, - remoteChanReserveSat: number, - staticRemoteKey: boolean, - commitmentType: CommitmentTypeMap[keyof CommitmentTypeMap], - lifetime: number, - uptime: number, - closeAddress: string, - pushAmountSat: number, - thawHeight: number, - localConstraints?: ChannelConstraints.AsObject, - remoteConstraints?: ChannelConstraints.AsObject, - } -} - -export class ListChannelsRequest extends jspb.Message { - getActiveOnly(): boolean; - setActiveOnly(value: boolean): void; - - getInactiveOnly(): boolean; - setInactiveOnly(value: boolean): void; - - getPublicOnly(): boolean; - setPublicOnly(value: boolean): void; - - getPrivateOnly(): boolean; - setPrivateOnly(value: boolean): void; - - getPeer(): Uint8Array | string; - getPeer_asU8(): Uint8Array; - getPeer_asB64(): string; - setPeer(value: Uint8Array | string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ListChannelsRequest.AsObject; - static toObject(includeInstance: boolean, msg: ListChannelsRequest): ListChannelsRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ListChannelsRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ListChannelsRequest; - static deserializeBinaryFromReader(message: ListChannelsRequest, reader: jspb.BinaryReader): ListChannelsRequest; -} - -export namespace ListChannelsRequest { - export type AsObject = { - activeOnly: boolean, - inactiveOnly: boolean, - publicOnly: boolean, - privateOnly: boolean, - peer: Uint8Array | string, - } -} - -export class ListChannelsResponse extends jspb.Message { - clearChannelsList(): void; - getChannelsList(): Array; - setChannelsList(value: Array): void; - addChannels(value?: Channel, index?: number): Channel; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ListChannelsResponse.AsObject; - static toObject(includeInstance: boolean, msg: ListChannelsResponse): ListChannelsResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ListChannelsResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ListChannelsResponse; - static deserializeBinaryFromReader(message: ListChannelsResponse, reader: jspb.BinaryReader): ListChannelsResponse; -} - -export namespace ListChannelsResponse { - export type AsObject = { - channels: Array, - } -} - -export class ChannelCloseSummary extends jspb.Message { - getChannelPoint(): string; - setChannelPoint(value: string): void; - - getChanId(): string; - setChanId(value: string): void; - - getChainHash(): string; - setChainHash(value: string): void; - - getClosingTxHash(): string; - setClosingTxHash(value: string): void; - - getRemotePubkey(): string; - setRemotePubkey(value: string): void; - - getCapacity(): number; - setCapacity(value: number): void; - - getCloseHeight(): number; - setCloseHeight(value: number): void; - - getSettledBalance(): number; - setSettledBalance(value: number): void; - - getTimeLockedBalance(): number; - setTimeLockedBalance(value: number): void; - - getCloseType(): ChannelCloseSummary.ClosureTypeMap[keyof ChannelCloseSummary.ClosureTypeMap]; - setCloseType(value: ChannelCloseSummary.ClosureTypeMap[keyof ChannelCloseSummary.ClosureTypeMap]): void; - - getOpenInitiator(): InitiatorMap[keyof InitiatorMap]; - setOpenInitiator(value: InitiatorMap[keyof InitiatorMap]): void; - - getCloseInitiator(): InitiatorMap[keyof InitiatorMap]; - setCloseInitiator(value: InitiatorMap[keyof InitiatorMap]): void; - - clearResolutionsList(): void; - getResolutionsList(): Array; - setResolutionsList(value: Array): void; - addResolutions(value?: Resolution, index?: number): Resolution; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ChannelCloseSummary.AsObject; - static toObject(includeInstance: boolean, msg: ChannelCloseSummary): ChannelCloseSummary.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ChannelCloseSummary, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ChannelCloseSummary; - static deserializeBinaryFromReader(message: ChannelCloseSummary, reader: jspb.BinaryReader): ChannelCloseSummary; -} - -export namespace ChannelCloseSummary { - export type AsObject = { - channelPoint: string, - chanId: string, - chainHash: string, - closingTxHash: string, - remotePubkey: string, - capacity: number, - closeHeight: number, - settledBalance: number, - timeLockedBalance: number, - closeType: ChannelCloseSummary.ClosureTypeMap[keyof ChannelCloseSummary.ClosureTypeMap], - openInitiator: InitiatorMap[keyof InitiatorMap], - closeInitiator: InitiatorMap[keyof InitiatorMap], - resolutions: Array, - } - - export interface ClosureTypeMap { - COOPERATIVE_CLOSE: 0; - LOCAL_FORCE_CLOSE: 1; - REMOTE_FORCE_CLOSE: 2; - BREACH_CLOSE: 3; - FUNDING_CANCELED: 4; - ABANDONED: 5; - } - - export const ClosureType: ClosureTypeMap; -} - -export class Resolution extends jspb.Message { - getResolutionType(): ResolutionTypeMap[keyof ResolutionTypeMap]; - setResolutionType(value: ResolutionTypeMap[keyof ResolutionTypeMap]): void; - - getOutcome(): ResolutionOutcomeMap[keyof ResolutionOutcomeMap]; - setOutcome(value: ResolutionOutcomeMap[keyof ResolutionOutcomeMap]): void; - - hasOutpoint(): boolean; - clearOutpoint(): void; - getOutpoint(): OutPoint | undefined; - setOutpoint(value?: OutPoint): void; - - getAmountSat(): number; - setAmountSat(value: number): void; - - getSweepTxid(): string; - setSweepTxid(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Resolution.AsObject; - static toObject(includeInstance: boolean, msg: Resolution): Resolution.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: Resolution, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Resolution; - static deserializeBinaryFromReader(message: Resolution, reader: jspb.BinaryReader): Resolution; -} - -export namespace Resolution { - export type AsObject = { - resolutionType: ResolutionTypeMap[keyof ResolutionTypeMap], - outcome: ResolutionOutcomeMap[keyof ResolutionOutcomeMap], - outpoint?: OutPoint.AsObject, - amountSat: number, - sweepTxid: string, - } -} - -export class ClosedChannelsRequest extends jspb.Message { - getCooperative(): boolean; - setCooperative(value: boolean): void; - - getLocalForce(): boolean; - setLocalForce(value: boolean): void; - - getRemoteForce(): boolean; - setRemoteForce(value: boolean): void; - - getBreach(): boolean; - setBreach(value: boolean): void; - - getFundingCanceled(): boolean; - setFundingCanceled(value: boolean): void; - - getAbandoned(): boolean; - setAbandoned(value: boolean): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ClosedChannelsRequest.AsObject; - static toObject(includeInstance: boolean, msg: ClosedChannelsRequest): ClosedChannelsRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ClosedChannelsRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ClosedChannelsRequest; - static deserializeBinaryFromReader(message: ClosedChannelsRequest, reader: jspb.BinaryReader): ClosedChannelsRequest; -} - -export namespace ClosedChannelsRequest { - export type AsObject = { - cooperative: boolean, - localForce: boolean, - remoteForce: boolean, - breach: boolean, - fundingCanceled: boolean, - abandoned: boolean, - } -} - -export class ClosedChannelsResponse extends jspb.Message { - clearChannelsList(): void; - getChannelsList(): Array; - setChannelsList(value: Array): void; - addChannels(value?: ChannelCloseSummary, index?: number): ChannelCloseSummary; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ClosedChannelsResponse.AsObject; - static toObject(includeInstance: boolean, msg: ClosedChannelsResponse): ClosedChannelsResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ClosedChannelsResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ClosedChannelsResponse; - static deserializeBinaryFromReader(message: ClosedChannelsResponse, reader: jspb.BinaryReader): ClosedChannelsResponse; -} - -export namespace ClosedChannelsResponse { - export type AsObject = { - channels: Array, - } -} - -export class Peer extends jspb.Message { - getPubKey(): string; - setPubKey(value: string): void; - - getAddress(): string; - setAddress(value: string): void; - - getBytesSent(): number; - setBytesSent(value: number): void; - - getBytesRecv(): number; - setBytesRecv(value: number): void; - - getSatSent(): number; - setSatSent(value: number): void; - - getSatRecv(): number; - setSatRecv(value: number): void; - - getInbound(): boolean; - setInbound(value: boolean): void; - - getPingTime(): number; - setPingTime(value: number): void; - - getSyncType(): Peer.SyncTypeMap[keyof Peer.SyncTypeMap]; - setSyncType(value: Peer.SyncTypeMap[keyof Peer.SyncTypeMap]): void; - - getFeaturesMap(): jspb.Map; - clearFeaturesMap(): void; - clearErrorsList(): void; - getErrorsList(): Array; - setErrorsList(value: Array): void; - addErrors(value?: TimestampedError, index?: number): TimestampedError; - - getFlapCount(): number; - setFlapCount(value: number): void; - - getLastFlapNs(): number; - setLastFlapNs(value: number): void; - - getLastPingPayload(): Uint8Array | string; - getLastPingPayload_asU8(): Uint8Array; - getLastPingPayload_asB64(): string; - setLastPingPayload(value: Uint8Array | string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Peer.AsObject; - static toObject(includeInstance: boolean, msg: Peer): Peer.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: Peer, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Peer; - static deserializeBinaryFromReader(message: Peer, reader: jspb.BinaryReader): Peer; -} - -export namespace Peer { - export type AsObject = { - pubKey: string, - address: string, - bytesSent: number, - bytesRecv: number, - satSent: number, - satRecv: number, - inbound: boolean, - pingTime: number, - syncType: Peer.SyncTypeMap[keyof Peer.SyncTypeMap], - features: Array<[number, Feature.AsObject]>, - errors: Array, - flapCount: number, - lastFlapNs: number, - lastPingPayload: Uint8Array | string, - } - - export interface SyncTypeMap { - UNKNOWN_SYNC: 0; - ACTIVE_SYNC: 1; - PASSIVE_SYNC: 2; - PINNED_SYNC: 3; - } - - export const SyncType: SyncTypeMap; -} - -export class TimestampedError extends jspb.Message { - getTimestamp(): number; - setTimestamp(value: number): void; - - getError(): string; - setError(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): TimestampedError.AsObject; - static toObject(includeInstance: boolean, msg: TimestampedError): TimestampedError.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: TimestampedError, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): TimestampedError; - static deserializeBinaryFromReader(message: TimestampedError, reader: jspb.BinaryReader): TimestampedError; -} - -export namespace TimestampedError { - export type AsObject = { - timestamp: number, - error: string, - } -} - -export class ListPeersRequest extends jspb.Message { - getLatestError(): boolean; - setLatestError(value: boolean): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ListPeersRequest.AsObject; - static toObject(includeInstance: boolean, msg: ListPeersRequest): ListPeersRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ListPeersRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ListPeersRequest; - static deserializeBinaryFromReader(message: ListPeersRequest, reader: jspb.BinaryReader): ListPeersRequest; -} - -export namespace ListPeersRequest { - export type AsObject = { - latestError: boolean, - } -} - -export class ListPeersResponse extends jspb.Message { - clearPeersList(): void; - getPeersList(): Array; - setPeersList(value: Array): void; - addPeers(value?: Peer, index?: number): Peer; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ListPeersResponse.AsObject; - static toObject(includeInstance: boolean, msg: ListPeersResponse): ListPeersResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ListPeersResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ListPeersResponse; - static deserializeBinaryFromReader(message: ListPeersResponse, reader: jspb.BinaryReader): ListPeersResponse; -} - -export namespace ListPeersResponse { - export type AsObject = { - peers: Array, - } -} - -export class PeerEventSubscription extends jspb.Message { - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): PeerEventSubscription.AsObject; - static toObject(includeInstance: boolean, msg: PeerEventSubscription): PeerEventSubscription.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: PeerEventSubscription, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): PeerEventSubscription; - static deserializeBinaryFromReader(message: PeerEventSubscription, reader: jspb.BinaryReader): PeerEventSubscription; -} - -export namespace PeerEventSubscription { - export type AsObject = { - } -} - -export class PeerEvent extends jspb.Message { - getPubKey(): string; - setPubKey(value: string): void; - - getType(): PeerEvent.EventTypeMap[keyof PeerEvent.EventTypeMap]; - setType(value: PeerEvent.EventTypeMap[keyof PeerEvent.EventTypeMap]): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): PeerEvent.AsObject; - static toObject(includeInstance: boolean, msg: PeerEvent): PeerEvent.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: PeerEvent, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): PeerEvent; - static deserializeBinaryFromReader(message: PeerEvent, reader: jspb.BinaryReader): PeerEvent; -} - -export namespace PeerEvent { - export type AsObject = { - pubKey: string, - type: PeerEvent.EventTypeMap[keyof PeerEvent.EventTypeMap], - } - - export interface EventTypeMap { - PEER_ONLINE: 0; - PEER_OFFLINE: 1; - } - - export const EventType: EventTypeMap; -} - -export class GetInfoRequest extends jspb.Message { - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GetInfoRequest.AsObject; - static toObject(includeInstance: boolean, msg: GetInfoRequest): GetInfoRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: GetInfoRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GetInfoRequest; - static deserializeBinaryFromReader(message: GetInfoRequest, reader: jspb.BinaryReader): GetInfoRequest; -} - -export namespace GetInfoRequest { - export type AsObject = { - } -} - -export class GetInfoResponse extends jspb.Message { - getVersion(): string; - setVersion(value: string): void; - - getCommitHash(): string; - setCommitHash(value: string): void; - - getIdentityPubkey(): string; - setIdentityPubkey(value: string): void; - - getAlias(): string; - setAlias(value: string): void; - - getColor(): string; - setColor(value: string): void; - - getNumPendingChannels(): number; - setNumPendingChannels(value: number): void; - - getNumActiveChannels(): number; - setNumActiveChannels(value: number): void; - - getNumInactiveChannels(): number; - setNumInactiveChannels(value: number): void; - - getNumPeers(): number; - setNumPeers(value: number): void; - - getBlockHeight(): number; - setBlockHeight(value: number): void; - - getBlockHash(): string; - setBlockHash(value: string): void; - - getBestHeaderTimestamp(): number; - setBestHeaderTimestamp(value: number): void; - - getSyncedToChain(): boolean; - setSyncedToChain(value: boolean): void; - - getSyncedToGraph(): boolean; - setSyncedToGraph(value: boolean): void; - - getTestnet(): boolean; - setTestnet(value: boolean): void; - - clearChainsList(): void; - getChainsList(): Array; - setChainsList(value: Array): void; - addChains(value?: Chain, index?: number): Chain; - - clearUrisList(): void; - getUrisList(): Array; - setUrisList(value: Array): void; - addUris(value: string, index?: number): string; - - getFeaturesMap(): jspb.Map; - clearFeaturesMap(): void; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GetInfoResponse.AsObject; - static toObject(includeInstance: boolean, msg: GetInfoResponse): GetInfoResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: GetInfoResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GetInfoResponse; - static deserializeBinaryFromReader(message: GetInfoResponse, reader: jspb.BinaryReader): GetInfoResponse; -} - -export namespace GetInfoResponse { - export type AsObject = { - version: string, - commitHash: string, - identityPubkey: string, - alias: string, - color: string, - numPendingChannels: number, - numActiveChannels: number, - numInactiveChannels: number, - numPeers: number, - blockHeight: number, - blockHash: string, - bestHeaderTimestamp: number, - syncedToChain: boolean, - syncedToGraph: boolean, - testnet: boolean, - chains: Array, - uris: Array, - features: Array<[number, Feature.AsObject]>, - } -} - -export class GetRecoveryInfoRequest extends jspb.Message { - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GetRecoveryInfoRequest.AsObject; - static toObject(includeInstance: boolean, msg: GetRecoveryInfoRequest): GetRecoveryInfoRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: GetRecoveryInfoRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GetRecoveryInfoRequest; - static deserializeBinaryFromReader(message: GetRecoveryInfoRequest, reader: jspb.BinaryReader): GetRecoveryInfoRequest; -} - -export namespace GetRecoveryInfoRequest { - export type AsObject = { - } -} - -export class GetRecoveryInfoResponse extends jspb.Message { - getRecoveryMode(): boolean; - setRecoveryMode(value: boolean): void; - - getRecoveryFinished(): boolean; - setRecoveryFinished(value: boolean): void; - - getProgress(): number; - setProgress(value: number): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GetRecoveryInfoResponse.AsObject; - static toObject(includeInstance: boolean, msg: GetRecoveryInfoResponse): GetRecoveryInfoResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: GetRecoveryInfoResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GetRecoveryInfoResponse; - static deserializeBinaryFromReader(message: GetRecoveryInfoResponse, reader: jspb.BinaryReader): GetRecoveryInfoResponse; -} - -export namespace GetRecoveryInfoResponse { - export type AsObject = { - recoveryMode: boolean, - recoveryFinished: boolean, - progress: number, - } -} - -export class Chain extends jspb.Message { - getChain(): string; - setChain(value: string): void; - - getNetwork(): string; - setNetwork(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Chain.AsObject; - static toObject(includeInstance: boolean, msg: Chain): Chain.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: Chain, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Chain; - static deserializeBinaryFromReader(message: Chain, reader: jspb.BinaryReader): Chain; -} - -export namespace Chain { - export type AsObject = { - chain: string, - network: string, - } -} - -export class ConfirmationUpdate extends jspb.Message { - getBlockSha(): Uint8Array | string; - getBlockSha_asU8(): Uint8Array; - getBlockSha_asB64(): string; - setBlockSha(value: Uint8Array | string): void; - - getBlockHeight(): number; - setBlockHeight(value: number): void; - - getNumConfsLeft(): number; - setNumConfsLeft(value: number): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ConfirmationUpdate.AsObject; - static toObject(includeInstance: boolean, msg: ConfirmationUpdate): ConfirmationUpdate.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ConfirmationUpdate, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ConfirmationUpdate; - static deserializeBinaryFromReader(message: ConfirmationUpdate, reader: jspb.BinaryReader): ConfirmationUpdate; -} - -export namespace ConfirmationUpdate { - export type AsObject = { - blockSha: Uint8Array | string, - blockHeight: number, - numConfsLeft: number, - } -} - -export class ChannelOpenUpdate extends jspb.Message { - hasChannelPoint(): boolean; - clearChannelPoint(): void; - getChannelPoint(): ChannelPoint | undefined; - setChannelPoint(value?: ChannelPoint): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ChannelOpenUpdate.AsObject; - static toObject(includeInstance: boolean, msg: ChannelOpenUpdate): ChannelOpenUpdate.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ChannelOpenUpdate, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ChannelOpenUpdate; - static deserializeBinaryFromReader(message: ChannelOpenUpdate, reader: jspb.BinaryReader): ChannelOpenUpdate; -} - -export namespace ChannelOpenUpdate { - export type AsObject = { - channelPoint?: ChannelPoint.AsObject, - } -} - -export class ChannelCloseUpdate extends jspb.Message { - getClosingTxid(): Uint8Array | string; - getClosingTxid_asU8(): Uint8Array; - getClosingTxid_asB64(): string; - setClosingTxid(value: Uint8Array | string): void; - - getSuccess(): boolean; - setSuccess(value: boolean): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ChannelCloseUpdate.AsObject; - static toObject(includeInstance: boolean, msg: ChannelCloseUpdate): ChannelCloseUpdate.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ChannelCloseUpdate, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ChannelCloseUpdate; - static deserializeBinaryFromReader(message: ChannelCloseUpdate, reader: jspb.BinaryReader): ChannelCloseUpdate; -} - -export namespace ChannelCloseUpdate { - export type AsObject = { - closingTxid: Uint8Array | string, - success: boolean, - } -} - -export class CloseChannelRequest extends jspb.Message { - hasChannelPoint(): boolean; - clearChannelPoint(): void; - getChannelPoint(): ChannelPoint | undefined; - setChannelPoint(value?: ChannelPoint): void; - - getForce(): boolean; - setForce(value: boolean): void; - - getTargetConf(): number; - setTargetConf(value: number): void; - - getSatPerByte(): number; - setSatPerByte(value: number): void; - - getDeliveryAddress(): string; - setDeliveryAddress(value: string): void; - - getSatPerVbyte(): number; - setSatPerVbyte(value: number): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): CloseChannelRequest.AsObject; - static toObject(includeInstance: boolean, msg: CloseChannelRequest): CloseChannelRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: CloseChannelRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): CloseChannelRequest; - static deserializeBinaryFromReader(message: CloseChannelRequest, reader: jspb.BinaryReader): CloseChannelRequest; -} - -export namespace CloseChannelRequest { - export type AsObject = { - channelPoint?: ChannelPoint.AsObject, - force: boolean, - targetConf: number, - satPerByte: number, - deliveryAddress: string, - satPerVbyte: number, - } -} - -export class CloseStatusUpdate extends jspb.Message { - hasClosePending(): boolean; - clearClosePending(): void; - getClosePending(): PendingUpdate | undefined; - setClosePending(value?: PendingUpdate): void; - - hasChanClose(): boolean; - clearChanClose(): void; - getChanClose(): ChannelCloseUpdate | undefined; - setChanClose(value?: ChannelCloseUpdate): void; - - getUpdateCase(): CloseStatusUpdate.UpdateCase; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): CloseStatusUpdate.AsObject; - static toObject(includeInstance: boolean, msg: CloseStatusUpdate): CloseStatusUpdate.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: CloseStatusUpdate, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): CloseStatusUpdate; - static deserializeBinaryFromReader(message: CloseStatusUpdate, reader: jspb.BinaryReader): CloseStatusUpdate; -} - -export namespace CloseStatusUpdate { - export type AsObject = { - closePending?: PendingUpdate.AsObject, - chanClose?: ChannelCloseUpdate.AsObject, - } - - export enum UpdateCase { - UPDATE_NOT_SET = 0, - CLOSE_PENDING = 1, - CHAN_CLOSE = 3, - } -} - -export class PendingUpdate extends jspb.Message { - getTxid(): Uint8Array | string; - getTxid_asU8(): Uint8Array; - getTxid_asB64(): string; - setTxid(value: Uint8Array | string): void; - - getOutputIndex(): number; - setOutputIndex(value: number): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): PendingUpdate.AsObject; - static toObject(includeInstance: boolean, msg: PendingUpdate): PendingUpdate.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: PendingUpdate, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): PendingUpdate; - static deserializeBinaryFromReader(message: PendingUpdate, reader: jspb.BinaryReader): PendingUpdate; -} - -export namespace PendingUpdate { - export type AsObject = { - txid: Uint8Array | string, - outputIndex: number, - } -} - -export class ReadyForPsbtFunding extends jspb.Message { - getFundingAddress(): string; - setFundingAddress(value: string): void; - - getFundingAmount(): number; - setFundingAmount(value: number): void; - - getPsbt(): Uint8Array | string; - getPsbt_asU8(): Uint8Array; - getPsbt_asB64(): string; - setPsbt(value: Uint8Array | string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ReadyForPsbtFunding.AsObject; - static toObject(includeInstance: boolean, msg: ReadyForPsbtFunding): ReadyForPsbtFunding.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ReadyForPsbtFunding, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ReadyForPsbtFunding; - static deserializeBinaryFromReader(message: ReadyForPsbtFunding, reader: jspb.BinaryReader): ReadyForPsbtFunding; -} - -export namespace ReadyForPsbtFunding { - export type AsObject = { - fundingAddress: string, - fundingAmount: number, - psbt: Uint8Array | string, - } -} - -export class BatchOpenChannelRequest extends jspb.Message { - clearChannelsList(): void; - getChannelsList(): Array; - setChannelsList(value: Array): void; - addChannels(value?: BatchOpenChannel, index?: number): BatchOpenChannel; - - getTargetConf(): number; - setTargetConf(value: number): void; - - getSatPerVbyte(): number; - setSatPerVbyte(value: number): void; - - getMinConfs(): number; - setMinConfs(value: number): void; - - getSpendUnconfirmed(): boolean; - setSpendUnconfirmed(value: boolean): void; - - getLabel(): string; - setLabel(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): BatchOpenChannelRequest.AsObject; - static toObject(includeInstance: boolean, msg: BatchOpenChannelRequest): BatchOpenChannelRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: BatchOpenChannelRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): BatchOpenChannelRequest; - static deserializeBinaryFromReader(message: BatchOpenChannelRequest, reader: jspb.BinaryReader): BatchOpenChannelRequest; -} - -export namespace BatchOpenChannelRequest { - export type AsObject = { - channels: Array, - targetConf: number, - satPerVbyte: number, - minConfs: number, - spendUnconfirmed: boolean, - label: string, - } -} - -export class BatchOpenChannel extends jspb.Message { - getNodePubkey(): Uint8Array | string; - getNodePubkey_asU8(): Uint8Array; - getNodePubkey_asB64(): string; - setNodePubkey(value: Uint8Array | string): void; - - getLocalFundingAmount(): number; - setLocalFundingAmount(value: number): void; - - getPushSat(): number; - setPushSat(value: number): void; - - getPrivate(): boolean; - setPrivate(value: boolean): void; - - getMinHtlcMsat(): number; - setMinHtlcMsat(value: number): void; - - getRemoteCsvDelay(): number; - setRemoteCsvDelay(value: number): void; - - getCloseAddress(): string; - setCloseAddress(value: string): void; - - getPendingChanId(): Uint8Array | string; - getPendingChanId_asU8(): Uint8Array; - getPendingChanId_asB64(): string; - setPendingChanId(value: Uint8Array | string): void; - - getCommitmentType(): CommitmentTypeMap[keyof CommitmentTypeMap]; - setCommitmentType(value: CommitmentTypeMap[keyof CommitmentTypeMap]): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): BatchOpenChannel.AsObject; - static toObject(includeInstance: boolean, msg: BatchOpenChannel): BatchOpenChannel.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: BatchOpenChannel, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): BatchOpenChannel; - static deserializeBinaryFromReader(message: BatchOpenChannel, reader: jspb.BinaryReader): BatchOpenChannel; -} - -export namespace BatchOpenChannel { - export type AsObject = { - nodePubkey: Uint8Array | string, - localFundingAmount: number, - pushSat: number, - pb_private: boolean, - minHtlcMsat: number, - remoteCsvDelay: number, - closeAddress: string, - pendingChanId: Uint8Array | string, - commitmentType: CommitmentTypeMap[keyof CommitmentTypeMap], - } -} - -export class BatchOpenChannelResponse extends jspb.Message { - clearPendingChannelsList(): void; - getPendingChannelsList(): Array; - setPendingChannelsList(value: Array): void; - addPendingChannels(value?: PendingUpdate, index?: number): PendingUpdate; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): BatchOpenChannelResponse.AsObject; - static toObject(includeInstance: boolean, msg: BatchOpenChannelResponse): BatchOpenChannelResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: BatchOpenChannelResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): BatchOpenChannelResponse; - static deserializeBinaryFromReader(message: BatchOpenChannelResponse, reader: jspb.BinaryReader): BatchOpenChannelResponse; -} - -export namespace BatchOpenChannelResponse { - export type AsObject = { - pendingChannels: Array, - } -} - -export class OpenChannelRequest extends jspb.Message { - getSatPerVbyte(): number; - setSatPerVbyte(value: number): void; - - getNodePubkey(): Uint8Array | string; - getNodePubkey_asU8(): Uint8Array; - getNodePubkey_asB64(): string; - setNodePubkey(value: Uint8Array | string): void; - - getNodePubkeyString(): string; - setNodePubkeyString(value: string): void; - - getLocalFundingAmount(): number; - setLocalFundingAmount(value: number): void; - - getPushSat(): number; - setPushSat(value: number): void; - - getTargetConf(): number; - setTargetConf(value: number): void; - - getSatPerByte(): number; - setSatPerByte(value: number): void; - - getPrivate(): boolean; - setPrivate(value: boolean): void; - - getMinHtlcMsat(): number; - setMinHtlcMsat(value: number): void; - - getRemoteCsvDelay(): number; - setRemoteCsvDelay(value: number): void; - - getMinConfs(): number; - setMinConfs(value: number): void; - - getSpendUnconfirmed(): boolean; - setSpendUnconfirmed(value: boolean): void; - - getCloseAddress(): string; - setCloseAddress(value: string): void; - - hasFundingShim(): boolean; - clearFundingShim(): void; - getFundingShim(): FundingShim | undefined; - setFundingShim(value?: FundingShim): void; - - getRemoteMaxValueInFlightMsat(): number; - setRemoteMaxValueInFlightMsat(value: number): void; - - getRemoteMaxHtlcs(): number; - setRemoteMaxHtlcs(value: number): void; - - getMaxLocalCsv(): number; - setMaxLocalCsv(value: number): void; - - getCommitmentType(): CommitmentTypeMap[keyof CommitmentTypeMap]; - setCommitmentType(value: CommitmentTypeMap[keyof CommitmentTypeMap]): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): OpenChannelRequest.AsObject; - static toObject(includeInstance: boolean, msg: OpenChannelRequest): OpenChannelRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: OpenChannelRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): OpenChannelRequest; - static deserializeBinaryFromReader(message: OpenChannelRequest, reader: jspb.BinaryReader): OpenChannelRequest; -} - -export namespace OpenChannelRequest { - export type AsObject = { - satPerVbyte: number, - nodePubkey: Uint8Array | string, - nodePubkeyString: string, - localFundingAmount: number, - pushSat: number, - targetConf: number, - satPerByte: number, - pb_private: boolean, - minHtlcMsat: number, - remoteCsvDelay: number, - minConfs: number, - spendUnconfirmed: boolean, - closeAddress: string, - fundingShim?: FundingShim.AsObject, - remoteMaxValueInFlightMsat: number, - remoteMaxHtlcs: number, - maxLocalCsv: number, - commitmentType: CommitmentTypeMap[keyof CommitmentTypeMap], - } -} - -export class OpenStatusUpdate extends jspb.Message { - hasChanPending(): boolean; - clearChanPending(): void; - getChanPending(): PendingUpdate | undefined; - setChanPending(value?: PendingUpdate): void; - - hasChanOpen(): boolean; - clearChanOpen(): void; - getChanOpen(): ChannelOpenUpdate | undefined; - setChanOpen(value?: ChannelOpenUpdate): void; - - hasPsbtFund(): boolean; - clearPsbtFund(): void; - getPsbtFund(): ReadyForPsbtFunding | undefined; - setPsbtFund(value?: ReadyForPsbtFunding): void; - - getPendingChanId(): Uint8Array | string; - getPendingChanId_asU8(): Uint8Array; - getPendingChanId_asB64(): string; - setPendingChanId(value: Uint8Array | string): void; - - getUpdateCase(): OpenStatusUpdate.UpdateCase; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): OpenStatusUpdate.AsObject; - static toObject(includeInstance: boolean, msg: OpenStatusUpdate): OpenStatusUpdate.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: OpenStatusUpdate, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): OpenStatusUpdate; - static deserializeBinaryFromReader(message: OpenStatusUpdate, reader: jspb.BinaryReader): OpenStatusUpdate; -} - -export namespace OpenStatusUpdate { - export type AsObject = { - chanPending?: PendingUpdate.AsObject, - chanOpen?: ChannelOpenUpdate.AsObject, - psbtFund?: ReadyForPsbtFunding.AsObject, - pendingChanId: Uint8Array | string, - } - - export enum UpdateCase { - UPDATE_NOT_SET = 0, - CHAN_PENDING = 1, - CHAN_OPEN = 3, - PSBT_FUND = 5, - } -} - -export class KeyLocator extends jspb.Message { - getKeyFamily(): number; - setKeyFamily(value: number): void; - - getKeyIndex(): number; - setKeyIndex(value: number): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): KeyLocator.AsObject; - static toObject(includeInstance: boolean, msg: KeyLocator): KeyLocator.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: KeyLocator, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): KeyLocator; - static deserializeBinaryFromReader(message: KeyLocator, reader: jspb.BinaryReader): KeyLocator; -} - -export namespace KeyLocator { - export type AsObject = { - keyFamily: number, - keyIndex: number, - } -} - -export class KeyDescriptor extends jspb.Message { - getRawKeyBytes(): Uint8Array | string; - getRawKeyBytes_asU8(): Uint8Array; - getRawKeyBytes_asB64(): string; - setRawKeyBytes(value: Uint8Array | string): void; - - hasKeyLoc(): boolean; - clearKeyLoc(): void; - getKeyLoc(): KeyLocator | undefined; - setKeyLoc(value?: KeyLocator): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): KeyDescriptor.AsObject; - static toObject(includeInstance: boolean, msg: KeyDescriptor): KeyDescriptor.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: KeyDescriptor, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): KeyDescriptor; - static deserializeBinaryFromReader(message: KeyDescriptor, reader: jspb.BinaryReader): KeyDescriptor; -} - -export namespace KeyDescriptor { - export type AsObject = { - rawKeyBytes: Uint8Array | string, - keyLoc?: KeyLocator.AsObject, - } -} - -export class ChanPointShim extends jspb.Message { - getAmt(): number; - setAmt(value: number): void; - - hasChanPoint(): boolean; - clearChanPoint(): void; - getChanPoint(): ChannelPoint | undefined; - setChanPoint(value?: ChannelPoint): void; - - hasLocalKey(): boolean; - clearLocalKey(): void; - getLocalKey(): KeyDescriptor | undefined; - setLocalKey(value?: KeyDescriptor): void; - - getRemoteKey(): Uint8Array | string; - getRemoteKey_asU8(): Uint8Array; - getRemoteKey_asB64(): string; - setRemoteKey(value: Uint8Array | string): void; - - getPendingChanId(): Uint8Array | string; - getPendingChanId_asU8(): Uint8Array; - getPendingChanId_asB64(): string; - setPendingChanId(value: Uint8Array | string): void; - - getThawHeight(): number; - setThawHeight(value: number): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ChanPointShim.AsObject; - static toObject(includeInstance: boolean, msg: ChanPointShim): ChanPointShim.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ChanPointShim, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ChanPointShim; - static deserializeBinaryFromReader(message: ChanPointShim, reader: jspb.BinaryReader): ChanPointShim; -} - -export namespace ChanPointShim { - export type AsObject = { - amt: number, - chanPoint?: ChannelPoint.AsObject, - localKey?: KeyDescriptor.AsObject, - remoteKey: Uint8Array | string, - pendingChanId: Uint8Array | string, - thawHeight: number, - } -} - -export class PsbtShim extends jspb.Message { - getPendingChanId(): Uint8Array | string; - getPendingChanId_asU8(): Uint8Array; - getPendingChanId_asB64(): string; - setPendingChanId(value: Uint8Array | string): void; - - getBasePsbt(): Uint8Array | string; - getBasePsbt_asU8(): Uint8Array; - getBasePsbt_asB64(): string; - setBasePsbt(value: Uint8Array | string): void; - - getNoPublish(): boolean; - setNoPublish(value: boolean): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): PsbtShim.AsObject; - static toObject(includeInstance: boolean, msg: PsbtShim): PsbtShim.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: PsbtShim, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): PsbtShim; - static deserializeBinaryFromReader(message: PsbtShim, reader: jspb.BinaryReader): PsbtShim; -} - -export namespace PsbtShim { - export type AsObject = { - pendingChanId: Uint8Array | string, - basePsbt: Uint8Array | string, - noPublish: boolean, - } -} - -export class FundingShim extends jspb.Message { - hasChanPointShim(): boolean; - clearChanPointShim(): void; - getChanPointShim(): ChanPointShim | undefined; - setChanPointShim(value?: ChanPointShim): void; - - hasPsbtShim(): boolean; - clearPsbtShim(): void; - getPsbtShim(): PsbtShim | undefined; - setPsbtShim(value?: PsbtShim): void; - - getShimCase(): FundingShim.ShimCase; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): FundingShim.AsObject; - static toObject(includeInstance: boolean, msg: FundingShim): FundingShim.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: FundingShim, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): FundingShim; - static deserializeBinaryFromReader(message: FundingShim, reader: jspb.BinaryReader): FundingShim; -} - -export namespace FundingShim { - export type AsObject = { - chanPointShim?: ChanPointShim.AsObject, - psbtShim?: PsbtShim.AsObject, - } - - export enum ShimCase { - SHIM_NOT_SET = 0, - CHAN_POINT_SHIM = 1, - PSBT_SHIM = 2, - } -} - -export class FundingShimCancel extends jspb.Message { - getPendingChanId(): Uint8Array | string; - getPendingChanId_asU8(): Uint8Array; - getPendingChanId_asB64(): string; - setPendingChanId(value: Uint8Array | string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): FundingShimCancel.AsObject; - static toObject(includeInstance: boolean, msg: FundingShimCancel): FundingShimCancel.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: FundingShimCancel, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): FundingShimCancel; - static deserializeBinaryFromReader(message: FundingShimCancel, reader: jspb.BinaryReader): FundingShimCancel; -} - -export namespace FundingShimCancel { - export type AsObject = { - pendingChanId: Uint8Array | string, - } -} - -export class FundingPsbtVerify extends jspb.Message { - getFundedPsbt(): Uint8Array | string; - getFundedPsbt_asU8(): Uint8Array; - getFundedPsbt_asB64(): string; - setFundedPsbt(value: Uint8Array | string): void; - - getPendingChanId(): Uint8Array | string; - getPendingChanId_asU8(): Uint8Array; - getPendingChanId_asB64(): string; - setPendingChanId(value: Uint8Array | string): void; - - getSkipFinalize(): boolean; - setSkipFinalize(value: boolean): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): FundingPsbtVerify.AsObject; - static toObject(includeInstance: boolean, msg: FundingPsbtVerify): FundingPsbtVerify.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: FundingPsbtVerify, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): FundingPsbtVerify; - static deserializeBinaryFromReader(message: FundingPsbtVerify, reader: jspb.BinaryReader): FundingPsbtVerify; -} - -export namespace FundingPsbtVerify { - export type AsObject = { - fundedPsbt: Uint8Array | string, - pendingChanId: Uint8Array | string, - skipFinalize: boolean, - } -} - -export class FundingPsbtFinalize extends jspb.Message { - getSignedPsbt(): Uint8Array | string; - getSignedPsbt_asU8(): Uint8Array; - getSignedPsbt_asB64(): string; - setSignedPsbt(value: Uint8Array | string): void; - - getPendingChanId(): Uint8Array | string; - getPendingChanId_asU8(): Uint8Array; - getPendingChanId_asB64(): string; - setPendingChanId(value: Uint8Array | string): void; - - getFinalRawTx(): Uint8Array | string; - getFinalRawTx_asU8(): Uint8Array; - getFinalRawTx_asB64(): string; - setFinalRawTx(value: Uint8Array | string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): FundingPsbtFinalize.AsObject; - static toObject(includeInstance: boolean, msg: FundingPsbtFinalize): FundingPsbtFinalize.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: FundingPsbtFinalize, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): FundingPsbtFinalize; - static deserializeBinaryFromReader(message: FundingPsbtFinalize, reader: jspb.BinaryReader): FundingPsbtFinalize; -} - -export namespace FundingPsbtFinalize { - export type AsObject = { - signedPsbt: Uint8Array | string, - pendingChanId: Uint8Array | string, - finalRawTx: Uint8Array | string, - } -} - -export class FundingTransitionMsg extends jspb.Message { - hasShimRegister(): boolean; - clearShimRegister(): void; - getShimRegister(): FundingShim | undefined; - setShimRegister(value?: FundingShim): void; - - hasShimCancel(): boolean; - clearShimCancel(): void; - getShimCancel(): FundingShimCancel | undefined; - setShimCancel(value?: FundingShimCancel): void; - - hasPsbtVerify(): boolean; - clearPsbtVerify(): void; - getPsbtVerify(): FundingPsbtVerify | undefined; - setPsbtVerify(value?: FundingPsbtVerify): void; - - hasPsbtFinalize(): boolean; - clearPsbtFinalize(): void; - getPsbtFinalize(): FundingPsbtFinalize | undefined; - setPsbtFinalize(value?: FundingPsbtFinalize): void; - - getTriggerCase(): FundingTransitionMsg.TriggerCase; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): FundingTransitionMsg.AsObject; - static toObject(includeInstance: boolean, msg: FundingTransitionMsg): FundingTransitionMsg.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: FundingTransitionMsg, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): FundingTransitionMsg; - static deserializeBinaryFromReader(message: FundingTransitionMsg, reader: jspb.BinaryReader): FundingTransitionMsg; -} - -export namespace FundingTransitionMsg { - export type AsObject = { - shimRegister?: FundingShim.AsObject, - shimCancel?: FundingShimCancel.AsObject, - psbtVerify?: FundingPsbtVerify.AsObject, - psbtFinalize?: FundingPsbtFinalize.AsObject, - } - - export enum TriggerCase { - TRIGGER_NOT_SET = 0, - SHIM_REGISTER = 1, - SHIM_CANCEL = 2, - PSBT_VERIFY = 3, - PSBT_FINALIZE = 4, - } -} - -export class FundingStateStepResp extends jspb.Message { - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): FundingStateStepResp.AsObject; - static toObject(includeInstance: boolean, msg: FundingStateStepResp): FundingStateStepResp.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: FundingStateStepResp, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): FundingStateStepResp; - static deserializeBinaryFromReader(message: FundingStateStepResp, reader: jspb.BinaryReader): FundingStateStepResp; -} - -export namespace FundingStateStepResp { - export type AsObject = { - } -} - -export class PendingHTLC extends jspb.Message { - getIncoming(): boolean; - setIncoming(value: boolean): void; - - getAmount(): number; - setAmount(value: number): void; - - getOutpoint(): string; - setOutpoint(value: string): void; - - getMaturityHeight(): number; - setMaturityHeight(value: number): void; - - getBlocksTilMaturity(): number; - setBlocksTilMaturity(value: number): void; - - getStage(): number; - setStage(value: number): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): PendingHTLC.AsObject; - static toObject(includeInstance: boolean, msg: PendingHTLC): PendingHTLC.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: PendingHTLC, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): PendingHTLC; - static deserializeBinaryFromReader(message: PendingHTLC, reader: jspb.BinaryReader): PendingHTLC; -} - -export namespace PendingHTLC { - export type AsObject = { - incoming: boolean, - amount: number, - outpoint: string, - maturityHeight: number, - blocksTilMaturity: number, - stage: number, - } -} - -export class PendingChannelsRequest extends jspb.Message { - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): PendingChannelsRequest.AsObject; - static toObject(includeInstance: boolean, msg: PendingChannelsRequest): PendingChannelsRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: PendingChannelsRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): PendingChannelsRequest; - static deserializeBinaryFromReader(message: PendingChannelsRequest, reader: jspb.BinaryReader): PendingChannelsRequest; -} - -export namespace PendingChannelsRequest { - export type AsObject = { - } -} - -export class PendingChannelsResponse extends jspb.Message { - getTotalLimboBalance(): number; - setTotalLimboBalance(value: number): void; - - clearPendingOpenChannelsList(): void; - getPendingOpenChannelsList(): Array; - setPendingOpenChannelsList(value: Array): void; - addPendingOpenChannels(value?: PendingChannelsResponse.PendingOpenChannel, index?: number): PendingChannelsResponse.PendingOpenChannel; - - clearPendingClosingChannelsList(): void; - getPendingClosingChannelsList(): Array; - setPendingClosingChannelsList(value: Array): void; - addPendingClosingChannels(value?: PendingChannelsResponse.ClosedChannel, index?: number): PendingChannelsResponse.ClosedChannel; - - clearPendingForceClosingChannelsList(): void; - getPendingForceClosingChannelsList(): Array; - setPendingForceClosingChannelsList(value: Array): void; - addPendingForceClosingChannels(value?: PendingChannelsResponse.ForceClosedChannel, index?: number): PendingChannelsResponse.ForceClosedChannel; - - clearWaitingCloseChannelsList(): void; - getWaitingCloseChannelsList(): Array; - setWaitingCloseChannelsList(value: Array): void; - addWaitingCloseChannels(value?: PendingChannelsResponse.WaitingCloseChannel, index?: number): PendingChannelsResponse.WaitingCloseChannel; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): PendingChannelsResponse.AsObject; - static toObject(includeInstance: boolean, msg: PendingChannelsResponse): PendingChannelsResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: PendingChannelsResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): PendingChannelsResponse; - static deserializeBinaryFromReader(message: PendingChannelsResponse, reader: jspb.BinaryReader): PendingChannelsResponse; -} - -export namespace PendingChannelsResponse { - export type AsObject = { - totalLimboBalance: number, - pendingOpenChannels: Array, - pendingClosingChannels: Array, - pendingForceClosingChannels: Array, - waitingCloseChannels: Array, - } - - export class PendingChannel extends jspb.Message { - getRemoteNodePub(): string; - setRemoteNodePub(value: string): void; - - getChannelPoint(): string; - setChannelPoint(value: string): void; - - getCapacity(): number; - setCapacity(value: number): void; - - getLocalBalance(): number; - setLocalBalance(value: number): void; - - getRemoteBalance(): number; - setRemoteBalance(value: number): void; - - getLocalChanReserveSat(): number; - setLocalChanReserveSat(value: number): void; - - getRemoteChanReserveSat(): number; - setRemoteChanReserveSat(value: number): void; - - getInitiator(): InitiatorMap[keyof InitiatorMap]; - setInitiator(value: InitiatorMap[keyof InitiatorMap]): void; - - getCommitmentType(): CommitmentTypeMap[keyof CommitmentTypeMap]; - setCommitmentType(value: CommitmentTypeMap[keyof CommitmentTypeMap]): void; - - getNumForwardingPackages(): number; - setNumForwardingPackages(value: number): void; - - getChanStatusFlags(): string; - setChanStatusFlags(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): PendingChannel.AsObject; - static toObject(includeInstance: boolean, msg: PendingChannel): PendingChannel.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: PendingChannel, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): PendingChannel; - static deserializeBinaryFromReader(message: PendingChannel, reader: jspb.BinaryReader): PendingChannel; - } - - export namespace PendingChannel { - export type AsObject = { - remoteNodePub: string, - channelPoint: string, - capacity: number, - localBalance: number, - remoteBalance: number, - localChanReserveSat: number, - remoteChanReserveSat: number, - initiator: InitiatorMap[keyof InitiatorMap], - commitmentType: CommitmentTypeMap[keyof CommitmentTypeMap], - numForwardingPackages: number, - chanStatusFlags: string, - } - } - - export class PendingOpenChannel extends jspb.Message { - hasChannel(): boolean; - clearChannel(): void; - getChannel(): PendingChannelsResponse.PendingChannel | undefined; - setChannel(value?: PendingChannelsResponse.PendingChannel): void; - - getConfirmationHeight(): number; - setConfirmationHeight(value: number): void; - - getCommitFee(): number; - setCommitFee(value: number): void; - - getCommitWeight(): number; - setCommitWeight(value: number): void; - - getFeePerKw(): number; - setFeePerKw(value: number): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): PendingOpenChannel.AsObject; - static toObject(includeInstance: boolean, msg: PendingOpenChannel): PendingOpenChannel.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: PendingOpenChannel, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): PendingOpenChannel; - static deserializeBinaryFromReader(message: PendingOpenChannel, reader: jspb.BinaryReader): PendingOpenChannel; - } - - export namespace PendingOpenChannel { - export type AsObject = { - channel?: PendingChannelsResponse.PendingChannel.AsObject, - confirmationHeight: number, - commitFee: number, - commitWeight: number, - feePerKw: number, - } - } - - export class WaitingCloseChannel extends jspb.Message { - hasChannel(): boolean; - clearChannel(): void; - getChannel(): PendingChannelsResponse.PendingChannel | undefined; - setChannel(value?: PendingChannelsResponse.PendingChannel): void; - - getLimboBalance(): number; - setLimboBalance(value: number): void; - - hasCommitments(): boolean; - clearCommitments(): void; - getCommitments(): PendingChannelsResponse.Commitments | undefined; - setCommitments(value?: PendingChannelsResponse.Commitments): void; - - getClosingTxid(): string; - setClosingTxid(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): WaitingCloseChannel.AsObject; - static toObject(includeInstance: boolean, msg: WaitingCloseChannel): WaitingCloseChannel.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: WaitingCloseChannel, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): WaitingCloseChannel; - static deserializeBinaryFromReader(message: WaitingCloseChannel, reader: jspb.BinaryReader): WaitingCloseChannel; - } - - export namespace WaitingCloseChannel { - export type AsObject = { - channel?: PendingChannelsResponse.PendingChannel.AsObject, - limboBalance: number, - commitments?: PendingChannelsResponse.Commitments.AsObject, - closingTxid: string, - } - } - - export class Commitments extends jspb.Message { - getLocalTxid(): string; - setLocalTxid(value: string): void; - - getRemoteTxid(): string; - setRemoteTxid(value: string): void; - - getRemotePendingTxid(): string; - setRemotePendingTxid(value: string): void; - - getLocalCommitFeeSat(): number; - setLocalCommitFeeSat(value: number): void; - - getRemoteCommitFeeSat(): number; - setRemoteCommitFeeSat(value: number): void; - - getRemotePendingCommitFeeSat(): number; - setRemotePendingCommitFeeSat(value: number): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Commitments.AsObject; - static toObject(includeInstance: boolean, msg: Commitments): Commitments.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: Commitments, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Commitments; - static deserializeBinaryFromReader(message: Commitments, reader: jspb.BinaryReader): Commitments; - } - - export namespace Commitments { - export type AsObject = { - localTxid: string, - remoteTxid: string, - remotePendingTxid: string, - localCommitFeeSat: number, - remoteCommitFeeSat: number, - remotePendingCommitFeeSat: number, - } - } - - export class ClosedChannel extends jspb.Message { - hasChannel(): boolean; - clearChannel(): void; - getChannel(): PendingChannelsResponse.PendingChannel | undefined; - setChannel(value?: PendingChannelsResponse.PendingChannel): void; - - getClosingTxid(): string; - setClosingTxid(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ClosedChannel.AsObject; - static toObject(includeInstance: boolean, msg: ClosedChannel): ClosedChannel.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ClosedChannel, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ClosedChannel; - static deserializeBinaryFromReader(message: ClosedChannel, reader: jspb.BinaryReader): ClosedChannel; - } - - export namespace ClosedChannel { - export type AsObject = { - channel?: PendingChannelsResponse.PendingChannel.AsObject, - closingTxid: string, - } - } - - export class ForceClosedChannel extends jspb.Message { - hasChannel(): boolean; - clearChannel(): void; - getChannel(): PendingChannelsResponse.PendingChannel | undefined; - setChannel(value?: PendingChannelsResponse.PendingChannel): void; - - getClosingTxid(): string; - setClosingTxid(value: string): void; - - getLimboBalance(): number; - setLimboBalance(value: number): void; - - getMaturityHeight(): number; - setMaturityHeight(value: number): void; - - getBlocksTilMaturity(): number; - setBlocksTilMaturity(value: number): void; - - getRecoveredBalance(): number; - setRecoveredBalance(value: number): void; - - clearPendingHtlcsList(): void; - getPendingHtlcsList(): Array; - setPendingHtlcsList(value: Array): void; - addPendingHtlcs(value?: PendingHTLC, index?: number): PendingHTLC; - - getAnchor(): PendingChannelsResponse.ForceClosedChannel.AnchorStateMap[keyof PendingChannelsResponse.ForceClosedChannel.AnchorStateMap]; - setAnchor(value: PendingChannelsResponse.ForceClosedChannel.AnchorStateMap[keyof PendingChannelsResponse.ForceClosedChannel.AnchorStateMap]): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ForceClosedChannel.AsObject; - static toObject(includeInstance: boolean, msg: ForceClosedChannel): ForceClosedChannel.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ForceClosedChannel, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ForceClosedChannel; - static deserializeBinaryFromReader(message: ForceClosedChannel, reader: jspb.BinaryReader): ForceClosedChannel; - } - - export namespace ForceClosedChannel { - export type AsObject = { - channel?: PendingChannelsResponse.PendingChannel.AsObject, - closingTxid: string, - limboBalance: number, - maturityHeight: number, - blocksTilMaturity: number, - recoveredBalance: number, - pendingHtlcs: Array, - anchor: PendingChannelsResponse.ForceClosedChannel.AnchorStateMap[keyof PendingChannelsResponse.ForceClosedChannel.AnchorStateMap], - } - - export interface AnchorStateMap { - LIMBO: 0; - RECOVERED: 1; - LOST: 2; - } - - export const AnchorState: AnchorStateMap; - } -} - -export class ChannelEventSubscription extends jspb.Message { - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ChannelEventSubscription.AsObject; - static toObject(includeInstance: boolean, msg: ChannelEventSubscription): ChannelEventSubscription.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ChannelEventSubscription, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ChannelEventSubscription; - static deserializeBinaryFromReader(message: ChannelEventSubscription, reader: jspb.BinaryReader): ChannelEventSubscription; -} - -export namespace ChannelEventSubscription { - export type AsObject = { - } -} - -export class ChannelEventUpdate extends jspb.Message { - hasOpenChannel(): boolean; - clearOpenChannel(): void; - getOpenChannel(): Channel | undefined; - setOpenChannel(value?: Channel): void; - - hasClosedChannel(): boolean; - clearClosedChannel(): void; - getClosedChannel(): ChannelCloseSummary | undefined; - setClosedChannel(value?: ChannelCloseSummary): void; - - hasActiveChannel(): boolean; - clearActiveChannel(): void; - getActiveChannel(): ChannelPoint | undefined; - setActiveChannel(value?: ChannelPoint): void; - - hasInactiveChannel(): boolean; - clearInactiveChannel(): void; - getInactiveChannel(): ChannelPoint | undefined; - setInactiveChannel(value?: ChannelPoint): void; - - hasPendingOpenChannel(): boolean; - clearPendingOpenChannel(): void; - getPendingOpenChannel(): PendingUpdate | undefined; - setPendingOpenChannel(value?: PendingUpdate): void; - - hasFullyResolvedChannel(): boolean; - clearFullyResolvedChannel(): void; - getFullyResolvedChannel(): ChannelPoint | undefined; - setFullyResolvedChannel(value?: ChannelPoint): void; - - getType(): ChannelEventUpdate.UpdateTypeMap[keyof ChannelEventUpdate.UpdateTypeMap]; - setType(value: ChannelEventUpdate.UpdateTypeMap[keyof ChannelEventUpdate.UpdateTypeMap]): void; - - getChannelCase(): ChannelEventUpdate.ChannelCase; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ChannelEventUpdate.AsObject; - static toObject(includeInstance: boolean, msg: ChannelEventUpdate): ChannelEventUpdate.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ChannelEventUpdate, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ChannelEventUpdate; - static deserializeBinaryFromReader(message: ChannelEventUpdate, reader: jspb.BinaryReader): ChannelEventUpdate; -} - -export namespace ChannelEventUpdate { - export type AsObject = { - openChannel?: Channel.AsObject, - closedChannel?: ChannelCloseSummary.AsObject, - activeChannel?: ChannelPoint.AsObject, - inactiveChannel?: ChannelPoint.AsObject, - pendingOpenChannel?: PendingUpdate.AsObject, - fullyResolvedChannel?: ChannelPoint.AsObject, - type: ChannelEventUpdate.UpdateTypeMap[keyof ChannelEventUpdate.UpdateTypeMap], - } - - export interface UpdateTypeMap { - OPEN_CHANNEL: 0; - CLOSED_CHANNEL: 1; - ACTIVE_CHANNEL: 2; - INACTIVE_CHANNEL: 3; - PENDING_OPEN_CHANNEL: 4; - FULLY_RESOLVED_CHANNEL: 5; - } - - export const UpdateType: UpdateTypeMap; - - export enum ChannelCase { - CHANNEL_NOT_SET = 0, - OPEN_CHANNEL = 1, - CLOSED_CHANNEL = 2, - ACTIVE_CHANNEL = 3, - INACTIVE_CHANNEL = 4, - PENDING_OPEN_CHANNEL = 6, - FULLY_RESOLVED_CHANNEL = 7, - } -} - -export class WalletAccountBalance extends jspb.Message { - getConfirmedBalance(): number; - setConfirmedBalance(value: number): void; - - getUnconfirmedBalance(): number; - setUnconfirmedBalance(value: number): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): WalletAccountBalance.AsObject; - static toObject(includeInstance: boolean, msg: WalletAccountBalance): WalletAccountBalance.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: WalletAccountBalance, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): WalletAccountBalance; - static deserializeBinaryFromReader(message: WalletAccountBalance, reader: jspb.BinaryReader): WalletAccountBalance; -} - -export namespace WalletAccountBalance { - export type AsObject = { - confirmedBalance: number, - unconfirmedBalance: number, - } -} - -export class WalletBalanceRequest extends jspb.Message { - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): WalletBalanceRequest.AsObject; - static toObject(includeInstance: boolean, msg: WalletBalanceRequest): WalletBalanceRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: WalletBalanceRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): WalletBalanceRequest; - static deserializeBinaryFromReader(message: WalletBalanceRequest, reader: jspb.BinaryReader): WalletBalanceRequest; -} - -export namespace WalletBalanceRequest { - export type AsObject = { - } -} - -export class WalletBalanceResponse extends jspb.Message { - getTotalBalance(): number; - setTotalBalance(value: number): void; - - getConfirmedBalance(): number; - setConfirmedBalance(value: number): void; - - getUnconfirmedBalance(): number; - setUnconfirmedBalance(value: number): void; - - getLockedBalance(): number; - setLockedBalance(value: number): void; - - getAccountBalanceMap(): jspb.Map; - clearAccountBalanceMap(): void; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): WalletBalanceResponse.AsObject; - static toObject(includeInstance: boolean, msg: WalletBalanceResponse): WalletBalanceResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: WalletBalanceResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): WalletBalanceResponse; - static deserializeBinaryFromReader(message: WalletBalanceResponse, reader: jspb.BinaryReader): WalletBalanceResponse; -} - -export namespace WalletBalanceResponse { - export type AsObject = { - totalBalance: number, - confirmedBalance: number, - unconfirmedBalance: number, - lockedBalance: number, - accountBalance: Array<[string, WalletAccountBalance.AsObject]>, - } -} - -export class Amount extends jspb.Message { - getSat(): number; - setSat(value: number): void; - - getMsat(): number; - setMsat(value: number): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Amount.AsObject; - static toObject(includeInstance: boolean, msg: Amount): Amount.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: Amount, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Amount; - static deserializeBinaryFromReader(message: Amount, reader: jspb.BinaryReader): Amount; -} - -export namespace Amount { - export type AsObject = { - sat: number, - msat: number, - } -} - -export class ChannelBalanceRequest extends jspb.Message { - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ChannelBalanceRequest.AsObject; - static toObject(includeInstance: boolean, msg: ChannelBalanceRequest): ChannelBalanceRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ChannelBalanceRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ChannelBalanceRequest; - static deserializeBinaryFromReader(message: ChannelBalanceRequest, reader: jspb.BinaryReader): ChannelBalanceRequest; -} - -export namespace ChannelBalanceRequest { - export type AsObject = { - } -} - -export class ChannelBalanceResponse extends jspb.Message { - getBalance(): number; - setBalance(value: number): void; - - getPendingOpenBalance(): number; - setPendingOpenBalance(value: number): void; - - hasLocalBalance(): boolean; - clearLocalBalance(): void; - getLocalBalance(): Amount | undefined; - setLocalBalance(value?: Amount): void; - - hasRemoteBalance(): boolean; - clearRemoteBalance(): void; - getRemoteBalance(): Amount | undefined; - setRemoteBalance(value?: Amount): void; - - hasUnsettledLocalBalance(): boolean; - clearUnsettledLocalBalance(): void; - getUnsettledLocalBalance(): Amount | undefined; - setUnsettledLocalBalance(value?: Amount): void; - - hasUnsettledRemoteBalance(): boolean; - clearUnsettledRemoteBalance(): void; - getUnsettledRemoteBalance(): Amount | undefined; - setUnsettledRemoteBalance(value?: Amount): void; - - hasPendingOpenLocalBalance(): boolean; - clearPendingOpenLocalBalance(): void; - getPendingOpenLocalBalance(): Amount | undefined; - setPendingOpenLocalBalance(value?: Amount): void; - - hasPendingOpenRemoteBalance(): boolean; - clearPendingOpenRemoteBalance(): void; - getPendingOpenRemoteBalance(): Amount | undefined; - setPendingOpenRemoteBalance(value?: Amount): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ChannelBalanceResponse.AsObject; - static toObject(includeInstance: boolean, msg: ChannelBalanceResponse): ChannelBalanceResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ChannelBalanceResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ChannelBalanceResponse; - static deserializeBinaryFromReader(message: ChannelBalanceResponse, reader: jspb.BinaryReader): ChannelBalanceResponse; -} - -export namespace ChannelBalanceResponse { - export type AsObject = { - balance: number, - pendingOpenBalance: number, - localBalance?: Amount.AsObject, - remoteBalance?: Amount.AsObject, - unsettledLocalBalance?: Amount.AsObject, - unsettledRemoteBalance?: Amount.AsObject, - pendingOpenLocalBalance?: Amount.AsObject, - pendingOpenRemoteBalance?: Amount.AsObject, - } -} - -export class QueryRoutesRequest extends jspb.Message { - getPubKey(): string; - setPubKey(value: string): void; - - getAmt(): number; - setAmt(value: number): void; - - getAmtMsat(): number; - setAmtMsat(value: number): void; - - getFinalCltvDelta(): number; - setFinalCltvDelta(value: number): void; - - hasFeeLimit(): boolean; - clearFeeLimit(): void; - getFeeLimit(): FeeLimit | undefined; - setFeeLimit(value?: FeeLimit): void; - - clearIgnoredNodesList(): void; - getIgnoredNodesList(): Array; - getIgnoredNodesList_asU8(): Array; - getIgnoredNodesList_asB64(): Array; - setIgnoredNodesList(value: Array): void; - addIgnoredNodes(value: Uint8Array | string, index?: number): Uint8Array | string; - - clearIgnoredEdgesList(): void; - getIgnoredEdgesList(): Array; - setIgnoredEdgesList(value: Array): void; - addIgnoredEdges(value?: EdgeLocator, index?: number): EdgeLocator; - - getSourcePubKey(): string; - setSourcePubKey(value: string): void; - - getUseMissionControl(): boolean; - setUseMissionControl(value: boolean): void; - - clearIgnoredPairsList(): void; - getIgnoredPairsList(): Array; - setIgnoredPairsList(value: Array): void; - addIgnoredPairs(value?: NodePair, index?: number): NodePair; - - getCltvLimit(): number; - setCltvLimit(value: number): void; - - getDestCustomRecordsMap(): jspb.Map; - clearDestCustomRecordsMap(): void; - getOutgoingChanId(): string; - setOutgoingChanId(value: string): void; - - getLastHopPubkey(): Uint8Array | string; - getLastHopPubkey_asU8(): Uint8Array; - getLastHopPubkey_asB64(): string; - setLastHopPubkey(value: Uint8Array | string): void; - - clearRouteHintsList(): void; - getRouteHintsList(): Array; - setRouteHintsList(value: Array): void; - addRouteHints(value?: RouteHint, index?: number): RouteHint; - - clearDestFeaturesList(): void; - getDestFeaturesList(): Array; - setDestFeaturesList(value: Array): void; - addDestFeatures(value: FeatureBitMap[keyof FeatureBitMap], index?: number): FeatureBitMap[keyof FeatureBitMap]; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): QueryRoutesRequest.AsObject; - static toObject(includeInstance: boolean, msg: QueryRoutesRequest): QueryRoutesRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: QueryRoutesRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): QueryRoutesRequest; - static deserializeBinaryFromReader(message: QueryRoutesRequest, reader: jspb.BinaryReader): QueryRoutesRequest; -} - -export namespace QueryRoutesRequest { - export type AsObject = { - pubKey: string, - amt: number, - amtMsat: number, - finalCltvDelta: number, - feeLimit?: FeeLimit.AsObject, - ignoredNodes: Array, - ignoredEdges: Array, - sourcePubKey: string, - useMissionControl: boolean, - ignoredPairs: Array, - cltvLimit: number, - destCustomRecords: Array<[number, Uint8Array | string]>, - outgoingChanId: string, - lastHopPubkey: Uint8Array | string, - routeHints: Array, - destFeatures: Array, - } -} - -export class NodePair extends jspb.Message { - getFrom(): Uint8Array | string; - getFrom_asU8(): Uint8Array; - getFrom_asB64(): string; - setFrom(value: Uint8Array | string): void; - - getTo(): Uint8Array | string; - getTo_asU8(): Uint8Array; - getTo_asB64(): string; - setTo(value: Uint8Array | string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): NodePair.AsObject; - static toObject(includeInstance: boolean, msg: NodePair): NodePair.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: NodePair, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): NodePair; - static deserializeBinaryFromReader(message: NodePair, reader: jspb.BinaryReader): NodePair; -} - -export namespace NodePair { - export type AsObject = { - from: Uint8Array | string, - to: Uint8Array | string, - } -} - -export class EdgeLocator extends jspb.Message { - getChannelId(): string; - setChannelId(value: string): void; - - getDirectionReverse(): boolean; - setDirectionReverse(value: boolean): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): EdgeLocator.AsObject; - static toObject(includeInstance: boolean, msg: EdgeLocator): EdgeLocator.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: EdgeLocator, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): EdgeLocator; - static deserializeBinaryFromReader(message: EdgeLocator, reader: jspb.BinaryReader): EdgeLocator; -} - -export namespace EdgeLocator { - export type AsObject = { - channelId: string, - directionReverse: boolean, - } -} - -export class QueryRoutesResponse extends jspb.Message { - clearRoutesList(): void; - getRoutesList(): Array; - setRoutesList(value: Array): void; - addRoutes(value?: Route, index?: number): Route; - - getSuccessProb(): number; - setSuccessProb(value: number): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): QueryRoutesResponse.AsObject; - static toObject(includeInstance: boolean, msg: QueryRoutesResponse): QueryRoutesResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: QueryRoutesResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): QueryRoutesResponse; - static deserializeBinaryFromReader(message: QueryRoutesResponse, reader: jspb.BinaryReader): QueryRoutesResponse; -} - -export namespace QueryRoutesResponse { - export type AsObject = { - routes: Array, - successProb: number, - } -} - -export class Hop extends jspb.Message { - getChanId(): string; - setChanId(value: string): void; - - getChanCapacity(): number; - setChanCapacity(value: number): void; - - getAmtToForward(): number; - setAmtToForward(value: number): void; - - getFee(): number; - setFee(value: number): void; - - getExpiry(): number; - setExpiry(value: number): void; - - getAmtToForwardMsat(): number; - setAmtToForwardMsat(value: number): void; - - getFeeMsat(): number; - setFeeMsat(value: number): void; - - getPubKey(): string; - setPubKey(value: string): void; - - getTlvPayload(): boolean; - setTlvPayload(value: boolean): void; - - hasMppRecord(): boolean; - clearMppRecord(): void; - getMppRecord(): MPPRecord | undefined; - setMppRecord(value?: MPPRecord): void; - - hasAmpRecord(): boolean; - clearAmpRecord(): void; - getAmpRecord(): AMPRecord | undefined; - setAmpRecord(value?: AMPRecord): void; - - getCustomRecordsMap(): jspb.Map; - clearCustomRecordsMap(): void; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Hop.AsObject; - static toObject(includeInstance: boolean, msg: Hop): Hop.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: Hop, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Hop; - static deserializeBinaryFromReader(message: Hop, reader: jspb.BinaryReader): Hop; -} - -export namespace Hop { - export type AsObject = { - chanId: string, - chanCapacity: number, - amtToForward: number, - fee: number, - expiry: number, - amtToForwardMsat: number, - feeMsat: number, - pubKey: string, - tlvPayload: boolean, - mppRecord?: MPPRecord.AsObject, - ampRecord?: AMPRecord.AsObject, - customRecords: Array<[number, Uint8Array | string]>, - } -} - -export class MPPRecord extends jspb.Message { - getPaymentAddr(): Uint8Array | string; - getPaymentAddr_asU8(): Uint8Array; - getPaymentAddr_asB64(): string; - setPaymentAddr(value: Uint8Array | string): void; - - getTotalAmtMsat(): number; - setTotalAmtMsat(value: number): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): MPPRecord.AsObject; - static toObject(includeInstance: boolean, msg: MPPRecord): MPPRecord.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: MPPRecord, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): MPPRecord; - static deserializeBinaryFromReader(message: MPPRecord, reader: jspb.BinaryReader): MPPRecord; -} - -export namespace MPPRecord { - export type AsObject = { - paymentAddr: Uint8Array | string, - totalAmtMsat: number, - } -} - -export class AMPRecord extends jspb.Message { - getRootShare(): Uint8Array | string; - getRootShare_asU8(): Uint8Array; - getRootShare_asB64(): string; - setRootShare(value: Uint8Array | string): void; - - getSetId(): Uint8Array | string; - getSetId_asU8(): Uint8Array; - getSetId_asB64(): string; - setSetId(value: Uint8Array | string): void; - - getChildIndex(): number; - setChildIndex(value: number): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): AMPRecord.AsObject; - static toObject(includeInstance: boolean, msg: AMPRecord): AMPRecord.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: AMPRecord, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): AMPRecord; - static deserializeBinaryFromReader(message: AMPRecord, reader: jspb.BinaryReader): AMPRecord; -} - -export namespace AMPRecord { - export type AsObject = { - rootShare: Uint8Array | string, - setId: Uint8Array | string, - childIndex: number, - } -} - -export class Route extends jspb.Message { - getTotalTimeLock(): number; - setTotalTimeLock(value: number): void; - - getTotalFees(): number; - setTotalFees(value: number): void; - - getTotalAmt(): number; - setTotalAmt(value: number): void; - - clearHopsList(): void; - getHopsList(): Array; - setHopsList(value: Array): void; - addHops(value?: Hop, index?: number): Hop; - - getTotalFeesMsat(): number; - setTotalFeesMsat(value: number): void; - - getTotalAmtMsat(): number; - setTotalAmtMsat(value: number): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Route.AsObject; - static toObject(includeInstance: boolean, msg: Route): Route.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: Route, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Route; - static deserializeBinaryFromReader(message: Route, reader: jspb.BinaryReader): Route; -} - -export namespace Route { - export type AsObject = { - totalTimeLock: number, - totalFees: number, - totalAmt: number, - hops: Array, - totalFeesMsat: number, - totalAmtMsat: number, - } -} - -export class NodeInfoRequest extends jspb.Message { - getPubKey(): string; - setPubKey(value: string): void; - - getIncludeChannels(): boolean; - setIncludeChannels(value: boolean): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): NodeInfoRequest.AsObject; - static toObject(includeInstance: boolean, msg: NodeInfoRequest): NodeInfoRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: NodeInfoRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): NodeInfoRequest; - static deserializeBinaryFromReader(message: NodeInfoRequest, reader: jspb.BinaryReader): NodeInfoRequest; -} - -export namespace NodeInfoRequest { - export type AsObject = { - pubKey: string, - includeChannels: boolean, - } -} - -export class NodeInfo extends jspb.Message { - hasNode(): boolean; - clearNode(): void; - getNode(): LightningNode | undefined; - setNode(value?: LightningNode): void; - - getNumChannels(): number; - setNumChannels(value: number): void; - - getTotalCapacity(): number; - setTotalCapacity(value: number): void; - - clearChannelsList(): void; - getChannelsList(): Array; - setChannelsList(value: Array): void; - addChannels(value?: ChannelEdge, index?: number): ChannelEdge; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): NodeInfo.AsObject; - static toObject(includeInstance: boolean, msg: NodeInfo): NodeInfo.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: NodeInfo, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): NodeInfo; - static deserializeBinaryFromReader(message: NodeInfo, reader: jspb.BinaryReader): NodeInfo; -} - -export namespace NodeInfo { - export type AsObject = { - node?: LightningNode.AsObject, - numChannels: number, - totalCapacity: number, - channels: Array, - } -} - -export class LightningNode extends jspb.Message { - getLastUpdate(): number; - setLastUpdate(value: number): void; - - getPubKey(): string; - setPubKey(value: string): void; - - getAlias(): string; - setAlias(value: string): void; - - clearAddressesList(): void; - getAddressesList(): Array; - setAddressesList(value: Array): void; - addAddresses(value?: NodeAddress, index?: number): NodeAddress; - - getColor(): string; - setColor(value: string): void; - - getFeaturesMap(): jspb.Map; - clearFeaturesMap(): void; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): LightningNode.AsObject; - static toObject(includeInstance: boolean, msg: LightningNode): LightningNode.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: LightningNode, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): LightningNode; - static deserializeBinaryFromReader(message: LightningNode, reader: jspb.BinaryReader): LightningNode; -} - -export namespace LightningNode { - export type AsObject = { - lastUpdate: number, - pubKey: string, - alias: string, - addresses: Array, - color: string, - features: Array<[number, Feature.AsObject]>, - } -} - -export class NodeAddress extends jspb.Message { - getNetwork(): string; - setNetwork(value: string): void; - - getAddr(): string; - setAddr(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): NodeAddress.AsObject; - static toObject(includeInstance: boolean, msg: NodeAddress): NodeAddress.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: NodeAddress, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): NodeAddress; - static deserializeBinaryFromReader(message: NodeAddress, reader: jspb.BinaryReader): NodeAddress; -} - -export namespace NodeAddress { - export type AsObject = { - network: string, - addr: string, - } -} - -export class RoutingPolicy extends jspb.Message { - getTimeLockDelta(): number; - setTimeLockDelta(value: number): void; - - getMinHtlc(): number; - setMinHtlc(value: number): void; - - getFeeBaseMsat(): number; - setFeeBaseMsat(value: number): void; - - getFeeRateMilliMsat(): number; - setFeeRateMilliMsat(value: number): void; - - getDisabled(): boolean; - setDisabled(value: boolean): void; - - getMaxHtlcMsat(): number; - setMaxHtlcMsat(value: number): void; - - getLastUpdate(): number; - setLastUpdate(value: number): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): RoutingPolicy.AsObject; - static toObject(includeInstance: boolean, msg: RoutingPolicy): RoutingPolicy.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: RoutingPolicy, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): RoutingPolicy; - static deserializeBinaryFromReader(message: RoutingPolicy, reader: jspb.BinaryReader): RoutingPolicy; -} - -export namespace RoutingPolicy { - export type AsObject = { - timeLockDelta: number, - minHtlc: number, - feeBaseMsat: number, - feeRateMilliMsat: number, - disabled: boolean, - maxHtlcMsat: number, - lastUpdate: number, - } -} - -export class ChannelEdge extends jspb.Message { - getChannelId(): string; - setChannelId(value: string): void; - - getChanPoint(): string; - setChanPoint(value: string): void; - - getLastUpdate(): number; - setLastUpdate(value: number): void; - - getNode1Pub(): string; - setNode1Pub(value: string): void; - - getNode2Pub(): string; - setNode2Pub(value: string): void; - - getCapacity(): number; - setCapacity(value: number): void; - - hasNode1Policy(): boolean; - clearNode1Policy(): void; - getNode1Policy(): RoutingPolicy | undefined; - setNode1Policy(value?: RoutingPolicy): void; - - hasNode2Policy(): boolean; - clearNode2Policy(): void; - getNode2Policy(): RoutingPolicy | undefined; - setNode2Policy(value?: RoutingPolicy): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ChannelEdge.AsObject; - static toObject(includeInstance: boolean, msg: ChannelEdge): ChannelEdge.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ChannelEdge, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ChannelEdge; - static deserializeBinaryFromReader(message: ChannelEdge, reader: jspb.BinaryReader): ChannelEdge; -} - -export namespace ChannelEdge { - export type AsObject = { - channelId: string, - chanPoint: string, - lastUpdate: number, - node1Pub: string, - node2Pub: string, - capacity: number, - node1Policy?: RoutingPolicy.AsObject, - node2Policy?: RoutingPolicy.AsObject, - } -} - -export class ChannelGraphRequest extends jspb.Message { - getIncludeUnannounced(): boolean; - setIncludeUnannounced(value: boolean): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ChannelGraphRequest.AsObject; - static toObject(includeInstance: boolean, msg: ChannelGraphRequest): ChannelGraphRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ChannelGraphRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ChannelGraphRequest; - static deserializeBinaryFromReader(message: ChannelGraphRequest, reader: jspb.BinaryReader): ChannelGraphRequest; -} - -export namespace ChannelGraphRequest { - export type AsObject = { - includeUnannounced: boolean, - } -} - -export class ChannelGraph extends jspb.Message { - clearNodesList(): void; - getNodesList(): Array; - setNodesList(value: Array): void; - addNodes(value?: LightningNode, index?: number): LightningNode; - - clearEdgesList(): void; - getEdgesList(): Array; - setEdgesList(value: Array): void; - addEdges(value?: ChannelEdge, index?: number): ChannelEdge; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ChannelGraph.AsObject; - static toObject(includeInstance: boolean, msg: ChannelGraph): ChannelGraph.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ChannelGraph, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ChannelGraph; - static deserializeBinaryFromReader(message: ChannelGraph, reader: jspb.BinaryReader): ChannelGraph; -} - -export namespace ChannelGraph { - export type AsObject = { - nodes: Array, - edges: Array, - } -} - -export class NodeMetricsRequest extends jspb.Message { - clearTypesList(): void; - getTypesList(): Array; - setTypesList(value: Array): void; - addTypes(value: NodeMetricTypeMap[keyof NodeMetricTypeMap], index?: number): NodeMetricTypeMap[keyof NodeMetricTypeMap]; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): NodeMetricsRequest.AsObject; - static toObject(includeInstance: boolean, msg: NodeMetricsRequest): NodeMetricsRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: NodeMetricsRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): NodeMetricsRequest; - static deserializeBinaryFromReader(message: NodeMetricsRequest, reader: jspb.BinaryReader): NodeMetricsRequest; -} - -export namespace NodeMetricsRequest { - export type AsObject = { - types: Array, - } -} - -export class NodeMetricsResponse extends jspb.Message { - getBetweennessCentralityMap(): jspb.Map; - clearBetweennessCentralityMap(): void; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): NodeMetricsResponse.AsObject; - static toObject(includeInstance: boolean, msg: NodeMetricsResponse): NodeMetricsResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: NodeMetricsResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): NodeMetricsResponse; - static deserializeBinaryFromReader(message: NodeMetricsResponse, reader: jspb.BinaryReader): NodeMetricsResponse; -} - -export namespace NodeMetricsResponse { - export type AsObject = { - betweennessCentrality: Array<[string, FloatMetric.AsObject]>, - } -} - -export class FloatMetric extends jspb.Message { - getValue(): number; - setValue(value: number): void; - - getNormalizedValue(): number; - setNormalizedValue(value: number): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): FloatMetric.AsObject; - static toObject(includeInstance: boolean, msg: FloatMetric): FloatMetric.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: FloatMetric, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): FloatMetric; - static deserializeBinaryFromReader(message: FloatMetric, reader: jspb.BinaryReader): FloatMetric; -} - -export namespace FloatMetric { - export type AsObject = { - value: number, - normalizedValue: number, - } -} - -export class ChanInfoRequest extends jspb.Message { - getChanId(): string; - setChanId(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ChanInfoRequest.AsObject; - static toObject(includeInstance: boolean, msg: ChanInfoRequest): ChanInfoRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ChanInfoRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ChanInfoRequest; - static deserializeBinaryFromReader(message: ChanInfoRequest, reader: jspb.BinaryReader): ChanInfoRequest; -} - -export namespace ChanInfoRequest { - export type AsObject = { - chanId: string, - } -} - -export class NetworkInfoRequest extends jspb.Message { - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): NetworkInfoRequest.AsObject; - static toObject(includeInstance: boolean, msg: NetworkInfoRequest): NetworkInfoRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: NetworkInfoRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): NetworkInfoRequest; - static deserializeBinaryFromReader(message: NetworkInfoRequest, reader: jspb.BinaryReader): NetworkInfoRequest; -} - -export namespace NetworkInfoRequest { - export type AsObject = { - } -} - -export class NetworkInfo extends jspb.Message { - getGraphDiameter(): number; - setGraphDiameter(value: number): void; - - getAvgOutDegree(): number; - setAvgOutDegree(value: number): void; - - getMaxOutDegree(): number; - setMaxOutDegree(value: number): void; - - getNumNodes(): number; - setNumNodes(value: number): void; - - getNumChannels(): number; - setNumChannels(value: number): void; - - getTotalNetworkCapacity(): number; - setTotalNetworkCapacity(value: number): void; - - getAvgChannelSize(): number; - setAvgChannelSize(value: number): void; - - getMinChannelSize(): number; - setMinChannelSize(value: number): void; - - getMaxChannelSize(): number; - setMaxChannelSize(value: number): void; - - getMedianChannelSizeSat(): number; - setMedianChannelSizeSat(value: number): void; - - getNumZombieChans(): number; - setNumZombieChans(value: number): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): NetworkInfo.AsObject; - static toObject(includeInstance: boolean, msg: NetworkInfo): NetworkInfo.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: NetworkInfo, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): NetworkInfo; - static deserializeBinaryFromReader(message: NetworkInfo, reader: jspb.BinaryReader): NetworkInfo; -} - -export namespace NetworkInfo { - export type AsObject = { - graphDiameter: number, - avgOutDegree: number, - maxOutDegree: number, - numNodes: number, - numChannels: number, - totalNetworkCapacity: number, - avgChannelSize: number, - minChannelSize: number, - maxChannelSize: number, - medianChannelSizeSat: number, - numZombieChans: number, - } -} - -export class StopRequest extends jspb.Message { - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): StopRequest.AsObject; - static toObject(includeInstance: boolean, msg: StopRequest): StopRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: StopRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): StopRequest; - static deserializeBinaryFromReader(message: StopRequest, reader: jspb.BinaryReader): StopRequest; -} - -export namespace StopRequest { - export type AsObject = { - } -} - -export class StopResponse extends jspb.Message { - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): StopResponse.AsObject; - static toObject(includeInstance: boolean, msg: StopResponse): StopResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: StopResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): StopResponse; - static deserializeBinaryFromReader(message: StopResponse, reader: jspb.BinaryReader): StopResponse; -} - -export namespace StopResponse { - export type AsObject = { - } -} - -export class GraphTopologySubscription extends jspb.Message { - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GraphTopologySubscription.AsObject; - static toObject(includeInstance: boolean, msg: GraphTopologySubscription): GraphTopologySubscription.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: GraphTopologySubscription, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GraphTopologySubscription; - static deserializeBinaryFromReader(message: GraphTopologySubscription, reader: jspb.BinaryReader): GraphTopologySubscription; -} - -export namespace GraphTopologySubscription { - export type AsObject = { - } -} - -export class GraphTopologyUpdate extends jspb.Message { - clearNodeUpdatesList(): void; - getNodeUpdatesList(): Array; - setNodeUpdatesList(value: Array): void; - addNodeUpdates(value?: NodeUpdate, index?: number): NodeUpdate; - - clearChannelUpdatesList(): void; - getChannelUpdatesList(): Array; - setChannelUpdatesList(value: Array): void; - addChannelUpdates(value?: ChannelEdgeUpdate, index?: number): ChannelEdgeUpdate; - - clearClosedChansList(): void; - getClosedChansList(): Array; - setClosedChansList(value: Array): void; - addClosedChans(value?: ClosedChannelUpdate, index?: number): ClosedChannelUpdate; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GraphTopologyUpdate.AsObject; - static toObject(includeInstance: boolean, msg: GraphTopologyUpdate): GraphTopologyUpdate.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: GraphTopologyUpdate, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GraphTopologyUpdate; - static deserializeBinaryFromReader(message: GraphTopologyUpdate, reader: jspb.BinaryReader): GraphTopologyUpdate; -} - -export namespace GraphTopologyUpdate { - export type AsObject = { - nodeUpdates: Array, - channelUpdates: Array, - closedChans: Array, - } -} - -export class NodeUpdate extends jspb.Message { - clearAddressesList(): void; - getAddressesList(): Array; - setAddressesList(value: Array): void; - addAddresses(value: string, index?: number): string; - - getIdentityKey(): string; - setIdentityKey(value: string): void; - - getGlobalFeatures(): Uint8Array | string; - getGlobalFeatures_asU8(): Uint8Array; - getGlobalFeatures_asB64(): string; - setGlobalFeatures(value: Uint8Array | string): void; - - getAlias(): string; - setAlias(value: string): void; - - getColor(): string; - setColor(value: string): void; - - clearNodeAddressesList(): void; - getNodeAddressesList(): Array; - setNodeAddressesList(value: Array): void; - addNodeAddresses(value?: NodeAddress, index?: number): NodeAddress; - - getFeaturesMap(): jspb.Map; - clearFeaturesMap(): void; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): NodeUpdate.AsObject; - static toObject(includeInstance: boolean, msg: NodeUpdate): NodeUpdate.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: NodeUpdate, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): NodeUpdate; - static deserializeBinaryFromReader(message: NodeUpdate, reader: jspb.BinaryReader): NodeUpdate; -} - -export namespace NodeUpdate { - export type AsObject = { - addresses: Array, - identityKey: string, - globalFeatures: Uint8Array | string, - alias: string, - color: string, - nodeAddresses: Array, - features: Array<[number, Feature.AsObject]>, - } -} - -export class ChannelEdgeUpdate extends jspb.Message { - getChanId(): string; - setChanId(value: string): void; - - hasChanPoint(): boolean; - clearChanPoint(): void; - getChanPoint(): ChannelPoint | undefined; - setChanPoint(value?: ChannelPoint): void; - - getCapacity(): number; - setCapacity(value: number): void; - - hasRoutingPolicy(): boolean; - clearRoutingPolicy(): void; - getRoutingPolicy(): RoutingPolicy | undefined; - setRoutingPolicy(value?: RoutingPolicy): void; - - getAdvertisingNode(): string; - setAdvertisingNode(value: string): void; - - getConnectingNode(): string; - setConnectingNode(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ChannelEdgeUpdate.AsObject; - static toObject(includeInstance: boolean, msg: ChannelEdgeUpdate): ChannelEdgeUpdate.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ChannelEdgeUpdate, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ChannelEdgeUpdate; - static deserializeBinaryFromReader(message: ChannelEdgeUpdate, reader: jspb.BinaryReader): ChannelEdgeUpdate; -} - -export namespace ChannelEdgeUpdate { - export type AsObject = { - chanId: string, - chanPoint?: ChannelPoint.AsObject, - capacity: number, - routingPolicy?: RoutingPolicy.AsObject, - advertisingNode: string, - connectingNode: string, - } -} - -export class ClosedChannelUpdate extends jspb.Message { - getChanId(): string; - setChanId(value: string): void; - - getCapacity(): number; - setCapacity(value: number): void; - - getClosedHeight(): number; - setClosedHeight(value: number): void; - - hasChanPoint(): boolean; - clearChanPoint(): void; - getChanPoint(): ChannelPoint | undefined; - setChanPoint(value?: ChannelPoint): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ClosedChannelUpdate.AsObject; - static toObject(includeInstance: boolean, msg: ClosedChannelUpdate): ClosedChannelUpdate.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ClosedChannelUpdate, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ClosedChannelUpdate; - static deserializeBinaryFromReader(message: ClosedChannelUpdate, reader: jspb.BinaryReader): ClosedChannelUpdate; -} - -export namespace ClosedChannelUpdate { - export type AsObject = { - chanId: string, - capacity: number, - closedHeight: number, - chanPoint?: ChannelPoint.AsObject, - } -} - -export class HopHint extends jspb.Message { - getNodeId(): string; - setNodeId(value: string): void; - - getChanId(): string; - setChanId(value: string): void; - - getFeeBaseMsat(): number; - setFeeBaseMsat(value: number): void; - - getFeeProportionalMillionths(): number; - setFeeProportionalMillionths(value: number): void; - - getCltvExpiryDelta(): number; - setCltvExpiryDelta(value: number): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): HopHint.AsObject; - static toObject(includeInstance: boolean, msg: HopHint): HopHint.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: HopHint, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): HopHint; - static deserializeBinaryFromReader(message: HopHint, reader: jspb.BinaryReader): HopHint; -} - -export namespace HopHint { - export type AsObject = { - nodeId: string, - chanId: string, - feeBaseMsat: number, - feeProportionalMillionths: number, - cltvExpiryDelta: number, - } -} - -export class SetID extends jspb.Message { - getSetId(): Uint8Array | string; - getSetId_asU8(): Uint8Array; - getSetId_asB64(): string; - setSetId(value: Uint8Array | string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): SetID.AsObject; - static toObject(includeInstance: boolean, msg: SetID): SetID.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: SetID, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): SetID; - static deserializeBinaryFromReader(message: SetID, reader: jspb.BinaryReader): SetID; -} - -export namespace SetID { - export type AsObject = { - setId: Uint8Array | string, - } -} - -export class RouteHint extends jspb.Message { - clearHopHintsList(): void; - getHopHintsList(): Array; - setHopHintsList(value: Array): void; - addHopHints(value?: HopHint, index?: number): HopHint; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): RouteHint.AsObject; - static toObject(includeInstance: boolean, msg: RouteHint): RouteHint.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: RouteHint, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): RouteHint; - static deserializeBinaryFromReader(message: RouteHint, reader: jspb.BinaryReader): RouteHint; -} - -export namespace RouteHint { - export type AsObject = { - hopHints: Array, - } -} - -export class AMPInvoiceState extends jspb.Message { - getState(): InvoiceHTLCStateMap[keyof InvoiceHTLCStateMap]; - setState(value: InvoiceHTLCStateMap[keyof InvoiceHTLCStateMap]): void; - - getSettleIndex(): number; - setSettleIndex(value: number): void; - - getSettleTime(): number; - setSettleTime(value: number): void; - - getAmtPaidMsat(): number; - setAmtPaidMsat(value: number): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): AMPInvoiceState.AsObject; - static toObject(includeInstance: boolean, msg: AMPInvoiceState): AMPInvoiceState.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: AMPInvoiceState, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): AMPInvoiceState; - static deserializeBinaryFromReader(message: AMPInvoiceState, reader: jspb.BinaryReader): AMPInvoiceState; -} - -export namespace AMPInvoiceState { - export type AsObject = { - state: InvoiceHTLCStateMap[keyof InvoiceHTLCStateMap], - settleIndex: number, - settleTime: number, - amtPaidMsat: number, - } -} - -export class Invoice extends jspb.Message { - getMemo(): string; - setMemo(value: string): void; - - getRPreimage(): Uint8Array | string; - getRPreimage_asU8(): Uint8Array; - getRPreimage_asB64(): string; - setRPreimage(value: Uint8Array | string): void; - - getRHash(): Uint8Array | string; - getRHash_asU8(): Uint8Array; - getRHash_asB64(): string; - setRHash(value: Uint8Array | string): void; - - getValue(): number; - setValue(value: number): void; - - getValueMsat(): number; - setValueMsat(value: number): void; - - getSettled(): boolean; - setSettled(value: boolean): void; - - getCreationDate(): number; - setCreationDate(value: number): void; - - getSettleDate(): number; - setSettleDate(value: number): void; - - getPaymentRequest(): string; - setPaymentRequest(value: string): void; - - getDescriptionHash(): Uint8Array | string; - getDescriptionHash_asU8(): Uint8Array; - getDescriptionHash_asB64(): string; - setDescriptionHash(value: Uint8Array | string): void; - - getExpiry(): number; - setExpiry(value: number): void; - - getFallbackAddr(): string; - setFallbackAddr(value: string): void; - - getCltvExpiry(): number; - setCltvExpiry(value: number): void; - - clearRouteHintsList(): void; - getRouteHintsList(): Array; - setRouteHintsList(value: Array): void; - addRouteHints(value?: RouteHint, index?: number): RouteHint; - - getPrivate(): boolean; - setPrivate(value: boolean): void; - - getAddIndex(): number; - setAddIndex(value: number): void; - - getSettleIndex(): number; - setSettleIndex(value: number): void; - - getAmtPaid(): number; - setAmtPaid(value: number): void; - - getAmtPaidSat(): number; - setAmtPaidSat(value: number): void; - - getAmtPaidMsat(): number; - setAmtPaidMsat(value: number): void; - - getState(): Invoice.InvoiceStateMap[keyof Invoice.InvoiceStateMap]; - setState(value: Invoice.InvoiceStateMap[keyof Invoice.InvoiceStateMap]): void; - - clearHtlcsList(): void; - getHtlcsList(): Array; - setHtlcsList(value: Array): void; - addHtlcs(value?: InvoiceHTLC, index?: number): InvoiceHTLC; - - getFeaturesMap(): jspb.Map; - clearFeaturesMap(): void; - getIsKeysend(): boolean; - setIsKeysend(value: boolean): void; - - getPaymentAddr(): Uint8Array | string; - getPaymentAddr_asU8(): Uint8Array; - getPaymentAddr_asB64(): string; - setPaymentAddr(value: Uint8Array | string): void; - - getIsAmp(): boolean; - setIsAmp(value: boolean): void; - - getAmpInvoiceStateMap(): jspb.Map; - clearAmpInvoiceStateMap(): void; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Invoice.AsObject; - static toObject(includeInstance: boolean, msg: Invoice): Invoice.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: Invoice, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Invoice; - static deserializeBinaryFromReader(message: Invoice, reader: jspb.BinaryReader): Invoice; -} - -export namespace Invoice { - export type AsObject = { - memo: string, - rPreimage: Uint8Array | string, - rHash: Uint8Array | string, - value: number, - valueMsat: number, - settled: boolean, - creationDate: number, - settleDate: number, - paymentRequest: string, - descriptionHash: Uint8Array | string, - expiry: number, - fallbackAddr: string, - cltvExpiry: number, - routeHints: Array, - pb_private: boolean, - addIndex: number, - settleIndex: number, - amtPaid: number, - amtPaidSat: number, - amtPaidMsat: number, - state: Invoice.InvoiceStateMap[keyof Invoice.InvoiceStateMap], - htlcs: Array, - features: Array<[number, Feature.AsObject]>, - isKeysend: boolean, - paymentAddr: Uint8Array | string, - isAmp: boolean, - ampInvoiceState: Array<[string, AMPInvoiceState.AsObject]>, - } - - export interface InvoiceStateMap { - OPEN: 0; - SETTLED: 1; - CANCELED: 2; - ACCEPTED: 3; - } - - export const InvoiceState: InvoiceStateMap; -} - -export class InvoiceHTLC extends jspb.Message { - getChanId(): string; - setChanId(value: string): void; - - getHtlcIndex(): number; - setHtlcIndex(value: number): void; - - getAmtMsat(): number; - setAmtMsat(value: number): void; - - getAcceptHeight(): number; - setAcceptHeight(value: number): void; - - getAcceptTime(): number; - setAcceptTime(value: number): void; - - getResolveTime(): number; - setResolveTime(value: number): void; - - getExpiryHeight(): number; - setExpiryHeight(value: number): void; - - getState(): InvoiceHTLCStateMap[keyof InvoiceHTLCStateMap]; - setState(value: InvoiceHTLCStateMap[keyof InvoiceHTLCStateMap]): void; - - getCustomRecordsMap(): jspb.Map; - clearCustomRecordsMap(): void; - getMppTotalAmtMsat(): number; - setMppTotalAmtMsat(value: number): void; - - hasAmp(): boolean; - clearAmp(): void; - getAmp(): AMP | undefined; - setAmp(value?: AMP): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): InvoiceHTLC.AsObject; - static toObject(includeInstance: boolean, msg: InvoiceHTLC): InvoiceHTLC.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: InvoiceHTLC, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): InvoiceHTLC; - static deserializeBinaryFromReader(message: InvoiceHTLC, reader: jspb.BinaryReader): InvoiceHTLC; -} - -export namespace InvoiceHTLC { - export type AsObject = { - chanId: string, - htlcIndex: number, - amtMsat: number, - acceptHeight: number, - acceptTime: number, - resolveTime: number, - expiryHeight: number, - state: InvoiceHTLCStateMap[keyof InvoiceHTLCStateMap], - customRecords: Array<[number, Uint8Array | string]>, - mppTotalAmtMsat: number, - amp?: AMP.AsObject, - } -} - -export class AMP extends jspb.Message { - getRootShare(): Uint8Array | string; - getRootShare_asU8(): Uint8Array; - getRootShare_asB64(): string; - setRootShare(value: Uint8Array | string): void; - - getSetId(): Uint8Array | string; - getSetId_asU8(): Uint8Array; - getSetId_asB64(): string; - setSetId(value: Uint8Array | string): void; - - getChildIndex(): number; - setChildIndex(value: number): void; - - getHash(): Uint8Array | string; - getHash_asU8(): Uint8Array; - getHash_asB64(): string; - setHash(value: Uint8Array | string): void; - - getPreimage(): Uint8Array | string; - getPreimage_asU8(): Uint8Array; - getPreimage_asB64(): string; - setPreimage(value: Uint8Array | string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): AMP.AsObject; - static toObject(includeInstance: boolean, msg: AMP): AMP.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: AMP, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): AMP; - static deserializeBinaryFromReader(message: AMP, reader: jspb.BinaryReader): AMP; -} - -export namespace AMP { - export type AsObject = { - rootShare: Uint8Array | string, - setId: Uint8Array | string, - childIndex: number, - hash: Uint8Array | string, - preimage: Uint8Array | string, - } -} - -export class AddInvoiceResponse extends jspb.Message { - getRHash(): Uint8Array | string; - getRHash_asU8(): Uint8Array; - getRHash_asB64(): string; - setRHash(value: Uint8Array | string): void; - - getPaymentRequest(): string; - setPaymentRequest(value: string): void; - - getAddIndex(): number; - setAddIndex(value: number): void; - - getPaymentAddr(): Uint8Array | string; - getPaymentAddr_asU8(): Uint8Array; - getPaymentAddr_asB64(): string; - setPaymentAddr(value: Uint8Array | string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): AddInvoiceResponse.AsObject; - static toObject(includeInstance: boolean, msg: AddInvoiceResponse): AddInvoiceResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: AddInvoiceResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): AddInvoiceResponse; - static deserializeBinaryFromReader(message: AddInvoiceResponse, reader: jspb.BinaryReader): AddInvoiceResponse; -} - -export namespace AddInvoiceResponse { - export type AsObject = { - rHash: Uint8Array | string, - paymentRequest: string, - addIndex: number, - paymentAddr: Uint8Array | string, - } -} - -export class PaymentHash extends jspb.Message { - getRHashStr(): string; - setRHashStr(value: string): void; - - getRHash(): Uint8Array | string; - getRHash_asU8(): Uint8Array; - getRHash_asB64(): string; - setRHash(value: Uint8Array | string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): PaymentHash.AsObject; - static toObject(includeInstance: boolean, msg: PaymentHash): PaymentHash.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: PaymentHash, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): PaymentHash; - static deserializeBinaryFromReader(message: PaymentHash, reader: jspb.BinaryReader): PaymentHash; -} - -export namespace PaymentHash { - export type AsObject = { - rHashStr: string, - rHash: Uint8Array | string, - } -} - -export class ListInvoiceRequest extends jspb.Message { - getPendingOnly(): boolean; - setPendingOnly(value: boolean): void; - - getIndexOffset(): number; - setIndexOffset(value: number): void; - - getNumMaxInvoices(): number; - setNumMaxInvoices(value: number): void; - - getReversed(): boolean; - setReversed(value: boolean): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ListInvoiceRequest.AsObject; - static toObject(includeInstance: boolean, msg: ListInvoiceRequest): ListInvoiceRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ListInvoiceRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ListInvoiceRequest; - static deserializeBinaryFromReader(message: ListInvoiceRequest, reader: jspb.BinaryReader): ListInvoiceRequest; -} - -export namespace ListInvoiceRequest { - export type AsObject = { - pendingOnly: boolean, - indexOffset: number, - numMaxInvoices: number, - reversed: boolean, - } -} - -export class ListInvoiceResponse extends jspb.Message { - clearInvoicesList(): void; - getInvoicesList(): Array; - setInvoicesList(value: Array): void; - addInvoices(value?: Invoice, index?: number): Invoice; - - getLastIndexOffset(): number; - setLastIndexOffset(value: number): void; - - getFirstIndexOffset(): number; - setFirstIndexOffset(value: number): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ListInvoiceResponse.AsObject; - static toObject(includeInstance: boolean, msg: ListInvoiceResponse): ListInvoiceResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ListInvoiceResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ListInvoiceResponse; - static deserializeBinaryFromReader(message: ListInvoiceResponse, reader: jspb.BinaryReader): ListInvoiceResponse; -} - -export namespace ListInvoiceResponse { - export type AsObject = { - invoices: Array, - lastIndexOffset: number, - firstIndexOffset: number, - } -} - -export class InvoiceSubscription extends jspb.Message { - getAddIndex(): number; - setAddIndex(value: number): void; - - getSettleIndex(): number; - setSettleIndex(value: number): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): InvoiceSubscription.AsObject; - static toObject(includeInstance: boolean, msg: InvoiceSubscription): InvoiceSubscription.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: InvoiceSubscription, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): InvoiceSubscription; - static deserializeBinaryFromReader(message: InvoiceSubscription, reader: jspb.BinaryReader): InvoiceSubscription; -} - -export namespace InvoiceSubscription { - export type AsObject = { - addIndex: number, - settleIndex: number, - } -} - -export class Payment extends jspb.Message { - getPaymentHash(): string; - setPaymentHash(value: string): void; - - getValue(): number; - setValue(value: number): void; - - getCreationDate(): number; - setCreationDate(value: number): void; - - getFee(): number; - setFee(value: number): void; - - getPaymentPreimage(): string; - setPaymentPreimage(value: string): void; - - getValueSat(): number; - setValueSat(value: number): void; - - getValueMsat(): number; - setValueMsat(value: number): void; - - getPaymentRequest(): string; - setPaymentRequest(value: string): void; - - getStatus(): Payment.PaymentStatusMap[keyof Payment.PaymentStatusMap]; - setStatus(value: Payment.PaymentStatusMap[keyof Payment.PaymentStatusMap]): void; - - getFeeSat(): number; - setFeeSat(value: number): void; - - getFeeMsat(): number; - setFeeMsat(value: number): void; - - getCreationTimeNs(): number; - setCreationTimeNs(value: number): void; - - clearHtlcsList(): void; - getHtlcsList(): Array; - setHtlcsList(value: Array): void; - addHtlcs(value?: HTLCAttempt, index?: number): HTLCAttempt; - - getPaymentIndex(): number; - setPaymentIndex(value: number): void; - - getFailureReason(): PaymentFailureReasonMap[keyof PaymentFailureReasonMap]; - setFailureReason(value: PaymentFailureReasonMap[keyof PaymentFailureReasonMap]): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Payment.AsObject; - static toObject(includeInstance: boolean, msg: Payment): Payment.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: Payment, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Payment; - static deserializeBinaryFromReader(message: Payment, reader: jspb.BinaryReader): Payment; -} - -export namespace Payment { - export type AsObject = { - paymentHash: string, - value: number, - creationDate: number, - fee: number, - paymentPreimage: string, - valueSat: number, - valueMsat: number, - paymentRequest: string, - status: Payment.PaymentStatusMap[keyof Payment.PaymentStatusMap], - feeSat: number, - feeMsat: number, - creationTimeNs: number, - htlcs: Array, - paymentIndex: number, - failureReason: PaymentFailureReasonMap[keyof PaymentFailureReasonMap], - } - - export interface PaymentStatusMap { - UNKNOWN: 0; - IN_FLIGHT: 1; - SUCCEEDED: 2; - FAILED: 3; - } - - export const PaymentStatus: PaymentStatusMap; -} - -export class HTLCAttempt extends jspb.Message { - getAttemptId(): number; - setAttemptId(value: number): void; - - getStatus(): HTLCAttempt.HTLCStatusMap[keyof HTLCAttempt.HTLCStatusMap]; - setStatus(value: HTLCAttempt.HTLCStatusMap[keyof HTLCAttempt.HTLCStatusMap]): void; - - hasRoute(): boolean; - clearRoute(): void; - getRoute(): Route | undefined; - setRoute(value?: Route): void; - - getAttemptTimeNs(): number; - setAttemptTimeNs(value: number): void; - - getResolveTimeNs(): number; - setResolveTimeNs(value: number): void; - - hasFailure(): boolean; - clearFailure(): void; - getFailure(): Failure | undefined; - setFailure(value?: Failure): void; - - getPreimage(): Uint8Array | string; - getPreimage_asU8(): Uint8Array; - getPreimage_asB64(): string; - setPreimage(value: Uint8Array | string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): HTLCAttempt.AsObject; - static toObject(includeInstance: boolean, msg: HTLCAttempt): HTLCAttempt.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: HTLCAttempt, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): HTLCAttempt; - static deserializeBinaryFromReader(message: HTLCAttempt, reader: jspb.BinaryReader): HTLCAttempt; -} - -export namespace HTLCAttempt { - export type AsObject = { - attemptId: number, - status: HTLCAttempt.HTLCStatusMap[keyof HTLCAttempt.HTLCStatusMap], - route?: Route.AsObject, - attemptTimeNs: number, - resolveTimeNs: number, - failure?: Failure.AsObject, - preimage: Uint8Array | string, - } - - export interface HTLCStatusMap { - IN_FLIGHT: 0; - SUCCEEDED: 1; - FAILED: 2; - } - - export const HTLCStatus: HTLCStatusMap; -} - -export class ListPaymentsRequest extends jspb.Message { - getIncludeIncomplete(): boolean; - setIncludeIncomplete(value: boolean): void; - - getIndexOffset(): number; - setIndexOffset(value: number): void; - - getMaxPayments(): number; - setMaxPayments(value: number): void; - - getReversed(): boolean; - setReversed(value: boolean): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ListPaymentsRequest.AsObject; - static toObject(includeInstance: boolean, msg: ListPaymentsRequest): ListPaymentsRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ListPaymentsRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ListPaymentsRequest; - static deserializeBinaryFromReader(message: ListPaymentsRequest, reader: jspb.BinaryReader): ListPaymentsRequest; -} - -export namespace ListPaymentsRequest { - export type AsObject = { - includeIncomplete: boolean, - indexOffset: number, - maxPayments: number, - reversed: boolean, - } -} - -export class ListPaymentsResponse extends jspb.Message { - clearPaymentsList(): void; - getPaymentsList(): Array; - setPaymentsList(value: Array): void; - addPayments(value?: Payment, index?: number): Payment; - - getFirstIndexOffset(): number; - setFirstIndexOffset(value: number): void; - - getLastIndexOffset(): number; - setLastIndexOffset(value: number): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ListPaymentsResponse.AsObject; - static toObject(includeInstance: boolean, msg: ListPaymentsResponse): ListPaymentsResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ListPaymentsResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ListPaymentsResponse; - static deserializeBinaryFromReader(message: ListPaymentsResponse, reader: jspb.BinaryReader): ListPaymentsResponse; -} - -export namespace ListPaymentsResponse { - export type AsObject = { - payments: Array, - firstIndexOffset: number, - lastIndexOffset: number, - } -} - -export class DeletePaymentRequest extends jspb.Message { - getPaymentHash(): Uint8Array | string; - getPaymentHash_asU8(): Uint8Array; - getPaymentHash_asB64(): string; - setPaymentHash(value: Uint8Array | string): void; - - getFailedHtlcsOnly(): boolean; - setFailedHtlcsOnly(value: boolean): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): DeletePaymentRequest.AsObject; - static toObject(includeInstance: boolean, msg: DeletePaymentRequest): DeletePaymentRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: DeletePaymentRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): DeletePaymentRequest; - static deserializeBinaryFromReader(message: DeletePaymentRequest, reader: jspb.BinaryReader): DeletePaymentRequest; -} - -export namespace DeletePaymentRequest { - export type AsObject = { - paymentHash: Uint8Array | string, - failedHtlcsOnly: boolean, - } -} - -export class DeleteAllPaymentsRequest extends jspb.Message { - getFailedPaymentsOnly(): boolean; - setFailedPaymentsOnly(value: boolean): void; - - getFailedHtlcsOnly(): boolean; - setFailedHtlcsOnly(value: boolean): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): DeleteAllPaymentsRequest.AsObject; - static toObject(includeInstance: boolean, msg: DeleteAllPaymentsRequest): DeleteAllPaymentsRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: DeleteAllPaymentsRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): DeleteAllPaymentsRequest; - static deserializeBinaryFromReader(message: DeleteAllPaymentsRequest, reader: jspb.BinaryReader): DeleteAllPaymentsRequest; -} - -export namespace DeleteAllPaymentsRequest { - export type AsObject = { - failedPaymentsOnly: boolean, - failedHtlcsOnly: boolean, - } -} - -export class DeletePaymentResponse extends jspb.Message { - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): DeletePaymentResponse.AsObject; - static toObject(includeInstance: boolean, msg: DeletePaymentResponse): DeletePaymentResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: DeletePaymentResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): DeletePaymentResponse; - static deserializeBinaryFromReader(message: DeletePaymentResponse, reader: jspb.BinaryReader): DeletePaymentResponse; -} - -export namespace DeletePaymentResponse { - export type AsObject = { - } -} - -export class DeleteAllPaymentsResponse extends jspb.Message { - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): DeleteAllPaymentsResponse.AsObject; - static toObject(includeInstance: boolean, msg: DeleteAllPaymentsResponse): DeleteAllPaymentsResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: DeleteAllPaymentsResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): DeleteAllPaymentsResponse; - static deserializeBinaryFromReader(message: DeleteAllPaymentsResponse, reader: jspb.BinaryReader): DeleteAllPaymentsResponse; -} - -export namespace DeleteAllPaymentsResponse { - export type AsObject = { - } -} - -export class AbandonChannelRequest extends jspb.Message { - hasChannelPoint(): boolean; - clearChannelPoint(): void; - getChannelPoint(): ChannelPoint | undefined; - setChannelPoint(value?: ChannelPoint): void; - - getPendingFundingShimOnly(): boolean; - setPendingFundingShimOnly(value: boolean): void; - - getIKnowWhatIAmDoing(): boolean; - setIKnowWhatIAmDoing(value: boolean): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): AbandonChannelRequest.AsObject; - static toObject(includeInstance: boolean, msg: AbandonChannelRequest): AbandonChannelRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: AbandonChannelRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): AbandonChannelRequest; - static deserializeBinaryFromReader(message: AbandonChannelRequest, reader: jspb.BinaryReader): AbandonChannelRequest; -} - -export namespace AbandonChannelRequest { - export type AsObject = { - channelPoint?: ChannelPoint.AsObject, - pendingFundingShimOnly: boolean, - iKnowWhatIAmDoing: boolean, - } -} - -export class AbandonChannelResponse extends jspb.Message { - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): AbandonChannelResponse.AsObject; - static toObject(includeInstance: boolean, msg: AbandonChannelResponse): AbandonChannelResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: AbandonChannelResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): AbandonChannelResponse; - static deserializeBinaryFromReader(message: AbandonChannelResponse, reader: jspb.BinaryReader): AbandonChannelResponse; -} - -export namespace AbandonChannelResponse { - export type AsObject = { - } -} - -export class DebugLevelRequest extends jspb.Message { - getShow(): boolean; - setShow(value: boolean): void; - - getLevelSpec(): string; - setLevelSpec(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): DebugLevelRequest.AsObject; - static toObject(includeInstance: boolean, msg: DebugLevelRequest): DebugLevelRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: DebugLevelRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): DebugLevelRequest; - static deserializeBinaryFromReader(message: DebugLevelRequest, reader: jspb.BinaryReader): DebugLevelRequest; -} - -export namespace DebugLevelRequest { - export type AsObject = { - show: boolean, - levelSpec: string, - } -} - -export class DebugLevelResponse extends jspb.Message { - getSubSystems(): string; - setSubSystems(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): DebugLevelResponse.AsObject; - static toObject(includeInstance: boolean, msg: DebugLevelResponse): DebugLevelResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: DebugLevelResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): DebugLevelResponse; - static deserializeBinaryFromReader(message: DebugLevelResponse, reader: jspb.BinaryReader): DebugLevelResponse; -} - -export namespace DebugLevelResponse { - export type AsObject = { - subSystems: string, - } -} - -export class PayReqString extends jspb.Message { - getPayReq(): string; - setPayReq(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): PayReqString.AsObject; - static toObject(includeInstance: boolean, msg: PayReqString): PayReqString.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: PayReqString, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): PayReqString; - static deserializeBinaryFromReader(message: PayReqString, reader: jspb.BinaryReader): PayReqString; -} - -export namespace PayReqString { - export type AsObject = { - payReq: string, - } -} - -export class PayReq extends jspb.Message { - getDestination(): string; - setDestination(value: string): void; - - getPaymentHash(): string; - setPaymentHash(value: string): void; - - getNumSatoshis(): number; - setNumSatoshis(value: number): void; - - getTimestamp(): number; - setTimestamp(value: number): void; - - getExpiry(): number; - setExpiry(value: number): void; - - getDescription(): string; - setDescription(value: string): void; - - getDescriptionHash(): string; - setDescriptionHash(value: string): void; - - getFallbackAddr(): string; - setFallbackAddr(value: string): void; - - getCltvExpiry(): number; - setCltvExpiry(value: number): void; - - clearRouteHintsList(): void; - getRouteHintsList(): Array; - setRouteHintsList(value: Array): void; - addRouteHints(value?: RouteHint, index?: number): RouteHint; - - getPaymentAddr(): Uint8Array | string; - getPaymentAddr_asU8(): Uint8Array; - getPaymentAddr_asB64(): string; - setPaymentAddr(value: Uint8Array | string): void; - - getNumMsat(): number; - setNumMsat(value: number): void; - - getFeaturesMap(): jspb.Map; - clearFeaturesMap(): void; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): PayReq.AsObject; - static toObject(includeInstance: boolean, msg: PayReq): PayReq.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: PayReq, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): PayReq; - static deserializeBinaryFromReader(message: PayReq, reader: jspb.BinaryReader): PayReq; -} - -export namespace PayReq { - export type AsObject = { - destination: string, - paymentHash: string, - numSatoshis: number, - timestamp: number, - expiry: number, - description: string, - descriptionHash: string, - fallbackAddr: string, - cltvExpiry: number, - routeHints: Array, - paymentAddr: Uint8Array | string, - numMsat: number, - features: Array<[number, Feature.AsObject]>, - } -} - -export class Feature extends jspb.Message { - getName(): string; - setName(value: string): void; - - getIsRequired(): boolean; - setIsRequired(value: boolean): void; - - getIsKnown(): boolean; - setIsKnown(value: boolean): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Feature.AsObject; - static toObject(includeInstance: boolean, msg: Feature): Feature.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: Feature, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Feature; - static deserializeBinaryFromReader(message: Feature, reader: jspb.BinaryReader): Feature; -} - -export namespace Feature { - export type AsObject = { - name: string, - isRequired: boolean, - isKnown: boolean, - } -} - -export class FeeReportRequest extends jspb.Message { - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): FeeReportRequest.AsObject; - static toObject(includeInstance: boolean, msg: FeeReportRequest): FeeReportRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: FeeReportRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): FeeReportRequest; - static deserializeBinaryFromReader(message: FeeReportRequest, reader: jspb.BinaryReader): FeeReportRequest; -} - -export namespace FeeReportRequest { - export type AsObject = { - } -} - -export class ChannelFeeReport extends jspb.Message { - getChanId(): string; - setChanId(value: string): void; - - getChannelPoint(): string; - setChannelPoint(value: string): void; - - getBaseFeeMsat(): number; - setBaseFeeMsat(value: number): void; - - getFeePerMil(): number; - setFeePerMil(value: number): void; - - getFeeRate(): number; - setFeeRate(value: number): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ChannelFeeReport.AsObject; - static toObject(includeInstance: boolean, msg: ChannelFeeReport): ChannelFeeReport.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ChannelFeeReport, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ChannelFeeReport; - static deserializeBinaryFromReader(message: ChannelFeeReport, reader: jspb.BinaryReader): ChannelFeeReport; -} - -export namespace ChannelFeeReport { - export type AsObject = { - chanId: string, - channelPoint: string, - baseFeeMsat: number, - feePerMil: number, - feeRate: number, - } -} - -export class FeeReportResponse extends jspb.Message { - clearChannelFeesList(): void; - getChannelFeesList(): Array; - setChannelFeesList(value: Array): void; - addChannelFees(value?: ChannelFeeReport, index?: number): ChannelFeeReport; - - getDayFeeSum(): number; - setDayFeeSum(value: number): void; - - getWeekFeeSum(): number; - setWeekFeeSum(value: number): void; - - getMonthFeeSum(): number; - setMonthFeeSum(value: number): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): FeeReportResponse.AsObject; - static toObject(includeInstance: boolean, msg: FeeReportResponse): FeeReportResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: FeeReportResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): FeeReportResponse; - static deserializeBinaryFromReader(message: FeeReportResponse, reader: jspb.BinaryReader): FeeReportResponse; -} - -export namespace FeeReportResponse { - export type AsObject = { - channelFees: Array, - dayFeeSum: number, - weekFeeSum: number, - monthFeeSum: number, - } -} - -export class PolicyUpdateRequest extends jspb.Message { - hasGlobal(): boolean; - clearGlobal(): void; - getGlobal(): boolean; - setGlobal(value: boolean): void; - - hasChanPoint(): boolean; - clearChanPoint(): void; - getChanPoint(): ChannelPoint | undefined; - setChanPoint(value?: ChannelPoint): void; - - getBaseFeeMsat(): number; - setBaseFeeMsat(value: number): void; - - getFeeRate(): number; - setFeeRate(value: number): void; - - getFeeRatePpm(): number; - setFeeRatePpm(value: number): void; - - getTimeLockDelta(): number; - setTimeLockDelta(value: number): void; - - getMaxHtlcMsat(): number; - setMaxHtlcMsat(value: number): void; - - getMinHtlcMsat(): number; - setMinHtlcMsat(value: number): void; - - getMinHtlcMsatSpecified(): boolean; - setMinHtlcMsatSpecified(value: boolean): void; - - getScopeCase(): PolicyUpdateRequest.ScopeCase; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): PolicyUpdateRequest.AsObject; - static toObject(includeInstance: boolean, msg: PolicyUpdateRequest): PolicyUpdateRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: PolicyUpdateRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): PolicyUpdateRequest; - static deserializeBinaryFromReader(message: PolicyUpdateRequest, reader: jspb.BinaryReader): PolicyUpdateRequest; -} - -export namespace PolicyUpdateRequest { - export type AsObject = { - global: boolean, - chanPoint?: ChannelPoint.AsObject, - baseFeeMsat: number, - feeRate: number, - feeRatePpm: number, - timeLockDelta: number, - maxHtlcMsat: number, - minHtlcMsat: number, - minHtlcMsatSpecified: boolean, - } - - export enum ScopeCase { - SCOPE_NOT_SET = 0, - GLOBAL = 1, - CHAN_POINT = 2, - } -} - -export class FailedUpdate extends jspb.Message { - hasOutpoint(): boolean; - clearOutpoint(): void; - getOutpoint(): OutPoint | undefined; - setOutpoint(value?: OutPoint): void; - - getReason(): UpdateFailureMap[keyof UpdateFailureMap]; - setReason(value: UpdateFailureMap[keyof UpdateFailureMap]): void; - - getUpdateError(): string; - setUpdateError(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): FailedUpdate.AsObject; - static toObject(includeInstance: boolean, msg: FailedUpdate): FailedUpdate.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: FailedUpdate, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): FailedUpdate; - static deserializeBinaryFromReader(message: FailedUpdate, reader: jspb.BinaryReader): FailedUpdate; -} - -export namespace FailedUpdate { - export type AsObject = { - outpoint?: OutPoint.AsObject, - reason: UpdateFailureMap[keyof UpdateFailureMap], - updateError: string, - } -} - -export class PolicyUpdateResponse extends jspb.Message { - clearFailedUpdatesList(): void; - getFailedUpdatesList(): Array; - setFailedUpdatesList(value: Array): void; - addFailedUpdates(value?: FailedUpdate, index?: number): FailedUpdate; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): PolicyUpdateResponse.AsObject; - static toObject(includeInstance: boolean, msg: PolicyUpdateResponse): PolicyUpdateResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: PolicyUpdateResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): PolicyUpdateResponse; - static deserializeBinaryFromReader(message: PolicyUpdateResponse, reader: jspb.BinaryReader): PolicyUpdateResponse; -} - -export namespace PolicyUpdateResponse { - export type AsObject = { - failedUpdates: Array, - } -} - -export class ForwardingHistoryRequest extends jspb.Message { - getStartTime(): number; - setStartTime(value: number): void; - - getEndTime(): number; - setEndTime(value: number): void; - - getIndexOffset(): number; - setIndexOffset(value: number): void; - - getNumMaxEvents(): number; - setNumMaxEvents(value: number): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ForwardingHistoryRequest.AsObject; - static toObject(includeInstance: boolean, msg: ForwardingHistoryRequest): ForwardingHistoryRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ForwardingHistoryRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ForwardingHistoryRequest; - static deserializeBinaryFromReader(message: ForwardingHistoryRequest, reader: jspb.BinaryReader): ForwardingHistoryRequest; -} - -export namespace ForwardingHistoryRequest { - export type AsObject = { - startTime: number, - endTime: number, - indexOffset: number, - numMaxEvents: number, - } -} - -export class ForwardingEvent extends jspb.Message { - getTimestamp(): number; - setTimestamp(value: number): void; - - getChanIdIn(): string; - setChanIdIn(value: string): void; - - getChanIdOut(): string; - setChanIdOut(value: string): void; - - getAmtIn(): number; - setAmtIn(value: number): void; - - getAmtOut(): number; - setAmtOut(value: number): void; - - getFee(): number; - setFee(value: number): void; - - getFeeMsat(): number; - setFeeMsat(value: number): void; - - getAmtInMsat(): number; - setAmtInMsat(value: number): void; - - getAmtOutMsat(): number; - setAmtOutMsat(value: number): void; - - getTimestampNs(): number; - setTimestampNs(value: number): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ForwardingEvent.AsObject; - static toObject(includeInstance: boolean, msg: ForwardingEvent): ForwardingEvent.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ForwardingEvent, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ForwardingEvent; - static deserializeBinaryFromReader(message: ForwardingEvent, reader: jspb.BinaryReader): ForwardingEvent; -} - -export namespace ForwardingEvent { - export type AsObject = { - timestamp: number, - chanIdIn: string, - chanIdOut: string, - amtIn: number, - amtOut: number, - fee: number, - feeMsat: number, - amtInMsat: number, - amtOutMsat: number, - timestampNs: number, - } -} - -export class ForwardingHistoryResponse extends jspb.Message { - clearForwardingEventsList(): void; - getForwardingEventsList(): Array; - setForwardingEventsList(value: Array): void; - addForwardingEvents(value?: ForwardingEvent, index?: number): ForwardingEvent; - - getLastOffsetIndex(): number; - setLastOffsetIndex(value: number): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ForwardingHistoryResponse.AsObject; - static toObject(includeInstance: boolean, msg: ForwardingHistoryResponse): ForwardingHistoryResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ForwardingHistoryResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ForwardingHistoryResponse; - static deserializeBinaryFromReader(message: ForwardingHistoryResponse, reader: jspb.BinaryReader): ForwardingHistoryResponse; -} - -export namespace ForwardingHistoryResponse { - export type AsObject = { - forwardingEvents: Array, - lastOffsetIndex: number, - } -} - -export class ExportChannelBackupRequest extends jspb.Message { - hasChanPoint(): boolean; - clearChanPoint(): void; - getChanPoint(): ChannelPoint | undefined; - setChanPoint(value?: ChannelPoint): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ExportChannelBackupRequest.AsObject; - static toObject(includeInstance: boolean, msg: ExportChannelBackupRequest): ExportChannelBackupRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ExportChannelBackupRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ExportChannelBackupRequest; - static deserializeBinaryFromReader(message: ExportChannelBackupRequest, reader: jspb.BinaryReader): ExportChannelBackupRequest; -} - -export namespace ExportChannelBackupRequest { - export type AsObject = { - chanPoint?: ChannelPoint.AsObject, - } -} - -export class ChannelBackup extends jspb.Message { - hasChanPoint(): boolean; - clearChanPoint(): void; - getChanPoint(): ChannelPoint | undefined; - setChanPoint(value?: ChannelPoint): void; - - getChanBackup(): Uint8Array | string; - getChanBackup_asU8(): Uint8Array; - getChanBackup_asB64(): string; - setChanBackup(value: Uint8Array | string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ChannelBackup.AsObject; - static toObject(includeInstance: boolean, msg: ChannelBackup): ChannelBackup.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ChannelBackup, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ChannelBackup; - static deserializeBinaryFromReader(message: ChannelBackup, reader: jspb.BinaryReader): ChannelBackup; -} - -export namespace ChannelBackup { - export type AsObject = { - chanPoint?: ChannelPoint.AsObject, - chanBackup: Uint8Array | string, - } -} - -export class MultiChanBackup extends jspb.Message { - clearChanPointsList(): void; - getChanPointsList(): Array; - setChanPointsList(value: Array): void; - addChanPoints(value?: ChannelPoint, index?: number): ChannelPoint; - - getMultiChanBackup(): Uint8Array | string; - getMultiChanBackup_asU8(): Uint8Array; - getMultiChanBackup_asB64(): string; - setMultiChanBackup(value: Uint8Array | string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): MultiChanBackup.AsObject; - static toObject(includeInstance: boolean, msg: MultiChanBackup): MultiChanBackup.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: MultiChanBackup, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): MultiChanBackup; - static deserializeBinaryFromReader(message: MultiChanBackup, reader: jspb.BinaryReader): MultiChanBackup; -} - -export namespace MultiChanBackup { - export type AsObject = { - chanPoints: Array, - multiChanBackup: Uint8Array | string, - } -} - -export class ChanBackupExportRequest extends jspb.Message { - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ChanBackupExportRequest.AsObject; - static toObject(includeInstance: boolean, msg: ChanBackupExportRequest): ChanBackupExportRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ChanBackupExportRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ChanBackupExportRequest; - static deserializeBinaryFromReader(message: ChanBackupExportRequest, reader: jspb.BinaryReader): ChanBackupExportRequest; -} - -export namespace ChanBackupExportRequest { - export type AsObject = { - } -} - -export class ChanBackupSnapshot extends jspb.Message { - hasSingleChanBackups(): boolean; - clearSingleChanBackups(): void; - getSingleChanBackups(): ChannelBackups | undefined; - setSingleChanBackups(value?: ChannelBackups): void; - - hasMultiChanBackup(): boolean; - clearMultiChanBackup(): void; - getMultiChanBackup(): MultiChanBackup | undefined; - setMultiChanBackup(value?: MultiChanBackup): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ChanBackupSnapshot.AsObject; - static toObject(includeInstance: boolean, msg: ChanBackupSnapshot): ChanBackupSnapshot.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ChanBackupSnapshot, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ChanBackupSnapshot; - static deserializeBinaryFromReader(message: ChanBackupSnapshot, reader: jspb.BinaryReader): ChanBackupSnapshot; -} - -export namespace ChanBackupSnapshot { - export type AsObject = { - singleChanBackups?: ChannelBackups.AsObject, - multiChanBackup?: MultiChanBackup.AsObject, - } -} - -export class ChannelBackups extends jspb.Message { - clearChanBackupsList(): void; - getChanBackupsList(): Array; - setChanBackupsList(value: Array): void; - addChanBackups(value?: ChannelBackup, index?: number): ChannelBackup; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ChannelBackups.AsObject; - static toObject(includeInstance: boolean, msg: ChannelBackups): ChannelBackups.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ChannelBackups, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ChannelBackups; - static deserializeBinaryFromReader(message: ChannelBackups, reader: jspb.BinaryReader): ChannelBackups; -} - -export namespace ChannelBackups { - export type AsObject = { - chanBackups: Array, - } -} - -export class RestoreChanBackupRequest extends jspb.Message { - hasChanBackups(): boolean; - clearChanBackups(): void; - getChanBackups(): ChannelBackups | undefined; - setChanBackups(value?: ChannelBackups): void; - - hasMultiChanBackup(): boolean; - clearMultiChanBackup(): void; - getMultiChanBackup(): Uint8Array | string; - getMultiChanBackup_asU8(): Uint8Array; - getMultiChanBackup_asB64(): string; - setMultiChanBackup(value: Uint8Array | string): void; - - getBackupCase(): RestoreChanBackupRequest.BackupCase; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): RestoreChanBackupRequest.AsObject; - static toObject(includeInstance: boolean, msg: RestoreChanBackupRequest): RestoreChanBackupRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: RestoreChanBackupRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): RestoreChanBackupRequest; - static deserializeBinaryFromReader(message: RestoreChanBackupRequest, reader: jspb.BinaryReader): RestoreChanBackupRequest; -} - -export namespace RestoreChanBackupRequest { - export type AsObject = { - chanBackups?: ChannelBackups.AsObject, - multiChanBackup: Uint8Array | string, - } - - export enum BackupCase { - BACKUP_NOT_SET = 0, - CHAN_BACKUPS = 1, - MULTI_CHAN_BACKUP = 2, - } -} - -export class RestoreBackupResponse extends jspb.Message { - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): RestoreBackupResponse.AsObject; - static toObject(includeInstance: boolean, msg: RestoreBackupResponse): RestoreBackupResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: RestoreBackupResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): RestoreBackupResponse; - static deserializeBinaryFromReader(message: RestoreBackupResponse, reader: jspb.BinaryReader): RestoreBackupResponse; -} - -export namespace RestoreBackupResponse { - export type AsObject = { - } -} - -export class ChannelBackupSubscription extends jspb.Message { - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ChannelBackupSubscription.AsObject; - static toObject(includeInstance: boolean, msg: ChannelBackupSubscription): ChannelBackupSubscription.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ChannelBackupSubscription, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ChannelBackupSubscription; - static deserializeBinaryFromReader(message: ChannelBackupSubscription, reader: jspb.BinaryReader): ChannelBackupSubscription; -} - -export namespace ChannelBackupSubscription { - export type AsObject = { - } -} - -export class VerifyChanBackupResponse extends jspb.Message { - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): VerifyChanBackupResponse.AsObject; - static toObject(includeInstance: boolean, msg: VerifyChanBackupResponse): VerifyChanBackupResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: VerifyChanBackupResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): VerifyChanBackupResponse; - static deserializeBinaryFromReader(message: VerifyChanBackupResponse, reader: jspb.BinaryReader): VerifyChanBackupResponse; -} - -export namespace VerifyChanBackupResponse { - export type AsObject = { - } -} - -export class MacaroonPermission extends jspb.Message { - getEntity(): string; - setEntity(value: string): void; - - getAction(): string; - setAction(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): MacaroonPermission.AsObject; - static toObject(includeInstance: boolean, msg: MacaroonPermission): MacaroonPermission.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: MacaroonPermission, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): MacaroonPermission; - static deserializeBinaryFromReader(message: MacaroonPermission, reader: jspb.BinaryReader): MacaroonPermission; -} - -export namespace MacaroonPermission { - export type AsObject = { - entity: string, - action: string, - } -} - -export class BakeMacaroonRequest extends jspb.Message { - clearPermissionsList(): void; - getPermissionsList(): Array; - setPermissionsList(value: Array): void; - addPermissions(value?: MacaroonPermission, index?: number): MacaroonPermission; - - getRootKeyId(): number; - setRootKeyId(value: number): void; - - getAllowExternalPermissions(): boolean; - setAllowExternalPermissions(value: boolean): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): BakeMacaroonRequest.AsObject; - static toObject(includeInstance: boolean, msg: BakeMacaroonRequest): BakeMacaroonRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: BakeMacaroonRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): BakeMacaroonRequest; - static deserializeBinaryFromReader(message: BakeMacaroonRequest, reader: jspb.BinaryReader): BakeMacaroonRequest; -} - -export namespace BakeMacaroonRequest { - export type AsObject = { - permissions: Array, - rootKeyId: number, - allowExternalPermissions: boolean, - } -} - -export class BakeMacaroonResponse extends jspb.Message { - getMacaroon(): string; - setMacaroon(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): BakeMacaroonResponse.AsObject; - static toObject(includeInstance: boolean, msg: BakeMacaroonResponse): BakeMacaroonResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: BakeMacaroonResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): BakeMacaroonResponse; - static deserializeBinaryFromReader(message: BakeMacaroonResponse, reader: jspb.BinaryReader): BakeMacaroonResponse; -} - -export namespace BakeMacaroonResponse { - export type AsObject = { - macaroon: string, - } -} - -export class ListMacaroonIDsRequest extends jspb.Message { - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ListMacaroonIDsRequest.AsObject; - static toObject(includeInstance: boolean, msg: ListMacaroonIDsRequest): ListMacaroonIDsRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ListMacaroonIDsRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ListMacaroonIDsRequest; - static deserializeBinaryFromReader(message: ListMacaroonIDsRequest, reader: jspb.BinaryReader): ListMacaroonIDsRequest; -} - -export namespace ListMacaroonIDsRequest { - export type AsObject = { - } -} - -export class ListMacaroonIDsResponse extends jspb.Message { - clearRootKeyIdsList(): void; - getRootKeyIdsList(): Array; - setRootKeyIdsList(value: Array): void; - addRootKeyIds(value: number, index?: number): number; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ListMacaroonIDsResponse.AsObject; - static toObject(includeInstance: boolean, msg: ListMacaroonIDsResponse): ListMacaroonIDsResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ListMacaroonIDsResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ListMacaroonIDsResponse; - static deserializeBinaryFromReader(message: ListMacaroonIDsResponse, reader: jspb.BinaryReader): ListMacaroonIDsResponse; -} - -export namespace ListMacaroonIDsResponse { - export type AsObject = { - rootKeyIds: Array, - } -} - -export class DeleteMacaroonIDRequest extends jspb.Message { - getRootKeyId(): number; - setRootKeyId(value: number): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): DeleteMacaroonIDRequest.AsObject; - static toObject(includeInstance: boolean, msg: DeleteMacaroonIDRequest): DeleteMacaroonIDRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: DeleteMacaroonIDRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): DeleteMacaroonIDRequest; - static deserializeBinaryFromReader(message: DeleteMacaroonIDRequest, reader: jspb.BinaryReader): DeleteMacaroonIDRequest; -} - -export namespace DeleteMacaroonIDRequest { - export type AsObject = { - rootKeyId: number, - } -} - -export class DeleteMacaroonIDResponse extends jspb.Message { - getDeleted(): boolean; - setDeleted(value: boolean): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): DeleteMacaroonIDResponse.AsObject; - static toObject(includeInstance: boolean, msg: DeleteMacaroonIDResponse): DeleteMacaroonIDResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: DeleteMacaroonIDResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): DeleteMacaroonIDResponse; - static deserializeBinaryFromReader(message: DeleteMacaroonIDResponse, reader: jspb.BinaryReader): DeleteMacaroonIDResponse; -} - -export namespace DeleteMacaroonIDResponse { - export type AsObject = { - deleted: boolean, - } -} - -export class MacaroonPermissionList extends jspb.Message { - clearPermissionsList(): void; - getPermissionsList(): Array; - setPermissionsList(value: Array): void; - addPermissions(value?: MacaroonPermission, index?: number): MacaroonPermission; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): MacaroonPermissionList.AsObject; - static toObject(includeInstance: boolean, msg: MacaroonPermissionList): MacaroonPermissionList.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: MacaroonPermissionList, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): MacaroonPermissionList; - static deserializeBinaryFromReader(message: MacaroonPermissionList, reader: jspb.BinaryReader): MacaroonPermissionList; -} - -export namespace MacaroonPermissionList { - export type AsObject = { - permissions: Array, - } -} - -export class ListPermissionsRequest extends jspb.Message { - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ListPermissionsRequest.AsObject; - static toObject(includeInstance: boolean, msg: ListPermissionsRequest): ListPermissionsRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ListPermissionsRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ListPermissionsRequest; - static deserializeBinaryFromReader(message: ListPermissionsRequest, reader: jspb.BinaryReader): ListPermissionsRequest; -} - -export namespace ListPermissionsRequest { - export type AsObject = { - } -} - -export class ListPermissionsResponse extends jspb.Message { - getMethodPermissionsMap(): jspb.Map; - clearMethodPermissionsMap(): void; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ListPermissionsResponse.AsObject; - static toObject(includeInstance: boolean, msg: ListPermissionsResponse): ListPermissionsResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ListPermissionsResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ListPermissionsResponse; - static deserializeBinaryFromReader(message: ListPermissionsResponse, reader: jspb.BinaryReader): ListPermissionsResponse; -} - -export namespace ListPermissionsResponse { - export type AsObject = { - methodPermissions: Array<[string, MacaroonPermissionList.AsObject]>, - } -} - -export class Failure extends jspb.Message { - getCode(): Failure.FailureCodeMap[keyof Failure.FailureCodeMap]; - setCode(value: Failure.FailureCodeMap[keyof Failure.FailureCodeMap]): void; - - hasChannelUpdate(): boolean; - clearChannelUpdate(): void; - getChannelUpdate(): ChannelUpdate | undefined; - setChannelUpdate(value?: ChannelUpdate): void; - - getHtlcMsat(): number; - setHtlcMsat(value: number): void; - - getOnionSha256(): Uint8Array | string; - getOnionSha256_asU8(): Uint8Array; - getOnionSha256_asB64(): string; - setOnionSha256(value: Uint8Array | string): void; - - getCltvExpiry(): number; - setCltvExpiry(value: number): void; - - getFlags(): number; - setFlags(value: number): void; - - getFailureSourceIndex(): number; - setFailureSourceIndex(value: number): void; - - getHeight(): number; - setHeight(value: number): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Failure.AsObject; - static toObject(includeInstance: boolean, msg: Failure): Failure.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: Failure, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Failure; - static deserializeBinaryFromReader(message: Failure, reader: jspb.BinaryReader): Failure; -} - -export namespace Failure { - export type AsObject = { - code: Failure.FailureCodeMap[keyof Failure.FailureCodeMap], - channelUpdate?: ChannelUpdate.AsObject, - htlcMsat: number, - onionSha256: Uint8Array | string, - cltvExpiry: number, - flags: number, - failureSourceIndex: number, - height: number, - } - - export interface FailureCodeMap { - RESERVED: 0; - INCORRECT_OR_UNKNOWN_PAYMENT_DETAILS: 1; - INCORRECT_PAYMENT_AMOUNT: 2; - FINAL_INCORRECT_CLTV_EXPIRY: 3; - FINAL_INCORRECT_HTLC_AMOUNT: 4; - FINAL_EXPIRY_TOO_SOON: 5; - INVALID_REALM: 6; - EXPIRY_TOO_SOON: 7; - INVALID_ONION_VERSION: 8; - INVALID_ONION_HMAC: 9; - INVALID_ONION_KEY: 10; - AMOUNT_BELOW_MINIMUM: 11; - FEE_INSUFFICIENT: 12; - INCORRECT_CLTV_EXPIRY: 13; - CHANNEL_DISABLED: 14; - TEMPORARY_CHANNEL_FAILURE: 15; - REQUIRED_NODE_FEATURE_MISSING: 16; - REQUIRED_CHANNEL_FEATURE_MISSING: 17; - UNKNOWN_NEXT_PEER: 18; - TEMPORARY_NODE_FAILURE: 19; - PERMANENT_NODE_FAILURE: 20; - PERMANENT_CHANNEL_FAILURE: 21; - EXPIRY_TOO_FAR: 22; - MPP_TIMEOUT: 23; - INVALID_ONION_PAYLOAD: 24; - INTERNAL_FAILURE: 997; - UNKNOWN_FAILURE: 998; - UNREADABLE_FAILURE: 999; - } - - export const FailureCode: FailureCodeMap; -} - -export class ChannelUpdate extends jspb.Message { - getSignature(): Uint8Array | string; - getSignature_asU8(): Uint8Array; - getSignature_asB64(): string; - setSignature(value: Uint8Array | string): void; - - getChainHash(): Uint8Array | string; - getChainHash_asU8(): Uint8Array; - getChainHash_asB64(): string; - setChainHash(value: Uint8Array | string): void; - - getChanId(): string; - setChanId(value: string): void; - - getTimestamp(): number; - setTimestamp(value: number): void; - - getMessageFlags(): number; - setMessageFlags(value: number): void; - - getChannelFlags(): number; - setChannelFlags(value: number): void; - - getTimeLockDelta(): number; - setTimeLockDelta(value: number): void; - - getHtlcMinimumMsat(): number; - setHtlcMinimumMsat(value: number): void; - - getBaseFee(): number; - setBaseFee(value: number): void; - - getFeeRate(): number; - setFeeRate(value: number): void; - - getHtlcMaximumMsat(): number; - setHtlcMaximumMsat(value: number): void; - - getExtraOpaqueData(): Uint8Array | string; - getExtraOpaqueData_asU8(): Uint8Array; - getExtraOpaqueData_asB64(): string; - setExtraOpaqueData(value: Uint8Array | string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ChannelUpdate.AsObject; - static toObject(includeInstance: boolean, msg: ChannelUpdate): ChannelUpdate.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ChannelUpdate, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ChannelUpdate; - static deserializeBinaryFromReader(message: ChannelUpdate, reader: jspb.BinaryReader): ChannelUpdate; -} - -export namespace ChannelUpdate { - export type AsObject = { - signature: Uint8Array | string, - chainHash: Uint8Array | string, - chanId: string, - timestamp: number, - messageFlags: number, - channelFlags: number, - timeLockDelta: number, - htlcMinimumMsat: number, - baseFee: number, - feeRate: number, - htlcMaximumMsat: number, - extraOpaqueData: Uint8Array | string, - } -} - -export class MacaroonId extends jspb.Message { - getNonce(): Uint8Array | string; - getNonce_asU8(): Uint8Array; - getNonce_asB64(): string; - setNonce(value: Uint8Array | string): void; - - getStorageid(): Uint8Array | string; - getStorageid_asU8(): Uint8Array; - getStorageid_asB64(): string; - setStorageid(value: Uint8Array | string): void; - - clearOpsList(): void; - getOpsList(): Array; - setOpsList(value: Array): void; - addOps(value?: Op, index?: number): Op; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): MacaroonId.AsObject; - static toObject(includeInstance: boolean, msg: MacaroonId): MacaroonId.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: MacaroonId, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): MacaroonId; - static deserializeBinaryFromReader(message: MacaroonId, reader: jspb.BinaryReader): MacaroonId; -} - -export namespace MacaroonId { - export type AsObject = { - nonce: Uint8Array | string, - storageid: Uint8Array | string, - ops: Array, - } -} - -export class Op extends jspb.Message { - getEntity(): string; - setEntity(value: string): void; - - clearActionsList(): void; - getActionsList(): Array; - setActionsList(value: Array): void; - addActions(value: string, index?: number): string; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Op.AsObject; - static toObject(includeInstance: boolean, msg: Op): Op.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: Op, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Op; - static deserializeBinaryFromReader(message: Op, reader: jspb.BinaryReader): Op; -} - -export namespace Op { - export type AsObject = { - entity: string, - actions: Array, - } -} - -export class CheckMacPermRequest extends jspb.Message { - getMacaroon(): Uint8Array | string; - getMacaroon_asU8(): Uint8Array; - getMacaroon_asB64(): string; - setMacaroon(value: Uint8Array | string): void; - - clearPermissionsList(): void; - getPermissionsList(): Array; - setPermissionsList(value: Array): void; - addPermissions(value?: MacaroonPermission, index?: number): MacaroonPermission; - - getFullmethod(): string; - setFullmethod(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): CheckMacPermRequest.AsObject; - static toObject(includeInstance: boolean, msg: CheckMacPermRequest): CheckMacPermRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: CheckMacPermRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): CheckMacPermRequest; - static deserializeBinaryFromReader(message: CheckMacPermRequest, reader: jspb.BinaryReader): CheckMacPermRequest; -} - -export namespace CheckMacPermRequest { - export type AsObject = { - macaroon: Uint8Array | string, - permissions: Array, - fullmethod: string, - } -} - -export class CheckMacPermResponse extends jspb.Message { - getValid(): boolean; - setValid(value: boolean): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): CheckMacPermResponse.AsObject; - static toObject(includeInstance: boolean, msg: CheckMacPermResponse): CheckMacPermResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: CheckMacPermResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): CheckMacPermResponse; - static deserializeBinaryFromReader(message: CheckMacPermResponse, reader: jspb.BinaryReader): CheckMacPermResponse; -} - -export namespace CheckMacPermResponse { - export type AsObject = { - valid: boolean, - } -} - -export class RPCMiddlewareRequest extends jspb.Message { - getRequestId(): number; - setRequestId(value: number): void; - - getRawMacaroon(): Uint8Array | string; - getRawMacaroon_asU8(): Uint8Array; - getRawMacaroon_asB64(): string; - setRawMacaroon(value: Uint8Array | string): void; - - getCustomCaveatCondition(): string; - setCustomCaveatCondition(value: string): void; - - hasStreamAuth(): boolean; - clearStreamAuth(): void; - getStreamAuth(): StreamAuth | undefined; - setStreamAuth(value?: StreamAuth): void; - - hasRequest(): boolean; - clearRequest(): void; - getRequest(): RPCMessage | undefined; - setRequest(value?: RPCMessage): void; - - hasResponse(): boolean; - clearResponse(): void; - getResponse(): RPCMessage | undefined; - setResponse(value?: RPCMessage): void; - - getMsgId(): number; - setMsgId(value: number): void; - - getInterceptTypeCase(): RPCMiddlewareRequest.InterceptTypeCase; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): RPCMiddlewareRequest.AsObject; - static toObject(includeInstance: boolean, msg: RPCMiddlewareRequest): RPCMiddlewareRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: RPCMiddlewareRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): RPCMiddlewareRequest; - static deserializeBinaryFromReader(message: RPCMiddlewareRequest, reader: jspb.BinaryReader): RPCMiddlewareRequest; -} - -export namespace RPCMiddlewareRequest { - export type AsObject = { - requestId: number, - rawMacaroon: Uint8Array | string, - customCaveatCondition: string, - streamAuth?: StreamAuth.AsObject, - request?: RPCMessage.AsObject, - response?: RPCMessage.AsObject, - msgId: number, - } - - export enum InterceptTypeCase { - INTERCEPT_TYPE_NOT_SET = 0, - STREAM_AUTH = 4, - REQUEST = 5, - RESPONSE = 6, - } -} - -export class StreamAuth extends jspb.Message { - getMethodFullUri(): string; - setMethodFullUri(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): StreamAuth.AsObject; - static toObject(includeInstance: boolean, msg: StreamAuth): StreamAuth.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: StreamAuth, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): StreamAuth; - static deserializeBinaryFromReader(message: StreamAuth, reader: jspb.BinaryReader): StreamAuth; -} - -export namespace StreamAuth { - export type AsObject = { - methodFullUri: string, - } -} - -export class RPCMessage extends jspb.Message { - getMethodFullUri(): string; - setMethodFullUri(value: string): void; - - getStreamRpc(): boolean; - setStreamRpc(value: boolean): void; - - getTypeName(): string; - setTypeName(value: string): void; - - getSerialized(): Uint8Array | string; - getSerialized_asU8(): Uint8Array; - getSerialized_asB64(): string; - setSerialized(value: Uint8Array | string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): RPCMessage.AsObject; - static toObject(includeInstance: boolean, msg: RPCMessage): RPCMessage.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: RPCMessage, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): RPCMessage; - static deserializeBinaryFromReader(message: RPCMessage, reader: jspb.BinaryReader): RPCMessage; -} - -export namespace RPCMessage { - export type AsObject = { - methodFullUri: string, - streamRpc: boolean, - typeName: string, - serialized: Uint8Array | string, - } -} - -export class RPCMiddlewareResponse extends jspb.Message { - getRefMsgId(): number; - setRefMsgId(value: number): void; - - hasRegister(): boolean; - clearRegister(): void; - getRegister(): MiddlewareRegistration | undefined; - setRegister(value?: MiddlewareRegistration): void; - - hasFeedback(): boolean; - clearFeedback(): void; - getFeedback(): InterceptFeedback | undefined; - setFeedback(value?: InterceptFeedback): void; - - getMiddlewareMessageCase(): RPCMiddlewareResponse.MiddlewareMessageCase; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): RPCMiddlewareResponse.AsObject; - static toObject(includeInstance: boolean, msg: RPCMiddlewareResponse): RPCMiddlewareResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: RPCMiddlewareResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): RPCMiddlewareResponse; - static deserializeBinaryFromReader(message: RPCMiddlewareResponse, reader: jspb.BinaryReader): RPCMiddlewareResponse; -} - -export namespace RPCMiddlewareResponse { - export type AsObject = { - refMsgId: number, - register?: MiddlewareRegistration.AsObject, - feedback?: InterceptFeedback.AsObject, - } - - export enum MiddlewareMessageCase { - MIDDLEWARE_MESSAGE_NOT_SET = 0, - REGISTER = 2, - FEEDBACK = 3, - } -} - -export class MiddlewareRegistration extends jspb.Message { - getMiddlewareName(): string; - setMiddlewareName(value: string): void; - - getCustomMacaroonCaveatName(): string; - setCustomMacaroonCaveatName(value: string): void; - - getReadOnlyMode(): boolean; - setReadOnlyMode(value: boolean): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): MiddlewareRegistration.AsObject; - static toObject(includeInstance: boolean, msg: MiddlewareRegistration): MiddlewareRegistration.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: MiddlewareRegistration, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): MiddlewareRegistration; - static deserializeBinaryFromReader(message: MiddlewareRegistration, reader: jspb.BinaryReader): MiddlewareRegistration; -} - -export namespace MiddlewareRegistration { - export type AsObject = { - middlewareName: string, - customMacaroonCaveatName: string, - readOnlyMode: boolean, - } -} - -export class InterceptFeedback extends jspb.Message { - getError(): string; - setError(value: string): void; - - getReplaceResponse(): boolean; - setReplaceResponse(value: boolean): void; - - getReplacementSerialized(): Uint8Array | string; - getReplacementSerialized_asU8(): Uint8Array; - getReplacementSerialized_asB64(): string; - setReplacementSerialized(value: Uint8Array | string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): InterceptFeedback.AsObject; - static toObject(includeInstance: boolean, msg: InterceptFeedback): InterceptFeedback.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: InterceptFeedback, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): InterceptFeedback; - static deserializeBinaryFromReader(message: InterceptFeedback, reader: jspb.BinaryReader): InterceptFeedback; -} - -export namespace InterceptFeedback { - export type AsObject = { - error: string, - replaceResponse: boolean, - replacementSerialized: Uint8Array | string, - } -} - -export interface AddressTypeMap { - WITNESS_PUBKEY_HASH: 0; - NESTED_PUBKEY_HASH: 1; - UNUSED_WITNESS_PUBKEY_HASH: 2; - UNUSED_NESTED_PUBKEY_HASH: 3; -} - -export const AddressType: AddressTypeMap; - -export interface CommitmentTypeMap { - UNKNOWN_COMMITMENT_TYPE: 0; - LEGACY: 1; - STATIC_REMOTE_KEY: 2; - ANCHORS: 3; - SCRIPT_ENFORCED_LEASE: 4; -} - -export const CommitmentType: CommitmentTypeMap; - -export interface InitiatorMap { - INITIATOR_UNKNOWN: 0; - INITIATOR_LOCAL: 1; - INITIATOR_REMOTE: 2; - INITIATOR_BOTH: 3; -} - -export const Initiator: InitiatorMap; - -export interface ResolutionTypeMap { - TYPE_UNKNOWN: 0; - ANCHOR: 1; - INCOMING_HTLC: 2; - OUTGOING_HTLC: 3; - COMMIT: 4; -} - -export const ResolutionType: ResolutionTypeMap; - -export interface ResolutionOutcomeMap { - OUTCOME_UNKNOWN: 0; - CLAIMED: 1; - UNCLAIMED: 2; - ABANDONED: 3; - FIRST_STAGE: 4; - TIMEOUT: 5; -} - -export const ResolutionOutcome: ResolutionOutcomeMap; - -export interface NodeMetricTypeMap { - UNKNOWN: 0; - BETWEENNESS_CENTRALITY: 1; -} - -export const NodeMetricType: NodeMetricTypeMap; - -export interface InvoiceHTLCStateMap { - ACCEPTED: 0; - SETTLED: 1; - CANCELED: 2; -} - -export const InvoiceHTLCState: InvoiceHTLCStateMap; - -export interface PaymentFailureReasonMap { - FAILURE_REASON_NONE: 0; - FAILURE_REASON_TIMEOUT: 1; - FAILURE_REASON_NO_ROUTE: 2; - FAILURE_REASON_ERROR: 3; - FAILURE_REASON_INCORRECT_PAYMENT_DETAILS: 4; - FAILURE_REASON_INSUFFICIENT_BALANCE: 5; -} - -export const PaymentFailureReason: PaymentFailureReasonMap; - -export interface FeatureBitMap { - DATALOSS_PROTECT_REQ: 0; - DATALOSS_PROTECT_OPT: 1; - INITIAL_ROUING_SYNC: 3; - UPFRONT_SHUTDOWN_SCRIPT_REQ: 4; - UPFRONT_SHUTDOWN_SCRIPT_OPT: 5; - GOSSIP_QUERIES_REQ: 6; - GOSSIP_QUERIES_OPT: 7; - TLV_ONION_REQ: 8; - TLV_ONION_OPT: 9; - EXT_GOSSIP_QUERIES_REQ: 10; - EXT_GOSSIP_QUERIES_OPT: 11; - STATIC_REMOTE_KEY_REQ: 12; - STATIC_REMOTE_KEY_OPT: 13; - PAYMENT_ADDR_REQ: 14; - PAYMENT_ADDR_OPT: 15; - MPP_REQ: 16; - MPP_OPT: 17; - WUMBO_CHANNELS_REQ: 18; - WUMBO_CHANNELS_OPT: 19; - ANCHORS_REQ: 20; - ANCHORS_OPT: 21; - ANCHORS_ZERO_FEE_HTLC_REQ: 22; - ANCHORS_ZERO_FEE_HTLC_OPT: 23; - AMP_REQ: 30; - AMP_OPT: 31; -} - -export const FeatureBit: FeatureBitMap; - -export interface UpdateFailureMap { - UPDATE_FAILURE_UNKNOWN: 0; - UPDATE_FAILURE_PENDING: 1; - UPDATE_FAILURE_NOT_FOUND: 2; - UPDATE_FAILURE_INTERNAL_ERR: 3; - UPDATE_FAILURE_INVALID_PARAMETER: 4; -} - -export const UpdateFailure: UpdateFailureMap; - diff --git a/lib/types/generated/lightning_pb.js b/lib/types/generated/lightning_pb.js deleted file mode 100644 index b5c5eb3..0000000 --- a/lib/types/generated/lightning_pb.js +++ /dev/null @@ -1,51211 +0,0 @@ -// source: lightning.proto -/** - * @fileoverview - * @enhanceable - * @suppress {missingRequire} reports error on implicit type usages. - * @suppress {messageConventions} JS Compiler reports an error if a variable or - * field starts with 'MSG_' and isn't a translatable message. - * @public - */ -// GENERATED CODE -- DO NOT EDIT! -/* eslint-disable */ -// @ts-nocheck - -var jspb = require('google-protobuf'); -var goog = jspb; -var global = Function('return this')(); - -goog.exportSymbol('proto.lnrpc.AMP', null, global); -goog.exportSymbol('proto.lnrpc.AMPInvoiceState', null, global); -goog.exportSymbol('proto.lnrpc.AMPRecord', null, global); -goog.exportSymbol('proto.lnrpc.AbandonChannelRequest', null, global); -goog.exportSymbol('proto.lnrpc.AbandonChannelResponse', null, global); -goog.exportSymbol('proto.lnrpc.AddInvoiceResponse', null, global); -goog.exportSymbol('proto.lnrpc.AddressType', null, global); -goog.exportSymbol('proto.lnrpc.Amount', null, global); -goog.exportSymbol('proto.lnrpc.BakeMacaroonRequest', null, global); -goog.exportSymbol('proto.lnrpc.BakeMacaroonResponse', null, global); -goog.exportSymbol('proto.lnrpc.BatchOpenChannel', null, global); -goog.exportSymbol('proto.lnrpc.BatchOpenChannelRequest', null, global); -goog.exportSymbol('proto.lnrpc.BatchOpenChannelResponse', null, global); -goog.exportSymbol('proto.lnrpc.Chain', null, global); -goog.exportSymbol('proto.lnrpc.ChanBackupExportRequest', null, global); -goog.exportSymbol('proto.lnrpc.ChanBackupSnapshot', null, global); -goog.exportSymbol('proto.lnrpc.ChanInfoRequest', null, global); -goog.exportSymbol('proto.lnrpc.ChanPointShim', null, global); -goog.exportSymbol('proto.lnrpc.Channel', null, global); -goog.exportSymbol('proto.lnrpc.ChannelAcceptRequest', null, global); -goog.exportSymbol('proto.lnrpc.ChannelAcceptResponse', null, global); -goog.exportSymbol('proto.lnrpc.ChannelBackup', null, global); -goog.exportSymbol('proto.lnrpc.ChannelBackupSubscription', null, global); -goog.exportSymbol('proto.lnrpc.ChannelBackups', null, global); -goog.exportSymbol('proto.lnrpc.ChannelBalanceRequest', null, global); -goog.exportSymbol('proto.lnrpc.ChannelBalanceResponse', null, global); -goog.exportSymbol('proto.lnrpc.ChannelCloseSummary', null, global); -goog.exportSymbol('proto.lnrpc.ChannelCloseSummary.ClosureType', null, global); -goog.exportSymbol('proto.lnrpc.ChannelCloseUpdate', null, global); -goog.exportSymbol('proto.lnrpc.ChannelConstraints', null, global); -goog.exportSymbol('proto.lnrpc.ChannelEdge', null, global); -goog.exportSymbol('proto.lnrpc.ChannelEdgeUpdate', null, global); -goog.exportSymbol('proto.lnrpc.ChannelEventSubscription', null, global); -goog.exportSymbol('proto.lnrpc.ChannelEventUpdate', null, global); -goog.exportSymbol('proto.lnrpc.ChannelEventUpdate.ChannelCase', null, global); -goog.exportSymbol('proto.lnrpc.ChannelEventUpdate.UpdateType', null, global); -goog.exportSymbol('proto.lnrpc.ChannelFeeReport', null, global); -goog.exportSymbol('proto.lnrpc.ChannelGraph', null, global); -goog.exportSymbol('proto.lnrpc.ChannelGraphRequest', null, global); -goog.exportSymbol('proto.lnrpc.ChannelOpenUpdate', null, global); -goog.exportSymbol('proto.lnrpc.ChannelPoint', null, global); -goog.exportSymbol('proto.lnrpc.ChannelPoint.FundingTxidCase', null, global); -goog.exportSymbol('proto.lnrpc.ChannelUpdate', null, global); -goog.exportSymbol('proto.lnrpc.CheckMacPermRequest', null, global); -goog.exportSymbol('proto.lnrpc.CheckMacPermResponse', null, global); -goog.exportSymbol('proto.lnrpc.CloseChannelRequest', null, global); -goog.exportSymbol('proto.lnrpc.CloseStatusUpdate', null, global); -goog.exportSymbol('proto.lnrpc.CloseStatusUpdate.UpdateCase', null, global); -goog.exportSymbol('proto.lnrpc.ClosedChannelUpdate', null, global); -goog.exportSymbol('proto.lnrpc.ClosedChannelsRequest', null, global); -goog.exportSymbol('proto.lnrpc.ClosedChannelsResponse', null, global); -goog.exportSymbol('proto.lnrpc.CommitmentType', null, global); -goog.exportSymbol('proto.lnrpc.ConfirmationUpdate', null, global); -goog.exportSymbol('proto.lnrpc.ConnectPeerRequest', null, global); -goog.exportSymbol('proto.lnrpc.ConnectPeerResponse', null, global); -goog.exportSymbol('proto.lnrpc.CustomMessage', null, global); -goog.exportSymbol('proto.lnrpc.DebugLevelRequest', null, global); -goog.exportSymbol('proto.lnrpc.DebugLevelResponse', null, global); -goog.exportSymbol('proto.lnrpc.DeleteAllPaymentsRequest', null, global); -goog.exportSymbol('proto.lnrpc.DeleteAllPaymentsResponse', null, global); -goog.exportSymbol('proto.lnrpc.DeleteMacaroonIDRequest', null, global); -goog.exportSymbol('proto.lnrpc.DeleteMacaroonIDResponse', null, global); -goog.exportSymbol('proto.lnrpc.DeletePaymentRequest', null, global); -goog.exportSymbol('proto.lnrpc.DeletePaymentResponse', null, global); -goog.exportSymbol('proto.lnrpc.DisconnectPeerRequest', null, global); -goog.exportSymbol('proto.lnrpc.DisconnectPeerResponse', null, global); -goog.exportSymbol('proto.lnrpc.EdgeLocator', null, global); -goog.exportSymbol('proto.lnrpc.EstimateFeeRequest', null, global); -goog.exportSymbol('proto.lnrpc.EstimateFeeResponse', null, global); -goog.exportSymbol('proto.lnrpc.ExportChannelBackupRequest', null, global); -goog.exportSymbol('proto.lnrpc.FailedUpdate', null, global); -goog.exportSymbol('proto.lnrpc.Failure', null, global); -goog.exportSymbol('proto.lnrpc.Failure.FailureCode', null, global); -goog.exportSymbol('proto.lnrpc.Feature', null, global); -goog.exportSymbol('proto.lnrpc.FeatureBit', null, global); -goog.exportSymbol('proto.lnrpc.FeeLimit', null, global); -goog.exportSymbol('proto.lnrpc.FeeLimit.LimitCase', null, global); -goog.exportSymbol('proto.lnrpc.FeeReportRequest', null, global); -goog.exportSymbol('proto.lnrpc.FeeReportResponse', null, global); -goog.exportSymbol('proto.lnrpc.FloatMetric', null, global); -goog.exportSymbol('proto.lnrpc.ForwardingEvent', null, global); -goog.exportSymbol('proto.lnrpc.ForwardingHistoryRequest', null, global); -goog.exportSymbol('proto.lnrpc.ForwardingHistoryResponse', null, global); -goog.exportSymbol('proto.lnrpc.FundingPsbtFinalize', null, global); -goog.exportSymbol('proto.lnrpc.FundingPsbtVerify', null, global); -goog.exportSymbol('proto.lnrpc.FundingShim', null, global); -goog.exportSymbol('proto.lnrpc.FundingShim.ShimCase', null, global); -goog.exportSymbol('proto.lnrpc.FundingShimCancel', null, global); -goog.exportSymbol('proto.lnrpc.FundingStateStepResp', null, global); -goog.exportSymbol('proto.lnrpc.FundingTransitionMsg', null, global); -goog.exportSymbol('proto.lnrpc.FundingTransitionMsg.TriggerCase', null, global); -goog.exportSymbol('proto.lnrpc.GetInfoRequest', null, global); -goog.exportSymbol('proto.lnrpc.GetInfoResponse', null, global); -goog.exportSymbol('proto.lnrpc.GetRecoveryInfoRequest', null, global); -goog.exportSymbol('proto.lnrpc.GetRecoveryInfoResponse', null, global); -goog.exportSymbol('proto.lnrpc.GetTransactionsRequest', null, global); -goog.exportSymbol('proto.lnrpc.GraphTopologySubscription', null, global); -goog.exportSymbol('proto.lnrpc.GraphTopologyUpdate', null, global); -goog.exportSymbol('proto.lnrpc.HTLC', null, global); -goog.exportSymbol('proto.lnrpc.HTLCAttempt', null, global); -goog.exportSymbol('proto.lnrpc.HTLCAttempt.HTLCStatus', null, global); -goog.exportSymbol('proto.lnrpc.Hop', null, global); -goog.exportSymbol('proto.lnrpc.HopHint', null, global); -goog.exportSymbol('proto.lnrpc.Initiator', null, global); -goog.exportSymbol('proto.lnrpc.InterceptFeedback', null, global); -goog.exportSymbol('proto.lnrpc.Invoice', null, global); -goog.exportSymbol('proto.lnrpc.Invoice.InvoiceState', null, global); -goog.exportSymbol('proto.lnrpc.InvoiceHTLC', null, global); -goog.exportSymbol('proto.lnrpc.InvoiceHTLCState', null, global); -goog.exportSymbol('proto.lnrpc.InvoiceSubscription', null, global); -goog.exportSymbol('proto.lnrpc.KeyDescriptor', null, global); -goog.exportSymbol('proto.lnrpc.KeyLocator', null, global); -goog.exportSymbol('proto.lnrpc.LightningAddress', null, global); -goog.exportSymbol('proto.lnrpc.LightningNode', null, global); -goog.exportSymbol('proto.lnrpc.ListChannelsRequest', null, global); -goog.exportSymbol('proto.lnrpc.ListChannelsResponse', null, global); -goog.exportSymbol('proto.lnrpc.ListInvoiceRequest', null, global); -goog.exportSymbol('proto.lnrpc.ListInvoiceResponse', null, global); -goog.exportSymbol('proto.lnrpc.ListMacaroonIDsRequest', null, global); -goog.exportSymbol('proto.lnrpc.ListMacaroonIDsResponse', null, global); -goog.exportSymbol('proto.lnrpc.ListPaymentsRequest', null, global); -goog.exportSymbol('proto.lnrpc.ListPaymentsResponse', null, global); -goog.exportSymbol('proto.lnrpc.ListPeersRequest', null, global); -goog.exportSymbol('proto.lnrpc.ListPeersResponse', null, global); -goog.exportSymbol('proto.lnrpc.ListPermissionsRequest', null, global); -goog.exportSymbol('proto.lnrpc.ListPermissionsResponse', null, global); -goog.exportSymbol('proto.lnrpc.ListUnspentRequest', null, global); -goog.exportSymbol('proto.lnrpc.ListUnspentResponse', null, global); -goog.exportSymbol('proto.lnrpc.MPPRecord', null, global); -goog.exportSymbol('proto.lnrpc.MacaroonId', null, global); -goog.exportSymbol('proto.lnrpc.MacaroonPermission', null, global); -goog.exportSymbol('proto.lnrpc.MacaroonPermissionList', null, global); -goog.exportSymbol('proto.lnrpc.MiddlewareRegistration', null, global); -goog.exportSymbol('proto.lnrpc.MultiChanBackup', null, global); -goog.exportSymbol('proto.lnrpc.NetworkInfo', null, global); -goog.exportSymbol('proto.lnrpc.NetworkInfoRequest', null, global); -goog.exportSymbol('proto.lnrpc.NewAddressRequest', null, global); -goog.exportSymbol('proto.lnrpc.NewAddressResponse', null, global); -goog.exportSymbol('proto.lnrpc.NodeAddress', null, global); -goog.exportSymbol('proto.lnrpc.NodeInfo', null, global); -goog.exportSymbol('proto.lnrpc.NodeInfoRequest', null, global); -goog.exportSymbol('proto.lnrpc.NodeMetricType', null, global); -goog.exportSymbol('proto.lnrpc.NodeMetricsRequest', null, global); -goog.exportSymbol('proto.lnrpc.NodeMetricsResponse', null, global); -goog.exportSymbol('proto.lnrpc.NodePair', null, global); -goog.exportSymbol('proto.lnrpc.NodeUpdate', null, global); -goog.exportSymbol('proto.lnrpc.Op', null, global); -goog.exportSymbol('proto.lnrpc.OpenChannelRequest', null, global); -goog.exportSymbol('proto.lnrpc.OpenStatusUpdate', null, global); -goog.exportSymbol('proto.lnrpc.OpenStatusUpdate.UpdateCase', null, global); -goog.exportSymbol('proto.lnrpc.OutPoint', null, global); -goog.exportSymbol('proto.lnrpc.PayReq', null, global); -goog.exportSymbol('proto.lnrpc.PayReqString', null, global); -goog.exportSymbol('proto.lnrpc.Payment', null, global); -goog.exportSymbol('proto.lnrpc.Payment.PaymentStatus', null, global); -goog.exportSymbol('proto.lnrpc.PaymentFailureReason', null, global); -goog.exportSymbol('proto.lnrpc.PaymentHash', null, global); -goog.exportSymbol('proto.lnrpc.Peer', null, global); -goog.exportSymbol('proto.lnrpc.Peer.SyncType', null, global); -goog.exportSymbol('proto.lnrpc.PeerEvent', null, global); -goog.exportSymbol('proto.lnrpc.PeerEvent.EventType', null, global); -goog.exportSymbol('proto.lnrpc.PeerEventSubscription', null, global); -goog.exportSymbol('proto.lnrpc.PendingChannelsRequest', null, global); -goog.exportSymbol('proto.lnrpc.PendingChannelsResponse', null, global); -goog.exportSymbol('proto.lnrpc.PendingChannelsResponse.ClosedChannel', null, global); -goog.exportSymbol('proto.lnrpc.PendingChannelsResponse.Commitments', null, global); -goog.exportSymbol('proto.lnrpc.PendingChannelsResponse.ForceClosedChannel', null, global); -goog.exportSymbol('proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.AnchorState', null, global); -goog.exportSymbol('proto.lnrpc.PendingChannelsResponse.PendingChannel', null, global); -goog.exportSymbol('proto.lnrpc.PendingChannelsResponse.PendingOpenChannel', null, global); -goog.exportSymbol('proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel', null, global); -goog.exportSymbol('proto.lnrpc.PendingHTLC', null, global); -goog.exportSymbol('proto.lnrpc.PendingUpdate', null, global); -goog.exportSymbol('proto.lnrpc.PolicyUpdateRequest', null, global); -goog.exportSymbol('proto.lnrpc.PolicyUpdateRequest.ScopeCase', null, global); -goog.exportSymbol('proto.lnrpc.PolicyUpdateResponse', null, global); -goog.exportSymbol('proto.lnrpc.PsbtShim', null, global); -goog.exportSymbol('proto.lnrpc.QueryRoutesRequest', null, global); -goog.exportSymbol('proto.lnrpc.QueryRoutesResponse', null, global); -goog.exportSymbol('proto.lnrpc.RPCMessage', null, global); -goog.exportSymbol('proto.lnrpc.RPCMiddlewareRequest', null, global); -goog.exportSymbol('proto.lnrpc.RPCMiddlewareRequest.InterceptTypeCase', null, global); -goog.exportSymbol('proto.lnrpc.RPCMiddlewareResponse', null, global); -goog.exportSymbol('proto.lnrpc.RPCMiddlewareResponse.MiddlewareMessageCase', null, global); -goog.exportSymbol('proto.lnrpc.ReadyForPsbtFunding', null, global); -goog.exportSymbol('proto.lnrpc.Resolution', null, global); -goog.exportSymbol('proto.lnrpc.ResolutionOutcome', null, global); -goog.exportSymbol('proto.lnrpc.ResolutionType', null, global); -goog.exportSymbol('proto.lnrpc.RestoreBackupResponse', null, global); -goog.exportSymbol('proto.lnrpc.RestoreChanBackupRequest', null, global); -goog.exportSymbol('proto.lnrpc.RestoreChanBackupRequest.BackupCase', null, global); -goog.exportSymbol('proto.lnrpc.Route', null, global); -goog.exportSymbol('proto.lnrpc.RouteHint', null, global); -goog.exportSymbol('proto.lnrpc.RoutingPolicy', null, global); -goog.exportSymbol('proto.lnrpc.SendCoinsRequest', null, global); -goog.exportSymbol('proto.lnrpc.SendCoinsResponse', null, global); -goog.exportSymbol('proto.lnrpc.SendCustomMessageRequest', null, global); -goog.exportSymbol('proto.lnrpc.SendCustomMessageResponse', null, global); -goog.exportSymbol('proto.lnrpc.SendManyRequest', null, global); -goog.exportSymbol('proto.lnrpc.SendManyResponse', null, global); -goog.exportSymbol('proto.lnrpc.SendRequest', null, global); -goog.exportSymbol('proto.lnrpc.SendResponse', null, global); -goog.exportSymbol('proto.lnrpc.SendToRouteRequest', null, global); -goog.exportSymbol('proto.lnrpc.SetID', null, global); -goog.exportSymbol('proto.lnrpc.SignMessageRequest', null, global); -goog.exportSymbol('proto.lnrpc.SignMessageResponse', null, global); -goog.exportSymbol('proto.lnrpc.StopRequest', null, global); -goog.exportSymbol('proto.lnrpc.StopResponse', null, global); -goog.exportSymbol('proto.lnrpc.StreamAuth', null, global); -goog.exportSymbol('proto.lnrpc.SubscribeCustomMessagesRequest', null, global); -goog.exportSymbol('proto.lnrpc.TimestampedError', null, global); -goog.exportSymbol('proto.lnrpc.Transaction', null, global); -goog.exportSymbol('proto.lnrpc.TransactionDetails', null, global); -goog.exportSymbol('proto.lnrpc.UpdateFailure', null, global); -goog.exportSymbol('proto.lnrpc.Utxo', null, global); -goog.exportSymbol('proto.lnrpc.VerifyChanBackupResponse', null, global); -goog.exportSymbol('proto.lnrpc.VerifyMessageRequest', null, global); -goog.exportSymbol('proto.lnrpc.VerifyMessageResponse', null, global); -goog.exportSymbol('proto.lnrpc.WalletAccountBalance', null, global); -goog.exportSymbol('proto.lnrpc.WalletBalanceRequest', null, global); -goog.exportSymbol('proto.lnrpc.WalletBalanceResponse', null, global); -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.SubscribeCustomMessagesRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.lnrpc.SubscribeCustomMessagesRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.SubscribeCustomMessagesRequest.displayName = 'proto.lnrpc.SubscribeCustomMessagesRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.CustomMessage = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.lnrpc.CustomMessage, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.CustomMessage.displayName = 'proto.lnrpc.CustomMessage'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.SendCustomMessageRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.lnrpc.SendCustomMessageRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.SendCustomMessageRequest.displayName = 'proto.lnrpc.SendCustomMessageRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.SendCustomMessageResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.lnrpc.SendCustomMessageResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.SendCustomMessageResponse.displayName = 'proto.lnrpc.SendCustomMessageResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.Utxo = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.lnrpc.Utxo, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.Utxo.displayName = 'proto.lnrpc.Utxo'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.Transaction = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.lnrpc.Transaction.repeatedFields_, null); -}; -goog.inherits(proto.lnrpc.Transaction, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.Transaction.displayName = 'proto.lnrpc.Transaction'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.GetTransactionsRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.lnrpc.GetTransactionsRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.GetTransactionsRequest.displayName = 'proto.lnrpc.GetTransactionsRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.TransactionDetails = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.lnrpc.TransactionDetails.repeatedFields_, null); -}; -goog.inherits(proto.lnrpc.TransactionDetails, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.TransactionDetails.displayName = 'proto.lnrpc.TransactionDetails'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.FeeLimit = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.lnrpc.FeeLimit.oneofGroups_); -}; -goog.inherits(proto.lnrpc.FeeLimit, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.FeeLimit.displayName = 'proto.lnrpc.FeeLimit'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.SendRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.lnrpc.SendRequest.repeatedFields_, null); -}; -goog.inherits(proto.lnrpc.SendRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.SendRequest.displayName = 'proto.lnrpc.SendRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.SendResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.lnrpc.SendResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.SendResponse.displayName = 'proto.lnrpc.SendResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.SendToRouteRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.lnrpc.SendToRouteRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.SendToRouteRequest.displayName = 'proto.lnrpc.SendToRouteRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.ChannelAcceptRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.lnrpc.ChannelAcceptRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.ChannelAcceptRequest.displayName = 'proto.lnrpc.ChannelAcceptRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.ChannelAcceptResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.lnrpc.ChannelAcceptResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.ChannelAcceptResponse.displayName = 'proto.lnrpc.ChannelAcceptResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.ChannelPoint = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.lnrpc.ChannelPoint.oneofGroups_); -}; -goog.inherits(proto.lnrpc.ChannelPoint, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.ChannelPoint.displayName = 'proto.lnrpc.ChannelPoint'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.OutPoint = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.lnrpc.OutPoint, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.OutPoint.displayName = 'proto.lnrpc.OutPoint'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.LightningAddress = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.lnrpc.LightningAddress, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.LightningAddress.displayName = 'proto.lnrpc.LightningAddress'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.EstimateFeeRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.lnrpc.EstimateFeeRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.EstimateFeeRequest.displayName = 'proto.lnrpc.EstimateFeeRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.EstimateFeeResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.lnrpc.EstimateFeeResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.EstimateFeeResponse.displayName = 'proto.lnrpc.EstimateFeeResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.SendManyRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.lnrpc.SendManyRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.SendManyRequest.displayName = 'proto.lnrpc.SendManyRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.SendManyResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.lnrpc.SendManyResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.SendManyResponse.displayName = 'proto.lnrpc.SendManyResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.SendCoinsRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.lnrpc.SendCoinsRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.SendCoinsRequest.displayName = 'proto.lnrpc.SendCoinsRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.SendCoinsResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.lnrpc.SendCoinsResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.SendCoinsResponse.displayName = 'proto.lnrpc.SendCoinsResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.ListUnspentRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.lnrpc.ListUnspentRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.ListUnspentRequest.displayName = 'proto.lnrpc.ListUnspentRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.ListUnspentResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.lnrpc.ListUnspentResponse.repeatedFields_, null); -}; -goog.inherits(proto.lnrpc.ListUnspentResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.ListUnspentResponse.displayName = 'proto.lnrpc.ListUnspentResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.NewAddressRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.lnrpc.NewAddressRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.NewAddressRequest.displayName = 'proto.lnrpc.NewAddressRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.NewAddressResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.lnrpc.NewAddressResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.NewAddressResponse.displayName = 'proto.lnrpc.NewAddressResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.SignMessageRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.lnrpc.SignMessageRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.SignMessageRequest.displayName = 'proto.lnrpc.SignMessageRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.SignMessageResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.lnrpc.SignMessageResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.SignMessageResponse.displayName = 'proto.lnrpc.SignMessageResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.VerifyMessageRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.lnrpc.VerifyMessageRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.VerifyMessageRequest.displayName = 'proto.lnrpc.VerifyMessageRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.VerifyMessageResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.lnrpc.VerifyMessageResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.VerifyMessageResponse.displayName = 'proto.lnrpc.VerifyMessageResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.ConnectPeerRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.lnrpc.ConnectPeerRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.ConnectPeerRequest.displayName = 'proto.lnrpc.ConnectPeerRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.ConnectPeerResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.lnrpc.ConnectPeerResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.ConnectPeerResponse.displayName = 'proto.lnrpc.ConnectPeerResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.DisconnectPeerRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.lnrpc.DisconnectPeerRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.DisconnectPeerRequest.displayName = 'proto.lnrpc.DisconnectPeerRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.DisconnectPeerResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.lnrpc.DisconnectPeerResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.DisconnectPeerResponse.displayName = 'proto.lnrpc.DisconnectPeerResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.HTLC = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.lnrpc.HTLC, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.HTLC.displayName = 'proto.lnrpc.HTLC'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.ChannelConstraints = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.lnrpc.ChannelConstraints, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.ChannelConstraints.displayName = 'proto.lnrpc.ChannelConstraints'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.Channel = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.lnrpc.Channel.repeatedFields_, null); -}; -goog.inherits(proto.lnrpc.Channel, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.Channel.displayName = 'proto.lnrpc.Channel'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.ListChannelsRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.lnrpc.ListChannelsRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.ListChannelsRequest.displayName = 'proto.lnrpc.ListChannelsRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.ListChannelsResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.lnrpc.ListChannelsResponse.repeatedFields_, null); -}; -goog.inherits(proto.lnrpc.ListChannelsResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.ListChannelsResponse.displayName = 'proto.lnrpc.ListChannelsResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.ChannelCloseSummary = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.lnrpc.ChannelCloseSummary.repeatedFields_, null); -}; -goog.inherits(proto.lnrpc.ChannelCloseSummary, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.ChannelCloseSummary.displayName = 'proto.lnrpc.ChannelCloseSummary'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.Resolution = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.lnrpc.Resolution, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.Resolution.displayName = 'proto.lnrpc.Resolution'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.ClosedChannelsRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.lnrpc.ClosedChannelsRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.ClosedChannelsRequest.displayName = 'proto.lnrpc.ClosedChannelsRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.ClosedChannelsResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.lnrpc.ClosedChannelsResponse.repeatedFields_, null); -}; -goog.inherits(proto.lnrpc.ClosedChannelsResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.ClosedChannelsResponse.displayName = 'proto.lnrpc.ClosedChannelsResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.Peer = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.lnrpc.Peer.repeatedFields_, null); -}; -goog.inherits(proto.lnrpc.Peer, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.Peer.displayName = 'proto.lnrpc.Peer'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.TimestampedError = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.lnrpc.TimestampedError, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.TimestampedError.displayName = 'proto.lnrpc.TimestampedError'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.ListPeersRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.lnrpc.ListPeersRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.ListPeersRequest.displayName = 'proto.lnrpc.ListPeersRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.ListPeersResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.lnrpc.ListPeersResponse.repeatedFields_, null); -}; -goog.inherits(proto.lnrpc.ListPeersResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.ListPeersResponse.displayName = 'proto.lnrpc.ListPeersResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.PeerEventSubscription = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.lnrpc.PeerEventSubscription, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.PeerEventSubscription.displayName = 'proto.lnrpc.PeerEventSubscription'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.PeerEvent = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.lnrpc.PeerEvent, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.PeerEvent.displayName = 'proto.lnrpc.PeerEvent'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.GetInfoRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.lnrpc.GetInfoRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.GetInfoRequest.displayName = 'proto.lnrpc.GetInfoRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.GetInfoResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.lnrpc.GetInfoResponse.repeatedFields_, null); -}; -goog.inherits(proto.lnrpc.GetInfoResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.GetInfoResponse.displayName = 'proto.lnrpc.GetInfoResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.GetRecoveryInfoRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.lnrpc.GetRecoveryInfoRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.GetRecoveryInfoRequest.displayName = 'proto.lnrpc.GetRecoveryInfoRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.GetRecoveryInfoResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.lnrpc.GetRecoveryInfoResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.GetRecoveryInfoResponse.displayName = 'proto.lnrpc.GetRecoveryInfoResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.Chain = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.lnrpc.Chain, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.Chain.displayName = 'proto.lnrpc.Chain'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.ConfirmationUpdate = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.lnrpc.ConfirmationUpdate, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.ConfirmationUpdate.displayName = 'proto.lnrpc.ConfirmationUpdate'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.ChannelOpenUpdate = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.lnrpc.ChannelOpenUpdate, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.ChannelOpenUpdate.displayName = 'proto.lnrpc.ChannelOpenUpdate'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.ChannelCloseUpdate = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.lnrpc.ChannelCloseUpdate, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.ChannelCloseUpdate.displayName = 'proto.lnrpc.ChannelCloseUpdate'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.CloseChannelRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.lnrpc.CloseChannelRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.CloseChannelRequest.displayName = 'proto.lnrpc.CloseChannelRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.CloseStatusUpdate = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.lnrpc.CloseStatusUpdate.oneofGroups_); -}; -goog.inherits(proto.lnrpc.CloseStatusUpdate, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.CloseStatusUpdate.displayName = 'proto.lnrpc.CloseStatusUpdate'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.PendingUpdate = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.lnrpc.PendingUpdate, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.PendingUpdate.displayName = 'proto.lnrpc.PendingUpdate'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.ReadyForPsbtFunding = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.lnrpc.ReadyForPsbtFunding, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.ReadyForPsbtFunding.displayName = 'proto.lnrpc.ReadyForPsbtFunding'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.BatchOpenChannelRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.lnrpc.BatchOpenChannelRequest.repeatedFields_, null); -}; -goog.inherits(proto.lnrpc.BatchOpenChannelRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.BatchOpenChannelRequest.displayName = 'proto.lnrpc.BatchOpenChannelRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.BatchOpenChannel = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.lnrpc.BatchOpenChannel, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.BatchOpenChannel.displayName = 'proto.lnrpc.BatchOpenChannel'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.BatchOpenChannelResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.lnrpc.BatchOpenChannelResponse.repeatedFields_, null); -}; -goog.inherits(proto.lnrpc.BatchOpenChannelResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.BatchOpenChannelResponse.displayName = 'proto.lnrpc.BatchOpenChannelResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.OpenChannelRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.lnrpc.OpenChannelRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.OpenChannelRequest.displayName = 'proto.lnrpc.OpenChannelRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.OpenStatusUpdate = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.lnrpc.OpenStatusUpdate.oneofGroups_); -}; -goog.inherits(proto.lnrpc.OpenStatusUpdate, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.OpenStatusUpdate.displayName = 'proto.lnrpc.OpenStatusUpdate'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.KeyLocator = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.lnrpc.KeyLocator, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.KeyLocator.displayName = 'proto.lnrpc.KeyLocator'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.KeyDescriptor = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.lnrpc.KeyDescriptor, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.KeyDescriptor.displayName = 'proto.lnrpc.KeyDescriptor'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.ChanPointShim = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.lnrpc.ChanPointShim, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.ChanPointShim.displayName = 'proto.lnrpc.ChanPointShim'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.PsbtShim = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.lnrpc.PsbtShim, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.PsbtShim.displayName = 'proto.lnrpc.PsbtShim'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.FundingShim = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.lnrpc.FundingShim.oneofGroups_); -}; -goog.inherits(proto.lnrpc.FundingShim, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.FundingShim.displayName = 'proto.lnrpc.FundingShim'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.FundingShimCancel = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.lnrpc.FundingShimCancel, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.FundingShimCancel.displayName = 'proto.lnrpc.FundingShimCancel'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.FundingPsbtVerify = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.lnrpc.FundingPsbtVerify, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.FundingPsbtVerify.displayName = 'proto.lnrpc.FundingPsbtVerify'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.FundingPsbtFinalize = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.lnrpc.FundingPsbtFinalize, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.FundingPsbtFinalize.displayName = 'proto.lnrpc.FundingPsbtFinalize'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.FundingTransitionMsg = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.lnrpc.FundingTransitionMsg.oneofGroups_); -}; -goog.inherits(proto.lnrpc.FundingTransitionMsg, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.FundingTransitionMsg.displayName = 'proto.lnrpc.FundingTransitionMsg'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.FundingStateStepResp = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.lnrpc.FundingStateStepResp, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.FundingStateStepResp.displayName = 'proto.lnrpc.FundingStateStepResp'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.PendingHTLC = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.lnrpc.PendingHTLC, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.PendingHTLC.displayName = 'proto.lnrpc.PendingHTLC'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.PendingChannelsRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.lnrpc.PendingChannelsRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.PendingChannelsRequest.displayName = 'proto.lnrpc.PendingChannelsRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.PendingChannelsResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.lnrpc.PendingChannelsResponse.repeatedFields_, null); -}; -goog.inherits(proto.lnrpc.PendingChannelsResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.PendingChannelsResponse.displayName = 'proto.lnrpc.PendingChannelsResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.PendingChannelsResponse.PendingChannel = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.lnrpc.PendingChannelsResponse.PendingChannel, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.PendingChannelsResponse.PendingChannel.displayName = 'proto.lnrpc.PendingChannelsResponse.PendingChannel'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.PendingChannelsResponse.PendingOpenChannel = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.lnrpc.PendingChannelsResponse.PendingOpenChannel, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.PendingChannelsResponse.PendingOpenChannel.displayName = 'proto.lnrpc.PendingChannelsResponse.PendingOpenChannel'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel.displayName = 'proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.PendingChannelsResponse.Commitments = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.lnrpc.PendingChannelsResponse.Commitments, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.PendingChannelsResponse.Commitments.displayName = 'proto.lnrpc.PendingChannelsResponse.Commitments'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.PendingChannelsResponse.ClosedChannel = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.lnrpc.PendingChannelsResponse.ClosedChannel, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.PendingChannelsResponse.ClosedChannel.displayName = 'proto.lnrpc.PendingChannelsResponse.ClosedChannel'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.PendingChannelsResponse.ForceClosedChannel = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.repeatedFields_, null); -}; -goog.inherits(proto.lnrpc.PendingChannelsResponse.ForceClosedChannel, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.displayName = 'proto.lnrpc.PendingChannelsResponse.ForceClosedChannel'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.ChannelEventSubscription = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.lnrpc.ChannelEventSubscription, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.ChannelEventSubscription.displayName = 'proto.lnrpc.ChannelEventSubscription'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.ChannelEventUpdate = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.lnrpc.ChannelEventUpdate.oneofGroups_); -}; -goog.inherits(proto.lnrpc.ChannelEventUpdate, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.ChannelEventUpdate.displayName = 'proto.lnrpc.ChannelEventUpdate'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.WalletAccountBalance = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.lnrpc.WalletAccountBalance, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.WalletAccountBalance.displayName = 'proto.lnrpc.WalletAccountBalance'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.WalletBalanceRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.lnrpc.WalletBalanceRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.WalletBalanceRequest.displayName = 'proto.lnrpc.WalletBalanceRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.WalletBalanceResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.lnrpc.WalletBalanceResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.WalletBalanceResponse.displayName = 'proto.lnrpc.WalletBalanceResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.Amount = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.lnrpc.Amount, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.Amount.displayName = 'proto.lnrpc.Amount'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.ChannelBalanceRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.lnrpc.ChannelBalanceRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.ChannelBalanceRequest.displayName = 'proto.lnrpc.ChannelBalanceRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.ChannelBalanceResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.lnrpc.ChannelBalanceResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.ChannelBalanceResponse.displayName = 'proto.lnrpc.ChannelBalanceResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.QueryRoutesRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.lnrpc.QueryRoutesRequest.repeatedFields_, null); -}; -goog.inherits(proto.lnrpc.QueryRoutesRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.QueryRoutesRequest.displayName = 'proto.lnrpc.QueryRoutesRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.NodePair = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.lnrpc.NodePair, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.NodePair.displayName = 'proto.lnrpc.NodePair'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.EdgeLocator = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.lnrpc.EdgeLocator, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.EdgeLocator.displayName = 'proto.lnrpc.EdgeLocator'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.QueryRoutesResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.lnrpc.QueryRoutesResponse.repeatedFields_, null); -}; -goog.inherits(proto.lnrpc.QueryRoutesResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.QueryRoutesResponse.displayName = 'proto.lnrpc.QueryRoutesResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.Hop = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.lnrpc.Hop, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.Hop.displayName = 'proto.lnrpc.Hop'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.MPPRecord = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.lnrpc.MPPRecord, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.MPPRecord.displayName = 'proto.lnrpc.MPPRecord'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.AMPRecord = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.lnrpc.AMPRecord, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.AMPRecord.displayName = 'proto.lnrpc.AMPRecord'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.Route = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.lnrpc.Route.repeatedFields_, null); -}; -goog.inherits(proto.lnrpc.Route, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.Route.displayName = 'proto.lnrpc.Route'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.NodeInfoRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.lnrpc.NodeInfoRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.NodeInfoRequest.displayName = 'proto.lnrpc.NodeInfoRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.NodeInfo = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.lnrpc.NodeInfo.repeatedFields_, null); -}; -goog.inherits(proto.lnrpc.NodeInfo, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.NodeInfo.displayName = 'proto.lnrpc.NodeInfo'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.LightningNode = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.lnrpc.LightningNode.repeatedFields_, null); -}; -goog.inherits(proto.lnrpc.LightningNode, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.LightningNode.displayName = 'proto.lnrpc.LightningNode'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.NodeAddress = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.lnrpc.NodeAddress, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.NodeAddress.displayName = 'proto.lnrpc.NodeAddress'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.RoutingPolicy = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.lnrpc.RoutingPolicy, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.RoutingPolicy.displayName = 'proto.lnrpc.RoutingPolicy'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.ChannelEdge = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.lnrpc.ChannelEdge, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.ChannelEdge.displayName = 'proto.lnrpc.ChannelEdge'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.ChannelGraphRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.lnrpc.ChannelGraphRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.ChannelGraphRequest.displayName = 'proto.lnrpc.ChannelGraphRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.ChannelGraph = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.lnrpc.ChannelGraph.repeatedFields_, null); -}; -goog.inherits(proto.lnrpc.ChannelGraph, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.ChannelGraph.displayName = 'proto.lnrpc.ChannelGraph'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.NodeMetricsRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.lnrpc.NodeMetricsRequest.repeatedFields_, null); -}; -goog.inherits(proto.lnrpc.NodeMetricsRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.NodeMetricsRequest.displayName = 'proto.lnrpc.NodeMetricsRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.NodeMetricsResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.lnrpc.NodeMetricsResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.NodeMetricsResponse.displayName = 'proto.lnrpc.NodeMetricsResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.FloatMetric = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.lnrpc.FloatMetric, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.FloatMetric.displayName = 'proto.lnrpc.FloatMetric'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.ChanInfoRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.lnrpc.ChanInfoRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.ChanInfoRequest.displayName = 'proto.lnrpc.ChanInfoRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.NetworkInfoRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.lnrpc.NetworkInfoRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.NetworkInfoRequest.displayName = 'proto.lnrpc.NetworkInfoRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.NetworkInfo = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.lnrpc.NetworkInfo, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.NetworkInfo.displayName = 'proto.lnrpc.NetworkInfo'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.StopRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.lnrpc.StopRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.StopRequest.displayName = 'proto.lnrpc.StopRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.StopResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.lnrpc.StopResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.StopResponse.displayName = 'proto.lnrpc.StopResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.GraphTopologySubscription = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.lnrpc.GraphTopologySubscription, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.GraphTopologySubscription.displayName = 'proto.lnrpc.GraphTopologySubscription'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.GraphTopologyUpdate = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.lnrpc.GraphTopologyUpdate.repeatedFields_, null); -}; -goog.inherits(proto.lnrpc.GraphTopologyUpdate, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.GraphTopologyUpdate.displayName = 'proto.lnrpc.GraphTopologyUpdate'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.NodeUpdate = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.lnrpc.NodeUpdate.repeatedFields_, null); -}; -goog.inherits(proto.lnrpc.NodeUpdate, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.NodeUpdate.displayName = 'proto.lnrpc.NodeUpdate'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.ChannelEdgeUpdate = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.lnrpc.ChannelEdgeUpdate, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.ChannelEdgeUpdate.displayName = 'proto.lnrpc.ChannelEdgeUpdate'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.ClosedChannelUpdate = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.lnrpc.ClosedChannelUpdate, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.ClosedChannelUpdate.displayName = 'proto.lnrpc.ClosedChannelUpdate'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.HopHint = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.lnrpc.HopHint, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.HopHint.displayName = 'proto.lnrpc.HopHint'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.SetID = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.lnrpc.SetID, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.SetID.displayName = 'proto.lnrpc.SetID'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.RouteHint = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.lnrpc.RouteHint.repeatedFields_, null); -}; -goog.inherits(proto.lnrpc.RouteHint, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.RouteHint.displayName = 'proto.lnrpc.RouteHint'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.AMPInvoiceState = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.lnrpc.AMPInvoiceState, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.AMPInvoiceState.displayName = 'proto.lnrpc.AMPInvoiceState'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.Invoice = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.lnrpc.Invoice.repeatedFields_, null); -}; -goog.inherits(proto.lnrpc.Invoice, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.Invoice.displayName = 'proto.lnrpc.Invoice'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.InvoiceHTLC = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.lnrpc.InvoiceHTLC, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.InvoiceHTLC.displayName = 'proto.lnrpc.InvoiceHTLC'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.AMP = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.lnrpc.AMP, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.AMP.displayName = 'proto.lnrpc.AMP'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.AddInvoiceResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.lnrpc.AddInvoiceResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.AddInvoiceResponse.displayName = 'proto.lnrpc.AddInvoiceResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.PaymentHash = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.lnrpc.PaymentHash, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.PaymentHash.displayName = 'proto.lnrpc.PaymentHash'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.ListInvoiceRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.lnrpc.ListInvoiceRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.ListInvoiceRequest.displayName = 'proto.lnrpc.ListInvoiceRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.ListInvoiceResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.lnrpc.ListInvoiceResponse.repeatedFields_, null); -}; -goog.inherits(proto.lnrpc.ListInvoiceResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.ListInvoiceResponse.displayName = 'proto.lnrpc.ListInvoiceResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.InvoiceSubscription = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.lnrpc.InvoiceSubscription, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.InvoiceSubscription.displayName = 'proto.lnrpc.InvoiceSubscription'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.Payment = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.lnrpc.Payment.repeatedFields_, null); -}; -goog.inherits(proto.lnrpc.Payment, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.Payment.displayName = 'proto.lnrpc.Payment'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.HTLCAttempt = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.lnrpc.HTLCAttempt, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.HTLCAttempt.displayName = 'proto.lnrpc.HTLCAttempt'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.ListPaymentsRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.lnrpc.ListPaymentsRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.ListPaymentsRequest.displayName = 'proto.lnrpc.ListPaymentsRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.ListPaymentsResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.lnrpc.ListPaymentsResponse.repeatedFields_, null); -}; -goog.inherits(proto.lnrpc.ListPaymentsResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.ListPaymentsResponse.displayName = 'proto.lnrpc.ListPaymentsResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.DeletePaymentRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.lnrpc.DeletePaymentRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.DeletePaymentRequest.displayName = 'proto.lnrpc.DeletePaymentRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.DeleteAllPaymentsRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.lnrpc.DeleteAllPaymentsRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.DeleteAllPaymentsRequest.displayName = 'proto.lnrpc.DeleteAllPaymentsRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.DeletePaymentResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.lnrpc.DeletePaymentResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.DeletePaymentResponse.displayName = 'proto.lnrpc.DeletePaymentResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.DeleteAllPaymentsResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.lnrpc.DeleteAllPaymentsResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.DeleteAllPaymentsResponse.displayName = 'proto.lnrpc.DeleteAllPaymentsResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.AbandonChannelRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.lnrpc.AbandonChannelRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.AbandonChannelRequest.displayName = 'proto.lnrpc.AbandonChannelRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.AbandonChannelResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.lnrpc.AbandonChannelResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.AbandonChannelResponse.displayName = 'proto.lnrpc.AbandonChannelResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.DebugLevelRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.lnrpc.DebugLevelRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.DebugLevelRequest.displayName = 'proto.lnrpc.DebugLevelRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.DebugLevelResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.lnrpc.DebugLevelResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.DebugLevelResponse.displayName = 'proto.lnrpc.DebugLevelResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.PayReqString = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.lnrpc.PayReqString, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.PayReqString.displayName = 'proto.lnrpc.PayReqString'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.PayReq = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.lnrpc.PayReq.repeatedFields_, null); -}; -goog.inherits(proto.lnrpc.PayReq, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.PayReq.displayName = 'proto.lnrpc.PayReq'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.Feature = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.lnrpc.Feature, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.Feature.displayName = 'proto.lnrpc.Feature'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.FeeReportRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.lnrpc.FeeReportRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.FeeReportRequest.displayName = 'proto.lnrpc.FeeReportRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.ChannelFeeReport = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.lnrpc.ChannelFeeReport, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.ChannelFeeReport.displayName = 'proto.lnrpc.ChannelFeeReport'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.FeeReportResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.lnrpc.FeeReportResponse.repeatedFields_, null); -}; -goog.inherits(proto.lnrpc.FeeReportResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.FeeReportResponse.displayName = 'proto.lnrpc.FeeReportResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.PolicyUpdateRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.lnrpc.PolicyUpdateRequest.oneofGroups_); -}; -goog.inherits(proto.lnrpc.PolicyUpdateRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.PolicyUpdateRequest.displayName = 'proto.lnrpc.PolicyUpdateRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.FailedUpdate = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.lnrpc.FailedUpdate, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.FailedUpdate.displayName = 'proto.lnrpc.FailedUpdate'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.PolicyUpdateResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.lnrpc.PolicyUpdateResponse.repeatedFields_, null); -}; -goog.inherits(proto.lnrpc.PolicyUpdateResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.PolicyUpdateResponse.displayName = 'proto.lnrpc.PolicyUpdateResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.ForwardingHistoryRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.lnrpc.ForwardingHistoryRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.ForwardingHistoryRequest.displayName = 'proto.lnrpc.ForwardingHistoryRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.ForwardingEvent = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.lnrpc.ForwardingEvent, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.ForwardingEvent.displayName = 'proto.lnrpc.ForwardingEvent'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.ForwardingHistoryResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.lnrpc.ForwardingHistoryResponse.repeatedFields_, null); -}; -goog.inherits(proto.lnrpc.ForwardingHistoryResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.ForwardingHistoryResponse.displayName = 'proto.lnrpc.ForwardingHistoryResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.ExportChannelBackupRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.lnrpc.ExportChannelBackupRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.ExportChannelBackupRequest.displayName = 'proto.lnrpc.ExportChannelBackupRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.ChannelBackup = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.lnrpc.ChannelBackup, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.ChannelBackup.displayName = 'proto.lnrpc.ChannelBackup'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.MultiChanBackup = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.lnrpc.MultiChanBackup.repeatedFields_, null); -}; -goog.inherits(proto.lnrpc.MultiChanBackup, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.MultiChanBackup.displayName = 'proto.lnrpc.MultiChanBackup'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.ChanBackupExportRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.lnrpc.ChanBackupExportRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.ChanBackupExportRequest.displayName = 'proto.lnrpc.ChanBackupExportRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.ChanBackupSnapshot = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.lnrpc.ChanBackupSnapshot, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.ChanBackupSnapshot.displayName = 'proto.lnrpc.ChanBackupSnapshot'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.ChannelBackups = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.lnrpc.ChannelBackups.repeatedFields_, null); -}; -goog.inherits(proto.lnrpc.ChannelBackups, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.ChannelBackups.displayName = 'proto.lnrpc.ChannelBackups'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.RestoreChanBackupRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.lnrpc.RestoreChanBackupRequest.oneofGroups_); -}; -goog.inherits(proto.lnrpc.RestoreChanBackupRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.RestoreChanBackupRequest.displayName = 'proto.lnrpc.RestoreChanBackupRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.RestoreBackupResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.lnrpc.RestoreBackupResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.RestoreBackupResponse.displayName = 'proto.lnrpc.RestoreBackupResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.ChannelBackupSubscription = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.lnrpc.ChannelBackupSubscription, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.ChannelBackupSubscription.displayName = 'proto.lnrpc.ChannelBackupSubscription'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.VerifyChanBackupResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.lnrpc.VerifyChanBackupResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.VerifyChanBackupResponse.displayName = 'proto.lnrpc.VerifyChanBackupResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.MacaroonPermission = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.lnrpc.MacaroonPermission, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.MacaroonPermission.displayName = 'proto.lnrpc.MacaroonPermission'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.BakeMacaroonRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.lnrpc.BakeMacaroonRequest.repeatedFields_, null); -}; -goog.inherits(proto.lnrpc.BakeMacaroonRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.BakeMacaroonRequest.displayName = 'proto.lnrpc.BakeMacaroonRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.BakeMacaroonResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.lnrpc.BakeMacaroonResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.BakeMacaroonResponse.displayName = 'proto.lnrpc.BakeMacaroonResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.ListMacaroonIDsRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.lnrpc.ListMacaroonIDsRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.ListMacaroonIDsRequest.displayName = 'proto.lnrpc.ListMacaroonIDsRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.ListMacaroonIDsResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.lnrpc.ListMacaroonIDsResponse.repeatedFields_, null); -}; -goog.inherits(proto.lnrpc.ListMacaroonIDsResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.ListMacaroonIDsResponse.displayName = 'proto.lnrpc.ListMacaroonIDsResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.DeleteMacaroonIDRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.lnrpc.DeleteMacaroonIDRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.DeleteMacaroonIDRequest.displayName = 'proto.lnrpc.DeleteMacaroonIDRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.DeleteMacaroonIDResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.lnrpc.DeleteMacaroonIDResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.DeleteMacaroonIDResponse.displayName = 'proto.lnrpc.DeleteMacaroonIDResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.MacaroonPermissionList = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.lnrpc.MacaroonPermissionList.repeatedFields_, null); -}; -goog.inherits(proto.lnrpc.MacaroonPermissionList, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.MacaroonPermissionList.displayName = 'proto.lnrpc.MacaroonPermissionList'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.ListPermissionsRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.lnrpc.ListPermissionsRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.ListPermissionsRequest.displayName = 'proto.lnrpc.ListPermissionsRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.ListPermissionsResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.lnrpc.ListPermissionsResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.ListPermissionsResponse.displayName = 'proto.lnrpc.ListPermissionsResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.Failure = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.lnrpc.Failure, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.Failure.displayName = 'proto.lnrpc.Failure'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.ChannelUpdate = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.lnrpc.ChannelUpdate, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.ChannelUpdate.displayName = 'proto.lnrpc.ChannelUpdate'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.MacaroonId = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.lnrpc.MacaroonId.repeatedFields_, null); -}; -goog.inherits(proto.lnrpc.MacaroonId, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.MacaroonId.displayName = 'proto.lnrpc.MacaroonId'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.Op = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.lnrpc.Op.repeatedFields_, null); -}; -goog.inherits(proto.lnrpc.Op, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.Op.displayName = 'proto.lnrpc.Op'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.CheckMacPermRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.lnrpc.CheckMacPermRequest.repeatedFields_, null); -}; -goog.inherits(proto.lnrpc.CheckMacPermRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.CheckMacPermRequest.displayName = 'proto.lnrpc.CheckMacPermRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.CheckMacPermResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.lnrpc.CheckMacPermResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.CheckMacPermResponse.displayName = 'proto.lnrpc.CheckMacPermResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.RPCMiddlewareRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.lnrpc.RPCMiddlewareRequest.oneofGroups_); -}; -goog.inherits(proto.lnrpc.RPCMiddlewareRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.RPCMiddlewareRequest.displayName = 'proto.lnrpc.RPCMiddlewareRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.StreamAuth = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.lnrpc.StreamAuth, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.StreamAuth.displayName = 'proto.lnrpc.StreamAuth'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.RPCMessage = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.lnrpc.RPCMessage, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.RPCMessage.displayName = 'proto.lnrpc.RPCMessage'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.RPCMiddlewareResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.lnrpc.RPCMiddlewareResponse.oneofGroups_); -}; -goog.inherits(proto.lnrpc.RPCMiddlewareResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.RPCMiddlewareResponse.displayName = 'proto.lnrpc.RPCMiddlewareResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.MiddlewareRegistration = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.lnrpc.MiddlewareRegistration, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.MiddlewareRegistration.displayName = 'proto.lnrpc.MiddlewareRegistration'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.InterceptFeedback = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.lnrpc.InterceptFeedback, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.InterceptFeedback.displayName = 'proto.lnrpc.InterceptFeedback'; -} - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.SubscribeCustomMessagesRequest.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.SubscribeCustomMessagesRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.SubscribeCustomMessagesRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.SubscribeCustomMessagesRequest.toObject = function(includeInstance, msg) { - var f, obj = { - - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.SubscribeCustomMessagesRequest} - */ -proto.lnrpc.SubscribeCustomMessagesRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.SubscribeCustomMessagesRequest; - return proto.lnrpc.SubscribeCustomMessagesRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.SubscribeCustomMessagesRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.SubscribeCustomMessagesRequest} - */ -proto.lnrpc.SubscribeCustomMessagesRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.SubscribeCustomMessagesRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.SubscribeCustomMessagesRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.SubscribeCustomMessagesRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.SubscribeCustomMessagesRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.CustomMessage.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.CustomMessage.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.CustomMessage} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.CustomMessage.toObject = function(includeInstance, msg) { - var f, obj = { - peer: msg.getPeer_asB64(), - type: jspb.Message.getFieldWithDefault(msg, 2, 0), - data: msg.getData_asB64() - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.CustomMessage} - */ -proto.lnrpc.CustomMessage.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.CustomMessage; - return proto.lnrpc.CustomMessage.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.CustomMessage} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.CustomMessage} - */ -proto.lnrpc.CustomMessage.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setPeer(value); - break; - case 2: - var value = /** @type {number} */ (reader.readUint32()); - msg.setType(value); - break; - case 3: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setData(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.CustomMessage.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.CustomMessage.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.CustomMessage} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.CustomMessage.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getPeer_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getType(); - if (f !== 0) { - writer.writeUint32( - 2, - f - ); - } - f = message.getData_asU8(); - if (f.length > 0) { - writer.writeBytes( - 3, - f - ); - } -}; - - -/** - * optional bytes peer = 1; - * @return {!(string|Uint8Array)} - */ -proto.lnrpc.CustomMessage.prototype.getPeer = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes peer = 1; - * This is a type-conversion wrapper around `getPeer()` - * @return {string} - */ -proto.lnrpc.CustomMessage.prototype.getPeer_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getPeer())); -}; - - -/** - * optional bytes peer = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getPeer()` - * @return {!Uint8Array} - */ -proto.lnrpc.CustomMessage.prototype.getPeer_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getPeer())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.lnrpc.CustomMessage} returns this - */ -proto.lnrpc.CustomMessage.prototype.setPeer = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional uint32 type = 2; - * @return {number} - */ -proto.lnrpc.CustomMessage.prototype.getType = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.CustomMessage} returns this - */ -proto.lnrpc.CustomMessage.prototype.setType = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * optional bytes data = 3; - * @return {!(string|Uint8Array)} - */ -proto.lnrpc.CustomMessage.prototype.getData = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * optional bytes data = 3; - * This is a type-conversion wrapper around `getData()` - * @return {string} - */ -proto.lnrpc.CustomMessage.prototype.getData_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getData())); -}; - - -/** - * optional bytes data = 3; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getData()` - * @return {!Uint8Array} - */ -proto.lnrpc.CustomMessage.prototype.getData_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getData())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.lnrpc.CustomMessage} returns this - */ -proto.lnrpc.CustomMessage.prototype.setData = function(value) { - return jspb.Message.setProto3BytesField(this, 3, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.SendCustomMessageRequest.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.SendCustomMessageRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.SendCustomMessageRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.SendCustomMessageRequest.toObject = function(includeInstance, msg) { - var f, obj = { - peer: msg.getPeer_asB64(), - type: jspb.Message.getFieldWithDefault(msg, 2, 0), - data: msg.getData_asB64() - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.SendCustomMessageRequest} - */ -proto.lnrpc.SendCustomMessageRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.SendCustomMessageRequest; - return proto.lnrpc.SendCustomMessageRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.SendCustomMessageRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.SendCustomMessageRequest} - */ -proto.lnrpc.SendCustomMessageRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setPeer(value); - break; - case 2: - var value = /** @type {number} */ (reader.readUint32()); - msg.setType(value); - break; - case 3: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setData(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.SendCustomMessageRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.SendCustomMessageRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.SendCustomMessageRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.SendCustomMessageRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getPeer_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getType(); - if (f !== 0) { - writer.writeUint32( - 2, - f - ); - } - f = message.getData_asU8(); - if (f.length > 0) { - writer.writeBytes( - 3, - f - ); - } -}; - - -/** - * optional bytes peer = 1; - * @return {!(string|Uint8Array)} - */ -proto.lnrpc.SendCustomMessageRequest.prototype.getPeer = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes peer = 1; - * This is a type-conversion wrapper around `getPeer()` - * @return {string} - */ -proto.lnrpc.SendCustomMessageRequest.prototype.getPeer_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getPeer())); -}; - - -/** - * optional bytes peer = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getPeer()` - * @return {!Uint8Array} - */ -proto.lnrpc.SendCustomMessageRequest.prototype.getPeer_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getPeer())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.lnrpc.SendCustomMessageRequest} returns this - */ -proto.lnrpc.SendCustomMessageRequest.prototype.setPeer = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional uint32 type = 2; - * @return {number} - */ -proto.lnrpc.SendCustomMessageRequest.prototype.getType = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.SendCustomMessageRequest} returns this - */ -proto.lnrpc.SendCustomMessageRequest.prototype.setType = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * optional bytes data = 3; - * @return {!(string|Uint8Array)} - */ -proto.lnrpc.SendCustomMessageRequest.prototype.getData = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * optional bytes data = 3; - * This is a type-conversion wrapper around `getData()` - * @return {string} - */ -proto.lnrpc.SendCustomMessageRequest.prototype.getData_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getData())); -}; - - -/** - * optional bytes data = 3; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getData()` - * @return {!Uint8Array} - */ -proto.lnrpc.SendCustomMessageRequest.prototype.getData_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getData())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.lnrpc.SendCustomMessageRequest} returns this - */ -proto.lnrpc.SendCustomMessageRequest.prototype.setData = function(value) { - return jspb.Message.setProto3BytesField(this, 3, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.SendCustomMessageResponse.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.SendCustomMessageResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.SendCustomMessageResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.SendCustomMessageResponse.toObject = function(includeInstance, msg) { - var f, obj = { - - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.SendCustomMessageResponse} - */ -proto.lnrpc.SendCustomMessageResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.SendCustomMessageResponse; - return proto.lnrpc.SendCustomMessageResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.SendCustomMessageResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.SendCustomMessageResponse} - */ -proto.lnrpc.SendCustomMessageResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.SendCustomMessageResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.SendCustomMessageResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.SendCustomMessageResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.SendCustomMessageResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.Utxo.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.Utxo.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.Utxo} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.Utxo.toObject = function(includeInstance, msg) { - var f, obj = { - addressType: jspb.Message.getFieldWithDefault(msg, 1, 0), - address: jspb.Message.getFieldWithDefault(msg, 2, ""), - amountSat: jspb.Message.getFieldWithDefault(msg, 3, 0), - pkScript: jspb.Message.getFieldWithDefault(msg, 4, ""), - outpoint: (f = msg.getOutpoint()) && proto.lnrpc.OutPoint.toObject(includeInstance, f), - confirmations: jspb.Message.getFieldWithDefault(msg, 6, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.Utxo} - */ -proto.lnrpc.Utxo.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.Utxo; - return proto.lnrpc.Utxo.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.Utxo} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.Utxo} - */ -proto.lnrpc.Utxo.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!proto.lnrpc.AddressType} */ (reader.readEnum()); - msg.setAddressType(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setAddress(value); - break; - case 3: - var value = /** @type {number} */ (reader.readInt64()); - msg.setAmountSat(value); - break; - case 4: - var value = /** @type {string} */ (reader.readString()); - msg.setPkScript(value); - break; - case 5: - var value = new proto.lnrpc.OutPoint; - reader.readMessage(value,proto.lnrpc.OutPoint.deserializeBinaryFromReader); - msg.setOutpoint(value); - break; - case 6: - var value = /** @type {number} */ (reader.readInt64()); - msg.setConfirmations(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.Utxo.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.Utxo.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.Utxo} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.Utxo.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getAddressType(); - if (f !== 0.0) { - writer.writeEnum( - 1, - f - ); - } - f = message.getAddress(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getAmountSat(); - if (f !== 0) { - writer.writeInt64( - 3, - f - ); - } - f = message.getPkScript(); - if (f.length > 0) { - writer.writeString( - 4, - f - ); - } - f = message.getOutpoint(); - if (f != null) { - writer.writeMessage( - 5, - f, - proto.lnrpc.OutPoint.serializeBinaryToWriter - ); - } - f = message.getConfirmations(); - if (f !== 0) { - writer.writeInt64( - 6, - f - ); - } -}; - - -/** - * optional AddressType address_type = 1; - * @return {!proto.lnrpc.AddressType} - */ -proto.lnrpc.Utxo.prototype.getAddressType = function() { - return /** @type {!proto.lnrpc.AddressType} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {!proto.lnrpc.AddressType} value - * @return {!proto.lnrpc.Utxo} returns this - */ -proto.lnrpc.Utxo.prototype.setAddressType = function(value) { - return jspb.Message.setProto3EnumField(this, 1, value); -}; - - -/** - * optional string address = 2; - * @return {string} - */ -proto.lnrpc.Utxo.prototype.getAddress = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.lnrpc.Utxo} returns this - */ -proto.lnrpc.Utxo.prototype.setAddress = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional int64 amount_sat = 3; - * @return {number} - */ -proto.lnrpc.Utxo.prototype.getAmountSat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.Utxo} returns this - */ -proto.lnrpc.Utxo.prototype.setAmountSat = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - -/** - * optional string pk_script = 4; - * @return {string} - */ -proto.lnrpc.Utxo.prototype.getPkScript = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); -}; - - -/** - * @param {string} value - * @return {!proto.lnrpc.Utxo} returns this - */ -proto.lnrpc.Utxo.prototype.setPkScript = function(value) { - return jspb.Message.setProto3StringField(this, 4, value); -}; - - -/** - * optional OutPoint outpoint = 5; - * @return {?proto.lnrpc.OutPoint} - */ -proto.lnrpc.Utxo.prototype.getOutpoint = function() { - return /** @type{?proto.lnrpc.OutPoint} */ ( - jspb.Message.getWrapperField(this, proto.lnrpc.OutPoint, 5)); -}; - - -/** - * @param {?proto.lnrpc.OutPoint|undefined} value - * @return {!proto.lnrpc.Utxo} returns this -*/ -proto.lnrpc.Utxo.prototype.setOutpoint = function(value) { - return jspb.Message.setWrapperField(this, 5, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.lnrpc.Utxo} returns this - */ -proto.lnrpc.Utxo.prototype.clearOutpoint = function() { - return this.setOutpoint(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.lnrpc.Utxo.prototype.hasOutpoint = function() { - return jspb.Message.getField(this, 5) != null; -}; - - -/** - * optional int64 confirmations = 6; - * @return {number} - */ -proto.lnrpc.Utxo.prototype.getConfirmations = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.Utxo} returns this - */ -proto.lnrpc.Utxo.prototype.setConfirmations = function(value) { - return jspb.Message.setProto3IntField(this, 6, value); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.lnrpc.Transaction.repeatedFields_ = [8]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.Transaction.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.Transaction.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.Transaction} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.Transaction.toObject = function(includeInstance, msg) { - var f, obj = { - txHash: jspb.Message.getFieldWithDefault(msg, 1, ""), - amount: jspb.Message.getFieldWithDefault(msg, 2, 0), - numConfirmations: jspb.Message.getFieldWithDefault(msg, 3, 0), - blockHash: jspb.Message.getFieldWithDefault(msg, 4, ""), - blockHeight: jspb.Message.getFieldWithDefault(msg, 5, 0), - timeStamp: jspb.Message.getFieldWithDefault(msg, 6, 0), - totalFees: jspb.Message.getFieldWithDefault(msg, 7, 0), - destAddressesList: (f = jspb.Message.getRepeatedField(msg, 8)) == null ? undefined : f, - rawTxHex: jspb.Message.getFieldWithDefault(msg, 9, ""), - label: jspb.Message.getFieldWithDefault(msg, 10, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.Transaction} - */ -proto.lnrpc.Transaction.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.Transaction; - return proto.lnrpc.Transaction.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.Transaction} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.Transaction} - */ -proto.lnrpc.Transaction.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setTxHash(value); - break; - case 2: - var value = /** @type {number} */ (reader.readInt64()); - msg.setAmount(value); - break; - case 3: - var value = /** @type {number} */ (reader.readInt32()); - msg.setNumConfirmations(value); - break; - case 4: - var value = /** @type {string} */ (reader.readString()); - msg.setBlockHash(value); - break; - case 5: - var value = /** @type {number} */ (reader.readInt32()); - msg.setBlockHeight(value); - break; - case 6: - var value = /** @type {number} */ (reader.readInt64()); - msg.setTimeStamp(value); - break; - case 7: - var value = /** @type {number} */ (reader.readInt64()); - msg.setTotalFees(value); - break; - case 8: - var value = /** @type {string} */ (reader.readString()); - msg.addDestAddresses(value); - break; - case 9: - var value = /** @type {string} */ (reader.readString()); - msg.setRawTxHex(value); - break; - case 10: - var value = /** @type {string} */ (reader.readString()); - msg.setLabel(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.Transaction.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.Transaction.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.Transaction} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.Transaction.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getTxHash(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getAmount(); - if (f !== 0) { - writer.writeInt64( - 2, - f - ); - } - f = message.getNumConfirmations(); - if (f !== 0) { - writer.writeInt32( - 3, - f - ); - } - f = message.getBlockHash(); - if (f.length > 0) { - writer.writeString( - 4, - f - ); - } - f = message.getBlockHeight(); - if (f !== 0) { - writer.writeInt32( - 5, - f - ); - } - f = message.getTimeStamp(); - if (f !== 0) { - writer.writeInt64( - 6, - f - ); - } - f = message.getTotalFees(); - if (f !== 0) { - writer.writeInt64( - 7, - f - ); - } - f = message.getDestAddressesList(); - if (f.length > 0) { - writer.writeRepeatedString( - 8, - f - ); - } - f = message.getRawTxHex(); - if (f.length > 0) { - writer.writeString( - 9, - f - ); - } - f = message.getLabel(); - if (f.length > 0) { - writer.writeString( - 10, - f - ); - } -}; - - -/** - * optional string tx_hash = 1; - * @return {string} - */ -proto.lnrpc.Transaction.prototype.getTxHash = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.lnrpc.Transaction} returns this - */ -proto.lnrpc.Transaction.prototype.setTxHash = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional int64 amount = 2; - * @return {number} - */ -proto.lnrpc.Transaction.prototype.getAmount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.Transaction} returns this - */ -proto.lnrpc.Transaction.prototype.setAmount = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * optional int32 num_confirmations = 3; - * @return {number} - */ -proto.lnrpc.Transaction.prototype.getNumConfirmations = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.Transaction} returns this - */ -proto.lnrpc.Transaction.prototype.setNumConfirmations = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - -/** - * optional string block_hash = 4; - * @return {string} - */ -proto.lnrpc.Transaction.prototype.getBlockHash = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); -}; - - -/** - * @param {string} value - * @return {!proto.lnrpc.Transaction} returns this - */ -proto.lnrpc.Transaction.prototype.setBlockHash = function(value) { - return jspb.Message.setProto3StringField(this, 4, value); -}; - - -/** - * optional int32 block_height = 5; - * @return {number} - */ -proto.lnrpc.Transaction.prototype.getBlockHeight = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.Transaction} returns this - */ -proto.lnrpc.Transaction.prototype.setBlockHeight = function(value) { - return jspb.Message.setProto3IntField(this, 5, value); -}; - - -/** - * optional int64 time_stamp = 6; - * @return {number} - */ -proto.lnrpc.Transaction.prototype.getTimeStamp = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.Transaction} returns this - */ -proto.lnrpc.Transaction.prototype.setTimeStamp = function(value) { - return jspb.Message.setProto3IntField(this, 6, value); -}; - - -/** - * optional int64 total_fees = 7; - * @return {number} - */ -proto.lnrpc.Transaction.prototype.getTotalFees = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.Transaction} returns this - */ -proto.lnrpc.Transaction.prototype.setTotalFees = function(value) { - return jspb.Message.setProto3IntField(this, 7, value); -}; - - -/** - * repeated string dest_addresses = 8; - * @return {!Array} - */ -proto.lnrpc.Transaction.prototype.getDestAddressesList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 8)); -}; - - -/** - * @param {!Array} value - * @return {!proto.lnrpc.Transaction} returns this - */ -proto.lnrpc.Transaction.prototype.setDestAddressesList = function(value) { - return jspb.Message.setField(this, 8, value || []); -}; - - -/** - * @param {string} value - * @param {number=} opt_index - * @return {!proto.lnrpc.Transaction} returns this - */ -proto.lnrpc.Transaction.prototype.addDestAddresses = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 8, value, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.lnrpc.Transaction} returns this - */ -proto.lnrpc.Transaction.prototype.clearDestAddressesList = function() { - return this.setDestAddressesList([]); -}; - - -/** - * optional string raw_tx_hex = 9; - * @return {string} - */ -proto.lnrpc.Transaction.prototype.getRawTxHex = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 9, "")); -}; - - -/** - * @param {string} value - * @return {!proto.lnrpc.Transaction} returns this - */ -proto.lnrpc.Transaction.prototype.setRawTxHex = function(value) { - return jspb.Message.setProto3StringField(this, 9, value); -}; - - -/** - * optional string label = 10; - * @return {string} - */ -proto.lnrpc.Transaction.prototype.getLabel = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 10, "")); -}; - - -/** - * @param {string} value - * @return {!proto.lnrpc.Transaction} returns this - */ -proto.lnrpc.Transaction.prototype.setLabel = function(value) { - return jspb.Message.setProto3StringField(this, 10, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.GetTransactionsRequest.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.GetTransactionsRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.GetTransactionsRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.GetTransactionsRequest.toObject = function(includeInstance, msg) { - var f, obj = { - startHeight: jspb.Message.getFieldWithDefault(msg, 1, 0), - endHeight: jspb.Message.getFieldWithDefault(msg, 2, 0), - account: jspb.Message.getFieldWithDefault(msg, 3, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.GetTransactionsRequest} - */ -proto.lnrpc.GetTransactionsRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.GetTransactionsRequest; - return proto.lnrpc.GetTransactionsRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.GetTransactionsRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.GetTransactionsRequest} - */ -proto.lnrpc.GetTransactionsRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readInt32()); - msg.setStartHeight(value); - break; - case 2: - var value = /** @type {number} */ (reader.readInt32()); - msg.setEndHeight(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setAccount(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.GetTransactionsRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.GetTransactionsRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.GetTransactionsRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.GetTransactionsRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getStartHeight(); - if (f !== 0) { - writer.writeInt32( - 1, - f - ); - } - f = message.getEndHeight(); - if (f !== 0) { - writer.writeInt32( - 2, - f - ); - } - f = message.getAccount(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } -}; - - -/** - * optional int32 start_height = 1; - * @return {number} - */ -proto.lnrpc.GetTransactionsRequest.prototype.getStartHeight = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.GetTransactionsRequest} returns this - */ -proto.lnrpc.GetTransactionsRequest.prototype.setStartHeight = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); -}; - - -/** - * optional int32 end_height = 2; - * @return {number} - */ -proto.lnrpc.GetTransactionsRequest.prototype.getEndHeight = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.GetTransactionsRequest} returns this - */ -proto.lnrpc.GetTransactionsRequest.prototype.setEndHeight = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * optional string account = 3; - * @return {string} - */ -proto.lnrpc.GetTransactionsRequest.prototype.getAccount = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * @param {string} value - * @return {!proto.lnrpc.GetTransactionsRequest} returns this - */ -proto.lnrpc.GetTransactionsRequest.prototype.setAccount = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.lnrpc.TransactionDetails.repeatedFields_ = [1]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.TransactionDetails.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.TransactionDetails.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.TransactionDetails} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.TransactionDetails.toObject = function(includeInstance, msg) { - var f, obj = { - transactionsList: jspb.Message.toObjectList(msg.getTransactionsList(), - proto.lnrpc.Transaction.toObject, includeInstance) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.TransactionDetails} - */ -proto.lnrpc.TransactionDetails.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.TransactionDetails; - return proto.lnrpc.TransactionDetails.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.TransactionDetails} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.TransactionDetails} - */ -proto.lnrpc.TransactionDetails.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.lnrpc.Transaction; - reader.readMessage(value,proto.lnrpc.Transaction.deserializeBinaryFromReader); - msg.addTransactions(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.TransactionDetails.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.TransactionDetails.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.TransactionDetails} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.TransactionDetails.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getTransactionsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 1, - f, - proto.lnrpc.Transaction.serializeBinaryToWriter - ); - } -}; - - -/** - * repeated Transaction transactions = 1; - * @return {!Array} - */ -proto.lnrpc.TransactionDetails.prototype.getTransactionsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.Transaction, 1)); -}; - - -/** - * @param {!Array} value - * @return {!proto.lnrpc.TransactionDetails} returns this -*/ -proto.lnrpc.TransactionDetails.prototype.setTransactionsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); -}; - - -/** - * @param {!proto.lnrpc.Transaction=} opt_value - * @param {number=} opt_index - * @return {!proto.lnrpc.Transaction} - */ -proto.lnrpc.TransactionDetails.prototype.addTransactions = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.lnrpc.Transaction, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.lnrpc.TransactionDetails} returns this - */ -proto.lnrpc.TransactionDetails.prototype.clearTransactionsList = function() { - return this.setTransactionsList([]); -}; - - - -/** - * Oneof group definitions for this message. Each group defines the field - * numbers belonging to that group. When of these fields' value is set, all - * other fields in the group are cleared. During deserialization, if multiple - * fields are encountered for a group, only the last value seen will be kept. - * @private {!Array>} - * @const - */ -proto.lnrpc.FeeLimit.oneofGroups_ = [[1,3,2]]; - -/** - * @enum {number} - */ -proto.lnrpc.FeeLimit.LimitCase = { - LIMIT_NOT_SET: 0, - FIXED: 1, - FIXED_MSAT: 3, - PERCENT: 2 -}; - -/** - * @return {proto.lnrpc.FeeLimit.LimitCase} - */ -proto.lnrpc.FeeLimit.prototype.getLimitCase = function() { - return /** @type {proto.lnrpc.FeeLimit.LimitCase} */(jspb.Message.computeOneofCase(this, proto.lnrpc.FeeLimit.oneofGroups_[0])); -}; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.FeeLimit.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.FeeLimit.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.FeeLimit} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.FeeLimit.toObject = function(includeInstance, msg) { - var f, obj = { - fixed: jspb.Message.getFieldWithDefault(msg, 1, 0), - fixedMsat: jspb.Message.getFieldWithDefault(msg, 3, 0), - percent: jspb.Message.getFieldWithDefault(msg, 2, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.FeeLimit} - */ -proto.lnrpc.FeeLimit.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.FeeLimit; - return proto.lnrpc.FeeLimit.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.FeeLimit} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.FeeLimit} - */ -proto.lnrpc.FeeLimit.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readInt64()); - msg.setFixed(value); - break; - case 3: - var value = /** @type {number} */ (reader.readInt64()); - msg.setFixedMsat(value); - break; - case 2: - var value = /** @type {number} */ (reader.readInt64()); - msg.setPercent(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.FeeLimit.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.FeeLimit.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.FeeLimit} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.FeeLimit.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = /** @type {number} */ (jspb.Message.getField(message, 1)); - if (f != null) { - writer.writeInt64( - 1, - f - ); - } - f = /** @type {number} */ (jspb.Message.getField(message, 3)); - if (f != null) { - writer.writeInt64( - 3, - f - ); - } - f = /** @type {number} */ (jspb.Message.getField(message, 2)); - if (f != null) { - writer.writeInt64( - 2, - f - ); - } -}; - - -/** - * optional int64 fixed = 1; - * @return {number} - */ -proto.lnrpc.FeeLimit.prototype.getFixed = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.FeeLimit} returns this - */ -proto.lnrpc.FeeLimit.prototype.setFixed = function(value) { - return jspb.Message.setOneofField(this, 1, proto.lnrpc.FeeLimit.oneofGroups_[0], value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.lnrpc.FeeLimit} returns this - */ -proto.lnrpc.FeeLimit.prototype.clearFixed = function() { - return jspb.Message.setOneofField(this, 1, proto.lnrpc.FeeLimit.oneofGroups_[0], undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.lnrpc.FeeLimit.prototype.hasFixed = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional int64 fixed_msat = 3; - * @return {number} - */ -proto.lnrpc.FeeLimit.prototype.getFixedMsat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.FeeLimit} returns this - */ -proto.lnrpc.FeeLimit.prototype.setFixedMsat = function(value) { - return jspb.Message.setOneofField(this, 3, proto.lnrpc.FeeLimit.oneofGroups_[0], value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.lnrpc.FeeLimit} returns this - */ -proto.lnrpc.FeeLimit.prototype.clearFixedMsat = function() { - return jspb.Message.setOneofField(this, 3, proto.lnrpc.FeeLimit.oneofGroups_[0], undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.lnrpc.FeeLimit.prototype.hasFixedMsat = function() { - return jspb.Message.getField(this, 3) != null; -}; - - -/** - * optional int64 percent = 2; - * @return {number} - */ -proto.lnrpc.FeeLimit.prototype.getPercent = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.FeeLimit} returns this - */ -proto.lnrpc.FeeLimit.prototype.setPercent = function(value) { - return jspb.Message.setOneofField(this, 2, proto.lnrpc.FeeLimit.oneofGroups_[0], value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.lnrpc.FeeLimit} returns this - */ -proto.lnrpc.FeeLimit.prototype.clearPercent = function() { - return jspb.Message.setOneofField(this, 2, proto.lnrpc.FeeLimit.oneofGroups_[0], undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.lnrpc.FeeLimit.prototype.hasPercent = function() { - return jspb.Message.getField(this, 2) != null; -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.lnrpc.SendRequest.repeatedFields_ = [15]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.SendRequest.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.SendRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.SendRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.SendRequest.toObject = function(includeInstance, msg) { - var f, obj = { - dest: msg.getDest_asB64(), - destString: jspb.Message.getFieldWithDefault(msg, 2, ""), - amt: jspb.Message.getFieldWithDefault(msg, 3, 0), - amtMsat: jspb.Message.getFieldWithDefault(msg, 12, 0), - paymentHash: msg.getPaymentHash_asB64(), - paymentHashString: jspb.Message.getFieldWithDefault(msg, 5, ""), - paymentRequest: jspb.Message.getFieldWithDefault(msg, 6, ""), - finalCltvDelta: jspb.Message.getFieldWithDefault(msg, 7, 0), - feeLimit: (f = msg.getFeeLimit()) && proto.lnrpc.FeeLimit.toObject(includeInstance, f), - outgoingChanId: jspb.Message.getFieldWithDefault(msg, 9, "0"), - lastHopPubkey: msg.getLastHopPubkey_asB64(), - cltvLimit: jspb.Message.getFieldWithDefault(msg, 10, 0), - destCustomRecordsMap: (f = msg.getDestCustomRecordsMap()) ? f.toObject(includeInstance, undefined) : [], - allowSelfPayment: jspb.Message.getBooleanFieldWithDefault(msg, 14, false), - destFeaturesList: (f = jspb.Message.getRepeatedField(msg, 15)) == null ? undefined : f, - paymentAddr: msg.getPaymentAddr_asB64() - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.SendRequest} - */ -proto.lnrpc.SendRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.SendRequest; - return proto.lnrpc.SendRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.SendRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.SendRequest} - */ -proto.lnrpc.SendRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setDest(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setDestString(value); - break; - case 3: - var value = /** @type {number} */ (reader.readInt64()); - msg.setAmt(value); - break; - case 12: - var value = /** @type {number} */ (reader.readInt64()); - msg.setAmtMsat(value); - break; - case 4: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setPaymentHash(value); - break; - case 5: - var value = /** @type {string} */ (reader.readString()); - msg.setPaymentHashString(value); - break; - case 6: - var value = /** @type {string} */ (reader.readString()); - msg.setPaymentRequest(value); - break; - case 7: - var value = /** @type {number} */ (reader.readInt32()); - msg.setFinalCltvDelta(value); - break; - case 8: - var value = new proto.lnrpc.FeeLimit; - reader.readMessage(value,proto.lnrpc.FeeLimit.deserializeBinaryFromReader); - msg.setFeeLimit(value); - break; - case 9: - var value = /** @type {string} */ (reader.readUint64String()); - msg.setOutgoingChanId(value); - break; - case 13: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setLastHopPubkey(value); - break; - case 10: - var value = /** @type {number} */ (reader.readUint32()); - msg.setCltvLimit(value); - break; - case 11: - var value = msg.getDestCustomRecordsMap(); - reader.readMessage(value, function(message, reader) { - jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readUint64, jspb.BinaryReader.prototype.readBytes, null, 0, ""); - }); - break; - case 14: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setAllowSelfPayment(value); - break; - case 15: - var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedEnum() : [reader.readEnum()]); - for (var i = 0; i < values.length; i++) { - msg.addDestFeatures(values[i]); - } - break; - case 16: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setPaymentAddr(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.SendRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.SendRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.SendRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.SendRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getDest_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getDestString(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getAmt(); - if (f !== 0) { - writer.writeInt64( - 3, - f - ); - } - f = message.getAmtMsat(); - if (f !== 0) { - writer.writeInt64( - 12, - f - ); - } - f = message.getPaymentHash_asU8(); - if (f.length > 0) { - writer.writeBytes( - 4, - f - ); - } - f = message.getPaymentHashString(); - if (f.length > 0) { - writer.writeString( - 5, - f - ); - } - f = message.getPaymentRequest(); - if (f.length > 0) { - writer.writeString( - 6, - f - ); - } - f = message.getFinalCltvDelta(); - if (f !== 0) { - writer.writeInt32( - 7, - f - ); - } - f = message.getFeeLimit(); - if (f != null) { - writer.writeMessage( - 8, - f, - proto.lnrpc.FeeLimit.serializeBinaryToWriter - ); - } - f = message.getOutgoingChanId(); - if (parseInt(f, 10) !== 0) { - writer.writeUint64String( - 9, - f - ); - } - f = message.getLastHopPubkey_asU8(); - if (f.length > 0) { - writer.writeBytes( - 13, - f - ); - } - f = message.getCltvLimit(); - if (f !== 0) { - writer.writeUint32( - 10, - f - ); - } - f = message.getDestCustomRecordsMap(true); - if (f && f.getLength() > 0) { - f.serializeBinary(11, writer, jspb.BinaryWriter.prototype.writeUint64, jspb.BinaryWriter.prototype.writeBytes); - } - f = message.getAllowSelfPayment(); - if (f) { - writer.writeBool( - 14, - f - ); - } - f = message.getDestFeaturesList(); - if (f.length > 0) { - writer.writePackedEnum( - 15, - f - ); - } - f = message.getPaymentAddr_asU8(); - if (f.length > 0) { - writer.writeBytes( - 16, - f - ); - } -}; - - -/** - * optional bytes dest = 1; - * @return {!(string|Uint8Array)} - */ -proto.lnrpc.SendRequest.prototype.getDest = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes dest = 1; - * This is a type-conversion wrapper around `getDest()` - * @return {string} - */ -proto.lnrpc.SendRequest.prototype.getDest_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getDest())); -}; - - -/** - * optional bytes dest = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getDest()` - * @return {!Uint8Array} - */ -proto.lnrpc.SendRequest.prototype.getDest_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getDest())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.lnrpc.SendRequest} returns this - */ -proto.lnrpc.SendRequest.prototype.setDest = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional string dest_string = 2; - * @return {string} - */ -proto.lnrpc.SendRequest.prototype.getDestString = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.lnrpc.SendRequest} returns this - */ -proto.lnrpc.SendRequest.prototype.setDestString = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional int64 amt = 3; - * @return {number} - */ -proto.lnrpc.SendRequest.prototype.getAmt = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.SendRequest} returns this - */ -proto.lnrpc.SendRequest.prototype.setAmt = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - -/** - * optional int64 amt_msat = 12; - * @return {number} - */ -proto.lnrpc.SendRequest.prototype.getAmtMsat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 12, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.SendRequest} returns this - */ -proto.lnrpc.SendRequest.prototype.setAmtMsat = function(value) { - return jspb.Message.setProto3IntField(this, 12, value); -}; - - -/** - * optional bytes payment_hash = 4; - * @return {!(string|Uint8Array)} - */ -proto.lnrpc.SendRequest.prototype.getPaymentHash = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 4, "")); -}; - - -/** - * optional bytes payment_hash = 4; - * This is a type-conversion wrapper around `getPaymentHash()` - * @return {string} - */ -proto.lnrpc.SendRequest.prototype.getPaymentHash_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getPaymentHash())); -}; - - -/** - * optional bytes payment_hash = 4; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getPaymentHash()` - * @return {!Uint8Array} - */ -proto.lnrpc.SendRequest.prototype.getPaymentHash_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getPaymentHash())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.lnrpc.SendRequest} returns this - */ -proto.lnrpc.SendRequest.prototype.setPaymentHash = function(value) { - return jspb.Message.setProto3BytesField(this, 4, value); -}; - - -/** - * optional string payment_hash_string = 5; - * @return {string} - */ -proto.lnrpc.SendRequest.prototype.getPaymentHashString = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); -}; - - -/** - * @param {string} value - * @return {!proto.lnrpc.SendRequest} returns this - */ -proto.lnrpc.SendRequest.prototype.setPaymentHashString = function(value) { - return jspb.Message.setProto3StringField(this, 5, value); -}; - - -/** - * optional string payment_request = 6; - * @return {string} - */ -proto.lnrpc.SendRequest.prototype.getPaymentRequest = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); -}; - - -/** - * @param {string} value - * @return {!proto.lnrpc.SendRequest} returns this - */ -proto.lnrpc.SendRequest.prototype.setPaymentRequest = function(value) { - return jspb.Message.setProto3StringField(this, 6, value); -}; - - -/** - * optional int32 final_cltv_delta = 7; - * @return {number} - */ -proto.lnrpc.SendRequest.prototype.getFinalCltvDelta = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.SendRequest} returns this - */ -proto.lnrpc.SendRequest.prototype.setFinalCltvDelta = function(value) { - return jspb.Message.setProto3IntField(this, 7, value); -}; - - -/** - * optional FeeLimit fee_limit = 8; - * @return {?proto.lnrpc.FeeLimit} - */ -proto.lnrpc.SendRequest.prototype.getFeeLimit = function() { - return /** @type{?proto.lnrpc.FeeLimit} */ ( - jspb.Message.getWrapperField(this, proto.lnrpc.FeeLimit, 8)); -}; - - -/** - * @param {?proto.lnrpc.FeeLimit|undefined} value - * @return {!proto.lnrpc.SendRequest} returns this -*/ -proto.lnrpc.SendRequest.prototype.setFeeLimit = function(value) { - return jspb.Message.setWrapperField(this, 8, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.lnrpc.SendRequest} returns this - */ -proto.lnrpc.SendRequest.prototype.clearFeeLimit = function() { - return this.setFeeLimit(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.lnrpc.SendRequest.prototype.hasFeeLimit = function() { - return jspb.Message.getField(this, 8) != null; -}; - - -/** - * optional uint64 outgoing_chan_id = 9; - * @return {string} - */ -proto.lnrpc.SendRequest.prototype.getOutgoingChanId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 9, "0")); -}; - - -/** - * @param {string} value - * @return {!proto.lnrpc.SendRequest} returns this - */ -proto.lnrpc.SendRequest.prototype.setOutgoingChanId = function(value) { - return jspb.Message.setProto3StringIntField(this, 9, value); -}; - - -/** - * optional bytes last_hop_pubkey = 13; - * @return {!(string|Uint8Array)} - */ -proto.lnrpc.SendRequest.prototype.getLastHopPubkey = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 13, "")); -}; - - -/** - * optional bytes last_hop_pubkey = 13; - * This is a type-conversion wrapper around `getLastHopPubkey()` - * @return {string} - */ -proto.lnrpc.SendRequest.prototype.getLastHopPubkey_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getLastHopPubkey())); -}; - - -/** - * optional bytes last_hop_pubkey = 13; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getLastHopPubkey()` - * @return {!Uint8Array} - */ -proto.lnrpc.SendRequest.prototype.getLastHopPubkey_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getLastHopPubkey())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.lnrpc.SendRequest} returns this - */ -proto.lnrpc.SendRequest.prototype.setLastHopPubkey = function(value) { - return jspb.Message.setProto3BytesField(this, 13, value); -}; - - -/** - * optional uint32 cltv_limit = 10; - * @return {number} - */ -proto.lnrpc.SendRequest.prototype.getCltvLimit = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 10, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.SendRequest} returns this - */ -proto.lnrpc.SendRequest.prototype.setCltvLimit = function(value) { - return jspb.Message.setProto3IntField(this, 10, value); -}; - - -/** - * map dest_custom_records = 11; - * @param {boolean=} opt_noLazyCreate Do not create the map if - * empty, instead returning `undefined` - * @return {!jspb.Map} - */ -proto.lnrpc.SendRequest.prototype.getDestCustomRecordsMap = function(opt_noLazyCreate) { - return /** @type {!jspb.Map} */ ( - jspb.Message.getMapField(this, 11, opt_noLazyCreate, - null)); -}; - - -/** - * Clears values from the map. The map will be non-null. - * @return {!proto.lnrpc.SendRequest} returns this - */ -proto.lnrpc.SendRequest.prototype.clearDestCustomRecordsMap = function() { - this.getDestCustomRecordsMap().clear(); - return this;}; - - -/** - * optional bool allow_self_payment = 14; - * @return {boolean} - */ -proto.lnrpc.SendRequest.prototype.getAllowSelfPayment = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 14, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.lnrpc.SendRequest} returns this - */ -proto.lnrpc.SendRequest.prototype.setAllowSelfPayment = function(value) { - return jspb.Message.setProto3BooleanField(this, 14, value); -}; - - -/** - * repeated FeatureBit dest_features = 15; - * @return {!Array} - */ -proto.lnrpc.SendRequest.prototype.getDestFeaturesList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 15)); -}; - - -/** - * @param {!Array} value - * @return {!proto.lnrpc.SendRequest} returns this - */ -proto.lnrpc.SendRequest.prototype.setDestFeaturesList = function(value) { - return jspb.Message.setField(this, 15, value || []); -}; - - -/** - * @param {!proto.lnrpc.FeatureBit} value - * @param {number=} opt_index - * @return {!proto.lnrpc.SendRequest} returns this - */ -proto.lnrpc.SendRequest.prototype.addDestFeatures = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 15, value, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.lnrpc.SendRequest} returns this - */ -proto.lnrpc.SendRequest.prototype.clearDestFeaturesList = function() { - return this.setDestFeaturesList([]); -}; - - -/** - * optional bytes payment_addr = 16; - * @return {!(string|Uint8Array)} - */ -proto.lnrpc.SendRequest.prototype.getPaymentAddr = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 16, "")); -}; - - -/** - * optional bytes payment_addr = 16; - * This is a type-conversion wrapper around `getPaymentAddr()` - * @return {string} - */ -proto.lnrpc.SendRequest.prototype.getPaymentAddr_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getPaymentAddr())); -}; - - -/** - * optional bytes payment_addr = 16; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getPaymentAddr()` - * @return {!Uint8Array} - */ -proto.lnrpc.SendRequest.prototype.getPaymentAddr_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getPaymentAddr())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.lnrpc.SendRequest} returns this - */ -proto.lnrpc.SendRequest.prototype.setPaymentAddr = function(value) { - return jspb.Message.setProto3BytesField(this, 16, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.SendResponse.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.SendResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.SendResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.SendResponse.toObject = function(includeInstance, msg) { - var f, obj = { - paymentError: jspb.Message.getFieldWithDefault(msg, 1, ""), - paymentPreimage: msg.getPaymentPreimage_asB64(), - paymentRoute: (f = msg.getPaymentRoute()) && proto.lnrpc.Route.toObject(includeInstance, f), - paymentHash: msg.getPaymentHash_asB64() - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.SendResponse} - */ -proto.lnrpc.SendResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.SendResponse; - return proto.lnrpc.SendResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.SendResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.SendResponse} - */ -proto.lnrpc.SendResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setPaymentError(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setPaymentPreimage(value); - break; - case 3: - var value = new proto.lnrpc.Route; - reader.readMessage(value,proto.lnrpc.Route.deserializeBinaryFromReader); - msg.setPaymentRoute(value); - break; - case 4: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setPaymentHash(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.SendResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.SendResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.SendResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.SendResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getPaymentError(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getPaymentPreimage_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } - f = message.getPaymentRoute(); - if (f != null) { - writer.writeMessage( - 3, - f, - proto.lnrpc.Route.serializeBinaryToWriter - ); - } - f = message.getPaymentHash_asU8(); - if (f.length > 0) { - writer.writeBytes( - 4, - f - ); - } -}; - - -/** - * optional string payment_error = 1; - * @return {string} - */ -proto.lnrpc.SendResponse.prototype.getPaymentError = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.lnrpc.SendResponse} returns this - */ -proto.lnrpc.SendResponse.prototype.setPaymentError = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional bytes payment_preimage = 2; - * @return {!(string|Uint8Array)} - */ -proto.lnrpc.SendResponse.prototype.getPaymentPreimage = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes payment_preimage = 2; - * This is a type-conversion wrapper around `getPaymentPreimage()` - * @return {string} - */ -proto.lnrpc.SendResponse.prototype.getPaymentPreimage_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getPaymentPreimage())); -}; - - -/** - * optional bytes payment_preimage = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getPaymentPreimage()` - * @return {!Uint8Array} - */ -proto.lnrpc.SendResponse.prototype.getPaymentPreimage_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getPaymentPreimage())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.lnrpc.SendResponse} returns this - */ -proto.lnrpc.SendResponse.prototype.setPaymentPreimage = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); -}; - - -/** - * optional Route payment_route = 3; - * @return {?proto.lnrpc.Route} - */ -proto.lnrpc.SendResponse.prototype.getPaymentRoute = function() { - return /** @type{?proto.lnrpc.Route} */ ( - jspb.Message.getWrapperField(this, proto.lnrpc.Route, 3)); -}; - - -/** - * @param {?proto.lnrpc.Route|undefined} value - * @return {!proto.lnrpc.SendResponse} returns this -*/ -proto.lnrpc.SendResponse.prototype.setPaymentRoute = function(value) { - return jspb.Message.setWrapperField(this, 3, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.lnrpc.SendResponse} returns this - */ -proto.lnrpc.SendResponse.prototype.clearPaymentRoute = function() { - return this.setPaymentRoute(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.lnrpc.SendResponse.prototype.hasPaymentRoute = function() { - return jspb.Message.getField(this, 3) != null; -}; - - -/** - * optional bytes payment_hash = 4; - * @return {!(string|Uint8Array)} - */ -proto.lnrpc.SendResponse.prototype.getPaymentHash = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 4, "")); -}; - - -/** - * optional bytes payment_hash = 4; - * This is a type-conversion wrapper around `getPaymentHash()` - * @return {string} - */ -proto.lnrpc.SendResponse.prototype.getPaymentHash_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getPaymentHash())); -}; - - -/** - * optional bytes payment_hash = 4; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getPaymentHash()` - * @return {!Uint8Array} - */ -proto.lnrpc.SendResponse.prototype.getPaymentHash_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getPaymentHash())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.lnrpc.SendResponse} returns this - */ -proto.lnrpc.SendResponse.prototype.setPaymentHash = function(value) { - return jspb.Message.setProto3BytesField(this, 4, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.SendToRouteRequest.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.SendToRouteRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.SendToRouteRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.SendToRouteRequest.toObject = function(includeInstance, msg) { - var f, obj = { - paymentHash: msg.getPaymentHash_asB64(), - paymentHashString: jspb.Message.getFieldWithDefault(msg, 2, ""), - route: (f = msg.getRoute()) && proto.lnrpc.Route.toObject(includeInstance, f) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.SendToRouteRequest} - */ -proto.lnrpc.SendToRouteRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.SendToRouteRequest; - return proto.lnrpc.SendToRouteRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.SendToRouteRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.SendToRouteRequest} - */ -proto.lnrpc.SendToRouteRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setPaymentHash(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setPaymentHashString(value); - break; - case 4: - var value = new proto.lnrpc.Route; - reader.readMessage(value,proto.lnrpc.Route.deserializeBinaryFromReader); - msg.setRoute(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.SendToRouteRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.SendToRouteRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.SendToRouteRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.SendToRouteRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getPaymentHash_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getPaymentHashString(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getRoute(); - if (f != null) { - writer.writeMessage( - 4, - f, - proto.lnrpc.Route.serializeBinaryToWriter - ); - } -}; - - -/** - * optional bytes payment_hash = 1; - * @return {!(string|Uint8Array)} - */ -proto.lnrpc.SendToRouteRequest.prototype.getPaymentHash = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes payment_hash = 1; - * This is a type-conversion wrapper around `getPaymentHash()` - * @return {string} - */ -proto.lnrpc.SendToRouteRequest.prototype.getPaymentHash_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getPaymentHash())); -}; - - -/** - * optional bytes payment_hash = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getPaymentHash()` - * @return {!Uint8Array} - */ -proto.lnrpc.SendToRouteRequest.prototype.getPaymentHash_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getPaymentHash())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.lnrpc.SendToRouteRequest} returns this - */ -proto.lnrpc.SendToRouteRequest.prototype.setPaymentHash = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional string payment_hash_string = 2; - * @return {string} - */ -proto.lnrpc.SendToRouteRequest.prototype.getPaymentHashString = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.lnrpc.SendToRouteRequest} returns this - */ -proto.lnrpc.SendToRouteRequest.prototype.setPaymentHashString = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional Route route = 4; - * @return {?proto.lnrpc.Route} - */ -proto.lnrpc.SendToRouteRequest.prototype.getRoute = function() { - return /** @type{?proto.lnrpc.Route} */ ( - jspb.Message.getWrapperField(this, proto.lnrpc.Route, 4)); -}; - - -/** - * @param {?proto.lnrpc.Route|undefined} value - * @return {!proto.lnrpc.SendToRouteRequest} returns this -*/ -proto.lnrpc.SendToRouteRequest.prototype.setRoute = function(value) { - return jspb.Message.setWrapperField(this, 4, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.lnrpc.SendToRouteRequest} returns this - */ -proto.lnrpc.SendToRouteRequest.prototype.clearRoute = function() { - return this.setRoute(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.lnrpc.SendToRouteRequest.prototype.hasRoute = function() { - return jspb.Message.getField(this, 4) != null; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.ChannelAcceptRequest.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.ChannelAcceptRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.ChannelAcceptRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.ChannelAcceptRequest.toObject = function(includeInstance, msg) { - var f, obj = { - nodePubkey: msg.getNodePubkey_asB64(), - chainHash: msg.getChainHash_asB64(), - pendingChanId: msg.getPendingChanId_asB64(), - fundingAmt: jspb.Message.getFieldWithDefault(msg, 4, 0), - pushAmt: jspb.Message.getFieldWithDefault(msg, 5, 0), - dustLimit: jspb.Message.getFieldWithDefault(msg, 6, 0), - maxValueInFlight: jspb.Message.getFieldWithDefault(msg, 7, 0), - channelReserve: jspb.Message.getFieldWithDefault(msg, 8, 0), - minHtlc: jspb.Message.getFieldWithDefault(msg, 9, 0), - feePerKw: jspb.Message.getFieldWithDefault(msg, 10, 0), - csvDelay: jspb.Message.getFieldWithDefault(msg, 11, 0), - maxAcceptedHtlcs: jspb.Message.getFieldWithDefault(msg, 12, 0), - channelFlags: jspb.Message.getFieldWithDefault(msg, 13, 0), - commitmentType: jspb.Message.getFieldWithDefault(msg, 14, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.ChannelAcceptRequest} - */ -proto.lnrpc.ChannelAcceptRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.ChannelAcceptRequest; - return proto.lnrpc.ChannelAcceptRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.ChannelAcceptRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.ChannelAcceptRequest} - */ -proto.lnrpc.ChannelAcceptRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setNodePubkey(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setChainHash(value); - break; - case 3: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setPendingChanId(value); - break; - case 4: - var value = /** @type {number} */ (reader.readUint64()); - msg.setFundingAmt(value); - break; - case 5: - var value = /** @type {number} */ (reader.readUint64()); - msg.setPushAmt(value); - break; - case 6: - var value = /** @type {number} */ (reader.readUint64()); - msg.setDustLimit(value); - break; - case 7: - var value = /** @type {number} */ (reader.readUint64()); - msg.setMaxValueInFlight(value); - break; - case 8: - var value = /** @type {number} */ (reader.readUint64()); - msg.setChannelReserve(value); - break; - case 9: - var value = /** @type {number} */ (reader.readUint64()); - msg.setMinHtlc(value); - break; - case 10: - var value = /** @type {number} */ (reader.readUint64()); - msg.setFeePerKw(value); - break; - case 11: - var value = /** @type {number} */ (reader.readUint32()); - msg.setCsvDelay(value); - break; - case 12: - var value = /** @type {number} */ (reader.readUint32()); - msg.setMaxAcceptedHtlcs(value); - break; - case 13: - var value = /** @type {number} */ (reader.readUint32()); - msg.setChannelFlags(value); - break; - case 14: - var value = /** @type {!proto.lnrpc.CommitmentType} */ (reader.readEnum()); - msg.setCommitmentType(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.ChannelAcceptRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.ChannelAcceptRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.ChannelAcceptRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.ChannelAcceptRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getNodePubkey_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getChainHash_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } - f = message.getPendingChanId_asU8(); - if (f.length > 0) { - writer.writeBytes( - 3, - f - ); - } - f = message.getFundingAmt(); - if (f !== 0) { - writer.writeUint64( - 4, - f - ); - } - f = message.getPushAmt(); - if (f !== 0) { - writer.writeUint64( - 5, - f - ); - } - f = message.getDustLimit(); - if (f !== 0) { - writer.writeUint64( - 6, - f - ); - } - f = message.getMaxValueInFlight(); - if (f !== 0) { - writer.writeUint64( - 7, - f - ); - } - f = message.getChannelReserve(); - if (f !== 0) { - writer.writeUint64( - 8, - f - ); - } - f = message.getMinHtlc(); - if (f !== 0) { - writer.writeUint64( - 9, - f - ); - } - f = message.getFeePerKw(); - if (f !== 0) { - writer.writeUint64( - 10, - f - ); - } - f = message.getCsvDelay(); - if (f !== 0) { - writer.writeUint32( - 11, - f - ); - } - f = message.getMaxAcceptedHtlcs(); - if (f !== 0) { - writer.writeUint32( - 12, - f - ); - } - f = message.getChannelFlags(); - if (f !== 0) { - writer.writeUint32( - 13, - f - ); - } - f = message.getCommitmentType(); - if (f !== 0.0) { - writer.writeEnum( - 14, - f - ); - } -}; - - -/** - * optional bytes node_pubkey = 1; - * @return {!(string|Uint8Array)} - */ -proto.lnrpc.ChannelAcceptRequest.prototype.getNodePubkey = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes node_pubkey = 1; - * This is a type-conversion wrapper around `getNodePubkey()` - * @return {string} - */ -proto.lnrpc.ChannelAcceptRequest.prototype.getNodePubkey_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getNodePubkey())); -}; - - -/** - * optional bytes node_pubkey = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getNodePubkey()` - * @return {!Uint8Array} - */ -proto.lnrpc.ChannelAcceptRequest.prototype.getNodePubkey_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getNodePubkey())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.lnrpc.ChannelAcceptRequest} returns this - */ -proto.lnrpc.ChannelAcceptRequest.prototype.setNodePubkey = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional bytes chain_hash = 2; - * @return {!(string|Uint8Array)} - */ -proto.lnrpc.ChannelAcceptRequest.prototype.getChainHash = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes chain_hash = 2; - * This is a type-conversion wrapper around `getChainHash()` - * @return {string} - */ -proto.lnrpc.ChannelAcceptRequest.prototype.getChainHash_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getChainHash())); -}; - - -/** - * optional bytes chain_hash = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getChainHash()` - * @return {!Uint8Array} - */ -proto.lnrpc.ChannelAcceptRequest.prototype.getChainHash_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getChainHash())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.lnrpc.ChannelAcceptRequest} returns this - */ -proto.lnrpc.ChannelAcceptRequest.prototype.setChainHash = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); -}; - - -/** - * optional bytes pending_chan_id = 3; - * @return {!(string|Uint8Array)} - */ -proto.lnrpc.ChannelAcceptRequest.prototype.getPendingChanId = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * optional bytes pending_chan_id = 3; - * This is a type-conversion wrapper around `getPendingChanId()` - * @return {string} - */ -proto.lnrpc.ChannelAcceptRequest.prototype.getPendingChanId_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getPendingChanId())); -}; - - -/** - * optional bytes pending_chan_id = 3; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getPendingChanId()` - * @return {!Uint8Array} - */ -proto.lnrpc.ChannelAcceptRequest.prototype.getPendingChanId_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getPendingChanId())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.lnrpc.ChannelAcceptRequest} returns this - */ -proto.lnrpc.ChannelAcceptRequest.prototype.setPendingChanId = function(value) { - return jspb.Message.setProto3BytesField(this, 3, value); -}; - - -/** - * optional uint64 funding_amt = 4; - * @return {number} - */ -proto.lnrpc.ChannelAcceptRequest.prototype.getFundingAmt = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.ChannelAcceptRequest} returns this - */ -proto.lnrpc.ChannelAcceptRequest.prototype.setFundingAmt = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); -}; - - -/** - * optional uint64 push_amt = 5; - * @return {number} - */ -proto.lnrpc.ChannelAcceptRequest.prototype.getPushAmt = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.ChannelAcceptRequest} returns this - */ -proto.lnrpc.ChannelAcceptRequest.prototype.setPushAmt = function(value) { - return jspb.Message.setProto3IntField(this, 5, value); -}; - - -/** - * optional uint64 dust_limit = 6; - * @return {number} - */ -proto.lnrpc.ChannelAcceptRequest.prototype.getDustLimit = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.ChannelAcceptRequest} returns this - */ -proto.lnrpc.ChannelAcceptRequest.prototype.setDustLimit = function(value) { - return jspb.Message.setProto3IntField(this, 6, value); -}; - - -/** - * optional uint64 max_value_in_flight = 7; - * @return {number} - */ -proto.lnrpc.ChannelAcceptRequest.prototype.getMaxValueInFlight = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.ChannelAcceptRequest} returns this - */ -proto.lnrpc.ChannelAcceptRequest.prototype.setMaxValueInFlight = function(value) { - return jspb.Message.setProto3IntField(this, 7, value); -}; - - -/** - * optional uint64 channel_reserve = 8; - * @return {number} - */ -proto.lnrpc.ChannelAcceptRequest.prototype.getChannelReserve = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.ChannelAcceptRequest} returns this - */ -proto.lnrpc.ChannelAcceptRequest.prototype.setChannelReserve = function(value) { - return jspb.Message.setProto3IntField(this, 8, value); -}; - - -/** - * optional uint64 min_htlc = 9; - * @return {number} - */ -proto.lnrpc.ChannelAcceptRequest.prototype.getMinHtlc = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.ChannelAcceptRequest} returns this - */ -proto.lnrpc.ChannelAcceptRequest.prototype.setMinHtlc = function(value) { - return jspb.Message.setProto3IntField(this, 9, value); -}; - - -/** - * optional uint64 fee_per_kw = 10; - * @return {number} - */ -proto.lnrpc.ChannelAcceptRequest.prototype.getFeePerKw = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 10, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.ChannelAcceptRequest} returns this - */ -proto.lnrpc.ChannelAcceptRequest.prototype.setFeePerKw = function(value) { - return jspb.Message.setProto3IntField(this, 10, value); -}; - - -/** - * optional uint32 csv_delay = 11; - * @return {number} - */ -proto.lnrpc.ChannelAcceptRequest.prototype.getCsvDelay = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 11, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.ChannelAcceptRequest} returns this - */ -proto.lnrpc.ChannelAcceptRequest.prototype.setCsvDelay = function(value) { - return jspb.Message.setProto3IntField(this, 11, value); -}; - - -/** - * optional uint32 max_accepted_htlcs = 12; - * @return {number} - */ -proto.lnrpc.ChannelAcceptRequest.prototype.getMaxAcceptedHtlcs = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 12, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.ChannelAcceptRequest} returns this - */ -proto.lnrpc.ChannelAcceptRequest.prototype.setMaxAcceptedHtlcs = function(value) { - return jspb.Message.setProto3IntField(this, 12, value); -}; - - -/** - * optional uint32 channel_flags = 13; - * @return {number} - */ -proto.lnrpc.ChannelAcceptRequest.prototype.getChannelFlags = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 13, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.ChannelAcceptRequest} returns this - */ -proto.lnrpc.ChannelAcceptRequest.prototype.setChannelFlags = function(value) { - return jspb.Message.setProto3IntField(this, 13, value); -}; - - -/** - * optional CommitmentType commitment_type = 14; - * @return {!proto.lnrpc.CommitmentType} - */ -proto.lnrpc.ChannelAcceptRequest.prototype.getCommitmentType = function() { - return /** @type {!proto.lnrpc.CommitmentType} */ (jspb.Message.getFieldWithDefault(this, 14, 0)); -}; - - -/** - * @param {!proto.lnrpc.CommitmentType} value - * @return {!proto.lnrpc.ChannelAcceptRequest} returns this - */ -proto.lnrpc.ChannelAcceptRequest.prototype.setCommitmentType = function(value) { - return jspb.Message.setProto3EnumField(this, 14, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.ChannelAcceptResponse.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.ChannelAcceptResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.ChannelAcceptResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.ChannelAcceptResponse.toObject = function(includeInstance, msg) { - var f, obj = { - accept: jspb.Message.getBooleanFieldWithDefault(msg, 1, false), - pendingChanId: msg.getPendingChanId_asB64(), - error: jspb.Message.getFieldWithDefault(msg, 3, ""), - upfrontShutdown: jspb.Message.getFieldWithDefault(msg, 4, ""), - csvDelay: jspb.Message.getFieldWithDefault(msg, 5, 0), - reserveSat: jspb.Message.getFieldWithDefault(msg, 6, 0), - inFlightMaxMsat: jspb.Message.getFieldWithDefault(msg, 7, 0), - maxHtlcCount: jspb.Message.getFieldWithDefault(msg, 8, 0), - minHtlcIn: jspb.Message.getFieldWithDefault(msg, 9, 0), - minAcceptDepth: jspb.Message.getFieldWithDefault(msg, 10, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.ChannelAcceptResponse} - */ -proto.lnrpc.ChannelAcceptResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.ChannelAcceptResponse; - return proto.lnrpc.ChannelAcceptResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.ChannelAcceptResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.ChannelAcceptResponse} - */ -proto.lnrpc.ChannelAcceptResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setAccept(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setPendingChanId(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setError(value); - break; - case 4: - var value = /** @type {string} */ (reader.readString()); - msg.setUpfrontShutdown(value); - break; - case 5: - var value = /** @type {number} */ (reader.readUint32()); - msg.setCsvDelay(value); - break; - case 6: - var value = /** @type {number} */ (reader.readUint64()); - msg.setReserveSat(value); - break; - case 7: - var value = /** @type {number} */ (reader.readUint64()); - msg.setInFlightMaxMsat(value); - break; - case 8: - var value = /** @type {number} */ (reader.readUint32()); - msg.setMaxHtlcCount(value); - break; - case 9: - var value = /** @type {number} */ (reader.readUint64()); - msg.setMinHtlcIn(value); - break; - case 10: - var value = /** @type {number} */ (reader.readUint32()); - msg.setMinAcceptDepth(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.ChannelAcceptResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.ChannelAcceptResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.ChannelAcceptResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.ChannelAcceptResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getAccept(); - if (f) { - writer.writeBool( - 1, - f - ); - } - f = message.getPendingChanId_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } - f = message.getError(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } - f = message.getUpfrontShutdown(); - if (f.length > 0) { - writer.writeString( - 4, - f - ); - } - f = message.getCsvDelay(); - if (f !== 0) { - writer.writeUint32( - 5, - f - ); - } - f = message.getReserveSat(); - if (f !== 0) { - writer.writeUint64( - 6, - f - ); - } - f = message.getInFlightMaxMsat(); - if (f !== 0) { - writer.writeUint64( - 7, - f - ); - } - f = message.getMaxHtlcCount(); - if (f !== 0) { - writer.writeUint32( - 8, - f - ); - } - f = message.getMinHtlcIn(); - if (f !== 0) { - writer.writeUint64( - 9, - f - ); - } - f = message.getMinAcceptDepth(); - if (f !== 0) { - writer.writeUint32( - 10, - f - ); - } -}; - - -/** - * optional bool accept = 1; - * @return {boolean} - */ -proto.lnrpc.ChannelAcceptResponse.prototype.getAccept = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.lnrpc.ChannelAcceptResponse} returns this - */ -proto.lnrpc.ChannelAcceptResponse.prototype.setAccept = function(value) { - return jspb.Message.setProto3BooleanField(this, 1, value); -}; - - -/** - * optional bytes pending_chan_id = 2; - * @return {!(string|Uint8Array)} - */ -proto.lnrpc.ChannelAcceptResponse.prototype.getPendingChanId = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes pending_chan_id = 2; - * This is a type-conversion wrapper around `getPendingChanId()` - * @return {string} - */ -proto.lnrpc.ChannelAcceptResponse.prototype.getPendingChanId_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getPendingChanId())); -}; - - -/** - * optional bytes pending_chan_id = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getPendingChanId()` - * @return {!Uint8Array} - */ -proto.lnrpc.ChannelAcceptResponse.prototype.getPendingChanId_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getPendingChanId())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.lnrpc.ChannelAcceptResponse} returns this - */ -proto.lnrpc.ChannelAcceptResponse.prototype.setPendingChanId = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); -}; - - -/** - * optional string error = 3; - * @return {string} - */ -proto.lnrpc.ChannelAcceptResponse.prototype.getError = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * @param {string} value - * @return {!proto.lnrpc.ChannelAcceptResponse} returns this - */ -proto.lnrpc.ChannelAcceptResponse.prototype.setError = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); -}; - - -/** - * optional string upfront_shutdown = 4; - * @return {string} - */ -proto.lnrpc.ChannelAcceptResponse.prototype.getUpfrontShutdown = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); -}; - - -/** - * @param {string} value - * @return {!proto.lnrpc.ChannelAcceptResponse} returns this - */ -proto.lnrpc.ChannelAcceptResponse.prototype.setUpfrontShutdown = function(value) { - return jspb.Message.setProto3StringField(this, 4, value); -}; - - -/** - * optional uint32 csv_delay = 5; - * @return {number} - */ -proto.lnrpc.ChannelAcceptResponse.prototype.getCsvDelay = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.ChannelAcceptResponse} returns this - */ -proto.lnrpc.ChannelAcceptResponse.prototype.setCsvDelay = function(value) { - return jspb.Message.setProto3IntField(this, 5, value); -}; - - -/** - * optional uint64 reserve_sat = 6; - * @return {number} - */ -proto.lnrpc.ChannelAcceptResponse.prototype.getReserveSat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.ChannelAcceptResponse} returns this - */ -proto.lnrpc.ChannelAcceptResponse.prototype.setReserveSat = function(value) { - return jspb.Message.setProto3IntField(this, 6, value); -}; - - -/** - * optional uint64 in_flight_max_msat = 7; - * @return {number} - */ -proto.lnrpc.ChannelAcceptResponse.prototype.getInFlightMaxMsat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.ChannelAcceptResponse} returns this - */ -proto.lnrpc.ChannelAcceptResponse.prototype.setInFlightMaxMsat = function(value) { - return jspb.Message.setProto3IntField(this, 7, value); -}; - - -/** - * optional uint32 max_htlc_count = 8; - * @return {number} - */ -proto.lnrpc.ChannelAcceptResponse.prototype.getMaxHtlcCount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.ChannelAcceptResponse} returns this - */ -proto.lnrpc.ChannelAcceptResponse.prototype.setMaxHtlcCount = function(value) { - return jspb.Message.setProto3IntField(this, 8, value); -}; - - -/** - * optional uint64 min_htlc_in = 9; - * @return {number} - */ -proto.lnrpc.ChannelAcceptResponse.prototype.getMinHtlcIn = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.ChannelAcceptResponse} returns this - */ -proto.lnrpc.ChannelAcceptResponse.prototype.setMinHtlcIn = function(value) { - return jspb.Message.setProto3IntField(this, 9, value); -}; - - -/** - * optional uint32 min_accept_depth = 10; - * @return {number} - */ -proto.lnrpc.ChannelAcceptResponse.prototype.getMinAcceptDepth = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 10, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.ChannelAcceptResponse} returns this - */ -proto.lnrpc.ChannelAcceptResponse.prototype.setMinAcceptDepth = function(value) { - return jspb.Message.setProto3IntField(this, 10, value); -}; - - - -/** - * Oneof group definitions for this message. Each group defines the field - * numbers belonging to that group. When of these fields' value is set, all - * other fields in the group are cleared. During deserialization, if multiple - * fields are encountered for a group, only the last value seen will be kept. - * @private {!Array>} - * @const - */ -proto.lnrpc.ChannelPoint.oneofGroups_ = [[1,2]]; - -/** - * @enum {number} - */ -proto.lnrpc.ChannelPoint.FundingTxidCase = { - FUNDING_TXID_NOT_SET: 0, - FUNDING_TXID_BYTES: 1, - FUNDING_TXID_STR: 2 -}; - -/** - * @return {proto.lnrpc.ChannelPoint.FundingTxidCase} - */ -proto.lnrpc.ChannelPoint.prototype.getFundingTxidCase = function() { - return /** @type {proto.lnrpc.ChannelPoint.FundingTxidCase} */(jspb.Message.computeOneofCase(this, proto.lnrpc.ChannelPoint.oneofGroups_[0])); -}; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.ChannelPoint.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.ChannelPoint.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.ChannelPoint} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.ChannelPoint.toObject = function(includeInstance, msg) { - var f, obj = { - fundingTxidBytes: msg.getFundingTxidBytes_asB64(), - fundingTxidStr: jspb.Message.getFieldWithDefault(msg, 2, ""), - outputIndex: jspb.Message.getFieldWithDefault(msg, 3, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.ChannelPoint} - */ -proto.lnrpc.ChannelPoint.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.ChannelPoint; - return proto.lnrpc.ChannelPoint.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.ChannelPoint} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.ChannelPoint} - */ -proto.lnrpc.ChannelPoint.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setFundingTxidBytes(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setFundingTxidStr(value); - break; - case 3: - var value = /** @type {number} */ (reader.readUint32()); - msg.setOutputIndex(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.ChannelPoint.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.ChannelPoint.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.ChannelPoint} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.ChannelPoint.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 1)); - if (f != null) { - writer.writeBytes( - 1, - f - ); - } - f = /** @type {string} */ (jspb.Message.getField(message, 2)); - if (f != null) { - writer.writeString( - 2, - f - ); - } - f = message.getOutputIndex(); - if (f !== 0) { - writer.writeUint32( - 3, - f - ); - } -}; - - -/** - * optional bytes funding_txid_bytes = 1; - * @return {!(string|Uint8Array)} - */ -proto.lnrpc.ChannelPoint.prototype.getFundingTxidBytes = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes funding_txid_bytes = 1; - * This is a type-conversion wrapper around `getFundingTxidBytes()` - * @return {string} - */ -proto.lnrpc.ChannelPoint.prototype.getFundingTxidBytes_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getFundingTxidBytes())); -}; - - -/** - * optional bytes funding_txid_bytes = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getFundingTxidBytes()` - * @return {!Uint8Array} - */ -proto.lnrpc.ChannelPoint.prototype.getFundingTxidBytes_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getFundingTxidBytes())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.lnrpc.ChannelPoint} returns this - */ -proto.lnrpc.ChannelPoint.prototype.setFundingTxidBytes = function(value) { - return jspb.Message.setOneofField(this, 1, proto.lnrpc.ChannelPoint.oneofGroups_[0], value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.lnrpc.ChannelPoint} returns this - */ -proto.lnrpc.ChannelPoint.prototype.clearFundingTxidBytes = function() { - return jspb.Message.setOneofField(this, 1, proto.lnrpc.ChannelPoint.oneofGroups_[0], undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.lnrpc.ChannelPoint.prototype.hasFundingTxidBytes = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional string funding_txid_str = 2; - * @return {string} - */ -proto.lnrpc.ChannelPoint.prototype.getFundingTxidStr = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.lnrpc.ChannelPoint} returns this - */ -proto.lnrpc.ChannelPoint.prototype.setFundingTxidStr = function(value) { - return jspb.Message.setOneofField(this, 2, proto.lnrpc.ChannelPoint.oneofGroups_[0], value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.lnrpc.ChannelPoint} returns this - */ -proto.lnrpc.ChannelPoint.prototype.clearFundingTxidStr = function() { - return jspb.Message.setOneofField(this, 2, proto.lnrpc.ChannelPoint.oneofGroups_[0], undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.lnrpc.ChannelPoint.prototype.hasFundingTxidStr = function() { - return jspb.Message.getField(this, 2) != null; -}; - - -/** - * optional uint32 output_index = 3; - * @return {number} - */ -proto.lnrpc.ChannelPoint.prototype.getOutputIndex = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.ChannelPoint} returns this - */ -proto.lnrpc.ChannelPoint.prototype.setOutputIndex = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.OutPoint.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.OutPoint.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.OutPoint} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.OutPoint.toObject = function(includeInstance, msg) { - var f, obj = { - txidBytes: msg.getTxidBytes_asB64(), - txidStr: jspb.Message.getFieldWithDefault(msg, 2, ""), - outputIndex: jspb.Message.getFieldWithDefault(msg, 3, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.OutPoint} - */ -proto.lnrpc.OutPoint.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.OutPoint; - return proto.lnrpc.OutPoint.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.OutPoint} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.OutPoint} - */ -proto.lnrpc.OutPoint.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setTxidBytes(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setTxidStr(value); - break; - case 3: - var value = /** @type {number} */ (reader.readUint32()); - msg.setOutputIndex(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.OutPoint.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.OutPoint.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.OutPoint} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.OutPoint.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getTxidBytes_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getTxidStr(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getOutputIndex(); - if (f !== 0) { - writer.writeUint32( - 3, - f - ); - } -}; - - -/** - * optional bytes txid_bytes = 1; - * @return {!(string|Uint8Array)} - */ -proto.lnrpc.OutPoint.prototype.getTxidBytes = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes txid_bytes = 1; - * This is a type-conversion wrapper around `getTxidBytes()` - * @return {string} - */ -proto.lnrpc.OutPoint.prototype.getTxidBytes_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getTxidBytes())); -}; - - -/** - * optional bytes txid_bytes = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getTxidBytes()` - * @return {!Uint8Array} - */ -proto.lnrpc.OutPoint.prototype.getTxidBytes_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getTxidBytes())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.lnrpc.OutPoint} returns this - */ -proto.lnrpc.OutPoint.prototype.setTxidBytes = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional string txid_str = 2; - * @return {string} - */ -proto.lnrpc.OutPoint.prototype.getTxidStr = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.lnrpc.OutPoint} returns this - */ -proto.lnrpc.OutPoint.prototype.setTxidStr = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional uint32 output_index = 3; - * @return {number} - */ -proto.lnrpc.OutPoint.prototype.getOutputIndex = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.OutPoint} returns this - */ -proto.lnrpc.OutPoint.prototype.setOutputIndex = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.LightningAddress.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.LightningAddress.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.LightningAddress} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.LightningAddress.toObject = function(includeInstance, msg) { - var f, obj = { - pubkey: jspb.Message.getFieldWithDefault(msg, 1, ""), - host: jspb.Message.getFieldWithDefault(msg, 2, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.LightningAddress} - */ -proto.lnrpc.LightningAddress.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.LightningAddress; - return proto.lnrpc.LightningAddress.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.LightningAddress} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.LightningAddress} - */ -proto.lnrpc.LightningAddress.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setPubkey(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setHost(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.LightningAddress.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.LightningAddress.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.LightningAddress} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.LightningAddress.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getPubkey(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getHost(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } -}; - - -/** - * optional string pubkey = 1; - * @return {string} - */ -proto.lnrpc.LightningAddress.prototype.getPubkey = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.lnrpc.LightningAddress} returns this - */ -proto.lnrpc.LightningAddress.prototype.setPubkey = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional string host = 2; - * @return {string} - */ -proto.lnrpc.LightningAddress.prototype.getHost = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.lnrpc.LightningAddress} returns this - */ -proto.lnrpc.LightningAddress.prototype.setHost = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.EstimateFeeRequest.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.EstimateFeeRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.EstimateFeeRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.EstimateFeeRequest.toObject = function(includeInstance, msg) { - var f, obj = { - addrtoamountMap: (f = msg.getAddrtoamountMap()) ? f.toObject(includeInstance, undefined) : [], - targetConf: jspb.Message.getFieldWithDefault(msg, 2, 0), - minConfs: jspb.Message.getFieldWithDefault(msg, 3, 0), - spendUnconfirmed: jspb.Message.getBooleanFieldWithDefault(msg, 4, false) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.EstimateFeeRequest} - */ -proto.lnrpc.EstimateFeeRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.EstimateFeeRequest; - return proto.lnrpc.EstimateFeeRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.EstimateFeeRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.EstimateFeeRequest} - */ -proto.lnrpc.EstimateFeeRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = msg.getAddrtoamountMap(); - reader.readMessage(value, function(message, reader) { - jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readInt64, null, "", 0); - }); - break; - case 2: - var value = /** @type {number} */ (reader.readInt32()); - msg.setTargetConf(value); - break; - case 3: - var value = /** @type {number} */ (reader.readInt32()); - msg.setMinConfs(value); - break; - case 4: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setSpendUnconfirmed(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.EstimateFeeRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.EstimateFeeRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.EstimateFeeRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.EstimateFeeRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getAddrtoamountMap(true); - if (f && f.getLength() > 0) { - f.serializeBinary(1, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeInt64); - } - f = message.getTargetConf(); - if (f !== 0) { - writer.writeInt32( - 2, - f - ); - } - f = message.getMinConfs(); - if (f !== 0) { - writer.writeInt32( - 3, - f - ); - } - f = message.getSpendUnconfirmed(); - if (f) { - writer.writeBool( - 4, - f - ); - } -}; - - -/** - * map AddrToAmount = 1; - * @param {boolean=} opt_noLazyCreate Do not create the map if - * empty, instead returning `undefined` - * @return {!jspb.Map} - */ -proto.lnrpc.EstimateFeeRequest.prototype.getAddrtoamountMap = function(opt_noLazyCreate) { - return /** @type {!jspb.Map} */ ( - jspb.Message.getMapField(this, 1, opt_noLazyCreate, - null)); -}; - - -/** - * Clears values from the map. The map will be non-null. - * @return {!proto.lnrpc.EstimateFeeRequest} returns this - */ -proto.lnrpc.EstimateFeeRequest.prototype.clearAddrtoamountMap = function() { - this.getAddrtoamountMap().clear(); - return this;}; - - -/** - * optional int32 target_conf = 2; - * @return {number} - */ -proto.lnrpc.EstimateFeeRequest.prototype.getTargetConf = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.EstimateFeeRequest} returns this - */ -proto.lnrpc.EstimateFeeRequest.prototype.setTargetConf = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * optional int32 min_confs = 3; - * @return {number} - */ -proto.lnrpc.EstimateFeeRequest.prototype.getMinConfs = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.EstimateFeeRequest} returns this - */ -proto.lnrpc.EstimateFeeRequest.prototype.setMinConfs = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - -/** - * optional bool spend_unconfirmed = 4; - * @return {boolean} - */ -proto.lnrpc.EstimateFeeRequest.prototype.getSpendUnconfirmed = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 4, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.lnrpc.EstimateFeeRequest} returns this - */ -proto.lnrpc.EstimateFeeRequest.prototype.setSpendUnconfirmed = function(value) { - return jspb.Message.setProto3BooleanField(this, 4, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.EstimateFeeResponse.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.EstimateFeeResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.EstimateFeeResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.EstimateFeeResponse.toObject = function(includeInstance, msg) { - var f, obj = { - feeSat: jspb.Message.getFieldWithDefault(msg, 1, 0), - feerateSatPerByte: jspb.Message.getFieldWithDefault(msg, 2, 0), - satPerVbyte: jspb.Message.getFieldWithDefault(msg, 3, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.EstimateFeeResponse} - */ -proto.lnrpc.EstimateFeeResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.EstimateFeeResponse; - return proto.lnrpc.EstimateFeeResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.EstimateFeeResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.EstimateFeeResponse} - */ -proto.lnrpc.EstimateFeeResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readInt64()); - msg.setFeeSat(value); - break; - case 2: - var value = /** @type {number} */ (reader.readInt64()); - msg.setFeerateSatPerByte(value); - break; - case 3: - var value = /** @type {number} */ (reader.readUint64()); - msg.setSatPerVbyte(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.EstimateFeeResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.EstimateFeeResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.EstimateFeeResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.EstimateFeeResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getFeeSat(); - if (f !== 0) { - writer.writeInt64( - 1, - f - ); - } - f = message.getFeerateSatPerByte(); - if (f !== 0) { - writer.writeInt64( - 2, - f - ); - } - f = message.getSatPerVbyte(); - if (f !== 0) { - writer.writeUint64( - 3, - f - ); - } -}; - - -/** - * optional int64 fee_sat = 1; - * @return {number} - */ -proto.lnrpc.EstimateFeeResponse.prototype.getFeeSat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.EstimateFeeResponse} returns this - */ -proto.lnrpc.EstimateFeeResponse.prototype.setFeeSat = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); -}; - - -/** - * optional int64 feerate_sat_per_byte = 2; - * @return {number} - */ -proto.lnrpc.EstimateFeeResponse.prototype.getFeerateSatPerByte = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.EstimateFeeResponse} returns this - */ -proto.lnrpc.EstimateFeeResponse.prototype.setFeerateSatPerByte = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * optional uint64 sat_per_vbyte = 3; - * @return {number} - */ -proto.lnrpc.EstimateFeeResponse.prototype.getSatPerVbyte = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.EstimateFeeResponse} returns this - */ -proto.lnrpc.EstimateFeeResponse.prototype.setSatPerVbyte = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.SendManyRequest.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.SendManyRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.SendManyRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.SendManyRequest.toObject = function(includeInstance, msg) { - var f, obj = { - addrtoamountMap: (f = msg.getAddrtoamountMap()) ? f.toObject(includeInstance, undefined) : [], - targetConf: jspb.Message.getFieldWithDefault(msg, 3, 0), - satPerVbyte: jspb.Message.getFieldWithDefault(msg, 4, 0), - satPerByte: jspb.Message.getFieldWithDefault(msg, 5, 0), - label: jspb.Message.getFieldWithDefault(msg, 6, ""), - minConfs: jspb.Message.getFieldWithDefault(msg, 7, 0), - spendUnconfirmed: jspb.Message.getBooleanFieldWithDefault(msg, 8, false) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.SendManyRequest} - */ -proto.lnrpc.SendManyRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.SendManyRequest; - return proto.lnrpc.SendManyRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.SendManyRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.SendManyRequest} - */ -proto.lnrpc.SendManyRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = msg.getAddrtoamountMap(); - reader.readMessage(value, function(message, reader) { - jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readInt64, null, "", 0); - }); - break; - case 3: - var value = /** @type {number} */ (reader.readInt32()); - msg.setTargetConf(value); - break; - case 4: - var value = /** @type {number} */ (reader.readUint64()); - msg.setSatPerVbyte(value); - break; - case 5: - var value = /** @type {number} */ (reader.readInt64()); - msg.setSatPerByte(value); - break; - case 6: - var value = /** @type {string} */ (reader.readString()); - msg.setLabel(value); - break; - case 7: - var value = /** @type {number} */ (reader.readInt32()); - msg.setMinConfs(value); - break; - case 8: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setSpendUnconfirmed(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.SendManyRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.SendManyRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.SendManyRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.SendManyRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getAddrtoamountMap(true); - if (f && f.getLength() > 0) { - f.serializeBinary(1, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeInt64); - } - f = message.getTargetConf(); - if (f !== 0) { - writer.writeInt32( - 3, - f - ); - } - f = message.getSatPerVbyte(); - if (f !== 0) { - writer.writeUint64( - 4, - f - ); - } - f = message.getSatPerByte(); - if (f !== 0) { - writer.writeInt64( - 5, - f - ); - } - f = message.getLabel(); - if (f.length > 0) { - writer.writeString( - 6, - f - ); - } - f = message.getMinConfs(); - if (f !== 0) { - writer.writeInt32( - 7, - f - ); - } - f = message.getSpendUnconfirmed(); - if (f) { - writer.writeBool( - 8, - f - ); - } -}; - - -/** - * map AddrToAmount = 1; - * @param {boolean=} opt_noLazyCreate Do not create the map if - * empty, instead returning `undefined` - * @return {!jspb.Map} - */ -proto.lnrpc.SendManyRequest.prototype.getAddrtoamountMap = function(opt_noLazyCreate) { - return /** @type {!jspb.Map} */ ( - jspb.Message.getMapField(this, 1, opt_noLazyCreate, - null)); -}; - - -/** - * Clears values from the map. The map will be non-null. - * @return {!proto.lnrpc.SendManyRequest} returns this - */ -proto.lnrpc.SendManyRequest.prototype.clearAddrtoamountMap = function() { - this.getAddrtoamountMap().clear(); - return this;}; - - -/** - * optional int32 target_conf = 3; - * @return {number} - */ -proto.lnrpc.SendManyRequest.prototype.getTargetConf = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.SendManyRequest} returns this - */ -proto.lnrpc.SendManyRequest.prototype.setTargetConf = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - -/** - * optional uint64 sat_per_vbyte = 4; - * @return {number} - */ -proto.lnrpc.SendManyRequest.prototype.getSatPerVbyte = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.SendManyRequest} returns this - */ -proto.lnrpc.SendManyRequest.prototype.setSatPerVbyte = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); -}; - - -/** - * optional int64 sat_per_byte = 5; - * @return {number} - */ -proto.lnrpc.SendManyRequest.prototype.getSatPerByte = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.SendManyRequest} returns this - */ -proto.lnrpc.SendManyRequest.prototype.setSatPerByte = function(value) { - return jspb.Message.setProto3IntField(this, 5, value); -}; - - -/** - * optional string label = 6; - * @return {string} - */ -proto.lnrpc.SendManyRequest.prototype.getLabel = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); -}; - - -/** - * @param {string} value - * @return {!proto.lnrpc.SendManyRequest} returns this - */ -proto.lnrpc.SendManyRequest.prototype.setLabel = function(value) { - return jspb.Message.setProto3StringField(this, 6, value); -}; - - -/** - * optional int32 min_confs = 7; - * @return {number} - */ -proto.lnrpc.SendManyRequest.prototype.getMinConfs = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.SendManyRequest} returns this - */ -proto.lnrpc.SendManyRequest.prototype.setMinConfs = function(value) { - return jspb.Message.setProto3IntField(this, 7, value); -}; - - -/** - * optional bool spend_unconfirmed = 8; - * @return {boolean} - */ -proto.lnrpc.SendManyRequest.prototype.getSpendUnconfirmed = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 8, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.lnrpc.SendManyRequest} returns this - */ -proto.lnrpc.SendManyRequest.prototype.setSpendUnconfirmed = function(value) { - return jspb.Message.setProto3BooleanField(this, 8, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.SendManyResponse.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.SendManyResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.SendManyResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.SendManyResponse.toObject = function(includeInstance, msg) { - var f, obj = { - txid: jspb.Message.getFieldWithDefault(msg, 1, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.SendManyResponse} - */ -proto.lnrpc.SendManyResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.SendManyResponse; - return proto.lnrpc.SendManyResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.SendManyResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.SendManyResponse} - */ -proto.lnrpc.SendManyResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setTxid(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.SendManyResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.SendManyResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.SendManyResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.SendManyResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getTxid(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } -}; - - -/** - * optional string txid = 1; - * @return {string} - */ -proto.lnrpc.SendManyResponse.prototype.getTxid = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.lnrpc.SendManyResponse} returns this - */ -proto.lnrpc.SendManyResponse.prototype.setTxid = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.SendCoinsRequest.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.SendCoinsRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.SendCoinsRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.SendCoinsRequest.toObject = function(includeInstance, msg) { - var f, obj = { - addr: jspb.Message.getFieldWithDefault(msg, 1, ""), - amount: jspb.Message.getFieldWithDefault(msg, 2, 0), - targetConf: jspb.Message.getFieldWithDefault(msg, 3, 0), - satPerVbyte: jspb.Message.getFieldWithDefault(msg, 4, 0), - satPerByte: jspb.Message.getFieldWithDefault(msg, 5, 0), - sendAll: jspb.Message.getBooleanFieldWithDefault(msg, 6, false), - label: jspb.Message.getFieldWithDefault(msg, 7, ""), - minConfs: jspb.Message.getFieldWithDefault(msg, 8, 0), - spendUnconfirmed: jspb.Message.getBooleanFieldWithDefault(msg, 9, false) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.SendCoinsRequest} - */ -proto.lnrpc.SendCoinsRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.SendCoinsRequest; - return proto.lnrpc.SendCoinsRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.SendCoinsRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.SendCoinsRequest} - */ -proto.lnrpc.SendCoinsRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setAddr(value); - break; - case 2: - var value = /** @type {number} */ (reader.readInt64()); - msg.setAmount(value); - break; - case 3: - var value = /** @type {number} */ (reader.readInt32()); - msg.setTargetConf(value); - break; - case 4: - var value = /** @type {number} */ (reader.readUint64()); - msg.setSatPerVbyte(value); - break; - case 5: - var value = /** @type {number} */ (reader.readInt64()); - msg.setSatPerByte(value); - break; - case 6: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setSendAll(value); - break; - case 7: - var value = /** @type {string} */ (reader.readString()); - msg.setLabel(value); - break; - case 8: - var value = /** @type {number} */ (reader.readInt32()); - msg.setMinConfs(value); - break; - case 9: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setSpendUnconfirmed(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.SendCoinsRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.SendCoinsRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.SendCoinsRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.SendCoinsRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getAddr(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getAmount(); - if (f !== 0) { - writer.writeInt64( - 2, - f - ); - } - f = message.getTargetConf(); - if (f !== 0) { - writer.writeInt32( - 3, - f - ); - } - f = message.getSatPerVbyte(); - if (f !== 0) { - writer.writeUint64( - 4, - f - ); - } - f = message.getSatPerByte(); - if (f !== 0) { - writer.writeInt64( - 5, - f - ); - } - f = message.getSendAll(); - if (f) { - writer.writeBool( - 6, - f - ); - } - f = message.getLabel(); - if (f.length > 0) { - writer.writeString( - 7, - f - ); - } - f = message.getMinConfs(); - if (f !== 0) { - writer.writeInt32( - 8, - f - ); - } - f = message.getSpendUnconfirmed(); - if (f) { - writer.writeBool( - 9, - f - ); - } -}; - - -/** - * optional string addr = 1; - * @return {string} - */ -proto.lnrpc.SendCoinsRequest.prototype.getAddr = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.lnrpc.SendCoinsRequest} returns this - */ -proto.lnrpc.SendCoinsRequest.prototype.setAddr = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional int64 amount = 2; - * @return {number} - */ -proto.lnrpc.SendCoinsRequest.prototype.getAmount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.SendCoinsRequest} returns this - */ -proto.lnrpc.SendCoinsRequest.prototype.setAmount = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * optional int32 target_conf = 3; - * @return {number} - */ -proto.lnrpc.SendCoinsRequest.prototype.getTargetConf = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.SendCoinsRequest} returns this - */ -proto.lnrpc.SendCoinsRequest.prototype.setTargetConf = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - -/** - * optional uint64 sat_per_vbyte = 4; - * @return {number} - */ -proto.lnrpc.SendCoinsRequest.prototype.getSatPerVbyte = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.SendCoinsRequest} returns this - */ -proto.lnrpc.SendCoinsRequest.prototype.setSatPerVbyte = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); -}; - - -/** - * optional int64 sat_per_byte = 5; - * @return {number} - */ -proto.lnrpc.SendCoinsRequest.prototype.getSatPerByte = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.SendCoinsRequest} returns this - */ -proto.lnrpc.SendCoinsRequest.prototype.setSatPerByte = function(value) { - return jspb.Message.setProto3IntField(this, 5, value); -}; - - -/** - * optional bool send_all = 6; - * @return {boolean} - */ -proto.lnrpc.SendCoinsRequest.prototype.getSendAll = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 6, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.lnrpc.SendCoinsRequest} returns this - */ -proto.lnrpc.SendCoinsRequest.prototype.setSendAll = function(value) { - return jspb.Message.setProto3BooleanField(this, 6, value); -}; - - -/** - * optional string label = 7; - * @return {string} - */ -proto.lnrpc.SendCoinsRequest.prototype.getLabel = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); -}; - - -/** - * @param {string} value - * @return {!proto.lnrpc.SendCoinsRequest} returns this - */ -proto.lnrpc.SendCoinsRequest.prototype.setLabel = function(value) { - return jspb.Message.setProto3StringField(this, 7, value); -}; - - -/** - * optional int32 min_confs = 8; - * @return {number} - */ -proto.lnrpc.SendCoinsRequest.prototype.getMinConfs = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.SendCoinsRequest} returns this - */ -proto.lnrpc.SendCoinsRequest.prototype.setMinConfs = function(value) { - return jspb.Message.setProto3IntField(this, 8, value); -}; - - -/** - * optional bool spend_unconfirmed = 9; - * @return {boolean} - */ -proto.lnrpc.SendCoinsRequest.prototype.getSpendUnconfirmed = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 9, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.lnrpc.SendCoinsRequest} returns this - */ -proto.lnrpc.SendCoinsRequest.prototype.setSpendUnconfirmed = function(value) { - return jspb.Message.setProto3BooleanField(this, 9, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.SendCoinsResponse.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.SendCoinsResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.SendCoinsResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.SendCoinsResponse.toObject = function(includeInstance, msg) { - var f, obj = { - txid: jspb.Message.getFieldWithDefault(msg, 1, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.SendCoinsResponse} - */ -proto.lnrpc.SendCoinsResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.SendCoinsResponse; - return proto.lnrpc.SendCoinsResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.SendCoinsResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.SendCoinsResponse} - */ -proto.lnrpc.SendCoinsResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setTxid(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.SendCoinsResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.SendCoinsResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.SendCoinsResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.SendCoinsResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getTxid(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } -}; - - -/** - * optional string txid = 1; - * @return {string} - */ -proto.lnrpc.SendCoinsResponse.prototype.getTxid = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.lnrpc.SendCoinsResponse} returns this - */ -proto.lnrpc.SendCoinsResponse.prototype.setTxid = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.ListUnspentRequest.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.ListUnspentRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.ListUnspentRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.ListUnspentRequest.toObject = function(includeInstance, msg) { - var f, obj = { - minConfs: jspb.Message.getFieldWithDefault(msg, 1, 0), - maxConfs: jspb.Message.getFieldWithDefault(msg, 2, 0), - account: jspb.Message.getFieldWithDefault(msg, 3, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.ListUnspentRequest} - */ -proto.lnrpc.ListUnspentRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.ListUnspentRequest; - return proto.lnrpc.ListUnspentRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.ListUnspentRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.ListUnspentRequest} - */ -proto.lnrpc.ListUnspentRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readInt32()); - msg.setMinConfs(value); - break; - case 2: - var value = /** @type {number} */ (reader.readInt32()); - msg.setMaxConfs(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setAccount(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.ListUnspentRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.ListUnspentRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.ListUnspentRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.ListUnspentRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getMinConfs(); - if (f !== 0) { - writer.writeInt32( - 1, - f - ); - } - f = message.getMaxConfs(); - if (f !== 0) { - writer.writeInt32( - 2, - f - ); - } - f = message.getAccount(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } -}; - - -/** - * optional int32 min_confs = 1; - * @return {number} - */ -proto.lnrpc.ListUnspentRequest.prototype.getMinConfs = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.ListUnspentRequest} returns this - */ -proto.lnrpc.ListUnspentRequest.prototype.setMinConfs = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); -}; - - -/** - * optional int32 max_confs = 2; - * @return {number} - */ -proto.lnrpc.ListUnspentRequest.prototype.getMaxConfs = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.ListUnspentRequest} returns this - */ -proto.lnrpc.ListUnspentRequest.prototype.setMaxConfs = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * optional string account = 3; - * @return {string} - */ -proto.lnrpc.ListUnspentRequest.prototype.getAccount = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * @param {string} value - * @return {!proto.lnrpc.ListUnspentRequest} returns this - */ -proto.lnrpc.ListUnspentRequest.prototype.setAccount = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.lnrpc.ListUnspentResponse.repeatedFields_ = [1]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.ListUnspentResponse.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.ListUnspentResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.ListUnspentResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.ListUnspentResponse.toObject = function(includeInstance, msg) { - var f, obj = { - utxosList: jspb.Message.toObjectList(msg.getUtxosList(), - proto.lnrpc.Utxo.toObject, includeInstance) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.ListUnspentResponse} - */ -proto.lnrpc.ListUnspentResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.ListUnspentResponse; - return proto.lnrpc.ListUnspentResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.ListUnspentResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.ListUnspentResponse} - */ -proto.lnrpc.ListUnspentResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.lnrpc.Utxo; - reader.readMessage(value,proto.lnrpc.Utxo.deserializeBinaryFromReader); - msg.addUtxos(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.ListUnspentResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.ListUnspentResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.ListUnspentResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.ListUnspentResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getUtxosList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 1, - f, - proto.lnrpc.Utxo.serializeBinaryToWriter - ); - } -}; - - -/** - * repeated Utxo utxos = 1; - * @return {!Array} - */ -proto.lnrpc.ListUnspentResponse.prototype.getUtxosList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.Utxo, 1)); -}; - - -/** - * @param {!Array} value - * @return {!proto.lnrpc.ListUnspentResponse} returns this -*/ -proto.lnrpc.ListUnspentResponse.prototype.setUtxosList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); -}; - - -/** - * @param {!proto.lnrpc.Utxo=} opt_value - * @param {number=} opt_index - * @return {!proto.lnrpc.Utxo} - */ -proto.lnrpc.ListUnspentResponse.prototype.addUtxos = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.lnrpc.Utxo, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.lnrpc.ListUnspentResponse} returns this - */ -proto.lnrpc.ListUnspentResponse.prototype.clearUtxosList = function() { - return this.setUtxosList([]); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.NewAddressRequest.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.NewAddressRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.NewAddressRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.NewAddressRequest.toObject = function(includeInstance, msg) { - var f, obj = { - type: jspb.Message.getFieldWithDefault(msg, 1, 0), - account: jspb.Message.getFieldWithDefault(msg, 2, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.NewAddressRequest} - */ -proto.lnrpc.NewAddressRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.NewAddressRequest; - return proto.lnrpc.NewAddressRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.NewAddressRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.NewAddressRequest} - */ -proto.lnrpc.NewAddressRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!proto.lnrpc.AddressType} */ (reader.readEnum()); - msg.setType(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setAccount(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.NewAddressRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.NewAddressRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.NewAddressRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.NewAddressRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getType(); - if (f !== 0.0) { - writer.writeEnum( - 1, - f - ); - } - f = message.getAccount(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } -}; - - -/** - * optional AddressType type = 1; - * @return {!proto.lnrpc.AddressType} - */ -proto.lnrpc.NewAddressRequest.prototype.getType = function() { - return /** @type {!proto.lnrpc.AddressType} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {!proto.lnrpc.AddressType} value - * @return {!proto.lnrpc.NewAddressRequest} returns this - */ -proto.lnrpc.NewAddressRequest.prototype.setType = function(value) { - return jspb.Message.setProto3EnumField(this, 1, value); -}; - - -/** - * optional string account = 2; - * @return {string} - */ -proto.lnrpc.NewAddressRequest.prototype.getAccount = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.lnrpc.NewAddressRequest} returns this - */ -proto.lnrpc.NewAddressRequest.prototype.setAccount = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.NewAddressResponse.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.NewAddressResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.NewAddressResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.NewAddressResponse.toObject = function(includeInstance, msg) { - var f, obj = { - address: jspb.Message.getFieldWithDefault(msg, 1, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.NewAddressResponse} - */ -proto.lnrpc.NewAddressResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.NewAddressResponse; - return proto.lnrpc.NewAddressResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.NewAddressResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.NewAddressResponse} - */ -proto.lnrpc.NewAddressResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setAddress(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.NewAddressResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.NewAddressResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.NewAddressResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.NewAddressResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getAddress(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } -}; - - -/** - * optional string address = 1; - * @return {string} - */ -proto.lnrpc.NewAddressResponse.prototype.getAddress = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.lnrpc.NewAddressResponse} returns this - */ -proto.lnrpc.NewAddressResponse.prototype.setAddress = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.SignMessageRequest.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.SignMessageRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.SignMessageRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.SignMessageRequest.toObject = function(includeInstance, msg) { - var f, obj = { - msg: msg.getMsg_asB64(), - singleHash: jspb.Message.getBooleanFieldWithDefault(msg, 2, false) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.SignMessageRequest} - */ -proto.lnrpc.SignMessageRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.SignMessageRequest; - return proto.lnrpc.SignMessageRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.SignMessageRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.SignMessageRequest} - */ -proto.lnrpc.SignMessageRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setMsg(value); - break; - case 2: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setSingleHash(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.SignMessageRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.SignMessageRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.SignMessageRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.SignMessageRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getMsg_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getSingleHash(); - if (f) { - writer.writeBool( - 2, - f - ); - } -}; - - -/** - * optional bytes msg = 1; - * @return {!(string|Uint8Array)} - */ -proto.lnrpc.SignMessageRequest.prototype.getMsg = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes msg = 1; - * This is a type-conversion wrapper around `getMsg()` - * @return {string} - */ -proto.lnrpc.SignMessageRequest.prototype.getMsg_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getMsg())); -}; - - -/** - * optional bytes msg = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getMsg()` - * @return {!Uint8Array} - */ -proto.lnrpc.SignMessageRequest.prototype.getMsg_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getMsg())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.lnrpc.SignMessageRequest} returns this - */ -proto.lnrpc.SignMessageRequest.prototype.setMsg = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional bool single_hash = 2; - * @return {boolean} - */ -proto.lnrpc.SignMessageRequest.prototype.getSingleHash = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.lnrpc.SignMessageRequest} returns this - */ -proto.lnrpc.SignMessageRequest.prototype.setSingleHash = function(value) { - return jspb.Message.setProto3BooleanField(this, 2, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.SignMessageResponse.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.SignMessageResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.SignMessageResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.SignMessageResponse.toObject = function(includeInstance, msg) { - var f, obj = { - signature: jspb.Message.getFieldWithDefault(msg, 1, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.SignMessageResponse} - */ -proto.lnrpc.SignMessageResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.SignMessageResponse; - return proto.lnrpc.SignMessageResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.SignMessageResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.SignMessageResponse} - */ -proto.lnrpc.SignMessageResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setSignature(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.SignMessageResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.SignMessageResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.SignMessageResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.SignMessageResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getSignature(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } -}; - - -/** - * optional string signature = 1; - * @return {string} - */ -proto.lnrpc.SignMessageResponse.prototype.getSignature = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.lnrpc.SignMessageResponse} returns this - */ -proto.lnrpc.SignMessageResponse.prototype.setSignature = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.VerifyMessageRequest.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.VerifyMessageRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.VerifyMessageRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.VerifyMessageRequest.toObject = function(includeInstance, msg) { - var f, obj = { - msg: msg.getMsg_asB64(), - signature: jspb.Message.getFieldWithDefault(msg, 2, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.VerifyMessageRequest} - */ -proto.lnrpc.VerifyMessageRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.VerifyMessageRequest; - return proto.lnrpc.VerifyMessageRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.VerifyMessageRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.VerifyMessageRequest} - */ -proto.lnrpc.VerifyMessageRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setMsg(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setSignature(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.VerifyMessageRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.VerifyMessageRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.VerifyMessageRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.VerifyMessageRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getMsg_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getSignature(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } -}; - - -/** - * optional bytes msg = 1; - * @return {!(string|Uint8Array)} - */ -proto.lnrpc.VerifyMessageRequest.prototype.getMsg = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes msg = 1; - * This is a type-conversion wrapper around `getMsg()` - * @return {string} - */ -proto.lnrpc.VerifyMessageRequest.prototype.getMsg_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getMsg())); -}; - - -/** - * optional bytes msg = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getMsg()` - * @return {!Uint8Array} - */ -proto.lnrpc.VerifyMessageRequest.prototype.getMsg_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getMsg())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.lnrpc.VerifyMessageRequest} returns this - */ -proto.lnrpc.VerifyMessageRequest.prototype.setMsg = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional string signature = 2; - * @return {string} - */ -proto.lnrpc.VerifyMessageRequest.prototype.getSignature = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.lnrpc.VerifyMessageRequest} returns this - */ -proto.lnrpc.VerifyMessageRequest.prototype.setSignature = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.VerifyMessageResponse.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.VerifyMessageResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.VerifyMessageResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.VerifyMessageResponse.toObject = function(includeInstance, msg) { - var f, obj = { - valid: jspb.Message.getBooleanFieldWithDefault(msg, 1, false), - pubkey: jspb.Message.getFieldWithDefault(msg, 2, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.VerifyMessageResponse} - */ -proto.lnrpc.VerifyMessageResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.VerifyMessageResponse; - return proto.lnrpc.VerifyMessageResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.VerifyMessageResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.VerifyMessageResponse} - */ -proto.lnrpc.VerifyMessageResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setValid(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setPubkey(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.VerifyMessageResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.VerifyMessageResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.VerifyMessageResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.VerifyMessageResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getValid(); - if (f) { - writer.writeBool( - 1, - f - ); - } - f = message.getPubkey(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } -}; - - -/** - * optional bool valid = 1; - * @return {boolean} - */ -proto.lnrpc.VerifyMessageResponse.prototype.getValid = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.lnrpc.VerifyMessageResponse} returns this - */ -proto.lnrpc.VerifyMessageResponse.prototype.setValid = function(value) { - return jspb.Message.setProto3BooleanField(this, 1, value); -}; - - -/** - * optional string pubkey = 2; - * @return {string} - */ -proto.lnrpc.VerifyMessageResponse.prototype.getPubkey = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.lnrpc.VerifyMessageResponse} returns this - */ -proto.lnrpc.VerifyMessageResponse.prototype.setPubkey = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.ConnectPeerRequest.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.ConnectPeerRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.ConnectPeerRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.ConnectPeerRequest.toObject = function(includeInstance, msg) { - var f, obj = { - addr: (f = msg.getAddr()) && proto.lnrpc.LightningAddress.toObject(includeInstance, f), - perm: jspb.Message.getBooleanFieldWithDefault(msg, 2, false), - timeout: jspb.Message.getFieldWithDefault(msg, 3, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.ConnectPeerRequest} - */ -proto.lnrpc.ConnectPeerRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.ConnectPeerRequest; - return proto.lnrpc.ConnectPeerRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.ConnectPeerRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.ConnectPeerRequest} - */ -proto.lnrpc.ConnectPeerRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.lnrpc.LightningAddress; - reader.readMessage(value,proto.lnrpc.LightningAddress.deserializeBinaryFromReader); - msg.setAddr(value); - break; - case 2: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setPerm(value); - break; - case 3: - var value = /** @type {number} */ (reader.readUint64()); - msg.setTimeout(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.ConnectPeerRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.ConnectPeerRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.ConnectPeerRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.ConnectPeerRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getAddr(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.lnrpc.LightningAddress.serializeBinaryToWriter - ); - } - f = message.getPerm(); - if (f) { - writer.writeBool( - 2, - f - ); - } - f = message.getTimeout(); - if (f !== 0) { - writer.writeUint64( - 3, - f - ); - } -}; - - -/** - * optional LightningAddress addr = 1; - * @return {?proto.lnrpc.LightningAddress} - */ -proto.lnrpc.ConnectPeerRequest.prototype.getAddr = function() { - return /** @type{?proto.lnrpc.LightningAddress} */ ( - jspb.Message.getWrapperField(this, proto.lnrpc.LightningAddress, 1)); -}; - - -/** - * @param {?proto.lnrpc.LightningAddress|undefined} value - * @return {!proto.lnrpc.ConnectPeerRequest} returns this -*/ -proto.lnrpc.ConnectPeerRequest.prototype.setAddr = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.lnrpc.ConnectPeerRequest} returns this - */ -proto.lnrpc.ConnectPeerRequest.prototype.clearAddr = function() { - return this.setAddr(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.lnrpc.ConnectPeerRequest.prototype.hasAddr = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional bool perm = 2; - * @return {boolean} - */ -proto.lnrpc.ConnectPeerRequest.prototype.getPerm = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.lnrpc.ConnectPeerRequest} returns this - */ -proto.lnrpc.ConnectPeerRequest.prototype.setPerm = function(value) { - return jspb.Message.setProto3BooleanField(this, 2, value); -}; - - -/** - * optional uint64 timeout = 3; - * @return {number} - */ -proto.lnrpc.ConnectPeerRequest.prototype.getTimeout = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.ConnectPeerRequest} returns this - */ -proto.lnrpc.ConnectPeerRequest.prototype.setTimeout = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.ConnectPeerResponse.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.ConnectPeerResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.ConnectPeerResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.ConnectPeerResponse.toObject = function(includeInstance, msg) { - var f, obj = { - - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.ConnectPeerResponse} - */ -proto.lnrpc.ConnectPeerResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.ConnectPeerResponse; - return proto.lnrpc.ConnectPeerResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.ConnectPeerResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.ConnectPeerResponse} - */ -proto.lnrpc.ConnectPeerResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.ConnectPeerResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.ConnectPeerResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.ConnectPeerResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.ConnectPeerResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.DisconnectPeerRequest.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.DisconnectPeerRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.DisconnectPeerRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.DisconnectPeerRequest.toObject = function(includeInstance, msg) { - var f, obj = { - pubKey: jspb.Message.getFieldWithDefault(msg, 1, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.DisconnectPeerRequest} - */ -proto.lnrpc.DisconnectPeerRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.DisconnectPeerRequest; - return proto.lnrpc.DisconnectPeerRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.DisconnectPeerRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.DisconnectPeerRequest} - */ -proto.lnrpc.DisconnectPeerRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setPubKey(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.DisconnectPeerRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.DisconnectPeerRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.DisconnectPeerRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.DisconnectPeerRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getPubKey(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } -}; - - -/** - * optional string pub_key = 1; - * @return {string} - */ -proto.lnrpc.DisconnectPeerRequest.prototype.getPubKey = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.lnrpc.DisconnectPeerRequest} returns this - */ -proto.lnrpc.DisconnectPeerRequest.prototype.setPubKey = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.DisconnectPeerResponse.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.DisconnectPeerResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.DisconnectPeerResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.DisconnectPeerResponse.toObject = function(includeInstance, msg) { - var f, obj = { - - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.DisconnectPeerResponse} - */ -proto.lnrpc.DisconnectPeerResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.DisconnectPeerResponse; - return proto.lnrpc.DisconnectPeerResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.DisconnectPeerResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.DisconnectPeerResponse} - */ -proto.lnrpc.DisconnectPeerResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.DisconnectPeerResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.DisconnectPeerResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.DisconnectPeerResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.DisconnectPeerResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.HTLC.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.HTLC.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.HTLC} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.HTLC.toObject = function(includeInstance, msg) { - var f, obj = { - incoming: jspb.Message.getBooleanFieldWithDefault(msg, 1, false), - amount: jspb.Message.getFieldWithDefault(msg, 2, 0), - hashLock: msg.getHashLock_asB64(), - expirationHeight: jspb.Message.getFieldWithDefault(msg, 4, 0), - htlcIndex: jspb.Message.getFieldWithDefault(msg, 5, 0), - forwardingChannel: jspb.Message.getFieldWithDefault(msg, 6, 0), - forwardingHtlcIndex: jspb.Message.getFieldWithDefault(msg, 7, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.HTLC} - */ -proto.lnrpc.HTLC.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.HTLC; - return proto.lnrpc.HTLC.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.HTLC} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.HTLC} - */ -proto.lnrpc.HTLC.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setIncoming(value); - break; - case 2: - var value = /** @type {number} */ (reader.readInt64()); - msg.setAmount(value); - break; - case 3: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setHashLock(value); - break; - case 4: - var value = /** @type {number} */ (reader.readUint32()); - msg.setExpirationHeight(value); - break; - case 5: - var value = /** @type {number} */ (reader.readUint64()); - msg.setHtlcIndex(value); - break; - case 6: - var value = /** @type {number} */ (reader.readUint64()); - msg.setForwardingChannel(value); - break; - case 7: - var value = /** @type {number} */ (reader.readUint64()); - msg.setForwardingHtlcIndex(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.HTLC.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.HTLC.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.HTLC} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.HTLC.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getIncoming(); - if (f) { - writer.writeBool( - 1, - f - ); - } - f = message.getAmount(); - if (f !== 0) { - writer.writeInt64( - 2, - f - ); - } - f = message.getHashLock_asU8(); - if (f.length > 0) { - writer.writeBytes( - 3, - f - ); - } - f = message.getExpirationHeight(); - if (f !== 0) { - writer.writeUint32( - 4, - f - ); - } - f = message.getHtlcIndex(); - if (f !== 0) { - writer.writeUint64( - 5, - f - ); - } - f = message.getForwardingChannel(); - if (f !== 0) { - writer.writeUint64( - 6, - f - ); - } - f = message.getForwardingHtlcIndex(); - if (f !== 0) { - writer.writeUint64( - 7, - f - ); - } -}; - - -/** - * optional bool incoming = 1; - * @return {boolean} - */ -proto.lnrpc.HTLC.prototype.getIncoming = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.lnrpc.HTLC} returns this - */ -proto.lnrpc.HTLC.prototype.setIncoming = function(value) { - return jspb.Message.setProto3BooleanField(this, 1, value); -}; - - -/** - * optional int64 amount = 2; - * @return {number} - */ -proto.lnrpc.HTLC.prototype.getAmount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.HTLC} returns this - */ -proto.lnrpc.HTLC.prototype.setAmount = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * optional bytes hash_lock = 3; - * @return {!(string|Uint8Array)} - */ -proto.lnrpc.HTLC.prototype.getHashLock = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * optional bytes hash_lock = 3; - * This is a type-conversion wrapper around `getHashLock()` - * @return {string} - */ -proto.lnrpc.HTLC.prototype.getHashLock_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getHashLock())); -}; - - -/** - * optional bytes hash_lock = 3; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getHashLock()` - * @return {!Uint8Array} - */ -proto.lnrpc.HTLC.prototype.getHashLock_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getHashLock())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.lnrpc.HTLC} returns this - */ -proto.lnrpc.HTLC.prototype.setHashLock = function(value) { - return jspb.Message.setProto3BytesField(this, 3, value); -}; - - -/** - * optional uint32 expiration_height = 4; - * @return {number} - */ -proto.lnrpc.HTLC.prototype.getExpirationHeight = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.HTLC} returns this - */ -proto.lnrpc.HTLC.prototype.setExpirationHeight = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); -}; - - -/** - * optional uint64 htlc_index = 5; - * @return {number} - */ -proto.lnrpc.HTLC.prototype.getHtlcIndex = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.HTLC} returns this - */ -proto.lnrpc.HTLC.prototype.setHtlcIndex = function(value) { - return jspb.Message.setProto3IntField(this, 5, value); -}; - - -/** - * optional uint64 forwarding_channel = 6; - * @return {number} - */ -proto.lnrpc.HTLC.prototype.getForwardingChannel = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.HTLC} returns this - */ -proto.lnrpc.HTLC.prototype.setForwardingChannel = function(value) { - return jspb.Message.setProto3IntField(this, 6, value); -}; - - -/** - * optional uint64 forwarding_htlc_index = 7; - * @return {number} - */ -proto.lnrpc.HTLC.prototype.getForwardingHtlcIndex = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.HTLC} returns this - */ -proto.lnrpc.HTLC.prototype.setForwardingHtlcIndex = function(value) { - return jspb.Message.setProto3IntField(this, 7, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.ChannelConstraints.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.ChannelConstraints.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.ChannelConstraints} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.ChannelConstraints.toObject = function(includeInstance, msg) { - var f, obj = { - csvDelay: jspb.Message.getFieldWithDefault(msg, 1, 0), - chanReserveSat: jspb.Message.getFieldWithDefault(msg, 2, 0), - dustLimitSat: jspb.Message.getFieldWithDefault(msg, 3, 0), - maxPendingAmtMsat: jspb.Message.getFieldWithDefault(msg, 4, 0), - minHtlcMsat: jspb.Message.getFieldWithDefault(msg, 5, 0), - maxAcceptedHtlcs: jspb.Message.getFieldWithDefault(msg, 6, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.ChannelConstraints} - */ -proto.lnrpc.ChannelConstraints.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.ChannelConstraints; - return proto.lnrpc.ChannelConstraints.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.ChannelConstraints} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.ChannelConstraints} - */ -proto.lnrpc.ChannelConstraints.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readUint32()); - msg.setCsvDelay(value); - break; - case 2: - var value = /** @type {number} */ (reader.readUint64()); - msg.setChanReserveSat(value); - break; - case 3: - var value = /** @type {number} */ (reader.readUint64()); - msg.setDustLimitSat(value); - break; - case 4: - var value = /** @type {number} */ (reader.readUint64()); - msg.setMaxPendingAmtMsat(value); - break; - case 5: - var value = /** @type {number} */ (reader.readUint64()); - msg.setMinHtlcMsat(value); - break; - case 6: - var value = /** @type {number} */ (reader.readUint32()); - msg.setMaxAcceptedHtlcs(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.ChannelConstraints.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.ChannelConstraints.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.ChannelConstraints} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.ChannelConstraints.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getCsvDelay(); - if (f !== 0) { - writer.writeUint32( - 1, - f - ); - } - f = message.getChanReserveSat(); - if (f !== 0) { - writer.writeUint64( - 2, - f - ); - } - f = message.getDustLimitSat(); - if (f !== 0) { - writer.writeUint64( - 3, - f - ); - } - f = message.getMaxPendingAmtMsat(); - if (f !== 0) { - writer.writeUint64( - 4, - f - ); - } - f = message.getMinHtlcMsat(); - if (f !== 0) { - writer.writeUint64( - 5, - f - ); - } - f = message.getMaxAcceptedHtlcs(); - if (f !== 0) { - writer.writeUint32( - 6, - f - ); - } -}; - - -/** - * optional uint32 csv_delay = 1; - * @return {number} - */ -proto.lnrpc.ChannelConstraints.prototype.getCsvDelay = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.ChannelConstraints} returns this - */ -proto.lnrpc.ChannelConstraints.prototype.setCsvDelay = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); -}; - - -/** - * optional uint64 chan_reserve_sat = 2; - * @return {number} - */ -proto.lnrpc.ChannelConstraints.prototype.getChanReserveSat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.ChannelConstraints} returns this - */ -proto.lnrpc.ChannelConstraints.prototype.setChanReserveSat = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * optional uint64 dust_limit_sat = 3; - * @return {number} - */ -proto.lnrpc.ChannelConstraints.prototype.getDustLimitSat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.ChannelConstraints} returns this - */ -proto.lnrpc.ChannelConstraints.prototype.setDustLimitSat = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - -/** - * optional uint64 max_pending_amt_msat = 4; - * @return {number} - */ -proto.lnrpc.ChannelConstraints.prototype.getMaxPendingAmtMsat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.ChannelConstraints} returns this - */ -proto.lnrpc.ChannelConstraints.prototype.setMaxPendingAmtMsat = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); -}; - - -/** - * optional uint64 min_htlc_msat = 5; - * @return {number} - */ -proto.lnrpc.ChannelConstraints.prototype.getMinHtlcMsat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.ChannelConstraints} returns this - */ -proto.lnrpc.ChannelConstraints.prototype.setMinHtlcMsat = function(value) { - return jspb.Message.setProto3IntField(this, 5, value); -}; - - -/** - * optional uint32 max_accepted_htlcs = 6; - * @return {number} - */ -proto.lnrpc.ChannelConstraints.prototype.getMaxAcceptedHtlcs = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.ChannelConstraints} returns this - */ -proto.lnrpc.ChannelConstraints.prototype.setMaxAcceptedHtlcs = function(value) { - return jspb.Message.setProto3IntField(this, 6, value); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.lnrpc.Channel.repeatedFields_ = [15]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.Channel.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.Channel.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.Channel} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.Channel.toObject = function(includeInstance, msg) { - var f, obj = { - active: jspb.Message.getBooleanFieldWithDefault(msg, 1, false), - remotePubkey: jspb.Message.getFieldWithDefault(msg, 2, ""), - channelPoint: jspb.Message.getFieldWithDefault(msg, 3, ""), - chanId: jspb.Message.getFieldWithDefault(msg, 4, "0"), - capacity: jspb.Message.getFieldWithDefault(msg, 5, 0), - localBalance: jspb.Message.getFieldWithDefault(msg, 6, 0), - remoteBalance: jspb.Message.getFieldWithDefault(msg, 7, 0), - commitFee: jspb.Message.getFieldWithDefault(msg, 8, 0), - commitWeight: jspb.Message.getFieldWithDefault(msg, 9, 0), - feePerKw: jspb.Message.getFieldWithDefault(msg, 10, 0), - unsettledBalance: jspb.Message.getFieldWithDefault(msg, 11, 0), - totalSatoshisSent: jspb.Message.getFieldWithDefault(msg, 12, 0), - totalSatoshisReceived: jspb.Message.getFieldWithDefault(msg, 13, 0), - numUpdates: jspb.Message.getFieldWithDefault(msg, 14, 0), - pendingHtlcsList: jspb.Message.toObjectList(msg.getPendingHtlcsList(), - proto.lnrpc.HTLC.toObject, includeInstance), - csvDelay: jspb.Message.getFieldWithDefault(msg, 16, 0), - pb_private: jspb.Message.getBooleanFieldWithDefault(msg, 17, false), - initiator: jspb.Message.getBooleanFieldWithDefault(msg, 18, false), - chanStatusFlags: jspb.Message.getFieldWithDefault(msg, 19, ""), - localChanReserveSat: jspb.Message.getFieldWithDefault(msg, 20, 0), - remoteChanReserveSat: jspb.Message.getFieldWithDefault(msg, 21, 0), - staticRemoteKey: jspb.Message.getBooleanFieldWithDefault(msg, 22, false), - commitmentType: jspb.Message.getFieldWithDefault(msg, 26, 0), - lifetime: jspb.Message.getFieldWithDefault(msg, 23, 0), - uptime: jspb.Message.getFieldWithDefault(msg, 24, 0), - closeAddress: jspb.Message.getFieldWithDefault(msg, 25, ""), - pushAmountSat: jspb.Message.getFieldWithDefault(msg, 27, 0), - thawHeight: jspb.Message.getFieldWithDefault(msg, 28, 0), - localConstraints: (f = msg.getLocalConstraints()) && proto.lnrpc.ChannelConstraints.toObject(includeInstance, f), - remoteConstraints: (f = msg.getRemoteConstraints()) && proto.lnrpc.ChannelConstraints.toObject(includeInstance, f) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.Channel} - */ -proto.lnrpc.Channel.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.Channel; - return proto.lnrpc.Channel.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.Channel} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.Channel} - */ -proto.lnrpc.Channel.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setActive(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setRemotePubkey(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setChannelPoint(value); - break; - case 4: - var value = /** @type {string} */ (reader.readUint64String()); - msg.setChanId(value); - break; - case 5: - var value = /** @type {number} */ (reader.readInt64()); - msg.setCapacity(value); - break; - case 6: - var value = /** @type {number} */ (reader.readInt64()); - msg.setLocalBalance(value); - break; - case 7: - var value = /** @type {number} */ (reader.readInt64()); - msg.setRemoteBalance(value); - break; - case 8: - var value = /** @type {number} */ (reader.readInt64()); - msg.setCommitFee(value); - break; - case 9: - var value = /** @type {number} */ (reader.readInt64()); - msg.setCommitWeight(value); - break; - case 10: - var value = /** @type {number} */ (reader.readInt64()); - msg.setFeePerKw(value); - break; - case 11: - var value = /** @type {number} */ (reader.readInt64()); - msg.setUnsettledBalance(value); - break; - case 12: - var value = /** @type {number} */ (reader.readInt64()); - msg.setTotalSatoshisSent(value); - break; - case 13: - var value = /** @type {number} */ (reader.readInt64()); - msg.setTotalSatoshisReceived(value); - break; - case 14: - var value = /** @type {number} */ (reader.readUint64()); - msg.setNumUpdates(value); - break; - case 15: - var value = new proto.lnrpc.HTLC; - reader.readMessage(value,proto.lnrpc.HTLC.deserializeBinaryFromReader); - msg.addPendingHtlcs(value); - break; - case 16: - var value = /** @type {number} */ (reader.readUint32()); - msg.setCsvDelay(value); - break; - case 17: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setPrivate(value); - break; - case 18: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setInitiator(value); - break; - case 19: - var value = /** @type {string} */ (reader.readString()); - msg.setChanStatusFlags(value); - break; - case 20: - var value = /** @type {number} */ (reader.readInt64()); - msg.setLocalChanReserveSat(value); - break; - case 21: - var value = /** @type {number} */ (reader.readInt64()); - msg.setRemoteChanReserveSat(value); - break; - case 22: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setStaticRemoteKey(value); - break; - case 26: - var value = /** @type {!proto.lnrpc.CommitmentType} */ (reader.readEnum()); - msg.setCommitmentType(value); - break; - case 23: - var value = /** @type {number} */ (reader.readInt64()); - msg.setLifetime(value); - break; - case 24: - var value = /** @type {number} */ (reader.readInt64()); - msg.setUptime(value); - break; - case 25: - var value = /** @type {string} */ (reader.readString()); - msg.setCloseAddress(value); - break; - case 27: - var value = /** @type {number} */ (reader.readUint64()); - msg.setPushAmountSat(value); - break; - case 28: - var value = /** @type {number} */ (reader.readUint32()); - msg.setThawHeight(value); - break; - case 29: - var value = new proto.lnrpc.ChannelConstraints; - reader.readMessage(value,proto.lnrpc.ChannelConstraints.deserializeBinaryFromReader); - msg.setLocalConstraints(value); - break; - case 30: - var value = new proto.lnrpc.ChannelConstraints; - reader.readMessage(value,proto.lnrpc.ChannelConstraints.deserializeBinaryFromReader); - msg.setRemoteConstraints(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.Channel.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.Channel.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.Channel} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.Channel.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getActive(); - if (f) { - writer.writeBool( - 1, - f - ); - } - f = message.getRemotePubkey(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getChannelPoint(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } - f = message.getChanId(); - if (parseInt(f, 10) !== 0) { - writer.writeUint64String( - 4, - f - ); - } - f = message.getCapacity(); - if (f !== 0) { - writer.writeInt64( - 5, - f - ); - } - f = message.getLocalBalance(); - if (f !== 0) { - writer.writeInt64( - 6, - f - ); - } - f = message.getRemoteBalance(); - if (f !== 0) { - writer.writeInt64( - 7, - f - ); - } - f = message.getCommitFee(); - if (f !== 0) { - writer.writeInt64( - 8, - f - ); - } - f = message.getCommitWeight(); - if (f !== 0) { - writer.writeInt64( - 9, - f - ); - } - f = message.getFeePerKw(); - if (f !== 0) { - writer.writeInt64( - 10, - f - ); - } - f = message.getUnsettledBalance(); - if (f !== 0) { - writer.writeInt64( - 11, - f - ); - } - f = message.getTotalSatoshisSent(); - if (f !== 0) { - writer.writeInt64( - 12, - f - ); - } - f = message.getTotalSatoshisReceived(); - if (f !== 0) { - writer.writeInt64( - 13, - f - ); - } - f = message.getNumUpdates(); - if (f !== 0) { - writer.writeUint64( - 14, - f - ); - } - f = message.getPendingHtlcsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 15, - f, - proto.lnrpc.HTLC.serializeBinaryToWriter - ); - } - f = message.getCsvDelay(); - if (f !== 0) { - writer.writeUint32( - 16, - f - ); - } - f = message.getPrivate(); - if (f) { - writer.writeBool( - 17, - f - ); - } - f = message.getInitiator(); - if (f) { - writer.writeBool( - 18, - f - ); - } - f = message.getChanStatusFlags(); - if (f.length > 0) { - writer.writeString( - 19, - f - ); - } - f = message.getLocalChanReserveSat(); - if (f !== 0) { - writer.writeInt64( - 20, - f - ); - } - f = message.getRemoteChanReserveSat(); - if (f !== 0) { - writer.writeInt64( - 21, - f - ); - } - f = message.getStaticRemoteKey(); - if (f) { - writer.writeBool( - 22, - f - ); - } - f = message.getCommitmentType(); - if (f !== 0.0) { - writer.writeEnum( - 26, - f - ); - } - f = message.getLifetime(); - if (f !== 0) { - writer.writeInt64( - 23, - f - ); - } - f = message.getUptime(); - if (f !== 0) { - writer.writeInt64( - 24, - f - ); - } - f = message.getCloseAddress(); - if (f.length > 0) { - writer.writeString( - 25, - f - ); - } - f = message.getPushAmountSat(); - if (f !== 0) { - writer.writeUint64( - 27, - f - ); - } - f = message.getThawHeight(); - if (f !== 0) { - writer.writeUint32( - 28, - f - ); - } - f = message.getLocalConstraints(); - if (f != null) { - writer.writeMessage( - 29, - f, - proto.lnrpc.ChannelConstraints.serializeBinaryToWriter - ); - } - f = message.getRemoteConstraints(); - if (f != null) { - writer.writeMessage( - 30, - f, - proto.lnrpc.ChannelConstraints.serializeBinaryToWriter - ); - } -}; - - -/** - * optional bool active = 1; - * @return {boolean} - */ -proto.lnrpc.Channel.prototype.getActive = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.lnrpc.Channel} returns this - */ -proto.lnrpc.Channel.prototype.setActive = function(value) { - return jspb.Message.setProto3BooleanField(this, 1, value); -}; - - -/** - * optional string remote_pubkey = 2; - * @return {string} - */ -proto.lnrpc.Channel.prototype.getRemotePubkey = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.lnrpc.Channel} returns this - */ -proto.lnrpc.Channel.prototype.setRemotePubkey = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional string channel_point = 3; - * @return {string} - */ -proto.lnrpc.Channel.prototype.getChannelPoint = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * @param {string} value - * @return {!proto.lnrpc.Channel} returns this - */ -proto.lnrpc.Channel.prototype.setChannelPoint = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); -}; - - -/** - * optional uint64 chan_id = 4; - * @return {string} - */ -proto.lnrpc.Channel.prototype.getChanId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "0")); -}; - - -/** - * @param {string} value - * @return {!proto.lnrpc.Channel} returns this - */ -proto.lnrpc.Channel.prototype.setChanId = function(value) { - return jspb.Message.setProto3StringIntField(this, 4, value); -}; - - -/** - * optional int64 capacity = 5; - * @return {number} - */ -proto.lnrpc.Channel.prototype.getCapacity = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.Channel} returns this - */ -proto.lnrpc.Channel.prototype.setCapacity = function(value) { - return jspb.Message.setProto3IntField(this, 5, value); -}; - - -/** - * optional int64 local_balance = 6; - * @return {number} - */ -proto.lnrpc.Channel.prototype.getLocalBalance = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.Channel} returns this - */ -proto.lnrpc.Channel.prototype.setLocalBalance = function(value) { - return jspb.Message.setProto3IntField(this, 6, value); -}; - - -/** - * optional int64 remote_balance = 7; - * @return {number} - */ -proto.lnrpc.Channel.prototype.getRemoteBalance = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.Channel} returns this - */ -proto.lnrpc.Channel.prototype.setRemoteBalance = function(value) { - return jspb.Message.setProto3IntField(this, 7, value); -}; - - -/** - * optional int64 commit_fee = 8; - * @return {number} - */ -proto.lnrpc.Channel.prototype.getCommitFee = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.Channel} returns this - */ -proto.lnrpc.Channel.prototype.setCommitFee = function(value) { - return jspb.Message.setProto3IntField(this, 8, value); -}; - - -/** - * optional int64 commit_weight = 9; - * @return {number} - */ -proto.lnrpc.Channel.prototype.getCommitWeight = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.Channel} returns this - */ -proto.lnrpc.Channel.prototype.setCommitWeight = function(value) { - return jspb.Message.setProto3IntField(this, 9, value); -}; - - -/** - * optional int64 fee_per_kw = 10; - * @return {number} - */ -proto.lnrpc.Channel.prototype.getFeePerKw = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 10, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.Channel} returns this - */ -proto.lnrpc.Channel.prototype.setFeePerKw = function(value) { - return jspb.Message.setProto3IntField(this, 10, value); -}; - - -/** - * optional int64 unsettled_balance = 11; - * @return {number} - */ -proto.lnrpc.Channel.prototype.getUnsettledBalance = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 11, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.Channel} returns this - */ -proto.lnrpc.Channel.prototype.setUnsettledBalance = function(value) { - return jspb.Message.setProto3IntField(this, 11, value); -}; - - -/** - * optional int64 total_satoshis_sent = 12; - * @return {number} - */ -proto.lnrpc.Channel.prototype.getTotalSatoshisSent = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 12, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.Channel} returns this - */ -proto.lnrpc.Channel.prototype.setTotalSatoshisSent = function(value) { - return jspb.Message.setProto3IntField(this, 12, value); -}; - - -/** - * optional int64 total_satoshis_received = 13; - * @return {number} - */ -proto.lnrpc.Channel.prototype.getTotalSatoshisReceived = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 13, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.Channel} returns this - */ -proto.lnrpc.Channel.prototype.setTotalSatoshisReceived = function(value) { - return jspb.Message.setProto3IntField(this, 13, value); -}; - - -/** - * optional uint64 num_updates = 14; - * @return {number} - */ -proto.lnrpc.Channel.prototype.getNumUpdates = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 14, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.Channel} returns this - */ -proto.lnrpc.Channel.prototype.setNumUpdates = function(value) { - return jspb.Message.setProto3IntField(this, 14, value); -}; - - -/** - * repeated HTLC pending_htlcs = 15; - * @return {!Array} - */ -proto.lnrpc.Channel.prototype.getPendingHtlcsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.HTLC, 15)); -}; - - -/** - * @param {!Array} value - * @return {!proto.lnrpc.Channel} returns this -*/ -proto.lnrpc.Channel.prototype.setPendingHtlcsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 15, value); -}; - - -/** - * @param {!proto.lnrpc.HTLC=} opt_value - * @param {number=} opt_index - * @return {!proto.lnrpc.HTLC} - */ -proto.lnrpc.Channel.prototype.addPendingHtlcs = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 15, opt_value, proto.lnrpc.HTLC, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.lnrpc.Channel} returns this - */ -proto.lnrpc.Channel.prototype.clearPendingHtlcsList = function() { - return this.setPendingHtlcsList([]); -}; - - -/** - * optional uint32 csv_delay = 16; - * @return {number} - */ -proto.lnrpc.Channel.prototype.getCsvDelay = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 16, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.Channel} returns this - */ -proto.lnrpc.Channel.prototype.setCsvDelay = function(value) { - return jspb.Message.setProto3IntField(this, 16, value); -}; - - -/** - * optional bool private = 17; - * @return {boolean} - */ -proto.lnrpc.Channel.prototype.getPrivate = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 17, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.lnrpc.Channel} returns this - */ -proto.lnrpc.Channel.prototype.setPrivate = function(value) { - return jspb.Message.setProto3BooleanField(this, 17, value); -}; - - -/** - * optional bool initiator = 18; - * @return {boolean} - */ -proto.lnrpc.Channel.prototype.getInitiator = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 18, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.lnrpc.Channel} returns this - */ -proto.lnrpc.Channel.prototype.setInitiator = function(value) { - return jspb.Message.setProto3BooleanField(this, 18, value); -}; - - -/** - * optional string chan_status_flags = 19; - * @return {string} - */ -proto.lnrpc.Channel.prototype.getChanStatusFlags = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 19, "")); -}; - - -/** - * @param {string} value - * @return {!proto.lnrpc.Channel} returns this - */ -proto.lnrpc.Channel.prototype.setChanStatusFlags = function(value) { - return jspb.Message.setProto3StringField(this, 19, value); -}; - - -/** - * optional int64 local_chan_reserve_sat = 20; - * @return {number} - */ -proto.lnrpc.Channel.prototype.getLocalChanReserveSat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 20, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.Channel} returns this - */ -proto.lnrpc.Channel.prototype.setLocalChanReserveSat = function(value) { - return jspb.Message.setProto3IntField(this, 20, value); -}; - - -/** - * optional int64 remote_chan_reserve_sat = 21; - * @return {number} - */ -proto.lnrpc.Channel.prototype.getRemoteChanReserveSat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 21, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.Channel} returns this - */ -proto.lnrpc.Channel.prototype.setRemoteChanReserveSat = function(value) { - return jspb.Message.setProto3IntField(this, 21, value); -}; - - -/** - * optional bool static_remote_key = 22; - * @return {boolean} - */ -proto.lnrpc.Channel.prototype.getStaticRemoteKey = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 22, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.lnrpc.Channel} returns this - */ -proto.lnrpc.Channel.prototype.setStaticRemoteKey = function(value) { - return jspb.Message.setProto3BooleanField(this, 22, value); -}; - - -/** - * optional CommitmentType commitment_type = 26; - * @return {!proto.lnrpc.CommitmentType} - */ -proto.lnrpc.Channel.prototype.getCommitmentType = function() { - return /** @type {!proto.lnrpc.CommitmentType} */ (jspb.Message.getFieldWithDefault(this, 26, 0)); -}; - - -/** - * @param {!proto.lnrpc.CommitmentType} value - * @return {!proto.lnrpc.Channel} returns this - */ -proto.lnrpc.Channel.prototype.setCommitmentType = function(value) { - return jspb.Message.setProto3EnumField(this, 26, value); -}; - - -/** - * optional int64 lifetime = 23; - * @return {number} - */ -proto.lnrpc.Channel.prototype.getLifetime = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 23, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.Channel} returns this - */ -proto.lnrpc.Channel.prototype.setLifetime = function(value) { - return jspb.Message.setProto3IntField(this, 23, value); -}; - - -/** - * optional int64 uptime = 24; - * @return {number} - */ -proto.lnrpc.Channel.prototype.getUptime = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 24, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.Channel} returns this - */ -proto.lnrpc.Channel.prototype.setUptime = function(value) { - return jspb.Message.setProto3IntField(this, 24, value); -}; - - -/** - * optional string close_address = 25; - * @return {string} - */ -proto.lnrpc.Channel.prototype.getCloseAddress = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 25, "")); -}; - - -/** - * @param {string} value - * @return {!proto.lnrpc.Channel} returns this - */ -proto.lnrpc.Channel.prototype.setCloseAddress = function(value) { - return jspb.Message.setProto3StringField(this, 25, value); -}; - - -/** - * optional uint64 push_amount_sat = 27; - * @return {number} - */ -proto.lnrpc.Channel.prototype.getPushAmountSat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 27, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.Channel} returns this - */ -proto.lnrpc.Channel.prototype.setPushAmountSat = function(value) { - return jspb.Message.setProto3IntField(this, 27, value); -}; - - -/** - * optional uint32 thaw_height = 28; - * @return {number} - */ -proto.lnrpc.Channel.prototype.getThawHeight = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 28, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.Channel} returns this - */ -proto.lnrpc.Channel.prototype.setThawHeight = function(value) { - return jspb.Message.setProto3IntField(this, 28, value); -}; - - -/** - * optional ChannelConstraints local_constraints = 29; - * @return {?proto.lnrpc.ChannelConstraints} - */ -proto.lnrpc.Channel.prototype.getLocalConstraints = function() { - return /** @type{?proto.lnrpc.ChannelConstraints} */ ( - jspb.Message.getWrapperField(this, proto.lnrpc.ChannelConstraints, 29)); -}; - - -/** - * @param {?proto.lnrpc.ChannelConstraints|undefined} value - * @return {!proto.lnrpc.Channel} returns this -*/ -proto.lnrpc.Channel.prototype.setLocalConstraints = function(value) { - return jspb.Message.setWrapperField(this, 29, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.lnrpc.Channel} returns this - */ -proto.lnrpc.Channel.prototype.clearLocalConstraints = function() { - return this.setLocalConstraints(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.lnrpc.Channel.prototype.hasLocalConstraints = function() { - return jspb.Message.getField(this, 29) != null; -}; - - -/** - * optional ChannelConstraints remote_constraints = 30; - * @return {?proto.lnrpc.ChannelConstraints} - */ -proto.lnrpc.Channel.prototype.getRemoteConstraints = function() { - return /** @type{?proto.lnrpc.ChannelConstraints} */ ( - jspb.Message.getWrapperField(this, proto.lnrpc.ChannelConstraints, 30)); -}; - - -/** - * @param {?proto.lnrpc.ChannelConstraints|undefined} value - * @return {!proto.lnrpc.Channel} returns this -*/ -proto.lnrpc.Channel.prototype.setRemoteConstraints = function(value) { - return jspb.Message.setWrapperField(this, 30, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.lnrpc.Channel} returns this - */ -proto.lnrpc.Channel.prototype.clearRemoteConstraints = function() { - return this.setRemoteConstraints(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.lnrpc.Channel.prototype.hasRemoteConstraints = function() { - return jspb.Message.getField(this, 30) != null; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.ListChannelsRequest.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.ListChannelsRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.ListChannelsRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.ListChannelsRequest.toObject = function(includeInstance, msg) { - var f, obj = { - activeOnly: jspb.Message.getBooleanFieldWithDefault(msg, 1, false), - inactiveOnly: jspb.Message.getBooleanFieldWithDefault(msg, 2, false), - publicOnly: jspb.Message.getBooleanFieldWithDefault(msg, 3, false), - privateOnly: jspb.Message.getBooleanFieldWithDefault(msg, 4, false), - peer: msg.getPeer_asB64() - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.ListChannelsRequest} - */ -proto.lnrpc.ListChannelsRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.ListChannelsRequest; - return proto.lnrpc.ListChannelsRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.ListChannelsRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.ListChannelsRequest} - */ -proto.lnrpc.ListChannelsRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setActiveOnly(value); - break; - case 2: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setInactiveOnly(value); - break; - case 3: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setPublicOnly(value); - break; - case 4: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setPrivateOnly(value); - break; - case 5: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setPeer(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.ListChannelsRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.ListChannelsRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.ListChannelsRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.ListChannelsRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getActiveOnly(); - if (f) { - writer.writeBool( - 1, - f - ); - } - f = message.getInactiveOnly(); - if (f) { - writer.writeBool( - 2, - f - ); - } - f = message.getPublicOnly(); - if (f) { - writer.writeBool( - 3, - f - ); - } - f = message.getPrivateOnly(); - if (f) { - writer.writeBool( - 4, - f - ); - } - f = message.getPeer_asU8(); - if (f.length > 0) { - writer.writeBytes( - 5, - f - ); - } -}; - - -/** - * optional bool active_only = 1; - * @return {boolean} - */ -proto.lnrpc.ListChannelsRequest.prototype.getActiveOnly = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.lnrpc.ListChannelsRequest} returns this - */ -proto.lnrpc.ListChannelsRequest.prototype.setActiveOnly = function(value) { - return jspb.Message.setProto3BooleanField(this, 1, value); -}; - - -/** - * optional bool inactive_only = 2; - * @return {boolean} - */ -proto.lnrpc.ListChannelsRequest.prototype.getInactiveOnly = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.lnrpc.ListChannelsRequest} returns this - */ -proto.lnrpc.ListChannelsRequest.prototype.setInactiveOnly = function(value) { - return jspb.Message.setProto3BooleanField(this, 2, value); -}; - - -/** - * optional bool public_only = 3; - * @return {boolean} - */ -proto.lnrpc.ListChannelsRequest.prototype.getPublicOnly = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.lnrpc.ListChannelsRequest} returns this - */ -proto.lnrpc.ListChannelsRequest.prototype.setPublicOnly = function(value) { - return jspb.Message.setProto3BooleanField(this, 3, value); -}; - - -/** - * optional bool private_only = 4; - * @return {boolean} - */ -proto.lnrpc.ListChannelsRequest.prototype.getPrivateOnly = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 4, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.lnrpc.ListChannelsRequest} returns this - */ -proto.lnrpc.ListChannelsRequest.prototype.setPrivateOnly = function(value) { - return jspb.Message.setProto3BooleanField(this, 4, value); -}; - - -/** - * optional bytes peer = 5; - * @return {!(string|Uint8Array)} - */ -proto.lnrpc.ListChannelsRequest.prototype.getPeer = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 5, "")); -}; - - -/** - * optional bytes peer = 5; - * This is a type-conversion wrapper around `getPeer()` - * @return {string} - */ -proto.lnrpc.ListChannelsRequest.prototype.getPeer_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getPeer())); -}; - - -/** - * optional bytes peer = 5; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getPeer()` - * @return {!Uint8Array} - */ -proto.lnrpc.ListChannelsRequest.prototype.getPeer_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getPeer())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.lnrpc.ListChannelsRequest} returns this - */ -proto.lnrpc.ListChannelsRequest.prototype.setPeer = function(value) { - return jspb.Message.setProto3BytesField(this, 5, value); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.lnrpc.ListChannelsResponse.repeatedFields_ = [11]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.ListChannelsResponse.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.ListChannelsResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.ListChannelsResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.ListChannelsResponse.toObject = function(includeInstance, msg) { - var f, obj = { - channelsList: jspb.Message.toObjectList(msg.getChannelsList(), - proto.lnrpc.Channel.toObject, includeInstance) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.ListChannelsResponse} - */ -proto.lnrpc.ListChannelsResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.ListChannelsResponse; - return proto.lnrpc.ListChannelsResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.ListChannelsResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.ListChannelsResponse} - */ -proto.lnrpc.ListChannelsResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 11: - var value = new proto.lnrpc.Channel; - reader.readMessage(value,proto.lnrpc.Channel.deserializeBinaryFromReader); - msg.addChannels(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.ListChannelsResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.ListChannelsResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.ListChannelsResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.ListChannelsResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getChannelsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 11, - f, - proto.lnrpc.Channel.serializeBinaryToWriter - ); - } -}; - - -/** - * repeated Channel channels = 11; - * @return {!Array} - */ -proto.lnrpc.ListChannelsResponse.prototype.getChannelsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.Channel, 11)); -}; - - -/** - * @param {!Array} value - * @return {!proto.lnrpc.ListChannelsResponse} returns this -*/ -proto.lnrpc.ListChannelsResponse.prototype.setChannelsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 11, value); -}; - - -/** - * @param {!proto.lnrpc.Channel=} opt_value - * @param {number=} opt_index - * @return {!proto.lnrpc.Channel} - */ -proto.lnrpc.ListChannelsResponse.prototype.addChannels = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 11, opt_value, proto.lnrpc.Channel, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.lnrpc.ListChannelsResponse} returns this - */ -proto.lnrpc.ListChannelsResponse.prototype.clearChannelsList = function() { - return this.setChannelsList([]); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.lnrpc.ChannelCloseSummary.repeatedFields_ = [13]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.ChannelCloseSummary.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.ChannelCloseSummary.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.ChannelCloseSummary} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.ChannelCloseSummary.toObject = function(includeInstance, msg) { - var f, obj = { - channelPoint: jspb.Message.getFieldWithDefault(msg, 1, ""), - chanId: jspb.Message.getFieldWithDefault(msg, 2, "0"), - chainHash: jspb.Message.getFieldWithDefault(msg, 3, ""), - closingTxHash: jspb.Message.getFieldWithDefault(msg, 4, ""), - remotePubkey: jspb.Message.getFieldWithDefault(msg, 5, ""), - capacity: jspb.Message.getFieldWithDefault(msg, 6, 0), - closeHeight: jspb.Message.getFieldWithDefault(msg, 7, 0), - settledBalance: jspb.Message.getFieldWithDefault(msg, 8, 0), - timeLockedBalance: jspb.Message.getFieldWithDefault(msg, 9, 0), - closeType: jspb.Message.getFieldWithDefault(msg, 10, 0), - openInitiator: jspb.Message.getFieldWithDefault(msg, 11, 0), - closeInitiator: jspb.Message.getFieldWithDefault(msg, 12, 0), - resolutionsList: jspb.Message.toObjectList(msg.getResolutionsList(), - proto.lnrpc.Resolution.toObject, includeInstance) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.ChannelCloseSummary} - */ -proto.lnrpc.ChannelCloseSummary.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.ChannelCloseSummary; - return proto.lnrpc.ChannelCloseSummary.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.ChannelCloseSummary} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.ChannelCloseSummary} - */ -proto.lnrpc.ChannelCloseSummary.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setChannelPoint(value); - break; - case 2: - var value = /** @type {string} */ (reader.readUint64String()); - msg.setChanId(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setChainHash(value); - break; - case 4: - var value = /** @type {string} */ (reader.readString()); - msg.setClosingTxHash(value); - break; - case 5: - var value = /** @type {string} */ (reader.readString()); - msg.setRemotePubkey(value); - break; - case 6: - var value = /** @type {number} */ (reader.readInt64()); - msg.setCapacity(value); - break; - case 7: - var value = /** @type {number} */ (reader.readUint32()); - msg.setCloseHeight(value); - break; - case 8: - var value = /** @type {number} */ (reader.readInt64()); - msg.setSettledBalance(value); - break; - case 9: - var value = /** @type {number} */ (reader.readInt64()); - msg.setTimeLockedBalance(value); - break; - case 10: - var value = /** @type {!proto.lnrpc.ChannelCloseSummary.ClosureType} */ (reader.readEnum()); - msg.setCloseType(value); - break; - case 11: - var value = /** @type {!proto.lnrpc.Initiator} */ (reader.readEnum()); - msg.setOpenInitiator(value); - break; - case 12: - var value = /** @type {!proto.lnrpc.Initiator} */ (reader.readEnum()); - msg.setCloseInitiator(value); - break; - case 13: - var value = new proto.lnrpc.Resolution; - reader.readMessage(value,proto.lnrpc.Resolution.deserializeBinaryFromReader); - msg.addResolutions(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.ChannelCloseSummary.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.ChannelCloseSummary.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.ChannelCloseSummary} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.ChannelCloseSummary.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getChannelPoint(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getChanId(); - if (parseInt(f, 10) !== 0) { - writer.writeUint64String( - 2, - f - ); - } - f = message.getChainHash(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } - f = message.getClosingTxHash(); - if (f.length > 0) { - writer.writeString( - 4, - f - ); - } - f = message.getRemotePubkey(); - if (f.length > 0) { - writer.writeString( - 5, - f - ); - } - f = message.getCapacity(); - if (f !== 0) { - writer.writeInt64( - 6, - f - ); - } - f = message.getCloseHeight(); - if (f !== 0) { - writer.writeUint32( - 7, - f - ); - } - f = message.getSettledBalance(); - if (f !== 0) { - writer.writeInt64( - 8, - f - ); - } - f = message.getTimeLockedBalance(); - if (f !== 0) { - writer.writeInt64( - 9, - f - ); - } - f = message.getCloseType(); - if (f !== 0.0) { - writer.writeEnum( - 10, - f - ); - } - f = message.getOpenInitiator(); - if (f !== 0.0) { - writer.writeEnum( - 11, - f - ); - } - f = message.getCloseInitiator(); - if (f !== 0.0) { - writer.writeEnum( - 12, - f - ); - } - f = message.getResolutionsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 13, - f, - proto.lnrpc.Resolution.serializeBinaryToWriter - ); - } -}; - - -/** - * @enum {number} - */ -proto.lnrpc.ChannelCloseSummary.ClosureType = { - COOPERATIVE_CLOSE: 0, - LOCAL_FORCE_CLOSE: 1, - REMOTE_FORCE_CLOSE: 2, - BREACH_CLOSE: 3, - FUNDING_CANCELED: 4, - ABANDONED: 5 -}; - -/** - * optional string channel_point = 1; - * @return {string} - */ -proto.lnrpc.ChannelCloseSummary.prototype.getChannelPoint = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.lnrpc.ChannelCloseSummary} returns this - */ -proto.lnrpc.ChannelCloseSummary.prototype.setChannelPoint = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional uint64 chan_id = 2; - * @return {string} - */ -proto.lnrpc.ChannelCloseSummary.prototype.getChanId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "0")); -}; - - -/** - * @param {string} value - * @return {!proto.lnrpc.ChannelCloseSummary} returns this - */ -proto.lnrpc.ChannelCloseSummary.prototype.setChanId = function(value) { - return jspb.Message.setProto3StringIntField(this, 2, value); -}; - - -/** - * optional string chain_hash = 3; - * @return {string} - */ -proto.lnrpc.ChannelCloseSummary.prototype.getChainHash = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * @param {string} value - * @return {!proto.lnrpc.ChannelCloseSummary} returns this - */ -proto.lnrpc.ChannelCloseSummary.prototype.setChainHash = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); -}; - - -/** - * optional string closing_tx_hash = 4; - * @return {string} - */ -proto.lnrpc.ChannelCloseSummary.prototype.getClosingTxHash = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); -}; - - -/** - * @param {string} value - * @return {!proto.lnrpc.ChannelCloseSummary} returns this - */ -proto.lnrpc.ChannelCloseSummary.prototype.setClosingTxHash = function(value) { - return jspb.Message.setProto3StringField(this, 4, value); -}; - - -/** - * optional string remote_pubkey = 5; - * @return {string} - */ -proto.lnrpc.ChannelCloseSummary.prototype.getRemotePubkey = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); -}; - - -/** - * @param {string} value - * @return {!proto.lnrpc.ChannelCloseSummary} returns this - */ -proto.lnrpc.ChannelCloseSummary.prototype.setRemotePubkey = function(value) { - return jspb.Message.setProto3StringField(this, 5, value); -}; - - -/** - * optional int64 capacity = 6; - * @return {number} - */ -proto.lnrpc.ChannelCloseSummary.prototype.getCapacity = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.ChannelCloseSummary} returns this - */ -proto.lnrpc.ChannelCloseSummary.prototype.setCapacity = function(value) { - return jspb.Message.setProto3IntField(this, 6, value); -}; - - -/** - * optional uint32 close_height = 7; - * @return {number} - */ -proto.lnrpc.ChannelCloseSummary.prototype.getCloseHeight = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.ChannelCloseSummary} returns this - */ -proto.lnrpc.ChannelCloseSummary.prototype.setCloseHeight = function(value) { - return jspb.Message.setProto3IntField(this, 7, value); -}; - - -/** - * optional int64 settled_balance = 8; - * @return {number} - */ -proto.lnrpc.ChannelCloseSummary.prototype.getSettledBalance = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.ChannelCloseSummary} returns this - */ -proto.lnrpc.ChannelCloseSummary.prototype.setSettledBalance = function(value) { - return jspb.Message.setProto3IntField(this, 8, value); -}; - - -/** - * optional int64 time_locked_balance = 9; - * @return {number} - */ -proto.lnrpc.ChannelCloseSummary.prototype.getTimeLockedBalance = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.ChannelCloseSummary} returns this - */ -proto.lnrpc.ChannelCloseSummary.prototype.setTimeLockedBalance = function(value) { - return jspb.Message.setProto3IntField(this, 9, value); -}; - - -/** - * optional ClosureType close_type = 10; - * @return {!proto.lnrpc.ChannelCloseSummary.ClosureType} - */ -proto.lnrpc.ChannelCloseSummary.prototype.getCloseType = function() { - return /** @type {!proto.lnrpc.ChannelCloseSummary.ClosureType} */ (jspb.Message.getFieldWithDefault(this, 10, 0)); -}; - - -/** - * @param {!proto.lnrpc.ChannelCloseSummary.ClosureType} value - * @return {!proto.lnrpc.ChannelCloseSummary} returns this - */ -proto.lnrpc.ChannelCloseSummary.prototype.setCloseType = function(value) { - return jspb.Message.setProto3EnumField(this, 10, value); -}; - - -/** - * optional Initiator open_initiator = 11; - * @return {!proto.lnrpc.Initiator} - */ -proto.lnrpc.ChannelCloseSummary.prototype.getOpenInitiator = function() { - return /** @type {!proto.lnrpc.Initiator} */ (jspb.Message.getFieldWithDefault(this, 11, 0)); -}; - - -/** - * @param {!proto.lnrpc.Initiator} value - * @return {!proto.lnrpc.ChannelCloseSummary} returns this - */ -proto.lnrpc.ChannelCloseSummary.prototype.setOpenInitiator = function(value) { - return jspb.Message.setProto3EnumField(this, 11, value); -}; - - -/** - * optional Initiator close_initiator = 12; - * @return {!proto.lnrpc.Initiator} - */ -proto.lnrpc.ChannelCloseSummary.prototype.getCloseInitiator = function() { - return /** @type {!proto.lnrpc.Initiator} */ (jspb.Message.getFieldWithDefault(this, 12, 0)); -}; - - -/** - * @param {!proto.lnrpc.Initiator} value - * @return {!proto.lnrpc.ChannelCloseSummary} returns this - */ -proto.lnrpc.ChannelCloseSummary.prototype.setCloseInitiator = function(value) { - return jspb.Message.setProto3EnumField(this, 12, value); -}; - - -/** - * repeated Resolution resolutions = 13; - * @return {!Array} - */ -proto.lnrpc.ChannelCloseSummary.prototype.getResolutionsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.Resolution, 13)); -}; - - -/** - * @param {!Array} value - * @return {!proto.lnrpc.ChannelCloseSummary} returns this -*/ -proto.lnrpc.ChannelCloseSummary.prototype.setResolutionsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 13, value); -}; - - -/** - * @param {!proto.lnrpc.Resolution=} opt_value - * @param {number=} opt_index - * @return {!proto.lnrpc.Resolution} - */ -proto.lnrpc.ChannelCloseSummary.prototype.addResolutions = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 13, opt_value, proto.lnrpc.Resolution, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.lnrpc.ChannelCloseSummary} returns this - */ -proto.lnrpc.ChannelCloseSummary.prototype.clearResolutionsList = function() { - return this.setResolutionsList([]); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.Resolution.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.Resolution.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.Resolution} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.Resolution.toObject = function(includeInstance, msg) { - var f, obj = { - resolutionType: jspb.Message.getFieldWithDefault(msg, 1, 0), - outcome: jspb.Message.getFieldWithDefault(msg, 2, 0), - outpoint: (f = msg.getOutpoint()) && proto.lnrpc.OutPoint.toObject(includeInstance, f), - amountSat: jspb.Message.getFieldWithDefault(msg, 4, 0), - sweepTxid: jspb.Message.getFieldWithDefault(msg, 5, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.Resolution} - */ -proto.lnrpc.Resolution.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.Resolution; - return proto.lnrpc.Resolution.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.Resolution} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.Resolution} - */ -proto.lnrpc.Resolution.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!proto.lnrpc.ResolutionType} */ (reader.readEnum()); - msg.setResolutionType(value); - break; - case 2: - var value = /** @type {!proto.lnrpc.ResolutionOutcome} */ (reader.readEnum()); - msg.setOutcome(value); - break; - case 3: - var value = new proto.lnrpc.OutPoint; - reader.readMessage(value,proto.lnrpc.OutPoint.deserializeBinaryFromReader); - msg.setOutpoint(value); - break; - case 4: - var value = /** @type {number} */ (reader.readUint64()); - msg.setAmountSat(value); - break; - case 5: - var value = /** @type {string} */ (reader.readString()); - msg.setSweepTxid(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.Resolution.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.Resolution.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.Resolution} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.Resolution.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getResolutionType(); - if (f !== 0.0) { - writer.writeEnum( - 1, - f - ); - } - f = message.getOutcome(); - if (f !== 0.0) { - writer.writeEnum( - 2, - f - ); - } - f = message.getOutpoint(); - if (f != null) { - writer.writeMessage( - 3, - f, - proto.lnrpc.OutPoint.serializeBinaryToWriter - ); - } - f = message.getAmountSat(); - if (f !== 0) { - writer.writeUint64( - 4, - f - ); - } - f = message.getSweepTxid(); - if (f.length > 0) { - writer.writeString( - 5, - f - ); - } -}; - - -/** - * optional ResolutionType resolution_type = 1; - * @return {!proto.lnrpc.ResolutionType} - */ -proto.lnrpc.Resolution.prototype.getResolutionType = function() { - return /** @type {!proto.lnrpc.ResolutionType} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {!proto.lnrpc.ResolutionType} value - * @return {!proto.lnrpc.Resolution} returns this - */ -proto.lnrpc.Resolution.prototype.setResolutionType = function(value) { - return jspb.Message.setProto3EnumField(this, 1, value); -}; - - -/** - * optional ResolutionOutcome outcome = 2; - * @return {!proto.lnrpc.ResolutionOutcome} - */ -proto.lnrpc.Resolution.prototype.getOutcome = function() { - return /** @type {!proto.lnrpc.ResolutionOutcome} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {!proto.lnrpc.ResolutionOutcome} value - * @return {!proto.lnrpc.Resolution} returns this - */ -proto.lnrpc.Resolution.prototype.setOutcome = function(value) { - return jspb.Message.setProto3EnumField(this, 2, value); -}; - - -/** - * optional OutPoint outpoint = 3; - * @return {?proto.lnrpc.OutPoint} - */ -proto.lnrpc.Resolution.prototype.getOutpoint = function() { - return /** @type{?proto.lnrpc.OutPoint} */ ( - jspb.Message.getWrapperField(this, proto.lnrpc.OutPoint, 3)); -}; - - -/** - * @param {?proto.lnrpc.OutPoint|undefined} value - * @return {!proto.lnrpc.Resolution} returns this -*/ -proto.lnrpc.Resolution.prototype.setOutpoint = function(value) { - return jspb.Message.setWrapperField(this, 3, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.lnrpc.Resolution} returns this - */ -proto.lnrpc.Resolution.prototype.clearOutpoint = function() { - return this.setOutpoint(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.lnrpc.Resolution.prototype.hasOutpoint = function() { - return jspb.Message.getField(this, 3) != null; -}; - - -/** - * optional uint64 amount_sat = 4; - * @return {number} - */ -proto.lnrpc.Resolution.prototype.getAmountSat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.Resolution} returns this - */ -proto.lnrpc.Resolution.prototype.setAmountSat = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); -}; - - -/** - * optional string sweep_txid = 5; - * @return {string} - */ -proto.lnrpc.Resolution.prototype.getSweepTxid = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); -}; - - -/** - * @param {string} value - * @return {!proto.lnrpc.Resolution} returns this - */ -proto.lnrpc.Resolution.prototype.setSweepTxid = function(value) { - return jspb.Message.setProto3StringField(this, 5, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.ClosedChannelsRequest.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.ClosedChannelsRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.ClosedChannelsRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.ClosedChannelsRequest.toObject = function(includeInstance, msg) { - var f, obj = { - cooperative: jspb.Message.getBooleanFieldWithDefault(msg, 1, false), - localForce: jspb.Message.getBooleanFieldWithDefault(msg, 2, false), - remoteForce: jspb.Message.getBooleanFieldWithDefault(msg, 3, false), - breach: jspb.Message.getBooleanFieldWithDefault(msg, 4, false), - fundingCanceled: jspb.Message.getBooleanFieldWithDefault(msg, 5, false), - abandoned: jspb.Message.getBooleanFieldWithDefault(msg, 6, false) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.ClosedChannelsRequest} - */ -proto.lnrpc.ClosedChannelsRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.ClosedChannelsRequest; - return proto.lnrpc.ClosedChannelsRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.ClosedChannelsRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.ClosedChannelsRequest} - */ -proto.lnrpc.ClosedChannelsRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setCooperative(value); - break; - case 2: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setLocalForce(value); - break; - case 3: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setRemoteForce(value); - break; - case 4: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setBreach(value); - break; - case 5: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setFundingCanceled(value); - break; - case 6: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setAbandoned(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.ClosedChannelsRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.ClosedChannelsRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.ClosedChannelsRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.ClosedChannelsRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getCooperative(); - if (f) { - writer.writeBool( - 1, - f - ); - } - f = message.getLocalForce(); - if (f) { - writer.writeBool( - 2, - f - ); - } - f = message.getRemoteForce(); - if (f) { - writer.writeBool( - 3, - f - ); - } - f = message.getBreach(); - if (f) { - writer.writeBool( - 4, - f - ); - } - f = message.getFundingCanceled(); - if (f) { - writer.writeBool( - 5, - f - ); - } - f = message.getAbandoned(); - if (f) { - writer.writeBool( - 6, - f - ); - } -}; - - -/** - * optional bool cooperative = 1; - * @return {boolean} - */ -proto.lnrpc.ClosedChannelsRequest.prototype.getCooperative = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.lnrpc.ClosedChannelsRequest} returns this - */ -proto.lnrpc.ClosedChannelsRequest.prototype.setCooperative = function(value) { - return jspb.Message.setProto3BooleanField(this, 1, value); -}; - - -/** - * optional bool local_force = 2; - * @return {boolean} - */ -proto.lnrpc.ClosedChannelsRequest.prototype.getLocalForce = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.lnrpc.ClosedChannelsRequest} returns this - */ -proto.lnrpc.ClosedChannelsRequest.prototype.setLocalForce = function(value) { - return jspb.Message.setProto3BooleanField(this, 2, value); -}; - - -/** - * optional bool remote_force = 3; - * @return {boolean} - */ -proto.lnrpc.ClosedChannelsRequest.prototype.getRemoteForce = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.lnrpc.ClosedChannelsRequest} returns this - */ -proto.lnrpc.ClosedChannelsRequest.prototype.setRemoteForce = function(value) { - return jspb.Message.setProto3BooleanField(this, 3, value); -}; - - -/** - * optional bool breach = 4; - * @return {boolean} - */ -proto.lnrpc.ClosedChannelsRequest.prototype.getBreach = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 4, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.lnrpc.ClosedChannelsRequest} returns this - */ -proto.lnrpc.ClosedChannelsRequest.prototype.setBreach = function(value) { - return jspb.Message.setProto3BooleanField(this, 4, value); -}; - - -/** - * optional bool funding_canceled = 5; - * @return {boolean} - */ -proto.lnrpc.ClosedChannelsRequest.prototype.getFundingCanceled = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 5, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.lnrpc.ClosedChannelsRequest} returns this - */ -proto.lnrpc.ClosedChannelsRequest.prototype.setFundingCanceled = function(value) { - return jspb.Message.setProto3BooleanField(this, 5, value); -}; - - -/** - * optional bool abandoned = 6; - * @return {boolean} - */ -proto.lnrpc.ClosedChannelsRequest.prototype.getAbandoned = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 6, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.lnrpc.ClosedChannelsRequest} returns this - */ -proto.lnrpc.ClosedChannelsRequest.prototype.setAbandoned = function(value) { - return jspb.Message.setProto3BooleanField(this, 6, value); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.lnrpc.ClosedChannelsResponse.repeatedFields_ = [1]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.ClosedChannelsResponse.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.ClosedChannelsResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.ClosedChannelsResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.ClosedChannelsResponse.toObject = function(includeInstance, msg) { - var f, obj = { - channelsList: jspb.Message.toObjectList(msg.getChannelsList(), - proto.lnrpc.ChannelCloseSummary.toObject, includeInstance) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.ClosedChannelsResponse} - */ -proto.lnrpc.ClosedChannelsResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.ClosedChannelsResponse; - return proto.lnrpc.ClosedChannelsResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.ClosedChannelsResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.ClosedChannelsResponse} - */ -proto.lnrpc.ClosedChannelsResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.lnrpc.ChannelCloseSummary; - reader.readMessage(value,proto.lnrpc.ChannelCloseSummary.deserializeBinaryFromReader); - msg.addChannels(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.ClosedChannelsResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.ClosedChannelsResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.ClosedChannelsResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.ClosedChannelsResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getChannelsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 1, - f, - proto.lnrpc.ChannelCloseSummary.serializeBinaryToWriter - ); - } -}; - - -/** - * repeated ChannelCloseSummary channels = 1; - * @return {!Array} - */ -proto.lnrpc.ClosedChannelsResponse.prototype.getChannelsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.ChannelCloseSummary, 1)); -}; - - -/** - * @param {!Array} value - * @return {!proto.lnrpc.ClosedChannelsResponse} returns this -*/ -proto.lnrpc.ClosedChannelsResponse.prototype.setChannelsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); -}; - - -/** - * @param {!proto.lnrpc.ChannelCloseSummary=} opt_value - * @param {number=} opt_index - * @return {!proto.lnrpc.ChannelCloseSummary} - */ -proto.lnrpc.ClosedChannelsResponse.prototype.addChannels = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.lnrpc.ChannelCloseSummary, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.lnrpc.ClosedChannelsResponse} returns this - */ -proto.lnrpc.ClosedChannelsResponse.prototype.clearChannelsList = function() { - return this.setChannelsList([]); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.lnrpc.Peer.repeatedFields_ = [12]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.Peer.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.Peer.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.Peer} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.Peer.toObject = function(includeInstance, msg) { - var f, obj = { - pubKey: jspb.Message.getFieldWithDefault(msg, 1, ""), - address: jspb.Message.getFieldWithDefault(msg, 3, ""), - bytesSent: jspb.Message.getFieldWithDefault(msg, 4, 0), - bytesRecv: jspb.Message.getFieldWithDefault(msg, 5, 0), - satSent: jspb.Message.getFieldWithDefault(msg, 6, 0), - satRecv: jspb.Message.getFieldWithDefault(msg, 7, 0), - inbound: jspb.Message.getBooleanFieldWithDefault(msg, 8, false), - pingTime: jspb.Message.getFieldWithDefault(msg, 9, 0), - syncType: jspb.Message.getFieldWithDefault(msg, 10, 0), - featuresMap: (f = msg.getFeaturesMap()) ? f.toObject(includeInstance, proto.lnrpc.Feature.toObject) : [], - errorsList: jspb.Message.toObjectList(msg.getErrorsList(), - proto.lnrpc.TimestampedError.toObject, includeInstance), - flapCount: jspb.Message.getFieldWithDefault(msg, 13, 0), - lastFlapNs: jspb.Message.getFieldWithDefault(msg, 14, 0), - lastPingPayload: msg.getLastPingPayload_asB64() - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.Peer} - */ -proto.lnrpc.Peer.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.Peer; - return proto.lnrpc.Peer.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.Peer} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.Peer} - */ -proto.lnrpc.Peer.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setPubKey(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setAddress(value); - break; - case 4: - var value = /** @type {number} */ (reader.readUint64()); - msg.setBytesSent(value); - break; - case 5: - var value = /** @type {number} */ (reader.readUint64()); - msg.setBytesRecv(value); - break; - case 6: - var value = /** @type {number} */ (reader.readInt64()); - msg.setSatSent(value); - break; - case 7: - var value = /** @type {number} */ (reader.readInt64()); - msg.setSatRecv(value); - break; - case 8: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setInbound(value); - break; - case 9: - var value = /** @type {number} */ (reader.readInt64()); - msg.setPingTime(value); - break; - case 10: - var value = /** @type {!proto.lnrpc.Peer.SyncType} */ (reader.readEnum()); - msg.setSyncType(value); - break; - case 11: - var value = msg.getFeaturesMap(); - reader.readMessage(value, function(message, reader) { - jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readUint32, jspb.BinaryReader.prototype.readMessage, proto.lnrpc.Feature.deserializeBinaryFromReader, 0, new proto.lnrpc.Feature()); - }); - break; - case 12: - var value = new proto.lnrpc.TimestampedError; - reader.readMessage(value,proto.lnrpc.TimestampedError.deserializeBinaryFromReader); - msg.addErrors(value); - break; - case 13: - var value = /** @type {number} */ (reader.readInt32()); - msg.setFlapCount(value); - break; - case 14: - var value = /** @type {number} */ (reader.readInt64()); - msg.setLastFlapNs(value); - break; - case 15: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setLastPingPayload(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.Peer.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.Peer.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.Peer} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.Peer.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getPubKey(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getAddress(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } - f = message.getBytesSent(); - if (f !== 0) { - writer.writeUint64( - 4, - f - ); - } - f = message.getBytesRecv(); - if (f !== 0) { - writer.writeUint64( - 5, - f - ); - } - f = message.getSatSent(); - if (f !== 0) { - writer.writeInt64( - 6, - f - ); - } - f = message.getSatRecv(); - if (f !== 0) { - writer.writeInt64( - 7, - f - ); - } - f = message.getInbound(); - if (f) { - writer.writeBool( - 8, - f - ); - } - f = message.getPingTime(); - if (f !== 0) { - writer.writeInt64( - 9, - f - ); - } - f = message.getSyncType(); - if (f !== 0.0) { - writer.writeEnum( - 10, - f - ); - } - f = message.getFeaturesMap(true); - if (f && f.getLength() > 0) { - f.serializeBinary(11, writer, jspb.BinaryWriter.prototype.writeUint32, jspb.BinaryWriter.prototype.writeMessage, proto.lnrpc.Feature.serializeBinaryToWriter); - } - f = message.getErrorsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 12, - f, - proto.lnrpc.TimestampedError.serializeBinaryToWriter - ); - } - f = message.getFlapCount(); - if (f !== 0) { - writer.writeInt32( - 13, - f - ); - } - f = message.getLastFlapNs(); - if (f !== 0) { - writer.writeInt64( - 14, - f - ); - } - f = message.getLastPingPayload_asU8(); - if (f.length > 0) { - writer.writeBytes( - 15, - f - ); - } -}; - - -/** - * @enum {number} - */ -proto.lnrpc.Peer.SyncType = { - UNKNOWN_SYNC: 0, - ACTIVE_SYNC: 1, - PASSIVE_SYNC: 2, - PINNED_SYNC: 3 -}; - -/** - * optional string pub_key = 1; - * @return {string} - */ -proto.lnrpc.Peer.prototype.getPubKey = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.lnrpc.Peer} returns this - */ -proto.lnrpc.Peer.prototype.setPubKey = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional string address = 3; - * @return {string} - */ -proto.lnrpc.Peer.prototype.getAddress = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * @param {string} value - * @return {!proto.lnrpc.Peer} returns this - */ -proto.lnrpc.Peer.prototype.setAddress = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); -}; - - -/** - * optional uint64 bytes_sent = 4; - * @return {number} - */ -proto.lnrpc.Peer.prototype.getBytesSent = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.Peer} returns this - */ -proto.lnrpc.Peer.prototype.setBytesSent = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); -}; - - -/** - * optional uint64 bytes_recv = 5; - * @return {number} - */ -proto.lnrpc.Peer.prototype.getBytesRecv = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.Peer} returns this - */ -proto.lnrpc.Peer.prototype.setBytesRecv = function(value) { - return jspb.Message.setProto3IntField(this, 5, value); -}; - - -/** - * optional int64 sat_sent = 6; - * @return {number} - */ -proto.lnrpc.Peer.prototype.getSatSent = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.Peer} returns this - */ -proto.lnrpc.Peer.prototype.setSatSent = function(value) { - return jspb.Message.setProto3IntField(this, 6, value); -}; - - -/** - * optional int64 sat_recv = 7; - * @return {number} - */ -proto.lnrpc.Peer.prototype.getSatRecv = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.Peer} returns this - */ -proto.lnrpc.Peer.prototype.setSatRecv = function(value) { - return jspb.Message.setProto3IntField(this, 7, value); -}; - - -/** - * optional bool inbound = 8; - * @return {boolean} - */ -proto.lnrpc.Peer.prototype.getInbound = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 8, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.lnrpc.Peer} returns this - */ -proto.lnrpc.Peer.prototype.setInbound = function(value) { - return jspb.Message.setProto3BooleanField(this, 8, value); -}; - - -/** - * optional int64 ping_time = 9; - * @return {number} - */ -proto.lnrpc.Peer.prototype.getPingTime = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.Peer} returns this - */ -proto.lnrpc.Peer.prototype.setPingTime = function(value) { - return jspb.Message.setProto3IntField(this, 9, value); -}; - - -/** - * optional SyncType sync_type = 10; - * @return {!proto.lnrpc.Peer.SyncType} - */ -proto.lnrpc.Peer.prototype.getSyncType = function() { - return /** @type {!proto.lnrpc.Peer.SyncType} */ (jspb.Message.getFieldWithDefault(this, 10, 0)); -}; - - -/** - * @param {!proto.lnrpc.Peer.SyncType} value - * @return {!proto.lnrpc.Peer} returns this - */ -proto.lnrpc.Peer.prototype.setSyncType = function(value) { - return jspb.Message.setProto3EnumField(this, 10, value); -}; - - -/** - * map features = 11; - * @param {boolean=} opt_noLazyCreate Do not create the map if - * empty, instead returning `undefined` - * @return {!jspb.Map} - */ -proto.lnrpc.Peer.prototype.getFeaturesMap = function(opt_noLazyCreate) { - return /** @type {!jspb.Map} */ ( - jspb.Message.getMapField(this, 11, opt_noLazyCreate, - proto.lnrpc.Feature)); -}; - - -/** - * Clears values from the map. The map will be non-null. - * @return {!proto.lnrpc.Peer} returns this - */ -proto.lnrpc.Peer.prototype.clearFeaturesMap = function() { - this.getFeaturesMap().clear(); - return this;}; - - -/** - * repeated TimestampedError errors = 12; - * @return {!Array} - */ -proto.lnrpc.Peer.prototype.getErrorsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.TimestampedError, 12)); -}; - - -/** - * @param {!Array} value - * @return {!proto.lnrpc.Peer} returns this -*/ -proto.lnrpc.Peer.prototype.setErrorsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 12, value); -}; - - -/** - * @param {!proto.lnrpc.TimestampedError=} opt_value - * @param {number=} opt_index - * @return {!proto.lnrpc.TimestampedError} - */ -proto.lnrpc.Peer.prototype.addErrors = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 12, opt_value, proto.lnrpc.TimestampedError, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.lnrpc.Peer} returns this - */ -proto.lnrpc.Peer.prototype.clearErrorsList = function() { - return this.setErrorsList([]); -}; - - -/** - * optional int32 flap_count = 13; - * @return {number} - */ -proto.lnrpc.Peer.prototype.getFlapCount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 13, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.Peer} returns this - */ -proto.lnrpc.Peer.prototype.setFlapCount = function(value) { - return jspb.Message.setProto3IntField(this, 13, value); -}; - - -/** - * optional int64 last_flap_ns = 14; - * @return {number} - */ -proto.lnrpc.Peer.prototype.getLastFlapNs = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 14, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.Peer} returns this - */ -proto.lnrpc.Peer.prototype.setLastFlapNs = function(value) { - return jspb.Message.setProto3IntField(this, 14, value); -}; - - -/** - * optional bytes last_ping_payload = 15; - * @return {!(string|Uint8Array)} - */ -proto.lnrpc.Peer.prototype.getLastPingPayload = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 15, "")); -}; - - -/** - * optional bytes last_ping_payload = 15; - * This is a type-conversion wrapper around `getLastPingPayload()` - * @return {string} - */ -proto.lnrpc.Peer.prototype.getLastPingPayload_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getLastPingPayload())); -}; - - -/** - * optional bytes last_ping_payload = 15; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getLastPingPayload()` - * @return {!Uint8Array} - */ -proto.lnrpc.Peer.prototype.getLastPingPayload_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getLastPingPayload())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.lnrpc.Peer} returns this - */ -proto.lnrpc.Peer.prototype.setLastPingPayload = function(value) { - return jspb.Message.setProto3BytesField(this, 15, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.TimestampedError.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.TimestampedError.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.TimestampedError} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.TimestampedError.toObject = function(includeInstance, msg) { - var f, obj = { - timestamp: jspb.Message.getFieldWithDefault(msg, 1, 0), - error: jspb.Message.getFieldWithDefault(msg, 2, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.TimestampedError} - */ -proto.lnrpc.TimestampedError.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.TimestampedError; - return proto.lnrpc.TimestampedError.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.TimestampedError} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.TimestampedError} - */ -proto.lnrpc.TimestampedError.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readUint64()); - msg.setTimestamp(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setError(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.TimestampedError.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.TimestampedError.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.TimestampedError} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.TimestampedError.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getTimestamp(); - if (f !== 0) { - writer.writeUint64( - 1, - f - ); - } - f = message.getError(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } -}; - - -/** - * optional uint64 timestamp = 1; - * @return {number} - */ -proto.lnrpc.TimestampedError.prototype.getTimestamp = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.TimestampedError} returns this - */ -proto.lnrpc.TimestampedError.prototype.setTimestamp = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); -}; - - -/** - * optional string error = 2; - * @return {string} - */ -proto.lnrpc.TimestampedError.prototype.getError = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.lnrpc.TimestampedError} returns this - */ -proto.lnrpc.TimestampedError.prototype.setError = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.ListPeersRequest.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.ListPeersRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.ListPeersRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.ListPeersRequest.toObject = function(includeInstance, msg) { - var f, obj = { - latestError: jspb.Message.getBooleanFieldWithDefault(msg, 1, false) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.ListPeersRequest} - */ -proto.lnrpc.ListPeersRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.ListPeersRequest; - return proto.lnrpc.ListPeersRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.ListPeersRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.ListPeersRequest} - */ -proto.lnrpc.ListPeersRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setLatestError(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.ListPeersRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.ListPeersRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.ListPeersRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.ListPeersRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getLatestError(); - if (f) { - writer.writeBool( - 1, - f - ); - } -}; - - -/** - * optional bool latest_error = 1; - * @return {boolean} - */ -proto.lnrpc.ListPeersRequest.prototype.getLatestError = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.lnrpc.ListPeersRequest} returns this - */ -proto.lnrpc.ListPeersRequest.prototype.setLatestError = function(value) { - return jspb.Message.setProto3BooleanField(this, 1, value); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.lnrpc.ListPeersResponse.repeatedFields_ = [1]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.ListPeersResponse.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.ListPeersResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.ListPeersResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.ListPeersResponse.toObject = function(includeInstance, msg) { - var f, obj = { - peersList: jspb.Message.toObjectList(msg.getPeersList(), - proto.lnrpc.Peer.toObject, includeInstance) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.ListPeersResponse} - */ -proto.lnrpc.ListPeersResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.ListPeersResponse; - return proto.lnrpc.ListPeersResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.ListPeersResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.ListPeersResponse} - */ -proto.lnrpc.ListPeersResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.lnrpc.Peer; - reader.readMessage(value,proto.lnrpc.Peer.deserializeBinaryFromReader); - msg.addPeers(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.ListPeersResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.ListPeersResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.ListPeersResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.ListPeersResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getPeersList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 1, - f, - proto.lnrpc.Peer.serializeBinaryToWriter - ); - } -}; - - -/** - * repeated Peer peers = 1; - * @return {!Array} - */ -proto.lnrpc.ListPeersResponse.prototype.getPeersList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.Peer, 1)); -}; - - -/** - * @param {!Array} value - * @return {!proto.lnrpc.ListPeersResponse} returns this -*/ -proto.lnrpc.ListPeersResponse.prototype.setPeersList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); -}; - - -/** - * @param {!proto.lnrpc.Peer=} opt_value - * @param {number=} opt_index - * @return {!proto.lnrpc.Peer} - */ -proto.lnrpc.ListPeersResponse.prototype.addPeers = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.lnrpc.Peer, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.lnrpc.ListPeersResponse} returns this - */ -proto.lnrpc.ListPeersResponse.prototype.clearPeersList = function() { - return this.setPeersList([]); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.PeerEventSubscription.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.PeerEventSubscription.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.PeerEventSubscription} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.PeerEventSubscription.toObject = function(includeInstance, msg) { - var f, obj = { - - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.PeerEventSubscription} - */ -proto.lnrpc.PeerEventSubscription.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.PeerEventSubscription; - return proto.lnrpc.PeerEventSubscription.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.PeerEventSubscription} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.PeerEventSubscription} - */ -proto.lnrpc.PeerEventSubscription.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.PeerEventSubscription.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.PeerEventSubscription.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.PeerEventSubscription} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.PeerEventSubscription.serializeBinaryToWriter = function(message, writer) { - var f = undefined; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.PeerEvent.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.PeerEvent.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.PeerEvent} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.PeerEvent.toObject = function(includeInstance, msg) { - var f, obj = { - pubKey: jspb.Message.getFieldWithDefault(msg, 1, ""), - type: jspb.Message.getFieldWithDefault(msg, 2, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.PeerEvent} - */ -proto.lnrpc.PeerEvent.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.PeerEvent; - return proto.lnrpc.PeerEvent.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.PeerEvent} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.PeerEvent} - */ -proto.lnrpc.PeerEvent.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setPubKey(value); - break; - case 2: - var value = /** @type {!proto.lnrpc.PeerEvent.EventType} */ (reader.readEnum()); - msg.setType(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.PeerEvent.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.PeerEvent.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.PeerEvent} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.PeerEvent.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getPubKey(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getType(); - if (f !== 0.0) { - writer.writeEnum( - 2, - f - ); - } -}; - - -/** - * @enum {number} - */ -proto.lnrpc.PeerEvent.EventType = { - PEER_ONLINE: 0, - PEER_OFFLINE: 1 -}; - -/** - * optional string pub_key = 1; - * @return {string} - */ -proto.lnrpc.PeerEvent.prototype.getPubKey = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.lnrpc.PeerEvent} returns this - */ -proto.lnrpc.PeerEvent.prototype.setPubKey = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional EventType type = 2; - * @return {!proto.lnrpc.PeerEvent.EventType} - */ -proto.lnrpc.PeerEvent.prototype.getType = function() { - return /** @type {!proto.lnrpc.PeerEvent.EventType} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {!proto.lnrpc.PeerEvent.EventType} value - * @return {!proto.lnrpc.PeerEvent} returns this - */ -proto.lnrpc.PeerEvent.prototype.setType = function(value) { - return jspb.Message.setProto3EnumField(this, 2, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.GetInfoRequest.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.GetInfoRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.GetInfoRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.GetInfoRequest.toObject = function(includeInstance, msg) { - var f, obj = { - - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.GetInfoRequest} - */ -proto.lnrpc.GetInfoRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.GetInfoRequest; - return proto.lnrpc.GetInfoRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.GetInfoRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.GetInfoRequest} - */ -proto.lnrpc.GetInfoRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.GetInfoRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.GetInfoRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.GetInfoRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.GetInfoRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.lnrpc.GetInfoResponse.repeatedFields_ = [16,12]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.GetInfoResponse.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.GetInfoResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.GetInfoResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.GetInfoResponse.toObject = function(includeInstance, msg) { - var f, obj = { - version: jspb.Message.getFieldWithDefault(msg, 14, ""), - commitHash: jspb.Message.getFieldWithDefault(msg, 20, ""), - identityPubkey: jspb.Message.getFieldWithDefault(msg, 1, ""), - alias: jspb.Message.getFieldWithDefault(msg, 2, ""), - color: jspb.Message.getFieldWithDefault(msg, 17, ""), - numPendingChannels: jspb.Message.getFieldWithDefault(msg, 3, 0), - numActiveChannels: jspb.Message.getFieldWithDefault(msg, 4, 0), - numInactiveChannels: jspb.Message.getFieldWithDefault(msg, 15, 0), - numPeers: jspb.Message.getFieldWithDefault(msg, 5, 0), - blockHeight: jspb.Message.getFieldWithDefault(msg, 6, 0), - blockHash: jspb.Message.getFieldWithDefault(msg, 8, ""), - bestHeaderTimestamp: jspb.Message.getFieldWithDefault(msg, 13, 0), - syncedToChain: jspb.Message.getBooleanFieldWithDefault(msg, 9, false), - syncedToGraph: jspb.Message.getBooleanFieldWithDefault(msg, 18, false), - testnet: jspb.Message.getBooleanFieldWithDefault(msg, 10, false), - chainsList: jspb.Message.toObjectList(msg.getChainsList(), - proto.lnrpc.Chain.toObject, includeInstance), - urisList: (f = jspb.Message.getRepeatedField(msg, 12)) == null ? undefined : f, - featuresMap: (f = msg.getFeaturesMap()) ? f.toObject(includeInstance, proto.lnrpc.Feature.toObject) : [] - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.GetInfoResponse} - */ -proto.lnrpc.GetInfoResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.GetInfoResponse; - return proto.lnrpc.GetInfoResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.GetInfoResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.GetInfoResponse} - */ -proto.lnrpc.GetInfoResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 14: - var value = /** @type {string} */ (reader.readString()); - msg.setVersion(value); - break; - case 20: - var value = /** @type {string} */ (reader.readString()); - msg.setCommitHash(value); - break; - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setIdentityPubkey(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setAlias(value); - break; - case 17: - var value = /** @type {string} */ (reader.readString()); - msg.setColor(value); - break; - case 3: - var value = /** @type {number} */ (reader.readUint32()); - msg.setNumPendingChannels(value); - break; - case 4: - var value = /** @type {number} */ (reader.readUint32()); - msg.setNumActiveChannels(value); - break; - case 15: - var value = /** @type {number} */ (reader.readUint32()); - msg.setNumInactiveChannels(value); - break; - case 5: - var value = /** @type {number} */ (reader.readUint32()); - msg.setNumPeers(value); - break; - case 6: - var value = /** @type {number} */ (reader.readUint32()); - msg.setBlockHeight(value); - break; - case 8: - var value = /** @type {string} */ (reader.readString()); - msg.setBlockHash(value); - break; - case 13: - var value = /** @type {number} */ (reader.readInt64()); - msg.setBestHeaderTimestamp(value); - break; - case 9: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setSyncedToChain(value); - break; - case 18: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setSyncedToGraph(value); - break; - case 10: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setTestnet(value); - break; - case 16: - var value = new proto.lnrpc.Chain; - reader.readMessage(value,proto.lnrpc.Chain.deserializeBinaryFromReader); - msg.addChains(value); - break; - case 12: - var value = /** @type {string} */ (reader.readString()); - msg.addUris(value); - break; - case 19: - var value = msg.getFeaturesMap(); - reader.readMessage(value, function(message, reader) { - jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readUint32, jspb.BinaryReader.prototype.readMessage, proto.lnrpc.Feature.deserializeBinaryFromReader, 0, new proto.lnrpc.Feature()); - }); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.GetInfoResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.GetInfoResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.GetInfoResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.GetInfoResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getVersion(); - if (f.length > 0) { - writer.writeString( - 14, - f - ); - } - f = message.getCommitHash(); - if (f.length > 0) { - writer.writeString( - 20, - f - ); - } - f = message.getIdentityPubkey(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getAlias(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getColor(); - if (f.length > 0) { - writer.writeString( - 17, - f - ); - } - f = message.getNumPendingChannels(); - if (f !== 0) { - writer.writeUint32( - 3, - f - ); - } - f = message.getNumActiveChannels(); - if (f !== 0) { - writer.writeUint32( - 4, - f - ); - } - f = message.getNumInactiveChannels(); - if (f !== 0) { - writer.writeUint32( - 15, - f - ); - } - f = message.getNumPeers(); - if (f !== 0) { - writer.writeUint32( - 5, - f - ); - } - f = message.getBlockHeight(); - if (f !== 0) { - writer.writeUint32( - 6, - f - ); - } - f = message.getBlockHash(); - if (f.length > 0) { - writer.writeString( - 8, - f - ); - } - f = message.getBestHeaderTimestamp(); - if (f !== 0) { - writer.writeInt64( - 13, - f - ); - } - f = message.getSyncedToChain(); - if (f) { - writer.writeBool( - 9, - f - ); - } - f = message.getSyncedToGraph(); - if (f) { - writer.writeBool( - 18, - f - ); - } - f = message.getTestnet(); - if (f) { - writer.writeBool( - 10, - f - ); - } - f = message.getChainsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 16, - f, - proto.lnrpc.Chain.serializeBinaryToWriter - ); - } - f = message.getUrisList(); - if (f.length > 0) { - writer.writeRepeatedString( - 12, - f - ); - } - f = message.getFeaturesMap(true); - if (f && f.getLength() > 0) { - f.serializeBinary(19, writer, jspb.BinaryWriter.prototype.writeUint32, jspb.BinaryWriter.prototype.writeMessage, proto.lnrpc.Feature.serializeBinaryToWriter); - } -}; - - -/** - * optional string version = 14; - * @return {string} - */ -proto.lnrpc.GetInfoResponse.prototype.getVersion = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 14, "")); -}; - - -/** - * @param {string} value - * @return {!proto.lnrpc.GetInfoResponse} returns this - */ -proto.lnrpc.GetInfoResponse.prototype.setVersion = function(value) { - return jspb.Message.setProto3StringField(this, 14, value); -}; - - -/** - * optional string commit_hash = 20; - * @return {string} - */ -proto.lnrpc.GetInfoResponse.prototype.getCommitHash = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 20, "")); -}; - - -/** - * @param {string} value - * @return {!proto.lnrpc.GetInfoResponse} returns this - */ -proto.lnrpc.GetInfoResponse.prototype.setCommitHash = function(value) { - return jspb.Message.setProto3StringField(this, 20, value); -}; - - -/** - * optional string identity_pubkey = 1; - * @return {string} - */ -proto.lnrpc.GetInfoResponse.prototype.getIdentityPubkey = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.lnrpc.GetInfoResponse} returns this - */ -proto.lnrpc.GetInfoResponse.prototype.setIdentityPubkey = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional string alias = 2; - * @return {string} - */ -proto.lnrpc.GetInfoResponse.prototype.getAlias = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.lnrpc.GetInfoResponse} returns this - */ -proto.lnrpc.GetInfoResponse.prototype.setAlias = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional string color = 17; - * @return {string} - */ -proto.lnrpc.GetInfoResponse.prototype.getColor = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 17, "")); -}; - - -/** - * @param {string} value - * @return {!proto.lnrpc.GetInfoResponse} returns this - */ -proto.lnrpc.GetInfoResponse.prototype.setColor = function(value) { - return jspb.Message.setProto3StringField(this, 17, value); -}; - - -/** - * optional uint32 num_pending_channels = 3; - * @return {number} - */ -proto.lnrpc.GetInfoResponse.prototype.getNumPendingChannels = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.GetInfoResponse} returns this - */ -proto.lnrpc.GetInfoResponse.prototype.setNumPendingChannels = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - -/** - * optional uint32 num_active_channels = 4; - * @return {number} - */ -proto.lnrpc.GetInfoResponse.prototype.getNumActiveChannels = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.GetInfoResponse} returns this - */ -proto.lnrpc.GetInfoResponse.prototype.setNumActiveChannels = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); -}; - - -/** - * optional uint32 num_inactive_channels = 15; - * @return {number} - */ -proto.lnrpc.GetInfoResponse.prototype.getNumInactiveChannels = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 15, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.GetInfoResponse} returns this - */ -proto.lnrpc.GetInfoResponse.prototype.setNumInactiveChannels = function(value) { - return jspb.Message.setProto3IntField(this, 15, value); -}; - - -/** - * optional uint32 num_peers = 5; - * @return {number} - */ -proto.lnrpc.GetInfoResponse.prototype.getNumPeers = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.GetInfoResponse} returns this - */ -proto.lnrpc.GetInfoResponse.prototype.setNumPeers = function(value) { - return jspb.Message.setProto3IntField(this, 5, value); -}; - - -/** - * optional uint32 block_height = 6; - * @return {number} - */ -proto.lnrpc.GetInfoResponse.prototype.getBlockHeight = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.GetInfoResponse} returns this - */ -proto.lnrpc.GetInfoResponse.prototype.setBlockHeight = function(value) { - return jspb.Message.setProto3IntField(this, 6, value); -}; - - -/** - * optional string block_hash = 8; - * @return {string} - */ -proto.lnrpc.GetInfoResponse.prototype.getBlockHash = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, "")); -}; - - -/** - * @param {string} value - * @return {!proto.lnrpc.GetInfoResponse} returns this - */ -proto.lnrpc.GetInfoResponse.prototype.setBlockHash = function(value) { - return jspb.Message.setProto3StringField(this, 8, value); -}; - - -/** - * optional int64 best_header_timestamp = 13; - * @return {number} - */ -proto.lnrpc.GetInfoResponse.prototype.getBestHeaderTimestamp = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 13, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.GetInfoResponse} returns this - */ -proto.lnrpc.GetInfoResponse.prototype.setBestHeaderTimestamp = function(value) { - return jspb.Message.setProto3IntField(this, 13, value); -}; - - -/** - * optional bool synced_to_chain = 9; - * @return {boolean} - */ -proto.lnrpc.GetInfoResponse.prototype.getSyncedToChain = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 9, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.lnrpc.GetInfoResponse} returns this - */ -proto.lnrpc.GetInfoResponse.prototype.setSyncedToChain = function(value) { - return jspb.Message.setProto3BooleanField(this, 9, value); -}; - - -/** - * optional bool synced_to_graph = 18; - * @return {boolean} - */ -proto.lnrpc.GetInfoResponse.prototype.getSyncedToGraph = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 18, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.lnrpc.GetInfoResponse} returns this - */ -proto.lnrpc.GetInfoResponse.prototype.setSyncedToGraph = function(value) { - return jspb.Message.setProto3BooleanField(this, 18, value); -}; - - -/** - * optional bool testnet = 10; - * @return {boolean} - */ -proto.lnrpc.GetInfoResponse.prototype.getTestnet = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 10, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.lnrpc.GetInfoResponse} returns this - */ -proto.lnrpc.GetInfoResponse.prototype.setTestnet = function(value) { - return jspb.Message.setProto3BooleanField(this, 10, value); -}; - - -/** - * repeated Chain chains = 16; - * @return {!Array} - */ -proto.lnrpc.GetInfoResponse.prototype.getChainsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.Chain, 16)); -}; - - -/** - * @param {!Array} value - * @return {!proto.lnrpc.GetInfoResponse} returns this -*/ -proto.lnrpc.GetInfoResponse.prototype.setChainsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 16, value); -}; - - -/** - * @param {!proto.lnrpc.Chain=} opt_value - * @param {number=} opt_index - * @return {!proto.lnrpc.Chain} - */ -proto.lnrpc.GetInfoResponse.prototype.addChains = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 16, opt_value, proto.lnrpc.Chain, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.lnrpc.GetInfoResponse} returns this - */ -proto.lnrpc.GetInfoResponse.prototype.clearChainsList = function() { - return this.setChainsList([]); -}; - - -/** - * repeated string uris = 12; - * @return {!Array} - */ -proto.lnrpc.GetInfoResponse.prototype.getUrisList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 12)); -}; - - -/** - * @param {!Array} value - * @return {!proto.lnrpc.GetInfoResponse} returns this - */ -proto.lnrpc.GetInfoResponse.prototype.setUrisList = function(value) { - return jspb.Message.setField(this, 12, value || []); -}; - - -/** - * @param {string} value - * @param {number=} opt_index - * @return {!proto.lnrpc.GetInfoResponse} returns this - */ -proto.lnrpc.GetInfoResponse.prototype.addUris = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 12, value, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.lnrpc.GetInfoResponse} returns this - */ -proto.lnrpc.GetInfoResponse.prototype.clearUrisList = function() { - return this.setUrisList([]); -}; - - -/** - * map features = 19; - * @param {boolean=} opt_noLazyCreate Do not create the map if - * empty, instead returning `undefined` - * @return {!jspb.Map} - */ -proto.lnrpc.GetInfoResponse.prototype.getFeaturesMap = function(opt_noLazyCreate) { - return /** @type {!jspb.Map} */ ( - jspb.Message.getMapField(this, 19, opt_noLazyCreate, - proto.lnrpc.Feature)); -}; - - -/** - * Clears values from the map. The map will be non-null. - * @return {!proto.lnrpc.GetInfoResponse} returns this - */ -proto.lnrpc.GetInfoResponse.prototype.clearFeaturesMap = function() { - this.getFeaturesMap().clear(); - return this;}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.GetRecoveryInfoRequest.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.GetRecoveryInfoRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.GetRecoveryInfoRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.GetRecoveryInfoRequest.toObject = function(includeInstance, msg) { - var f, obj = { - - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.GetRecoveryInfoRequest} - */ -proto.lnrpc.GetRecoveryInfoRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.GetRecoveryInfoRequest; - return proto.lnrpc.GetRecoveryInfoRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.GetRecoveryInfoRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.GetRecoveryInfoRequest} - */ -proto.lnrpc.GetRecoveryInfoRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.GetRecoveryInfoRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.GetRecoveryInfoRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.GetRecoveryInfoRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.GetRecoveryInfoRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.GetRecoveryInfoResponse.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.GetRecoveryInfoResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.GetRecoveryInfoResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.GetRecoveryInfoResponse.toObject = function(includeInstance, msg) { - var f, obj = { - recoveryMode: jspb.Message.getBooleanFieldWithDefault(msg, 1, false), - recoveryFinished: jspb.Message.getBooleanFieldWithDefault(msg, 2, false), - progress: jspb.Message.getFloatingPointFieldWithDefault(msg, 3, 0.0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.GetRecoveryInfoResponse} - */ -proto.lnrpc.GetRecoveryInfoResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.GetRecoveryInfoResponse; - return proto.lnrpc.GetRecoveryInfoResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.GetRecoveryInfoResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.GetRecoveryInfoResponse} - */ -proto.lnrpc.GetRecoveryInfoResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setRecoveryMode(value); - break; - case 2: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setRecoveryFinished(value); - break; - case 3: - var value = /** @type {number} */ (reader.readDouble()); - msg.setProgress(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.GetRecoveryInfoResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.GetRecoveryInfoResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.GetRecoveryInfoResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.GetRecoveryInfoResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getRecoveryMode(); - if (f) { - writer.writeBool( - 1, - f - ); - } - f = message.getRecoveryFinished(); - if (f) { - writer.writeBool( - 2, - f - ); - } - f = message.getProgress(); - if (f !== 0.0) { - writer.writeDouble( - 3, - f - ); - } -}; - - -/** - * optional bool recovery_mode = 1; - * @return {boolean} - */ -proto.lnrpc.GetRecoveryInfoResponse.prototype.getRecoveryMode = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.lnrpc.GetRecoveryInfoResponse} returns this - */ -proto.lnrpc.GetRecoveryInfoResponse.prototype.setRecoveryMode = function(value) { - return jspb.Message.setProto3BooleanField(this, 1, value); -}; - - -/** - * optional bool recovery_finished = 2; - * @return {boolean} - */ -proto.lnrpc.GetRecoveryInfoResponse.prototype.getRecoveryFinished = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.lnrpc.GetRecoveryInfoResponse} returns this - */ -proto.lnrpc.GetRecoveryInfoResponse.prototype.setRecoveryFinished = function(value) { - return jspb.Message.setProto3BooleanField(this, 2, value); -}; - - -/** - * optional double progress = 3; - * @return {number} - */ -proto.lnrpc.GetRecoveryInfoResponse.prototype.getProgress = function() { - return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 3, 0.0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.GetRecoveryInfoResponse} returns this - */ -proto.lnrpc.GetRecoveryInfoResponse.prototype.setProgress = function(value) { - return jspb.Message.setProto3FloatField(this, 3, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.Chain.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.Chain.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.Chain} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.Chain.toObject = function(includeInstance, msg) { - var f, obj = { - chain: jspb.Message.getFieldWithDefault(msg, 1, ""), - network: jspb.Message.getFieldWithDefault(msg, 2, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.Chain} - */ -proto.lnrpc.Chain.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.Chain; - return proto.lnrpc.Chain.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.Chain} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.Chain} - */ -proto.lnrpc.Chain.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setChain(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setNetwork(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.Chain.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.Chain.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.Chain} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.Chain.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getChain(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getNetwork(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } -}; - - -/** - * optional string chain = 1; - * @return {string} - */ -proto.lnrpc.Chain.prototype.getChain = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.lnrpc.Chain} returns this - */ -proto.lnrpc.Chain.prototype.setChain = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional string network = 2; - * @return {string} - */ -proto.lnrpc.Chain.prototype.getNetwork = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.lnrpc.Chain} returns this - */ -proto.lnrpc.Chain.prototype.setNetwork = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.ConfirmationUpdate.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.ConfirmationUpdate.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.ConfirmationUpdate} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.ConfirmationUpdate.toObject = function(includeInstance, msg) { - var f, obj = { - blockSha: msg.getBlockSha_asB64(), - blockHeight: jspb.Message.getFieldWithDefault(msg, 2, 0), - numConfsLeft: jspb.Message.getFieldWithDefault(msg, 3, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.ConfirmationUpdate} - */ -proto.lnrpc.ConfirmationUpdate.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.ConfirmationUpdate; - return proto.lnrpc.ConfirmationUpdate.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.ConfirmationUpdate} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.ConfirmationUpdate} - */ -proto.lnrpc.ConfirmationUpdate.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setBlockSha(value); - break; - case 2: - var value = /** @type {number} */ (reader.readInt32()); - msg.setBlockHeight(value); - break; - case 3: - var value = /** @type {number} */ (reader.readUint32()); - msg.setNumConfsLeft(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.ConfirmationUpdate.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.ConfirmationUpdate.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.ConfirmationUpdate} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.ConfirmationUpdate.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getBlockSha_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getBlockHeight(); - if (f !== 0) { - writer.writeInt32( - 2, - f - ); - } - f = message.getNumConfsLeft(); - if (f !== 0) { - writer.writeUint32( - 3, - f - ); - } -}; - - -/** - * optional bytes block_sha = 1; - * @return {!(string|Uint8Array)} - */ -proto.lnrpc.ConfirmationUpdate.prototype.getBlockSha = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes block_sha = 1; - * This is a type-conversion wrapper around `getBlockSha()` - * @return {string} - */ -proto.lnrpc.ConfirmationUpdate.prototype.getBlockSha_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getBlockSha())); -}; - - -/** - * optional bytes block_sha = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getBlockSha()` - * @return {!Uint8Array} - */ -proto.lnrpc.ConfirmationUpdate.prototype.getBlockSha_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getBlockSha())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.lnrpc.ConfirmationUpdate} returns this - */ -proto.lnrpc.ConfirmationUpdate.prototype.setBlockSha = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional int32 block_height = 2; - * @return {number} - */ -proto.lnrpc.ConfirmationUpdate.prototype.getBlockHeight = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.ConfirmationUpdate} returns this - */ -proto.lnrpc.ConfirmationUpdate.prototype.setBlockHeight = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * optional uint32 num_confs_left = 3; - * @return {number} - */ -proto.lnrpc.ConfirmationUpdate.prototype.getNumConfsLeft = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.ConfirmationUpdate} returns this - */ -proto.lnrpc.ConfirmationUpdate.prototype.setNumConfsLeft = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.ChannelOpenUpdate.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.ChannelOpenUpdate.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.ChannelOpenUpdate} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.ChannelOpenUpdate.toObject = function(includeInstance, msg) { - var f, obj = { - channelPoint: (f = msg.getChannelPoint()) && proto.lnrpc.ChannelPoint.toObject(includeInstance, f) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.ChannelOpenUpdate} - */ -proto.lnrpc.ChannelOpenUpdate.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.ChannelOpenUpdate; - return proto.lnrpc.ChannelOpenUpdate.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.ChannelOpenUpdate} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.ChannelOpenUpdate} - */ -proto.lnrpc.ChannelOpenUpdate.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.lnrpc.ChannelPoint; - reader.readMessage(value,proto.lnrpc.ChannelPoint.deserializeBinaryFromReader); - msg.setChannelPoint(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.ChannelOpenUpdate.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.ChannelOpenUpdate.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.ChannelOpenUpdate} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.ChannelOpenUpdate.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getChannelPoint(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.lnrpc.ChannelPoint.serializeBinaryToWriter - ); - } -}; - - -/** - * optional ChannelPoint channel_point = 1; - * @return {?proto.lnrpc.ChannelPoint} - */ -proto.lnrpc.ChannelOpenUpdate.prototype.getChannelPoint = function() { - return /** @type{?proto.lnrpc.ChannelPoint} */ ( - jspb.Message.getWrapperField(this, proto.lnrpc.ChannelPoint, 1)); -}; - - -/** - * @param {?proto.lnrpc.ChannelPoint|undefined} value - * @return {!proto.lnrpc.ChannelOpenUpdate} returns this -*/ -proto.lnrpc.ChannelOpenUpdate.prototype.setChannelPoint = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.lnrpc.ChannelOpenUpdate} returns this - */ -proto.lnrpc.ChannelOpenUpdate.prototype.clearChannelPoint = function() { - return this.setChannelPoint(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.lnrpc.ChannelOpenUpdate.prototype.hasChannelPoint = function() { - return jspb.Message.getField(this, 1) != null; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.ChannelCloseUpdate.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.ChannelCloseUpdate.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.ChannelCloseUpdate} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.ChannelCloseUpdate.toObject = function(includeInstance, msg) { - var f, obj = { - closingTxid: msg.getClosingTxid_asB64(), - success: jspb.Message.getBooleanFieldWithDefault(msg, 2, false) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.ChannelCloseUpdate} - */ -proto.lnrpc.ChannelCloseUpdate.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.ChannelCloseUpdate; - return proto.lnrpc.ChannelCloseUpdate.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.ChannelCloseUpdate} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.ChannelCloseUpdate} - */ -proto.lnrpc.ChannelCloseUpdate.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setClosingTxid(value); - break; - case 2: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setSuccess(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.ChannelCloseUpdate.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.ChannelCloseUpdate.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.ChannelCloseUpdate} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.ChannelCloseUpdate.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getClosingTxid_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getSuccess(); - if (f) { - writer.writeBool( - 2, - f - ); - } -}; - - -/** - * optional bytes closing_txid = 1; - * @return {!(string|Uint8Array)} - */ -proto.lnrpc.ChannelCloseUpdate.prototype.getClosingTxid = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes closing_txid = 1; - * This is a type-conversion wrapper around `getClosingTxid()` - * @return {string} - */ -proto.lnrpc.ChannelCloseUpdate.prototype.getClosingTxid_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getClosingTxid())); -}; - - -/** - * optional bytes closing_txid = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getClosingTxid()` - * @return {!Uint8Array} - */ -proto.lnrpc.ChannelCloseUpdate.prototype.getClosingTxid_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getClosingTxid())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.lnrpc.ChannelCloseUpdate} returns this - */ -proto.lnrpc.ChannelCloseUpdate.prototype.setClosingTxid = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional bool success = 2; - * @return {boolean} - */ -proto.lnrpc.ChannelCloseUpdate.prototype.getSuccess = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.lnrpc.ChannelCloseUpdate} returns this - */ -proto.lnrpc.ChannelCloseUpdate.prototype.setSuccess = function(value) { - return jspb.Message.setProto3BooleanField(this, 2, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.CloseChannelRequest.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.CloseChannelRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.CloseChannelRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.CloseChannelRequest.toObject = function(includeInstance, msg) { - var f, obj = { - channelPoint: (f = msg.getChannelPoint()) && proto.lnrpc.ChannelPoint.toObject(includeInstance, f), - force: jspb.Message.getBooleanFieldWithDefault(msg, 2, false), - targetConf: jspb.Message.getFieldWithDefault(msg, 3, 0), - satPerByte: jspb.Message.getFieldWithDefault(msg, 4, 0), - deliveryAddress: jspb.Message.getFieldWithDefault(msg, 5, ""), - satPerVbyte: jspb.Message.getFieldWithDefault(msg, 6, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.CloseChannelRequest} - */ -proto.lnrpc.CloseChannelRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.CloseChannelRequest; - return proto.lnrpc.CloseChannelRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.CloseChannelRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.CloseChannelRequest} - */ -proto.lnrpc.CloseChannelRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.lnrpc.ChannelPoint; - reader.readMessage(value,proto.lnrpc.ChannelPoint.deserializeBinaryFromReader); - msg.setChannelPoint(value); - break; - case 2: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setForce(value); - break; - case 3: - var value = /** @type {number} */ (reader.readInt32()); - msg.setTargetConf(value); - break; - case 4: - var value = /** @type {number} */ (reader.readInt64()); - msg.setSatPerByte(value); - break; - case 5: - var value = /** @type {string} */ (reader.readString()); - msg.setDeliveryAddress(value); - break; - case 6: - var value = /** @type {number} */ (reader.readUint64()); - msg.setSatPerVbyte(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.CloseChannelRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.CloseChannelRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.CloseChannelRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.CloseChannelRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getChannelPoint(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.lnrpc.ChannelPoint.serializeBinaryToWriter - ); - } - f = message.getForce(); - if (f) { - writer.writeBool( - 2, - f - ); - } - f = message.getTargetConf(); - if (f !== 0) { - writer.writeInt32( - 3, - f - ); - } - f = message.getSatPerByte(); - if (f !== 0) { - writer.writeInt64( - 4, - f - ); - } - f = message.getDeliveryAddress(); - if (f.length > 0) { - writer.writeString( - 5, - f - ); - } - f = message.getSatPerVbyte(); - if (f !== 0) { - writer.writeUint64( - 6, - f - ); - } -}; - - -/** - * optional ChannelPoint channel_point = 1; - * @return {?proto.lnrpc.ChannelPoint} - */ -proto.lnrpc.CloseChannelRequest.prototype.getChannelPoint = function() { - return /** @type{?proto.lnrpc.ChannelPoint} */ ( - jspb.Message.getWrapperField(this, proto.lnrpc.ChannelPoint, 1)); -}; - - -/** - * @param {?proto.lnrpc.ChannelPoint|undefined} value - * @return {!proto.lnrpc.CloseChannelRequest} returns this -*/ -proto.lnrpc.CloseChannelRequest.prototype.setChannelPoint = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.lnrpc.CloseChannelRequest} returns this - */ -proto.lnrpc.CloseChannelRequest.prototype.clearChannelPoint = function() { - return this.setChannelPoint(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.lnrpc.CloseChannelRequest.prototype.hasChannelPoint = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional bool force = 2; - * @return {boolean} - */ -proto.lnrpc.CloseChannelRequest.prototype.getForce = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.lnrpc.CloseChannelRequest} returns this - */ -proto.lnrpc.CloseChannelRequest.prototype.setForce = function(value) { - return jspb.Message.setProto3BooleanField(this, 2, value); -}; - - -/** - * optional int32 target_conf = 3; - * @return {number} - */ -proto.lnrpc.CloseChannelRequest.prototype.getTargetConf = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.CloseChannelRequest} returns this - */ -proto.lnrpc.CloseChannelRequest.prototype.setTargetConf = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - -/** - * optional int64 sat_per_byte = 4; - * @return {number} - */ -proto.lnrpc.CloseChannelRequest.prototype.getSatPerByte = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.CloseChannelRequest} returns this - */ -proto.lnrpc.CloseChannelRequest.prototype.setSatPerByte = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); -}; - - -/** - * optional string delivery_address = 5; - * @return {string} - */ -proto.lnrpc.CloseChannelRequest.prototype.getDeliveryAddress = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); -}; - - -/** - * @param {string} value - * @return {!proto.lnrpc.CloseChannelRequest} returns this - */ -proto.lnrpc.CloseChannelRequest.prototype.setDeliveryAddress = function(value) { - return jspb.Message.setProto3StringField(this, 5, value); -}; - - -/** - * optional uint64 sat_per_vbyte = 6; - * @return {number} - */ -proto.lnrpc.CloseChannelRequest.prototype.getSatPerVbyte = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.CloseChannelRequest} returns this - */ -proto.lnrpc.CloseChannelRequest.prototype.setSatPerVbyte = function(value) { - return jspb.Message.setProto3IntField(this, 6, value); -}; - - - -/** - * Oneof group definitions for this message. Each group defines the field - * numbers belonging to that group. When of these fields' value is set, all - * other fields in the group are cleared. During deserialization, if multiple - * fields are encountered for a group, only the last value seen will be kept. - * @private {!Array>} - * @const - */ -proto.lnrpc.CloseStatusUpdate.oneofGroups_ = [[1,3]]; - -/** - * @enum {number} - */ -proto.lnrpc.CloseStatusUpdate.UpdateCase = { - UPDATE_NOT_SET: 0, - CLOSE_PENDING: 1, - CHAN_CLOSE: 3 -}; - -/** - * @return {proto.lnrpc.CloseStatusUpdate.UpdateCase} - */ -proto.lnrpc.CloseStatusUpdate.prototype.getUpdateCase = function() { - return /** @type {proto.lnrpc.CloseStatusUpdate.UpdateCase} */(jspb.Message.computeOneofCase(this, proto.lnrpc.CloseStatusUpdate.oneofGroups_[0])); -}; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.CloseStatusUpdate.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.CloseStatusUpdate.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.CloseStatusUpdate} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.CloseStatusUpdate.toObject = function(includeInstance, msg) { - var f, obj = { - closePending: (f = msg.getClosePending()) && proto.lnrpc.PendingUpdate.toObject(includeInstance, f), - chanClose: (f = msg.getChanClose()) && proto.lnrpc.ChannelCloseUpdate.toObject(includeInstance, f) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.CloseStatusUpdate} - */ -proto.lnrpc.CloseStatusUpdate.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.CloseStatusUpdate; - return proto.lnrpc.CloseStatusUpdate.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.CloseStatusUpdate} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.CloseStatusUpdate} - */ -proto.lnrpc.CloseStatusUpdate.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.lnrpc.PendingUpdate; - reader.readMessage(value,proto.lnrpc.PendingUpdate.deserializeBinaryFromReader); - msg.setClosePending(value); - break; - case 3: - var value = new proto.lnrpc.ChannelCloseUpdate; - reader.readMessage(value,proto.lnrpc.ChannelCloseUpdate.deserializeBinaryFromReader); - msg.setChanClose(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.CloseStatusUpdate.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.CloseStatusUpdate.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.CloseStatusUpdate} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.CloseStatusUpdate.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getClosePending(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.lnrpc.PendingUpdate.serializeBinaryToWriter - ); - } - f = message.getChanClose(); - if (f != null) { - writer.writeMessage( - 3, - f, - proto.lnrpc.ChannelCloseUpdate.serializeBinaryToWriter - ); - } -}; - - -/** - * optional PendingUpdate close_pending = 1; - * @return {?proto.lnrpc.PendingUpdate} - */ -proto.lnrpc.CloseStatusUpdate.prototype.getClosePending = function() { - return /** @type{?proto.lnrpc.PendingUpdate} */ ( - jspb.Message.getWrapperField(this, proto.lnrpc.PendingUpdate, 1)); -}; - - -/** - * @param {?proto.lnrpc.PendingUpdate|undefined} value - * @return {!proto.lnrpc.CloseStatusUpdate} returns this -*/ -proto.lnrpc.CloseStatusUpdate.prototype.setClosePending = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.lnrpc.CloseStatusUpdate.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.lnrpc.CloseStatusUpdate} returns this - */ -proto.lnrpc.CloseStatusUpdate.prototype.clearClosePending = function() { - return this.setClosePending(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.lnrpc.CloseStatusUpdate.prototype.hasClosePending = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional ChannelCloseUpdate chan_close = 3; - * @return {?proto.lnrpc.ChannelCloseUpdate} - */ -proto.lnrpc.CloseStatusUpdate.prototype.getChanClose = function() { - return /** @type{?proto.lnrpc.ChannelCloseUpdate} */ ( - jspb.Message.getWrapperField(this, proto.lnrpc.ChannelCloseUpdate, 3)); -}; - - -/** - * @param {?proto.lnrpc.ChannelCloseUpdate|undefined} value - * @return {!proto.lnrpc.CloseStatusUpdate} returns this -*/ -proto.lnrpc.CloseStatusUpdate.prototype.setChanClose = function(value) { - return jspb.Message.setOneofWrapperField(this, 3, proto.lnrpc.CloseStatusUpdate.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.lnrpc.CloseStatusUpdate} returns this - */ -proto.lnrpc.CloseStatusUpdate.prototype.clearChanClose = function() { - return this.setChanClose(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.lnrpc.CloseStatusUpdate.prototype.hasChanClose = function() { - return jspb.Message.getField(this, 3) != null; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.PendingUpdate.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.PendingUpdate.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.PendingUpdate} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.PendingUpdate.toObject = function(includeInstance, msg) { - var f, obj = { - txid: msg.getTxid_asB64(), - outputIndex: jspb.Message.getFieldWithDefault(msg, 2, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.PendingUpdate} - */ -proto.lnrpc.PendingUpdate.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.PendingUpdate; - return proto.lnrpc.PendingUpdate.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.PendingUpdate} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.PendingUpdate} - */ -proto.lnrpc.PendingUpdate.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setTxid(value); - break; - case 2: - var value = /** @type {number} */ (reader.readUint32()); - msg.setOutputIndex(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.PendingUpdate.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.PendingUpdate.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.PendingUpdate} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.PendingUpdate.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getTxid_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getOutputIndex(); - if (f !== 0) { - writer.writeUint32( - 2, - f - ); - } -}; - - -/** - * optional bytes txid = 1; - * @return {!(string|Uint8Array)} - */ -proto.lnrpc.PendingUpdate.prototype.getTxid = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes txid = 1; - * This is a type-conversion wrapper around `getTxid()` - * @return {string} - */ -proto.lnrpc.PendingUpdate.prototype.getTxid_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getTxid())); -}; - - -/** - * optional bytes txid = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getTxid()` - * @return {!Uint8Array} - */ -proto.lnrpc.PendingUpdate.prototype.getTxid_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getTxid())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.lnrpc.PendingUpdate} returns this - */ -proto.lnrpc.PendingUpdate.prototype.setTxid = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional uint32 output_index = 2; - * @return {number} - */ -proto.lnrpc.PendingUpdate.prototype.getOutputIndex = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.PendingUpdate} returns this - */ -proto.lnrpc.PendingUpdate.prototype.setOutputIndex = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.ReadyForPsbtFunding.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.ReadyForPsbtFunding.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.ReadyForPsbtFunding} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.ReadyForPsbtFunding.toObject = function(includeInstance, msg) { - var f, obj = { - fundingAddress: jspb.Message.getFieldWithDefault(msg, 1, ""), - fundingAmount: jspb.Message.getFieldWithDefault(msg, 2, 0), - psbt: msg.getPsbt_asB64() - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.ReadyForPsbtFunding} - */ -proto.lnrpc.ReadyForPsbtFunding.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.ReadyForPsbtFunding; - return proto.lnrpc.ReadyForPsbtFunding.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.ReadyForPsbtFunding} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.ReadyForPsbtFunding} - */ -proto.lnrpc.ReadyForPsbtFunding.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setFundingAddress(value); - break; - case 2: - var value = /** @type {number} */ (reader.readInt64()); - msg.setFundingAmount(value); - break; - case 3: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setPsbt(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.ReadyForPsbtFunding.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.ReadyForPsbtFunding.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.ReadyForPsbtFunding} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.ReadyForPsbtFunding.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getFundingAddress(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getFundingAmount(); - if (f !== 0) { - writer.writeInt64( - 2, - f - ); - } - f = message.getPsbt_asU8(); - if (f.length > 0) { - writer.writeBytes( - 3, - f - ); - } -}; - - -/** - * optional string funding_address = 1; - * @return {string} - */ -proto.lnrpc.ReadyForPsbtFunding.prototype.getFundingAddress = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.lnrpc.ReadyForPsbtFunding} returns this - */ -proto.lnrpc.ReadyForPsbtFunding.prototype.setFundingAddress = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional int64 funding_amount = 2; - * @return {number} - */ -proto.lnrpc.ReadyForPsbtFunding.prototype.getFundingAmount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.ReadyForPsbtFunding} returns this - */ -proto.lnrpc.ReadyForPsbtFunding.prototype.setFundingAmount = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * optional bytes psbt = 3; - * @return {!(string|Uint8Array)} - */ -proto.lnrpc.ReadyForPsbtFunding.prototype.getPsbt = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * optional bytes psbt = 3; - * This is a type-conversion wrapper around `getPsbt()` - * @return {string} - */ -proto.lnrpc.ReadyForPsbtFunding.prototype.getPsbt_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getPsbt())); -}; - - -/** - * optional bytes psbt = 3; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getPsbt()` - * @return {!Uint8Array} - */ -proto.lnrpc.ReadyForPsbtFunding.prototype.getPsbt_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getPsbt())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.lnrpc.ReadyForPsbtFunding} returns this - */ -proto.lnrpc.ReadyForPsbtFunding.prototype.setPsbt = function(value) { - return jspb.Message.setProto3BytesField(this, 3, value); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.lnrpc.BatchOpenChannelRequest.repeatedFields_ = [1]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.BatchOpenChannelRequest.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.BatchOpenChannelRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.BatchOpenChannelRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.BatchOpenChannelRequest.toObject = function(includeInstance, msg) { - var f, obj = { - channelsList: jspb.Message.toObjectList(msg.getChannelsList(), - proto.lnrpc.BatchOpenChannel.toObject, includeInstance), - targetConf: jspb.Message.getFieldWithDefault(msg, 2, 0), - satPerVbyte: jspb.Message.getFieldWithDefault(msg, 3, 0), - minConfs: jspb.Message.getFieldWithDefault(msg, 4, 0), - spendUnconfirmed: jspb.Message.getBooleanFieldWithDefault(msg, 5, false), - label: jspb.Message.getFieldWithDefault(msg, 6, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.BatchOpenChannelRequest} - */ -proto.lnrpc.BatchOpenChannelRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.BatchOpenChannelRequest; - return proto.lnrpc.BatchOpenChannelRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.BatchOpenChannelRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.BatchOpenChannelRequest} - */ -proto.lnrpc.BatchOpenChannelRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.lnrpc.BatchOpenChannel; - reader.readMessage(value,proto.lnrpc.BatchOpenChannel.deserializeBinaryFromReader); - msg.addChannels(value); - break; - case 2: - var value = /** @type {number} */ (reader.readInt32()); - msg.setTargetConf(value); - break; - case 3: - var value = /** @type {number} */ (reader.readInt64()); - msg.setSatPerVbyte(value); - break; - case 4: - var value = /** @type {number} */ (reader.readInt32()); - msg.setMinConfs(value); - break; - case 5: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setSpendUnconfirmed(value); - break; - case 6: - var value = /** @type {string} */ (reader.readString()); - msg.setLabel(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.BatchOpenChannelRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.BatchOpenChannelRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.BatchOpenChannelRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.BatchOpenChannelRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getChannelsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 1, - f, - proto.lnrpc.BatchOpenChannel.serializeBinaryToWriter - ); - } - f = message.getTargetConf(); - if (f !== 0) { - writer.writeInt32( - 2, - f - ); - } - f = message.getSatPerVbyte(); - if (f !== 0) { - writer.writeInt64( - 3, - f - ); - } - f = message.getMinConfs(); - if (f !== 0) { - writer.writeInt32( - 4, - f - ); - } - f = message.getSpendUnconfirmed(); - if (f) { - writer.writeBool( - 5, - f - ); - } - f = message.getLabel(); - if (f.length > 0) { - writer.writeString( - 6, - f - ); - } -}; - - -/** - * repeated BatchOpenChannel channels = 1; - * @return {!Array} - */ -proto.lnrpc.BatchOpenChannelRequest.prototype.getChannelsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.BatchOpenChannel, 1)); -}; - - -/** - * @param {!Array} value - * @return {!proto.lnrpc.BatchOpenChannelRequest} returns this -*/ -proto.lnrpc.BatchOpenChannelRequest.prototype.setChannelsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); -}; - - -/** - * @param {!proto.lnrpc.BatchOpenChannel=} opt_value - * @param {number=} opt_index - * @return {!proto.lnrpc.BatchOpenChannel} - */ -proto.lnrpc.BatchOpenChannelRequest.prototype.addChannels = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.lnrpc.BatchOpenChannel, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.lnrpc.BatchOpenChannelRequest} returns this - */ -proto.lnrpc.BatchOpenChannelRequest.prototype.clearChannelsList = function() { - return this.setChannelsList([]); -}; - - -/** - * optional int32 target_conf = 2; - * @return {number} - */ -proto.lnrpc.BatchOpenChannelRequest.prototype.getTargetConf = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.BatchOpenChannelRequest} returns this - */ -proto.lnrpc.BatchOpenChannelRequest.prototype.setTargetConf = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * optional int64 sat_per_vbyte = 3; - * @return {number} - */ -proto.lnrpc.BatchOpenChannelRequest.prototype.getSatPerVbyte = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.BatchOpenChannelRequest} returns this - */ -proto.lnrpc.BatchOpenChannelRequest.prototype.setSatPerVbyte = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - -/** - * optional int32 min_confs = 4; - * @return {number} - */ -proto.lnrpc.BatchOpenChannelRequest.prototype.getMinConfs = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.BatchOpenChannelRequest} returns this - */ -proto.lnrpc.BatchOpenChannelRequest.prototype.setMinConfs = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); -}; - - -/** - * optional bool spend_unconfirmed = 5; - * @return {boolean} - */ -proto.lnrpc.BatchOpenChannelRequest.prototype.getSpendUnconfirmed = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 5, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.lnrpc.BatchOpenChannelRequest} returns this - */ -proto.lnrpc.BatchOpenChannelRequest.prototype.setSpendUnconfirmed = function(value) { - return jspb.Message.setProto3BooleanField(this, 5, value); -}; - - -/** - * optional string label = 6; - * @return {string} - */ -proto.lnrpc.BatchOpenChannelRequest.prototype.getLabel = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); -}; - - -/** - * @param {string} value - * @return {!proto.lnrpc.BatchOpenChannelRequest} returns this - */ -proto.lnrpc.BatchOpenChannelRequest.prototype.setLabel = function(value) { - return jspb.Message.setProto3StringField(this, 6, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.BatchOpenChannel.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.BatchOpenChannel.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.BatchOpenChannel} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.BatchOpenChannel.toObject = function(includeInstance, msg) { - var f, obj = { - nodePubkey: msg.getNodePubkey_asB64(), - localFundingAmount: jspb.Message.getFieldWithDefault(msg, 2, 0), - pushSat: jspb.Message.getFieldWithDefault(msg, 3, 0), - pb_private: jspb.Message.getBooleanFieldWithDefault(msg, 4, false), - minHtlcMsat: jspb.Message.getFieldWithDefault(msg, 5, 0), - remoteCsvDelay: jspb.Message.getFieldWithDefault(msg, 6, 0), - closeAddress: jspb.Message.getFieldWithDefault(msg, 7, ""), - pendingChanId: msg.getPendingChanId_asB64(), - commitmentType: jspb.Message.getFieldWithDefault(msg, 9, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.BatchOpenChannel} - */ -proto.lnrpc.BatchOpenChannel.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.BatchOpenChannel; - return proto.lnrpc.BatchOpenChannel.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.BatchOpenChannel} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.BatchOpenChannel} - */ -proto.lnrpc.BatchOpenChannel.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setNodePubkey(value); - break; - case 2: - var value = /** @type {number} */ (reader.readInt64()); - msg.setLocalFundingAmount(value); - break; - case 3: - var value = /** @type {number} */ (reader.readInt64()); - msg.setPushSat(value); - break; - case 4: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setPrivate(value); - break; - case 5: - var value = /** @type {number} */ (reader.readInt64()); - msg.setMinHtlcMsat(value); - break; - case 6: - var value = /** @type {number} */ (reader.readUint32()); - msg.setRemoteCsvDelay(value); - break; - case 7: - var value = /** @type {string} */ (reader.readString()); - msg.setCloseAddress(value); - break; - case 8: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setPendingChanId(value); - break; - case 9: - var value = /** @type {!proto.lnrpc.CommitmentType} */ (reader.readEnum()); - msg.setCommitmentType(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.BatchOpenChannel.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.BatchOpenChannel.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.BatchOpenChannel} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.BatchOpenChannel.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getNodePubkey_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getLocalFundingAmount(); - if (f !== 0) { - writer.writeInt64( - 2, - f - ); - } - f = message.getPushSat(); - if (f !== 0) { - writer.writeInt64( - 3, - f - ); - } - f = message.getPrivate(); - if (f) { - writer.writeBool( - 4, - f - ); - } - f = message.getMinHtlcMsat(); - if (f !== 0) { - writer.writeInt64( - 5, - f - ); - } - f = message.getRemoteCsvDelay(); - if (f !== 0) { - writer.writeUint32( - 6, - f - ); - } - f = message.getCloseAddress(); - if (f.length > 0) { - writer.writeString( - 7, - f - ); - } - f = message.getPendingChanId_asU8(); - if (f.length > 0) { - writer.writeBytes( - 8, - f - ); - } - f = message.getCommitmentType(); - if (f !== 0.0) { - writer.writeEnum( - 9, - f - ); - } -}; - - -/** - * optional bytes node_pubkey = 1; - * @return {!(string|Uint8Array)} - */ -proto.lnrpc.BatchOpenChannel.prototype.getNodePubkey = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes node_pubkey = 1; - * This is a type-conversion wrapper around `getNodePubkey()` - * @return {string} - */ -proto.lnrpc.BatchOpenChannel.prototype.getNodePubkey_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getNodePubkey())); -}; - - -/** - * optional bytes node_pubkey = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getNodePubkey()` - * @return {!Uint8Array} - */ -proto.lnrpc.BatchOpenChannel.prototype.getNodePubkey_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getNodePubkey())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.lnrpc.BatchOpenChannel} returns this - */ -proto.lnrpc.BatchOpenChannel.prototype.setNodePubkey = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional int64 local_funding_amount = 2; - * @return {number} - */ -proto.lnrpc.BatchOpenChannel.prototype.getLocalFundingAmount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.BatchOpenChannel} returns this - */ -proto.lnrpc.BatchOpenChannel.prototype.setLocalFundingAmount = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * optional int64 push_sat = 3; - * @return {number} - */ -proto.lnrpc.BatchOpenChannel.prototype.getPushSat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.BatchOpenChannel} returns this - */ -proto.lnrpc.BatchOpenChannel.prototype.setPushSat = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - -/** - * optional bool private = 4; - * @return {boolean} - */ -proto.lnrpc.BatchOpenChannel.prototype.getPrivate = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 4, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.lnrpc.BatchOpenChannel} returns this - */ -proto.lnrpc.BatchOpenChannel.prototype.setPrivate = function(value) { - return jspb.Message.setProto3BooleanField(this, 4, value); -}; - - -/** - * optional int64 min_htlc_msat = 5; - * @return {number} - */ -proto.lnrpc.BatchOpenChannel.prototype.getMinHtlcMsat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.BatchOpenChannel} returns this - */ -proto.lnrpc.BatchOpenChannel.prototype.setMinHtlcMsat = function(value) { - return jspb.Message.setProto3IntField(this, 5, value); -}; - - -/** - * optional uint32 remote_csv_delay = 6; - * @return {number} - */ -proto.lnrpc.BatchOpenChannel.prototype.getRemoteCsvDelay = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.BatchOpenChannel} returns this - */ -proto.lnrpc.BatchOpenChannel.prototype.setRemoteCsvDelay = function(value) { - return jspb.Message.setProto3IntField(this, 6, value); -}; - - -/** - * optional string close_address = 7; - * @return {string} - */ -proto.lnrpc.BatchOpenChannel.prototype.getCloseAddress = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); -}; - - -/** - * @param {string} value - * @return {!proto.lnrpc.BatchOpenChannel} returns this - */ -proto.lnrpc.BatchOpenChannel.prototype.setCloseAddress = function(value) { - return jspb.Message.setProto3StringField(this, 7, value); -}; - - -/** - * optional bytes pending_chan_id = 8; - * @return {!(string|Uint8Array)} - */ -proto.lnrpc.BatchOpenChannel.prototype.getPendingChanId = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 8, "")); -}; - - -/** - * optional bytes pending_chan_id = 8; - * This is a type-conversion wrapper around `getPendingChanId()` - * @return {string} - */ -proto.lnrpc.BatchOpenChannel.prototype.getPendingChanId_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getPendingChanId())); -}; - - -/** - * optional bytes pending_chan_id = 8; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getPendingChanId()` - * @return {!Uint8Array} - */ -proto.lnrpc.BatchOpenChannel.prototype.getPendingChanId_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getPendingChanId())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.lnrpc.BatchOpenChannel} returns this - */ -proto.lnrpc.BatchOpenChannel.prototype.setPendingChanId = function(value) { - return jspb.Message.setProto3BytesField(this, 8, value); -}; - - -/** - * optional CommitmentType commitment_type = 9; - * @return {!proto.lnrpc.CommitmentType} - */ -proto.lnrpc.BatchOpenChannel.prototype.getCommitmentType = function() { - return /** @type {!proto.lnrpc.CommitmentType} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); -}; - - -/** - * @param {!proto.lnrpc.CommitmentType} value - * @return {!proto.lnrpc.BatchOpenChannel} returns this - */ -proto.lnrpc.BatchOpenChannel.prototype.setCommitmentType = function(value) { - return jspb.Message.setProto3EnumField(this, 9, value); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.lnrpc.BatchOpenChannelResponse.repeatedFields_ = [1]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.BatchOpenChannelResponse.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.BatchOpenChannelResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.BatchOpenChannelResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.BatchOpenChannelResponse.toObject = function(includeInstance, msg) { - var f, obj = { - pendingChannelsList: jspb.Message.toObjectList(msg.getPendingChannelsList(), - proto.lnrpc.PendingUpdate.toObject, includeInstance) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.BatchOpenChannelResponse} - */ -proto.lnrpc.BatchOpenChannelResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.BatchOpenChannelResponse; - return proto.lnrpc.BatchOpenChannelResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.BatchOpenChannelResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.BatchOpenChannelResponse} - */ -proto.lnrpc.BatchOpenChannelResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.lnrpc.PendingUpdate; - reader.readMessage(value,proto.lnrpc.PendingUpdate.deserializeBinaryFromReader); - msg.addPendingChannels(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.BatchOpenChannelResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.BatchOpenChannelResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.BatchOpenChannelResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.BatchOpenChannelResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getPendingChannelsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 1, - f, - proto.lnrpc.PendingUpdate.serializeBinaryToWriter - ); - } -}; - - -/** - * repeated PendingUpdate pending_channels = 1; - * @return {!Array} - */ -proto.lnrpc.BatchOpenChannelResponse.prototype.getPendingChannelsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.PendingUpdate, 1)); -}; - - -/** - * @param {!Array} value - * @return {!proto.lnrpc.BatchOpenChannelResponse} returns this -*/ -proto.lnrpc.BatchOpenChannelResponse.prototype.setPendingChannelsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); -}; - - -/** - * @param {!proto.lnrpc.PendingUpdate=} opt_value - * @param {number=} opt_index - * @return {!proto.lnrpc.PendingUpdate} - */ -proto.lnrpc.BatchOpenChannelResponse.prototype.addPendingChannels = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.lnrpc.PendingUpdate, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.lnrpc.BatchOpenChannelResponse} returns this - */ -proto.lnrpc.BatchOpenChannelResponse.prototype.clearPendingChannelsList = function() { - return this.setPendingChannelsList([]); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.OpenChannelRequest.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.OpenChannelRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.OpenChannelRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.OpenChannelRequest.toObject = function(includeInstance, msg) { - var f, obj = { - satPerVbyte: jspb.Message.getFieldWithDefault(msg, 1, 0), - nodePubkey: msg.getNodePubkey_asB64(), - nodePubkeyString: jspb.Message.getFieldWithDefault(msg, 3, ""), - localFundingAmount: jspb.Message.getFieldWithDefault(msg, 4, 0), - pushSat: jspb.Message.getFieldWithDefault(msg, 5, 0), - targetConf: jspb.Message.getFieldWithDefault(msg, 6, 0), - satPerByte: jspb.Message.getFieldWithDefault(msg, 7, 0), - pb_private: jspb.Message.getBooleanFieldWithDefault(msg, 8, false), - minHtlcMsat: jspb.Message.getFieldWithDefault(msg, 9, 0), - remoteCsvDelay: jspb.Message.getFieldWithDefault(msg, 10, 0), - minConfs: jspb.Message.getFieldWithDefault(msg, 11, 0), - spendUnconfirmed: jspb.Message.getBooleanFieldWithDefault(msg, 12, false), - closeAddress: jspb.Message.getFieldWithDefault(msg, 13, ""), - fundingShim: (f = msg.getFundingShim()) && proto.lnrpc.FundingShim.toObject(includeInstance, f), - remoteMaxValueInFlightMsat: jspb.Message.getFieldWithDefault(msg, 15, 0), - remoteMaxHtlcs: jspb.Message.getFieldWithDefault(msg, 16, 0), - maxLocalCsv: jspb.Message.getFieldWithDefault(msg, 17, 0), - commitmentType: jspb.Message.getFieldWithDefault(msg, 18, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.OpenChannelRequest} - */ -proto.lnrpc.OpenChannelRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.OpenChannelRequest; - return proto.lnrpc.OpenChannelRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.OpenChannelRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.OpenChannelRequest} - */ -proto.lnrpc.OpenChannelRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readUint64()); - msg.setSatPerVbyte(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setNodePubkey(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setNodePubkeyString(value); - break; - case 4: - var value = /** @type {number} */ (reader.readInt64()); - msg.setLocalFundingAmount(value); - break; - case 5: - var value = /** @type {number} */ (reader.readInt64()); - msg.setPushSat(value); - break; - case 6: - var value = /** @type {number} */ (reader.readInt32()); - msg.setTargetConf(value); - break; - case 7: - var value = /** @type {number} */ (reader.readInt64()); - msg.setSatPerByte(value); - break; - case 8: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setPrivate(value); - break; - case 9: - var value = /** @type {number} */ (reader.readInt64()); - msg.setMinHtlcMsat(value); - break; - case 10: - var value = /** @type {number} */ (reader.readUint32()); - msg.setRemoteCsvDelay(value); - break; - case 11: - var value = /** @type {number} */ (reader.readInt32()); - msg.setMinConfs(value); - break; - case 12: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setSpendUnconfirmed(value); - break; - case 13: - var value = /** @type {string} */ (reader.readString()); - msg.setCloseAddress(value); - break; - case 14: - var value = new proto.lnrpc.FundingShim; - reader.readMessage(value,proto.lnrpc.FundingShim.deserializeBinaryFromReader); - msg.setFundingShim(value); - break; - case 15: - var value = /** @type {number} */ (reader.readUint64()); - msg.setRemoteMaxValueInFlightMsat(value); - break; - case 16: - var value = /** @type {number} */ (reader.readUint32()); - msg.setRemoteMaxHtlcs(value); - break; - case 17: - var value = /** @type {number} */ (reader.readUint32()); - msg.setMaxLocalCsv(value); - break; - case 18: - var value = /** @type {!proto.lnrpc.CommitmentType} */ (reader.readEnum()); - msg.setCommitmentType(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.OpenChannelRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.OpenChannelRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.OpenChannelRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.OpenChannelRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getSatPerVbyte(); - if (f !== 0) { - writer.writeUint64( - 1, - f - ); - } - f = message.getNodePubkey_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } - f = message.getNodePubkeyString(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } - f = message.getLocalFundingAmount(); - if (f !== 0) { - writer.writeInt64( - 4, - f - ); - } - f = message.getPushSat(); - if (f !== 0) { - writer.writeInt64( - 5, - f - ); - } - f = message.getTargetConf(); - if (f !== 0) { - writer.writeInt32( - 6, - f - ); - } - f = message.getSatPerByte(); - if (f !== 0) { - writer.writeInt64( - 7, - f - ); - } - f = message.getPrivate(); - if (f) { - writer.writeBool( - 8, - f - ); - } - f = message.getMinHtlcMsat(); - if (f !== 0) { - writer.writeInt64( - 9, - f - ); - } - f = message.getRemoteCsvDelay(); - if (f !== 0) { - writer.writeUint32( - 10, - f - ); - } - f = message.getMinConfs(); - if (f !== 0) { - writer.writeInt32( - 11, - f - ); - } - f = message.getSpendUnconfirmed(); - if (f) { - writer.writeBool( - 12, - f - ); - } - f = message.getCloseAddress(); - if (f.length > 0) { - writer.writeString( - 13, - f - ); - } - f = message.getFundingShim(); - if (f != null) { - writer.writeMessage( - 14, - f, - proto.lnrpc.FundingShim.serializeBinaryToWriter - ); - } - f = message.getRemoteMaxValueInFlightMsat(); - if (f !== 0) { - writer.writeUint64( - 15, - f - ); - } - f = message.getRemoteMaxHtlcs(); - if (f !== 0) { - writer.writeUint32( - 16, - f - ); - } - f = message.getMaxLocalCsv(); - if (f !== 0) { - writer.writeUint32( - 17, - f - ); - } - f = message.getCommitmentType(); - if (f !== 0.0) { - writer.writeEnum( - 18, - f - ); - } -}; - - -/** - * optional uint64 sat_per_vbyte = 1; - * @return {number} - */ -proto.lnrpc.OpenChannelRequest.prototype.getSatPerVbyte = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.OpenChannelRequest} returns this - */ -proto.lnrpc.OpenChannelRequest.prototype.setSatPerVbyte = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); -}; - - -/** - * optional bytes node_pubkey = 2; - * @return {!(string|Uint8Array)} - */ -proto.lnrpc.OpenChannelRequest.prototype.getNodePubkey = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes node_pubkey = 2; - * This is a type-conversion wrapper around `getNodePubkey()` - * @return {string} - */ -proto.lnrpc.OpenChannelRequest.prototype.getNodePubkey_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getNodePubkey())); -}; - - -/** - * optional bytes node_pubkey = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getNodePubkey()` - * @return {!Uint8Array} - */ -proto.lnrpc.OpenChannelRequest.prototype.getNodePubkey_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getNodePubkey())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.lnrpc.OpenChannelRequest} returns this - */ -proto.lnrpc.OpenChannelRequest.prototype.setNodePubkey = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); -}; - - -/** - * optional string node_pubkey_string = 3; - * @return {string} - */ -proto.lnrpc.OpenChannelRequest.prototype.getNodePubkeyString = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * @param {string} value - * @return {!proto.lnrpc.OpenChannelRequest} returns this - */ -proto.lnrpc.OpenChannelRequest.prototype.setNodePubkeyString = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); -}; - - -/** - * optional int64 local_funding_amount = 4; - * @return {number} - */ -proto.lnrpc.OpenChannelRequest.prototype.getLocalFundingAmount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.OpenChannelRequest} returns this - */ -proto.lnrpc.OpenChannelRequest.prototype.setLocalFundingAmount = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); -}; - - -/** - * optional int64 push_sat = 5; - * @return {number} - */ -proto.lnrpc.OpenChannelRequest.prototype.getPushSat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.OpenChannelRequest} returns this - */ -proto.lnrpc.OpenChannelRequest.prototype.setPushSat = function(value) { - return jspb.Message.setProto3IntField(this, 5, value); -}; - - -/** - * optional int32 target_conf = 6; - * @return {number} - */ -proto.lnrpc.OpenChannelRequest.prototype.getTargetConf = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.OpenChannelRequest} returns this - */ -proto.lnrpc.OpenChannelRequest.prototype.setTargetConf = function(value) { - return jspb.Message.setProto3IntField(this, 6, value); -}; - - -/** - * optional int64 sat_per_byte = 7; - * @return {number} - */ -proto.lnrpc.OpenChannelRequest.prototype.getSatPerByte = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.OpenChannelRequest} returns this - */ -proto.lnrpc.OpenChannelRequest.prototype.setSatPerByte = function(value) { - return jspb.Message.setProto3IntField(this, 7, value); -}; - - -/** - * optional bool private = 8; - * @return {boolean} - */ -proto.lnrpc.OpenChannelRequest.prototype.getPrivate = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 8, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.lnrpc.OpenChannelRequest} returns this - */ -proto.lnrpc.OpenChannelRequest.prototype.setPrivate = function(value) { - return jspb.Message.setProto3BooleanField(this, 8, value); -}; - - -/** - * optional int64 min_htlc_msat = 9; - * @return {number} - */ -proto.lnrpc.OpenChannelRequest.prototype.getMinHtlcMsat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.OpenChannelRequest} returns this - */ -proto.lnrpc.OpenChannelRequest.prototype.setMinHtlcMsat = function(value) { - return jspb.Message.setProto3IntField(this, 9, value); -}; - - -/** - * optional uint32 remote_csv_delay = 10; - * @return {number} - */ -proto.lnrpc.OpenChannelRequest.prototype.getRemoteCsvDelay = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 10, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.OpenChannelRequest} returns this - */ -proto.lnrpc.OpenChannelRequest.prototype.setRemoteCsvDelay = function(value) { - return jspb.Message.setProto3IntField(this, 10, value); -}; - - -/** - * optional int32 min_confs = 11; - * @return {number} - */ -proto.lnrpc.OpenChannelRequest.prototype.getMinConfs = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 11, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.OpenChannelRequest} returns this - */ -proto.lnrpc.OpenChannelRequest.prototype.setMinConfs = function(value) { - return jspb.Message.setProto3IntField(this, 11, value); -}; - - -/** - * optional bool spend_unconfirmed = 12; - * @return {boolean} - */ -proto.lnrpc.OpenChannelRequest.prototype.getSpendUnconfirmed = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 12, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.lnrpc.OpenChannelRequest} returns this - */ -proto.lnrpc.OpenChannelRequest.prototype.setSpendUnconfirmed = function(value) { - return jspb.Message.setProto3BooleanField(this, 12, value); -}; - - -/** - * optional string close_address = 13; - * @return {string} - */ -proto.lnrpc.OpenChannelRequest.prototype.getCloseAddress = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 13, "")); -}; - - -/** - * @param {string} value - * @return {!proto.lnrpc.OpenChannelRequest} returns this - */ -proto.lnrpc.OpenChannelRequest.prototype.setCloseAddress = function(value) { - return jspb.Message.setProto3StringField(this, 13, value); -}; - - -/** - * optional FundingShim funding_shim = 14; - * @return {?proto.lnrpc.FundingShim} - */ -proto.lnrpc.OpenChannelRequest.prototype.getFundingShim = function() { - return /** @type{?proto.lnrpc.FundingShim} */ ( - jspb.Message.getWrapperField(this, proto.lnrpc.FundingShim, 14)); -}; - - -/** - * @param {?proto.lnrpc.FundingShim|undefined} value - * @return {!proto.lnrpc.OpenChannelRequest} returns this -*/ -proto.lnrpc.OpenChannelRequest.prototype.setFundingShim = function(value) { - return jspb.Message.setWrapperField(this, 14, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.lnrpc.OpenChannelRequest} returns this - */ -proto.lnrpc.OpenChannelRequest.prototype.clearFundingShim = function() { - return this.setFundingShim(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.lnrpc.OpenChannelRequest.prototype.hasFundingShim = function() { - return jspb.Message.getField(this, 14) != null; -}; - - -/** - * optional uint64 remote_max_value_in_flight_msat = 15; - * @return {number} - */ -proto.lnrpc.OpenChannelRequest.prototype.getRemoteMaxValueInFlightMsat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 15, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.OpenChannelRequest} returns this - */ -proto.lnrpc.OpenChannelRequest.prototype.setRemoteMaxValueInFlightMsat = function(value) { - return jspb.Message.setProto3IntField(this, 15, value); -}; - - -/** - * optional uint32 remote_max_htlcs = 16; - * @return {number} - */ -proto.lnrpc.OpenChannelRequest.prototype.getRemoteMaxHtlcs = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 16, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.OpenChannelRequest} returns this - */ -proto.lnrpc.OpenChannelRequest.prototype.setRemoteMaxHtlcs = function(value) { - return jspb.Message.setProto3IntField(this, 16, value); -}; - - -/** - * optional uint32 max_local_csv = 17; - * @return {number} - */ -proto.lnrpc.OpenChannelRequest.prototype.getMaxLocalCsv = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 17, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.OpenChannelRequest} returns this - */ -proto.lnrpc.OpenChannelRequest.prototype.setMaxLocalCsv = function(value) { - return jspb.Message.setProto3IntField(this, 17, value); -}; - - -/** - * optional CommitmentType commitment_type = 18; - * @return {!proto.lnrpc.CommitmentType} - */ -proto.lnrpc.OpenChannelRequest.prototype.getCommitmentType = function() { - return /** @type {!proto.lnrpc.CommitmentType} */ (jspb.Message.getFieldWithDefault(this, 18, 0)); -}; - - -/** - * @param {!proto.lnrpc.CommitmentType} value - * @return {!proto.lnrpc.OpenChannelRequest} returns this - */ -proto.lnrpc.OpenChannelRequest.prototype.setCommitmentType = function(value) { - return jspb.Message.setProto3EnumField(this, 18, value); -}; - - - -/** - * Oneof group definitions for this message. Each group defines the field - * numbers belonging to that group. When of these fields' value is set, all - * other fields in the group are cleared. During deserialization, if multiple - * fields are encountered for a group, only the last value seen will be kept. - * @private {!Array>} - * @const - */ -proto.lnrpc.OpenStatusUpdate.oneofGroups_ = [[1,3,5]]; - -/** - * @enum {number} - */ -proto.lnrpc.OpenStatusUpdate.UpdateCase = { - UPDATE_NOT_SET: 0, - CHAN_PENDING: 1, - CHAN_OPEN: 3, - PSBT_FUND: 5 -}; - -/** - * @return {proto.lnrpc.OpenStatusUpdate.UpdateCase} - */ -proto.lnrpc.OpenStatusUpdate.prototype.getUpdateCase = function() { - return /** @type {proto.lnrpc.OpenStatusUpdate.UpdateCase} */(jspb.Message.computeOneofCase(this, proto.lnrpc.OpenStatusUpdate.oneofGroups_[0])); -}; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.OpenStatusUpdate.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.OpenStatusUpdate.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.OpenStatusUpdate} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.OpenStatusUpdate.toObject = function(includeInstance, msg) { - var f, obj = { - chanPending: (f = msg.getChanPending()) && proto.lnrpc.PendingUpdate.toObject(includeInstance, f), - chanOpen: (f = msg.getChanOpen()) && proto.lnrpc.ChannelOpenUpdate.toObject(includeInstance, f), - psbtFund: (f = msg.getPsbtFund()) && proto.lnrpc.ReadyForPsbtFunding.toObject(includeInstance, f), - pendingChanId: msg.getPendingChanId_asB64() - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.OpenStatusUpdate} - */ -proto.lnrpc.OpenStatusUpdate.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.OpenStatusUpdate; - return proto.lnrpc.OpenStatusUpdate.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.OpenStatusUpdate} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.OpenStatusUpdate} - */ -proto.lnrpc.OpenStatusUpdate.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.lnrpc.PendingUpdate; - reader.readMessage(value,proto.lnrpc.PendingUpdate.deserializeBinaryFromReader); - msg.setChanPending(value); - break; - case 3: - var value = new proto.lnrpc.ChannelOpenUpdate; - reader.readMessage(value,proto.lnrpc.ChannelOpenUpdate.deserializeBinaryFromReader); - msg.setChanOpen(value); - break; - case 5: - var value = new proto.lnrpc.ReadyForPsbtFunding; - reader.readMessage(value,proto.lnrpc.ReadyForPsbtFunding.deserializeBinaryFromReader); - msg.setPsbtFund(value); - break; - case 4: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setPendingChanId(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.OpenStatusUpdate.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.OpenStatusUpdate.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.OpenStatusUpdate} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.OpenStatusUpdate.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getChanPending(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.lnrpc.PendingUpdate.serializeBinaryToWriter - ); - } - f = message.getChanOpen(); - if (f != null) { - writer.writeMessage( - 3, - f, - proto.lnrpc.ChannelOpenUpdate.serializeBinaryToWriter - ); - } - f = message.getPsbtFund(); - if (f != null) { - writer.writeMessage( - 5, - f, - proto.lnrpc.ReadyForPsbtFunding.serializeBinaryToWriter - ); - } - f = message.getPendingChanId_asU8(); - if (f.length > 0) { - writer.writeBytes( - 4, - f - ); - } -}; - - -/** - * optional PendingUpdate chan_pending = 1; - * @return {?proto.lnrpc.PendingUpdate} - */ -proto.lnrpc.OpenStatusUpdate.prototype.getChanPending = function() { - return /** @type{?proto.lnrpc.PendingUpdate} */ ( - jspb.Message.getWrapperField(this, proto.lnrpc.PendingUpdate, 1)); -}; - - -/** - * @param {?proto.lnrpc.PendingUpdate|undefined} value - * @return {!proto.lnrpc.OpenStatusUpdate} returns this -*/ -proto.lnrpc.OpenStatusUpdate.prototype.setChanPending = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.lnrpc.OpenStatusUpdate.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.lnrpc.OpenStatusUpdate} returns this - */ -proto.lnrpc.OpenStatusUpdate.prototype.clearChanPending = function() { - return this.setChanPending(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.lnrpc.OpenStatusUpdate.prototype.hasChanPending = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional ChannelOpenUpdate chan_open = 3; - * @return {?proto.lnrpc.ChannelOpenUpdate} - */ -proto.lnrpc.OpenStatusUpdate.prototype.getChanOpen = function() { - return /** @type{?proto.lnrpc.ChannelOpenUpdate} */ ( - jspb.Message.getWrapperField(this, proto.lnrpc.ChannelOpenUpdate, 3)); -}; - - -/** - * @param {?proto.lnrpc.ChannelOpenUpdate|undefined} value - * @return {!proto.lnrpc.OpenStatusUpdate} returns this -*/ -proto.lnrpc.OpenStatusUpdate.prototype.setChanOpen = function(value) { - return jspb.Message.setOneofWrapperField(this, 3, proto.lnrpc.OpenStatusUpdate.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.lnrpc.OpenStatusUpdate} returns this - */ -proto.lnrpc.OpenStatusUpdate.prototype.clearChanOpen = function() { - return this.setChanOpen(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.lnrpc.OpenStatusUpdate.prototype.hasChanOpen = function() { - return jspb.Message.getField(this, 3) != null; -}; - - -/** - * optional ReadyForPsbtFunding psbt_fund = 5; - * @return {?proto.lnrpc.ReadyForPsbtFunding} - */ -proto.lnrpc.OpenStatusUpdate.prototype.getPsbtFund = function() { - return /** @type{?proto.lnrpc.ReadyForPsbtFunding} */ ( - jspb.Message.getWrapperField(this, proto.lnrpc.ReadyForPsbtFunding, 5)); -}; - - -/** - * @param {?proto.lnrpc.ReadyForPsbtFunding|undefined} value - * @return {!proto.lnrpc.OpenStatusUpdate} returns this -*/ -proto.lnrpc.OpenStatusUpdate.prototype.setPsbtFund = function(value) { - return jspb.Message.setOneofWrapperField(this, 5, proto.lnrpc.OpenStatusUpdate.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.lnrpc.OpenStatusUpdate} returns this - */ -proto.lnrpc.OpenStatusUpdate.prototype.clearPsbtFund = function() { - return this.setPsbtFund(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.lnrpc.OpenStatusUpdate.prototype.hasPsbtFund = function() { - return jspb.Message.getField(this, 5) != null; -}; - - -/** - * optional bytes pending_chan_id = 4; - * @return {!(string|Uint8Array)} - */ -proto.lnrpc.OpenStatusUpdate.prototype.getPendingChanId = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 4, "")); -}; - - -/** - * optional bytes pending_chan_id = 4; - * This is a type-conversion wrapper around `getPendingChanId()` - * @return {string} - */ -proto.lnrpc.OpenStatusUpdate.prototype.getPendingChanId_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getPendingChanId())); -}; - - -/** - * optional bytes pending_chan_id = 4; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getPendingChanId()` - * @return {!Uint8Array} - */ -proto.lnrpc.OpenStatusUpdate.prototype.getPendingChanId_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getPendingChanId())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.lnrpc.OpenStatusUpdate} returns this - */ -proto.lnrpc.OpenStatusUpdate.prototype.setPendingChanId = function(value) { - return jspb.Message.setProto3BytesField(this, 4, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.KeyLocator.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.KeyLocator.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.KeyLocator} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.KeyLocator.toObject = function(includeInstance, msg) { - var f, obj = { - keyFamily: jspb.Message.getFieldWithDefault(msg, 1, 0), - keyIndex: jspb.Message.getFieldWithDefault(msg, 2, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.KeyLocator} - */ -proto.lnrpc.KeyLocator.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.KeyLocator; - return proto.lnrpc.KeyLocator.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.KeyLocator} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.KeyLocator} - */ -proto.lnrpc.KeyLocator.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readInt32()); - msg.setKeyFamily(value); - break; - case 2: - var value = /** @type {number} */ (reader.readInt32()); - msg.setKeyIndex(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.KeyLocator.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.KeyLocator.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.KeyLocator} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.KeyLocator.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getKeyFamily(); - if (f !== 0) { - writer.writeInt32( - 1, - f - ); - } - f = message.getKeyIndex(); - if (f !== 0) { - writer.writeInt32( - 2, - f - ); - } -}; - - -/** - * optional int32 key_family = 1; - * @return {number} - */ -proto.lnrpc.KeyLocator.prototype.getKeyFamily = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.KeyLocator} returns this - */ -proto.lnrpc.KeyLocator.prototype.setKeyFamily = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); -}; - - -/** - * optional int32 key_index = 2; - * @return {number} - */ -proto.lnrpc.KeyLocator.prototype.getKeyIndex = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.KeyLocator} returns this - */ -proto.lnrpc.KeyLocator.prototype.setKeyIndex = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.KeyDescriptor.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.KeyDescriptor.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.KeyDescriptor} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.KeyDescriptor.toObject = function(includeInstance, msg) { - var f, obj = { - rawKeyBytes: msg.getRawKeyBytes_asB64(), - keyLoc: (f = msg.getKeyLoc()) && proto.lnrpc.KeyLocator.toObject(includeInstance, f) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.KeyDescriptor} - */ -proto.lnrpc.KeyDescriptor.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.KeyDescriptor; - return proto.lnrpc.KeyDescriptor.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.KeyDescriptor} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.KeyDescriptor} - */ -proto.lnrpc.KeyDescriptor.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setRawKeyBytes(value); - break; - case 2: - var value = new proto.lnrpc.KeyLocator; - reader.readMessage(value,proto.lnrpc.KeyLocator.deserializeBinaryFromReader); - msg.setKeyLoc(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.KeyDescriptor.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.KeyDescriptor.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.KeyDescriptor} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.KeyDescriptor.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getRawKeyBytes_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getKeyLoc(); - if (f != null) { - writer.writeMessage( - 2, - f, - proto.lnrpc.KeyLocator.serializeBinaryToWriter - ); - } -}; - - -/** - * optional bytes raw_key_bytes = 1; - * @return {!(string|Uint8Array)} - */ -proto.lnrpc.KeyDescriptor.prototype.getRawKeyBytes = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes raw_key_bytes = 1; - * This is a type-conversion wrapper around `getRawKeyBytes()` - * @return {string} - */ -proto.lnrpc.KeyDescriptor.prototype.getRawKeyBytes_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getRawKeyBytes())); -}; - - -/** - * optional bytes raw_key_bytes = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getRawKeyBytes()` - * @return {!Uint8Array} - */ -proto.lnrpc.KeyDescriptor.prototype.getRawKeyBytes_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getRawKeyBytes())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.lnrpc.KeyDescriptor} returns this - */ -proto.lnrpc.KeyDescriptor.prototype.setRawKeyBytes = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional KeyLocator key_loc = 2; - * @return {?proto.lnrpc.KeyLocator} - */ -proto.lnrpc.KeyDescriptor.prototype.getKeyLoc = function() { - return /** @type{?proto.lnrpc.KeyLocator} */ ( - jspb.Message.getWrapperField(this, proto.lnrpc.KeyLocator, 2)); -}; - - -/** - * @param {?proto.lnrpc.KeyLocator|undefined} value - * @return {!proto.lnrpc.KeyDescriptor} returns this -*/ -proto.lnrpc.KeyDescriptor.prototype.setKeyLoc = function(value) { - return jspb.Message.setWrapperField(this, 2, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.lnrpc.KeyDescriptor} returns this - */ -proto.lnrpc.KeyDescriptor.prototype.clearKeyLoc = function() { - return this.setKeyLoc(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.lnrpc.KeyDescriptor.prototype.hasKeyLoc = function() { - return jspb.Message.getField(this, 2) != null; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.ChanPointShim.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.ChanPointShim.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.ChanPointShim} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.ChanPointShim.toObject = function(includeInstance, msg) { - var f, obj = { - amt: jspb.Message.getFieldWithDefault(msg, 1, 0), - chanPoint: (f = msg.getChanPoint()) && proto.lnrpc.ChannelPoint.toObject(includeInstance, f), - localKey: (f = msg.getLocalKey()) && proto.lnrpc.KeyDescriptor.toObject(includeInstance, f), - remoteKey: msg.getRemoteKey_asB64(), - pendingChanId: msg.getPendingChanId_asB64(), - thawHeight: jspb.Message.getFieldWithDefault(msg, 6, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.ChanPointShim} - */ -proto.lnrpc.ChanPointShim.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.ChanPointShim; - return proto.lnrpc.ChanPointShim.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.ChanPointShim} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.ChanPointShim} - */ -proto.lnrpc.ChanPointShim.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readInt64()); - msg.setAmt(value); - break; - case 2: - var value = new proto.lnrpc.ChannelPoint; - reader.readMessage(value,proto.lnrpc.ChannelPoint.deserializeBinaryFromReader); - msg.setChanPoint(value); - break; - case 3: - var value = new proto.lnrpc.KeyDescriptor; - reader.readMessage(value,proto.lnrpc.KeyDescriptor.deserializeBinaryFromReader); - msg.setLocalKey(value); - break; - case 4: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setRemoteKey(value); - break; - case 5: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setPendingChanId(value); - break; - case 6: - var value = /** @type {number} */ (reader.readUint32()); - msg.setThawHeight(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.ChanPointShim.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.ChanPointShim.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.ChanPointShim} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.ChanPointShim.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getAmt(); - if (f !== 0) { - writer.writeInt64( - 1, - f - ); - } - f = message.getChanPoint(); - if (f != null) { - writer.writeMessage( - 2, - f, - proto.lnrpc.ChannelPoint.serializeBinaryToWriter - ); - } - f = message.getLocalKey(); - if (f != null) { - writer.writeMessage( - 3, - f, - proto.lnrpc.KeyDescriptor.serializeBinaryToWriter - ); - } - f = message.getRemoteKey_asU8(); - if (f.length > 0) { - writer.writeBytes( - 4, - f - ); - } - f = message.getPendingChanId_asU8(); - if (f.length > 0) { - writer.writeBytes( - 5, - f - ); - } - f = message.getThawHeight(); - if (f !== 0) { - writer.writeUint32( - 6, - f - ); - } -}; - - -/** - * optional int64 amt = 1; - * @return {number} - */ -proto.lnrpc.ChanPointShim.prototype.getAmt = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.ChanPointShim} returns this - */ -proto.lnrpc.ChanPointShim.prototype.setAmt = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); -}; - - -/** - * optional ChannelPoint chan_point = 2; - * @return {?proto.lnrpc.ChannelPoint} - */ -proto.lnrpc.ChanPointShim.prototype.getChanPoint = function() { - return /** @type{?proto.lnrpc.ChannelPoint} */ ( - jspb.Message.getWrapperField(this, proto.lnrpc.ChannelPoint, 2)); -}; - - -/** - * @param {?proto.lnrpc.ChannelPoint|undefined} value - * @return {!proto.lnrpc.ChanPointShim} returns this -*/ -proto.lnrpc.ChanPointShim.prototype.setChanPoint = function(value) { - return jspb.Message.setWrapperField(this, 2, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.lnrpc.ChanPointShim} returns this - */ -proto.lnrpc.ChanPointShim.prototype.clearChanPoint = function() { - return this.setChanPoint(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.lnrpc.ChanPointShim.prototype.hasChanPoint = function() { - return jspb.Message.getField(this, 2) != null; -}; - - -/** - * optional KeyDescriptor local_key = 3; - * @return {?proto.lnrpc.KeyDescriptor} - */ -proto.lnrpc.ChanPointShim.prototype.getLocalKey = function() { - return /** @type{?proto.lnrpc.KeyDescriptor} */ ( - jspb.Message.getWrapperField(this, proto.lnrpc.KeyDescriptor, 3)); -}; - - -/** - * @param {?proto.lnrpc.KeyDescriptor|undefined} value - * @return {!proto.lnrpc.ChanPointShim} returns this -*/ -proto.lnrpc.ChanPointShim.prototype.setLocalKey = function(value) { - return jspb.Message.setWrapperField(this, 3, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.lnrpc.ChanPointShim} returns this - */ -proto.lnrpc.ChanPointShim.prototype.clearLocalKey = function() { - return this.setLocalKey(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.lnrpc.ChanPointShim.prototype.hasLocalKey = function() { - return jspb.Message.getField(this, 3) != null; -}; - - -/** - * optional bytes remote_key = 4; - * @return {!(string|Uint8Array)} - */ -proto.lnrpc.ChanPointShim.prototype.getRemoteKey = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 4, "")); -}; - - -/** - * optional bytes remote_key = 4; - * This is a type-conversion wrapper around `getRemoteKey()` - * @return {string} - */ -proto.lnrpc.ChanPointShim.prototype.getRemoteKey_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getRemoteKey())); -}; - - -/** - * optional bytes remote_key = 4; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getRemoteKey()` - * @return {!Uint8Array} - */ -proto.lnrpc.ChanPointShim.prototype.getRemoteKey_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getRemoteKey())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.lnrpc.ChanPointShim} returns this - */ -proto.lnrpc.ChanPointShim.prototype.setRemoteKey = function(value) { - return jspb.Message.setProto3BytesField(this, 4, value); -}; - - -/** - * optional bytes pending_chan_id = 5; - * @return {!(string|Uint8Array)} - */ -proto.lnrpc.ChanPointShim.prototype.getPendingChanId = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 5, "")); -}; - - -/** - * optional bytes pending_chan_id = 5; - * This is a type-conversion wrapper around `getPendingChanId()` - * @return {string} - */ -proto.lnrpc.ChanPointShim.prototype.getPendingChanId_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getPendingChanId())); -}; - - -/** - * optional bytes pending_chan_id = 5; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getPendingChanId()` - * @return {!Uint8Array} - */ -proto.lnrpc.ChanPointShim.prototype.getPendingChanId_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getPendingChanId())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.lnrpc.ChanPointShim} returns this - */ -proto.lnrpc.ChanPointShim.prototype.setPendingChanId = function(value) { - return jspb.Message.setProto3BytesField(this, 5, value); -}; - - -/** - * optional uint32 thaw_height = 6; - * @return {number} - */ -proto.lnrpc.ChanPointShim.prototype.getThawHeight = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.ChanPointShim} returns this - */ -proto.lnrpc.ChanPointShim.prototype.setThawHeight = function(value) { - return jspb.Message.setProto3IntField(this, 6, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.PsbtShim.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.PsbtShim.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.PsbtShim} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.PsbtShim.toObject = function(includeInstance, msg) { - var f, obj = { - pendingChanId: msg.getPendingChanId_asB64(), - basePsbt: msg.getBasePsbt_asB64(), - noPublish: jspb.Message.getBooleanFieldWithDefault(msg, 3, false) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.PsbtShim} - */ -proto.lnrpc.PsbtShim.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.PsbtShim; - return proto.lnrpc.PsbtShim.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.PsbtShim} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.PsbtShim} - */ -proto.lnrpc.PsbtShim.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setPendingChanId(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setBasePsbt(value); - break; - case 3: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setNoPublish(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.PsbtShim.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.PsbtShim.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.PsbtShim} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.PsbtShim.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getPendingChanId_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getBasePsbt_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } - f = message.getNoPublish(); - if (f) { - writer.writeBool( - 3, - f - ); - } -}; - - -/** - * optional bytes pending_chan_id = 1; - * @return {!(string|Uint8Array)} - */ -proto.lnrpc.PsbtShim.prototype.getPendingChanId = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes pending_chan_id = 1; - * This is a type-conversion wrapper around `getPendingChanId()` - * @return {string} - */ -proto.lnrpc.PsbtShim.prototype.getPendingChanId_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getPendingChanId())); -}; - - -/** - * optional bytes pending_chan_id = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getPendingChanId()` - * @return {!Uint8Array} - */ -proto.lnrpc.PsbtShim.prototype.getPendingChanId_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getPendingChanId())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.lnrpc.PsbtShim} returns this - */ -proto.lnrpc.PsbtShim.prototype.setPendingChanId = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional bytes base_psbt = 2; - * @return {!(string|Uint8Array)} - */ -proto.lnrpc.PsbtShim.prototype.getBasePsbt = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes base_psbt = 2; - * This is a type-conversion wrapper around `getBasePsbt()` - * @return {string} - */ -proto.lnrpc.PsbtShim.prototype.getBasePsbt_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getBasePsbt())); -}; - - -/** - * optional bytes base_psbt = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getBasePsbt()` - * @return {!Uint8Array} - */ -proto.lnrpc.PsbtShim.prototype.getBasePsbt_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getBasePsbt())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.lnrpc.PsbtShim} returns this - */ -proto.lnrpc.PsbtShim.prototype.setBasePsbt = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); -}; - - -/** - * optional bool no_publish = 3; - * @return {boolean} - */ -proto.lnrpc.PsbtShim.prototype.getNoPublish = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.lnrpc.PsbtShim} returns this - */ -proto.lnrpc.PsbtShim.prototype.setNoPublish = function(value) { - return jspb.Message.setProto3BooleanField(this, 3, value); -}; - - - -/** - * Oneof group definitions for this message. Each group defines the field - * numbers belonging to that group. When of these fields' value is set, all - * other fields in the group are cleared. During deserialization, if multiple - * fields are encountered for a group, only the last value seen will be kept. - * @private {!Array>} - * @const - */ -proto.lnrpc.FundingShim.oneofGroups_ = [[1,2]]; - -/** - * @enum {number} - */ -proto.lnrpc.FundingShim.ShimCase = { - SHIM_NOT_SET: 0, - CHAN_POINT_SHIM: 1, - PSBT_SHIM: 2 -}; - -/** - * @return {proto.lnrpc.FundingShim.ShimCase} - */ -proto.lnrpc.FundingShim.prototype.getShimCase = function() { - return /** @type {proto.lnrpc.FundingShim.ShimCase} */(jspb.Message.computeOneofCase(this, proto.lnrpc.FundingShim.oneofGroups_[0])); -}; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.FundingShim.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.FundingShim.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.FundingShim} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.FundingShim.toObject = function(includeInstance, msg) { - var f, obj = { - chanPointShim: (f = msg.getChanPointShim()) && proto.lnrpc.ChanPointShim.toObject(includeInstance, f), - psbtShim: (f = msg.getPsbtShim()) && proto.lnrpc.PsbtShim.toObject(includeInstance, f) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.FundingShim} - */ -proto.lnrpc.FundingShim.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.FundingShim; - return proto.lnrpc.FundingShim.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.FundingShim} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.FundingShim} - */ -proto.lnrpc.FundingShim.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.lnrpc.ChanPointShim; - reader.readMessage(value,proto.lnrpc.ChanPointShim.deserializeBinaryFromReader); - msg.setChanPointShim(value); - break; - case 2: - var value = new proto.lnrpc.PsbtShim; - reader.readMessage(value,proto.lnrpc.PsbtShim.deserializeBinaryFromReader); - msg.setPsbtShim(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.FundingShim.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.FundingShim.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.FundingShim} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.FundingShim.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getChanPointShim(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.lnrpc.ChanPointShim.serializeBinaryToWriter - ); - } - f = message.getPsbtShim(); - if (f != null) { - writer.writeMessage( - 2, - f, - proto.lnrpc.PsbtShim.serializeBinaryToWriter - ); - } -}; - - -/** - * optional ChanPointShim chan_point_shim = 1; - * @return {?proto.lnrpc.ChanPointShim} - */ -proto.lnrpc.FundingShim.prototype.getChanPointShim = function() { - return /** @type{?proto.lnrpc.ChanPointShim} */ ( - jspb.Message.getWrapperField(this, proto.lnrpc.ChanPointShim, 1)); -}; - - -/** - * @param {?proto.lnrpc.ChanPointShim|undefined} value - * @return {!proto.lnrpc.FundingShim} returns this -*/ -proto.lnrpc.FundingShim.prototype.setChanPointShim = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.lnrpc.FundingShim.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.lnrpc.FundingShim} returns this - */ -proto.lnrpc.FundingShim.prototype.clearChanPointShim = function() { - return this.setChanPointShim(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.lnrpc.FundingShim.prototype.hasChanPointShim = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional PsbtShim psbt_shim = 2; - * @return {?proto.lnrpc.PsbtShim} - */ -proto.lnrpc.FundingShim.prototype.getPsbtShim = function() { - return /** @type{?proto.lnrpc.PsbtShim} */ ( - jspb.Message.getWrapperField(this, proto.lnrpc.PsbtShim, 2)); -}; - - -/** - * @param {?proto.lnrpc.PsbtShim|undefined} value - * @return {!proto.lnrpc.FundingShim} returns this -*/ -proto.lnrpc.FundingShim.prototype.setPsbtShim = function(value) { - return jspb.Message.setOneofWrapperField(this, 2, proto.lnrpc.FundingShim.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.lnrpc.FundingShim} returns this - */ -proto.lnrpc.FundingShim.prototype.clearPsbtShim = function() { - return this.setPsbtShim(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.lnrpc.FundingShim.prototype.hasPsbtShim = function() { - return jspb.Message.getField(this, 2) != null; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.FundingShimCancel.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.FundingShimCancel.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.FundingShimCancel} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.FundingShimCancel.toObject = function(includeInstance, msg) { - var f, obj = { - pendingChanId: msg.getPendingChanId_asB64() - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.FundingShimCancel} - */ -proto.lnrpc.FundingShimCancel.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.FundingShimCancel; - return proto.lnrpc.FundingShimCancel.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.FundingShimCancel} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.FundingShimCancel} - */ -proto.lnrpc.FundingShimCancel.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setPendingChanId(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.FundingShimCancel.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.FundingShimCancel.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.FundingShimCancel} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.FundingShimCancel.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getPendingChanId_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } -}; - - -/** - * optional bytes pending_chan_id = 1; - * @return {!(string|Uint8Array)} - */ -proto.lnrpc.FundingShimCancel.prototype.getPendingChanId = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes pending_chan_id = 1; - * This is a type-conversion wrapper around `getPendingChanId()` - * @return {string} - */ -proto.lnrpc.FundingShimCancel.prototype.getPendingChanId_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getPendingChanId())); -}; - - -/** - * optional bytes pending_chan_id = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getPendingChanId()` - * @return {!Uint8Array} - */ -proto.lnrpc.FundingShimCancel.prototype.getPendingChanId_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getPendingChanId())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.lnrpc.FundingShimCancel} returns this - */ -proto.lnrpc.FundingShimCancel.prototype.setPendingChanId = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.FundingPsbtVerify.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.FundingPsbtVerify.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.FundingPsbtVerify} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.FundingPsbtVerify.toObject = function(includeInstance, msg) { - var f, obj = { - fundedPsbt: msg.getFundedPsbt_asB64(), - pendingChanId: msg.getPendingChanId_asB64(), - skipFinalize: jspb.Message.getBooleanFieldWithDefault(msg, 3, false) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.FundingPsbtVerify} - */ -proto.lnrpc.FundingPsbtVerify.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.FundingPsbtVerify; - return proto.lnrpc.FundingPsbtVerify.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.FundingPsbtVerify} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.FundingPsbtVerify} - */ -proto.lnrpc.FundingPsbtVerify.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setFundedPsbt(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setPendingChanId(value); - break; - case 3: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setSkipFinalize(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.FundingPsbtVerify.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.FundingPsbtVerify.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.FundingPsbtVerify} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.FundingPsbtVerify.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getFundedPsbt_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getPendingChanId_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } - f = message.getSkipFinalize(); - if (f) { - writer.writeBool( - 3, - f - ); - } -}; - - -/** - * optional bytes funded_psbt = 1; - * @return {!(string|Uint8Array)} - */ -proto.lnrpc.FundingPsbtVerify.prototype.getFundedPsbt = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes funded_psbt = 1; - * This is a type-conversion wrapper around `getFundedPsbt()` - * @return {string} - */ -proto.lnrpc.FundingPsbtVerify.prototype.getFundedPsbt_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getFundedPsbt())); -}; - - -/** - * optional bytes funded_psbt = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getFundedPsbt()` - * @return {!Uint8Array} - */ -proto.lnrpc.FundingPsbtVerify.prototype.getFundedPsbt_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getFundedPsbt())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.lnrpc.FundingPsbtVerify} returns this - */ -proto.lnrpc.FundingPsbtVerify.prototype.setFundedPsbt = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional bytes pending_chan_id = 2; - * @return {!(string|Uint8Array)} - */ -proto.lnrpc.FundingPsbtVerify.prototype.getPendingChanId = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes pending_chan_id = 2; - * This is a type-conversion wrapper around `getPendingChanId()` - * @return {string} - */ -proto.lnrpc.FundingPsbtVerify.prototype.getPendingChanId_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getPendingChanId())); -}; - - -/** - * optional bytes pending_chan_id = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getPendingChanId()` - * @return {!Uint8Array} - */ -proto.lnrpc.FundingPsbtVerify.prototype.getPendingChanId_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getPendingChanId())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.lnrpc.FundingPsbtVerify} returns this - */ -proto.lnrpc.FundingPsbtVerify.prototype.setPendingChanId = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); -}; - - -/** - * optional bool skip_finalize = 3; - * @return {boolean} - */ -proto.lnrpc.FundingPsbtVerify.prototype.getSkipFinalize = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.lnrpc.FundingPsbtVerify} returns this - */ -proto.lnrpc.FundingPsbtVerify.prototype.setSkipFinalize = function(value) { - return jspb.Message.setProto3BooleanField(this, 3, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.FundingPsbtFinalize.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.FundingPsbtFinalize.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.FundingPsbtFinalize} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.FundingPsbtFinalize.toObject = function(includeInstance, msg) { - var f, obj = { - signedPsbt: msg.getSignedPsbt_asB64(), - pendingChanId: msg.getPendingChanId_asB64(), - finalRawTx: msg.getFinalRawTx_asB64() - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.FundingPsbtFinalize} - */ -proto.lnrpc.FundingPsbtFinalize.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.FundingPsbtFinalize; - return proto.lnrpc.FundingPsbtFinalize.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.FundingPsbtFinalize} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.FundingPsbtFinalize} - */ -proto.lnrpc.FundingPsbtFinalize.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setSignedPsbt(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setPendingChanId(value); - break; - case 3: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setFinalRawTx(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.FundingPsbtFinalize.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.FundingPsbtFinalize.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.FundingPsbtFinalize} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.FundingPsbtFinalize.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getSignedPsbt_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getPendingChanId_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } - f = message.getFinalRawTx_asU8(); - if (f.length > 0) { - writer.writeBytes( - 3, - f - ); - } -}; - - -/** - * optional bytes signed_psbt = 1; - * @return {!(string|Uint8Array)} - */ -proto.lnrpc.FundingPsbtFinalize.prototype.getSignedPsbt = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes signed_psbt = 1; - * This is a type-conversion wrapper around `getSignedPsbt()` - * @return {string} - */ -proto.lnrpc.FundingPsbtFinalize.prototype.getSignedPsbt_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getSignedPsbt())); -}; - - -/** - * optional bytes signed_psbt = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getSignedPsbt()` - * @return {!Uint8Array} - */ -proto.lnrpc.FundingPsbtFinalize.prototype.getSignedPsbt_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getSignedPsbt())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.lnrpc.FundingPsbtFinalize} returns this - */ -proto.lnrpc.FundingPsbtFinalize.prototype.setSignedPsbt = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional bytes pending_chan_id = 2; - * @return {!(string|Uint8Array)} - */ -proto.lnrpc.FundingPsbtFinalize.prototype.getPendingChanId = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes pending_chan_id = 2; - * This is a type-conversion wrapper around `getPendingChanId()` - * @return {string} - */ -proto.lnrpc.FundingPsbtFinalize.prototype.getPendingChanId_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getPendingChanId())); -}; - - -/** - * optional bytes pending_chan_id = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getPendingChanId()` - * @return {!Uint8Array} - */ -proto.lnrpc.FundingPsbtFinalize.prototype.getPendingChanId_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getPendingChanId())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.lnrpc.FundingPsbtFinalize} returns this - */ -proto.lnrpc.FundingPsbtFinalize.prototype.setPendingChanId = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); -}; - - -/** - * optional bytes final_raw_tx = 3; - * @return {!(string|Uint8Array)} - */ -proto.lnrpc.FundingPsbtFinalize.prototype.getFinalRawTx = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * optional bytes final_raw_tx = 3; - * This is a type-conversion wrapper around `getFinalRawTx()` - * @return {string} - */ -proto.lnrpc.FundingPsbtFinalize.prototype.getFinalRawTx_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getFinalRawTx())); -}; - - -/** - * optional bytes final_raw_tx = 3; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getFinalRawTx()` - * @return {!Uint8Array} - */ -proto.lnrpc.FundingPsbtFinalize.prototype.getFinalRawTx_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getFinalRawTx())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.lnrpc.FundingPsbtFinalize} returns this - */ -proto.lnrpc.FundingPsbtFinalize.prototype.setFinalRawTx = function(value) { - return jspb.Message.setProto3BytesField(this, 3, value); -}; - - - -/** - * Oneof group definitions for this message. Each group defines the field - * numbers belonging to that group. When of these fields' value is set, all - * other fields in the group are cleared. During deserialization, if multiple - * fields are encountered for a group, only the last value seen will be kept. - * @private {!Array>} - * @const - */ -proto.lnrpc.FundingTransitionMsg.oneofGroups_ = [[1,2,3,4]]; - -/** - * @enum {number} - */ -proto.lnrpc.FundingTransitionMsg.TriggerCase = { - TRIGGER_NOT_SET: 0, - SHIM_REGISTER: 1, - SHIM_CANCEL: 2, - PSBT_VERIFY: 3, - PSBT_FINALIZE: 4 -}; - -/** - * @return {proto.lnrpc.FundingTransitionMsg.TriggerCase} - */ -proto.lnrpc.FundingTransitionMsg.prototype.getTriggerCase = function() { - return /** @type {proto.lnrpc.FundingTransitionMsg.TriggerCase} */(jspb.Message.computeOneofCase(this, proto.lnrpc.FundingTransitionMsg.oneofGroups_[0])); -}; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.FundingTransitionMsg.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.FundingTransitionMsg.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.FundingTransitionMsg} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.FundingTransitionMsg.toObject = function(includeInstance, msg) { - var f, obj = { - shimRegister: (f = msg.getShimRegister()) && proto.lnrpc.FundingShim.toObject(includeInstance, f), - shimCancel: (f = msg.getShimCancel()) && proto.lnrpc.FundingShimCancel.toObject(includeInstance, f), - psbtVerify: (f = msg.getPsbtVerify()) && proto.lnrpc.FundingPsbtVerify.toObject(includeInstance, f), - psbtFinalize: (f = msg.getPsbtFinalize()) && proto.lnrpc.FundingPsbtFinalize.toObject(includeInstance, f) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.FundingTransitionMsg} - */ -proto.lnrpc.FundingTransitionMsg.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.FundingTransitionMsg; - return proto.lnrpc.FundingTransitionMsg.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.FundingTransitionMsg} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.FundingTransitionMsg} - */ -proto.lnrpc.FundingTransitionMsg.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.lnrpc.FundingShim; - reader.readMessage(value,proto.lnrpc.FundingShim.deserializeBinaryFromReader); - msg.setShimRegister(value); - break; - case 2: - var value = new proto.lnrpc.FundingShimCancel; - reader.readMessage(value,proto.lnrpc.FundingShimCancel.deserializeBinaryFromReader); - msg.setShimCancel(value); - break; - case 3: - var value = new proto.lnrpc.FundingPsbtVerify; - reader.readMessage(value,proto.lnrpc.FundingPsbtVerify.deserializeBinaryFromReader); - msg.setPsbtVerify(value); - break; - case 4: - var value = new proto.lnrpc.FundingPsbtFinalize; - reader.readMessage(value,proto.lnrpc.FundingPsbtFinalize.deserializeBinaryFromReader); - msg.setPsbtFinalize(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.FundingTransitionMsg.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.FundingTransitionMsg.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.FundingTransitionMsg} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.FundingTransitionMsg.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getShimRegister(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.lnrpc.FundingShim.serializeBinaryToWriter - ); - } - f = message.getShimCancel(); - if (f != null) { - writer.writeMessage( - 2, - f, - proto.lnrpc.FundingShimCancel.serializeBinaryToWriter - ); - } - f = message.getPsbtVerify(); - if (f != null) { - writer.writeMessage( - 3, - f, - proto.lnrpc.FundingPsbtVerify.serializeBinaryToWriter - ); - } - f = message.getPsbtFinalize(); - if (f != null) { - writer.writeMessage( - 4, - f, - proto.lnrpc.FundingPsbtFinalize.serializeBinaryToWriter - ); - } -}; - - -/** - * optional FundingShim shim_register = 1; - * @return {?proto.lnrpc.FundingShim} - */ -proto.lnrpc.FundingTransitionMsg.prototype.getShimRegister = function() { - return /** @type{?proto.lnrpc.FundingShim} */ ( - jspb.Message.getWrapperField(this, proto.lnrpc.FundingShim, 1)); -}; - - -/** - * @param {?proto.lnrpc.FundingShim|undefined} value - * @return {!proto.lnrpc.FundingTransitionMsg} returns this -*/ -proto.lnrpc.FundingTransitionMsg.prototype.setShimRegister = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.lnrpc.FundingTransitionMsg.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.lnrpc.FundingTransitionMsg} returns this - */ -proto.lnrpc.FundingTransitionMsg.prototype.clearShimRegister = function() { - return this.setShimRegister(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.lnrpc.FundingTransitionMsg.prototype.hasShimRegister = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional FundingShimCancel shim_cancel = 2; - * @return {?proto.lnrpc.FundingShimCancel} - */ -proto.lnrpc.FundingTransitionMsg.prototype.getShimCancel = function() { - return /** @type{?proto.lnrpc.FundingShimCancel} */ ( - jspb.Message.getWrapperField(this, proto.lnrpc.FundingShimCancel, 2)); -}; - - -/** - * @param {?proto.lnrpc.FundingShimCancel|undefined} value - * @return {!proto.lnrpc.FundingTransitionMsg} returns this -*/ -proto.lnrpc.FundingTransitionMsg.prototype.setShimCancel = function(value) { - return jspb.Message.setOneofWrapperField(this, 2, proto.lnrpc.FundingTransitionMsg.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.lnrpc.FundingTransitionMsg} returns this - */ -proto.lnrpc.FundingTransitionMsg.prototype.clearShimCancel = function() { - return this.setShimCancel(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.lnrpc.FundingTransitionMsg.prototype.hasShimCancel = function() { - return jspb.Message.getField(this, 2) != null; -}; - - -/** - * optional FundingPsbtVerify psbt_verify = 3; - * @return {?proto.lnrpc.FundingPsbtVerify} - */ -proto.lnrpc.FundingTransitionMsg.prototype.getPsbtVerify = function() { - return /** @type{?proto.lnrpc.FundingPsbtVerify} */ ( - jspb.Message.getWrapperField(this, proto.lnrpc.FundingPsbtVerify, 3)); -}; - - -/** - * @param {?proto.lnrpc.FundingPsbtVerify|undefined} value - * @return {!proto.lnrpc.FundingTransitionMsg} returns this -*/ -proto.lnrpc.FundingTransitionMsg.prototype.setPsbtVerify = function(value) { - return jspb.Message.setOneofWrapperField(this, 3, proto.lnrpc.FundingTransitionMsg.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.lnrpc.FundingTransitionMsg} returns this - */ -proto.lnrpc.FundingTransitionMsg.prototype.clearPsbtVerify = function() { - return this.setPsbtVerify(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.lnrpc.FundingTransitionMsg.prototype.hasPsbtVerify = function() { - return jspb.Message.getField(this, 3) != null; -}; - - -/** - * optional FundingPsbtFinalize psbt_finalize = 4; - * @return {?proto.lnrpc.FundingPsbtFinalize} - */ -proto.lnrpc.FundingTransitionMsg.prototype.getPsbtFinalize = function() { - return /** @type{?proto.lnrpc.FundingPsbtFinalize} */ ( - jspb.Message.getWrapperField(this, proto.lnrpc.FundingPsbtFinalize, 4)); -}; - - -/** - * @param {?proto.lnrpc.FundingPsbtFinalize|undefined} value - * @return {!proto.lnrpc.FundingTransitionMsg} returns this -*/ -proto.lnrpc.FundingTransitionMsg.prototype.setPsbtFinalize = function(value) { - return jspb.Message.setOneofWrapperField(this, 4, proto.lnrpc.FundingTransitionMsg.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.lnrpc.FundingTransitionMsg} returns this - */ -proto.lnrpc.FundingTransitionMsg.prototype.clearPsbtFinalize = function() { - return this.setPsbtFinalize(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.lnrpc.FundingTransitionMsg.prototype.hasPsbtFinalize = function() { - return jspb.Message.getField(this, 4) != null; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.FundingStateStepResp.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.FundingStateStepResp.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.FundingStateStepResp} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.FundingStateStepResp.toObject = function(includeInstance, msg) { - var f, obj = { - - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.FundingStateStepResp} - */ -proto.lnrpc.FundingStateStepResp.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.FundingStateStepResp; - return proto.lnrpc.FundingStateStepResp.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.FundingStateStepResp} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.FundingStateStepResp} - */ -proto.lnrpc.FundingStateStepResp.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.FundingStateStepResp.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.FundingStateStepResp.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.FundingStateStepResp} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.FundingStateStepResp.serializeBinaryToWriter = function(message, writer) { - var f = undefined; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.PendingHTLC.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.PendingHTLC.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.PendingHTLC} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.PendingHTLC.toObject = function(includeInstance, msg) { - var f, obj = { - incoming: jspb.Message.getBooleanFieldWithDefault(msg, 1, false), - amount: jspb.Message.getFieldWithDefault(msg, 2, 0), - outpoint: jspb.Message.getFieldWithDefault(msg, 3, ""), - maturityHeight: jspb.Message.getFieldWithDefault(msg, 4, 0), - blocksTilMaturity: jspb.Message.getFieldWithDefault(msg, 5, 0), - stage: jspb.Message.getFieldWithDefault(msg, 6, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.PendingHTLC} - */ -proto.lnrpc.PendingHTLC.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.PendingHTLC; - return proto.lnrpc.PendingHTLC.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.PendingHTLC} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.PendingHTLC} - */ -proto.lnrpc.PendingHTLC.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setIncoming(value); - break; - case 2: - var value = /** @type {number} */ (reader.readInt64()); - msg.setAmount(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setOutpoint(value); - break; - case 4: - var value = /** @type {number} */ (reader.readUint32()); - msg.setMaturityHeight(value); - break; - case 5: - var value = /** @type {number} */ (reader.readInt32()); - msg.setBlocksTilMaturity(value); - break; - case 6: - var value = /** @type {number} */ (reader.readUint32()); - msg.setStage(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.PendingHTLC.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.PendingHTLC.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.PendingHTLC} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.PendingHTLC.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getIncoming(); - if (f) { - writer.writeBool( - 1, - f - ); - } - f = message.getAmount(); - if (f !== 0) { - writer.writeInt64( - 2, - f - ); - } - f = message.getOutpoint(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } - f = message.getMaturityHeight(); - if (f !== 0) { - writer.writeUint32( - 4, - f - ); - } - f = message.getBlocksTilMaturity(); - if (f !== 0) { - writer.writeInt32( - 5, - f - ); - } - f = message.getStage(); - if (f !== 0) { - writer.writeUint32( - 6, - f - ); - } -}; - - -/** - * optional bool incoming = 1; - * @return {boolean} - */ -proto.lnrpc.PendingHTLC.prototype.getIncoming = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.lnrpc.PendingHTLC} returns this - */ -proto.lnrpc.PendingHTLC.prototype.setIncoming = function(value) { - return jspb.Message.setProto3BooleanField(this, 1, value); -}; - - -/** - * optional int64 amount = 2; - * @return {number} - */ -proto.lnrpc.PendingHTLC.prototype.getAmount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.PendingHTLC} returns this - */ -proto.lnrpc.PendingHTLC.prototype.setAmount = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * optional string outpoint = 3; - * @return {string} - */ -proto.lnrpc.PendingHTLC.prototype.getOutpoint = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * @param {string} value - * @return {!proto.lnrpc.PendingHTLC} returns this - */ -proto.lnrpc.PendingHTLC.prototype.setOutpoint = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); -}; - - -/** - * optional uint32 maturity_height = 4; - * @return {number} - */ -proto.lnrpc.PendingHTLC.prototype.getMaturityHeight = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.PendingHTLC} returns this - */ -proto.lnrpc.PendingHTLC.prototype.setMaturityHeight = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); -}; - - -/** - * optional int32 blocks_til_maturity = 5; - * @return {number} - */ -proto.lnrpc.PendingHTLC.prototype.getBlocksTilMaturity = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.PendingHTLC} returns this - */ -proto.lnrpc.PendingHTLC.prototype.setBlocksTilMaturity = function(value) { - return jspb.Message.setProto3IntField(this, 5, value); -}; - - -/** - * optional uint32 stage = 6; - * @return {number} - */ -proto.lnrpc.PendingHTLC.prototype.getStage = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.PendingHTLC} returns this - */ -proto.lnrpc.PendingHTLC.prototype.setStage = function(value) { - return jspb.Message.setProto3IntField(this, 6, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.PendingChannelsRequest.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.PendingChannelsRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.PendingChannelsRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.PendingChannelsRequest.toObject = function(includeInstance, msg) { - var f, obj = { - - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.PendingChannelsRequest} - */ -proto.lnrpc.PendingChannelsRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.PendingChannelsRequest; - return proto.lnrpc.PendingChannelsRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.PendingChannelsRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.PendingChannelsRequest} - */ -proto.lnrpc.PendingChannelsRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.PendingChannelsRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.PendingChannelsRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.PendingChannelsRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.PendingChannelsRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.lnrpc.PendingChannelsResponse.repeatedFields_ = [2,3,4,5]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.PendingChannelsResponse.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.PendingChannelsResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.PendingChannelsResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.PendingChannelsResponse.toObject = function(includeInstance, msg) { - var f, obj = { - totalLimboBalance: jspb.Message.getFieldWithDefault(msg, 1, 0), - pendingOpenChannelsList: jspb.Message.toObjectList(msg.getPendingOpenChannelsList(), - proto.lnrpc.PendingChannelsResponse.PendingOpenChannel.toObject, includeInstance), - pendingClosingChannelsList: jspb.Message.toObjectList(msg.getPendingClosingChannelsList(), - proto.lnrpc.PendingChannelsResponse.ClosedChannel.toObject, includeInstance), - pendingForceClosingChannelsList: jspb.Message.toObjectList(msg.getPendingForceClosingChannelsList(), - proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.toObject, includeInstance), - waitingCloseChannelsList: jspb.Message.toObjectList(msg.getWaitingCloseChannelsList(), - proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel.toObject, includeInstance) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.PendingChannelsResponse} - */ -proto.lnrpc.PendingChannelsResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.PendingChannelsResponse; - return proto.lnrpc.PendingChannelsResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.PendingChannelsResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.PendingChannelsResponse} - */ -proto.lnrpc.PendingChannelsResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readInt64()); - msg.setTotalLimboBalance(value); - break; - case 2: - var value = new proto.lnrpc.PendingChannelsResponse.PendingOpenChannel; - reader.readMessage(value,proto.lnrpc.PendingChannelsResponse.PendingOpenChannel.deserializeBinaryFromReader); - msg.addPendingOpenChannels(value); - break; - case 3: - var value = new proto.lnrpc.PendingChannelsResponse.ClosedChannel; - reader.readMessage(value,proto.lnrpc.PendingChannelsResponse.ClosedChannel.deserializeBinaryFromReader); - msg.addPendingClosingChannels(value); - break; - case 4: - var value = new proto.lnrpc.PendingChannelsResponse.ForceClosedChannel; - reader.readMessage(value,proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.deserializeBinaryFromReader); - msg.addPendingForceClosingChannels(value); - break; - case 5: - var value = new proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel; - reader.readMessage(value,proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel.deserializeBinaryFromReader); - msg.addWaitingCloseChannels(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.PendingChannelsResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.PendingChannelsResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.PendingChannelsResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.PendingChannelsResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getTotalLimboBalance(); - if (f !== 0) { - writer.writeInt64( - 1, - f - ); - } - f = message.getPendingOpenChannelsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 2, - f, - proto.lnrpc.PendingChannelsResponse.PendingOpenChannel.serializeBinaryToWriter - ); - } - f = message.getPendingClosingChannelsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 3, - f, - proto.lnrpc.PendingChannelsResponse.ClosedChannel.serializeBinaryToWriter - ); - } - f = message.getPendingForceClosingChannelsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 4, - f, - proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.serializeBinaryToWriter - ); - } - f = message.getWaitingCloseChannelsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 5, - f, - proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel.serializeBinaryToWriter - ); - } -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.PendingChannelsResponse.PendingChannel.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.PendingChannelsResponse.PendingChannel.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.PendingChannelsResponse.PendingChannel} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.PendingChannelsResponse.PendingChannel.toObject = function(includeInstance, msg) { - var f, obj = { - remoteNodePub: jspb.Message.getFieldWithDefault(msg, 1, ""), - channelPoint: jspb.Message.getFieldWithDefault(msg, 2, ""), - capacity: jspb.Message.getFieldWithDefault(msg, 3, 0), - localBalance: jspb.Message.getFieldWithDefault(msg, 4, 0), - remoteBalance: jspb.Message.getFieldWithDefault(msg, 5, 0), - localChanReserveSat: jspb.Message.getFieldWithDefault(msg, 6, 0), - remoteChanReserveSat: jspb.Message.getFieldWithDefault(msg, 7, 0), - initiator: jspb.Message.getFieldWithDefault(msg, 8, 0), - commitmentType: jspb.Message.getFieldWithDefault(msg, 9, 0), - numForwardingPackages: jspb.Message.getFieldWithDefault(msg, 10, 0), - chanStatusFlags: jspb.Message.getFieldWithDefault(msg, 11, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.PendingChannelsResponse.PendingChannel} - */ -proto.lnrpc.PendingChannelsResponse.PendingChannel.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.PendingChannelsResponse.PendingChannel; - return proto.lnrpc.PendingChannelsResponse.PendingChannel.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.PendingChannelsResponse.PendingChannel} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.PendingChannelsResponse.PendingChannel} - */ -proto.lnrpc.PendingChannelsResponse.PendingChannel.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setRemoteNodePub(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setChannelPoint(value); - break; - case 3: - var value = /** @type {number} */ (reader.readInt64()); - msg.setCapacity(value); - break; - case 4: - var value = /** @type {number} */ (reader.readInt64()); - msg.setLocalBalance(value); - break; - case 5: - var value = /** @type {number} */ (reader.readInt64()); - msg.setRemoteBalance(value); - break; - case 6: - var value = /** @type {number} */ (reader.readInt64()); - msg.setLocalChanReserveSat(value); - break; - case 7: - var value = /** @type {number} */ (reader.readInt64()); - msg.setRemoteChanReserveSat(value); - break; - case 8: - var value = /** @type {!proto.lnrpc.Initiator} */ (reader.readEnum()); - msg.setInitiator(value); - break; - case 9: - var value = /** @type {!proto.lnrpc.CommitmentType} */ (reader.readEnum()); - msg.setCommitmentType(value); - break; - case 10: - var value = /** @type {number} */ (reader.readInt64()); - msg.setNumForwardingPackages(value); - break; - case 11: - var value = /** @type {string} */ (reader.readString()); - msg.setChanStatusFlags(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.PendingChannelsResponse.PendingChannel.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.PendingChannelsResponse.PendingChannel.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.PendingChannelsResponse.PendingChannel} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.PendingChannelsResponse.PendingChannel.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getRemoteNodePub(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getChannelPoint(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getCapacity(); - if (f !== 0) { - writer.writeInt64( - 3, - f - ); - } - f = message.getLocalBalance(); - if (f !== 0) { - writer.writeInt64( - 4, - f - ); - } - f = message.getRemoteBalance(); - if (f !== 0) { - writer.writeInt64( - 5, - f - ); - } - f = message.getLocalChanReserveSat(); - if (f !== 0) { - writer.writeInt64( - 6, - f - ); - } - f = message.getRemoteChanReserveSat(); - if (f !== 0) { - writer.writeInt64( - 7, - f - ); - } - f = message.getInitiator(); - if (f !== 0.0) { - writer.writeEnum( - 8, - f - ); - } - f = message.getCommitmentType(); - if (f !== 0.0) { - writer.writeEnum( - 9, - f - ); - } - f = message.getNumForwardingPackages(); - if (f !== 0) { - writer.writeInt64( - 10, - f - ); - } - f = message.getChanStatusFlags(); - if (f.length > 0) { - writer.writeString( - 11, - f - ); - } -}; - - -/** - * optional string remote_node_pub = 1; - * @return {string} - */ -proto.lnrpc.PendingChannelsResponse.PendingChannel.prototype.getRemoteNodePub = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.lnrpc.PendingChannelsResponse.PendingChannel} returns this - */ -proto.lnrpc.PendingChannelsResponse.PendingChannel.prototype.setRemoteNodePub = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional string channel_point = 2; - * @return {string} - */ -proto.lnrpc.PendingChannelsResponse.PendingChannel.prototype.getChannelPoint = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.lnrpc.PendingChannelsResponse.PendingChannel} returns this - */ -proto.lnrpc.PendingChannelsResponse.PendingChannel.prototype.setChannelPoint = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional int64 capacity = 3; - * @return {number} - */ -proto.lnrpc.PendingChannelsResponse.PendingChannel.prototype.getCapacity = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.PendingChannelsResponse.PendingChannel} returns this - */ -proto.lnrpc.PendingChannelsResponse.PendingChannel.prototype.setCapacity = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - -/** - * optional int64 local_balance = 4; - * @return {number} - */ -proto.lnrpc.PendingChannelsResponse.PendingChannel.prototype.getLocalBalance = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.PendingChannelsResponse.PendingChannel} returns this - */ -proto.lnrpc.PendingChannelsResponse.PendingChannel.prototype.setLocalBalance = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); -}; - - -/** - * optional int64 remote_balance = 5; - * @return {number} - */ -proto.lnrpc.PendingChannelsResponse.PendingChannel.prototype.getRemoteBalance = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.PendingChannelsResponse.PendingChannel} returns this - */ -proto.lnrpc.PendingChannelsResponse.PendingChannel.prototype.setRemoteBalance = function(value) { - return jspb.Message.setProto3IntField(this, 5, value); -}; - - -/** - * optional int64 local_chan_reserve_sat = 6; - * @return {number} - */ -proto.lnrpc.PendingChannelsResponse.PendingChannel.prototype.getLocalChanReserveSat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.PendingChannelsResponse.PendingChannel} returns this - */ -proto.lnrpc.PendingChannelsResponse.PendingChannel.prototype.setLocalChanReserveSat = function(value) { - return jspb.Message.setProto3IntField(this, 6, value); -}; - - -/** - * optional int64 remote_chan_reserve_sat = 7; - * @return {number} - */ -proto.lnrpc.PendingChannelsResponse.PendingChannel.prototype.getRemoteChanReserveSat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.PendingChannelsResponse.PendingChannel} returns this - */ -proto.lnrpc.PendingChannelsResponse.PendingChannel.prototype.setRemoteChanReserveSat = function(value) { - return jspb.Message.setProto3IntField(this, 7, value); -}; - - -/** - * optional Initiator initiator = 8; - * @return {!proto.lnrpc.Initiator} - */ -proto.lnrpc.PendingChannelsResponse.PendingChannel.prototype.getInitiator = function() { - return /** @type {!proto.lnrpc.Initiator} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); -}; - - -/** - * @param {!proto.lnrpc.Initiator} value - * @return {!proto.lnrpc.PendingChannelsResponse.PendingChannel} returns this - */ -proto.lnrpc.PendingChannelsResponse.PendingChannel.prototype.setInitiator = function(value) { - return jspb.Message.setProto3EnumField(this, 8, value); -}; - - -/** - * optional CommitmentType commitment_type = 9; - * @return {!proto.lnrpc.CommitmentType} - */ -proto.lnrpc.PendingChannelsResponse.PendingChannel.prototype.getCommitmentType = function() { - return /** @type {!proto.lnrpc.CommitmentType} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); -}; - - -/** - * @param {!proto.lnrpc.CommitmentType} value - * @return {!proto.lnrpc.PendingChannelsResponse.PendingChannel} returns this - */ -proto.lnrpc.PendingChannelsResponse.PendingChannel.prototype.setCommitmentType = function(value) { - return jspb.Message.setProto3EnumField(this, 9, value); -}; - - -/** - * optional int64 num_forwarding_packages = 10; - * @return {number} - */ -proto.lnrpc.PendingChannelsResponse.PendingChannel.prototype.getNumForwardingPackages = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 10, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.PendingChannelsResponse.PendingChannel} returns this - */ -proto.lnrpc.PendingChannelsResponse.PendingChannel.prototype.setNumForwardingPackages = function(value) { - return jspb.Message.setProto3IntField(this, 10, value); -}; - - -/** - * optional string chan_status_flags = 11; - * @return {string} - */ -proto.lnrpc.PendingChannelsResponse.PendingChannel.prototype.getChanStatusFlags = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 11, "")); -}; - - -/** - * @param {string} value - * @return {!proto.lnrpc.PendingChannelsResponse.PendingChannel} returns this - */ -proto.lnrpc.PendingChannelsResponse.PendingChannel.prototype.setChanStatusFlags = function(value) { - return jspb.Message.setProto3StringField(this, 11, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.PendingChannelsResponse.PendingOpenChannel.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.PendingChannelsResponse.PendingOpenChannel.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.PendingChannelsResponse.PendingOpenChannel} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.PendingChannelsResponse.PendingOpenChannel.toObject = function(includeInstance, msg) { - var f, obj = { - channel: (f = msg.getChannel()) && proto.lnrpc.PendingChannelsResponse.PendingChannel.toObject(includeInstance, f), - confirmationHeight: jspb.Message.getFieldWithDefault(msg, 2, 0), - commitFee: jspb.Message.getFieldWithDefault(msg, 4, 0), - commitWeight: jspb.Message.getFieldWithDefault(msg, 5, 0), - feePerKw: jspb.Message.getFieldWithDefault(msg, 6, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.PendingChannelsResponse.PendingOpenChannel} - */ -proto.lnrpc.PendingChannelsResponse.PendingOpenChannel.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.PendingChannelsResponse.PendingOpenChannel; - return proto.lnrpc.PendingChannelsResponse.PendingOpenChannel.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.PendingChannelsResponse.PendingOpenChannel} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.PendingChannelsResponse.PendingOpenChannel} - */ -proto.lnrpc.PendingChannelsResponse.PendingOpenChannel.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.lnrpc.PendingChannelsResponse.PendingChannel; - reader.readMessage(value,proto.lnrpc.PendingChannelsResponse.PendingChannel.deserializeBinaryFromReader); - msg.setChannel(value); - break; - case 2: - var value = /** @type {number} */ (reader.readUint32()); - msg.setConfirmationHeight(value); - break; - case 4: - var value = /** @type {number} */ (reader.readInt64()); - msg.setCommitFee(value); - break; - case 5: - var value = /** @type {number} */ (reader.readInt64()); - msg.setCommitWeight(value); - break; - case 6: - var value = /** @type {number} */ (reader.readInt64()); - msg.setFeePerKw(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.PendingChannelsResponse.PendingOpenChannel.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.PendingChannelsResponse.PendingOpenChannel.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.PendingChannelsResponse.PendingOpenChannel} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.PendingChannelsResponse.PendingOpenChannel.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getChannel(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.lnrpc.PendingChannelsResponse.PendingChannel.serializeBinaryToWriter - ); - } - f = message.getConfirmationHeight(); - if (f !== 0) { - writer.writeUint32( - 2, - f - ); - } - f = message.getCommitFee(); - if (f !== 0) { - writer.writeInt64( - 4, - f - ); - } - f = message.getCommitWeight(); - if (f !== 0) { - writer.writeInt64( - 5, - f - ); - } - f = message.getFeePerKw(); - if (f !== 0) { - writer.writeInt64( - 6, - f - ); - } -}; - - -/** - * optional PendingChannel channel = 1; - * @return {?proto.lnrpc.PendingChannelsResponse.PendingChannel} - */ -proto.lnrpc.PendingChannelsResponse.PendingOpenChannel.prototype.getChannel = function() { - return /** @type{?proto.lnrpc.PendingChannelsResponse.PendingChannel} */ ( - jspb.Message.getWrapperField(this, proto.lnrpc.PendingChannelsResponse.PendingChannel, 1)); -}; - - -/** - * @param {?proto.lnrpc.PendingChannelsResponse.PendingChannel|undefined} value - * @return {!proto.lnrpc.PendingChannelsResponse.PendingOpenChannel} returns this -*/ -proto.lnrpc.PendingChannelsResponse.PendingOpenChannel.prototype.setChannel = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.lnrpc.PendingChannelsResponse.PendingOpenChannel} returns this - */ -proto.lnrpc.PendingChannelsResponse.PendingOpenChannel.prototype.clearChannel = function() { - return this.setChannel(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.lnrpc.PendingChannelsResponse.PendingOpenChannel.prototype.hasChannel = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional uint32 confirmation_height = 2; - * @return {number} - */ -proto.lnrpc.PendingChannelsResponse.PendingOpenChannel.prototype.getConfirmationHeight = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.PendingChannelsResponse.PendingOpenChannel} returns this - */ -proto.lnrpc.PendingChannelsResponse.PendingOpenChannel.prototype.setConfirmationHeight = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * optional int64 commit_fee = 4; - * @return {number} - */ -proto.lnrpc.PendingChannelsResponse.PendingOpenChannel.prototype.getCommitFee = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.PendingChannelsResponse.PendingOpenChannel} returns this - */ -proto.lnrpc.PendingChannelsResponse.PendingOpenChannel.prototype.setCommitFee = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); -}; - - -/** - * optional int64 commit_weight = 5; - * @return {number} - */ -proto.lnrpc.PendingChannelsResponse.PendingOpenChannel.prototype.getCommitWeight = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.PendingChannelsResponse.PendingOpenChannel} returns this - */ -proto.lnrpc.PendingChannelsResponse.PendingOpenChannel.prototype.setCommitWeight = function(value) { - return jspb.Message.setProto3IntField(this, 5, value); -}; - - -/** - * optional int64 fee_per_kw = 6; - * @return {number} - */ -proto.lnrpc.PendingChannelsResponse.PendingOpenChannel.prototype.getFeePerKw = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.PendingChannelsResponse.PendingOpenChannel} returns this - */ -proto.lnrpc.PendingChannelsResponse.PendingOpenChannel.prototype.setFeePerKw = function(value) { - return jspb.Message.setProto3IntField(this, 6, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel.toObject = function(includeInstance, msg) { - var f, obj = { - channel: (f = msg.getChannel()) && proto.lnrpc.PendingChannelsResponse.PendingChannel.toObject(includeInstance, f), - limboBalance: jspb.Message.getFieldWithDefault(msg, 2, 0), - commitments: (f = msg.getCommitments()) && proto.lnrpc.PendingChannelsResponse.Commitments.toObject(includeInstance, f), - closingTxid: jspb.Message.getFieldWithDefault(msg, 4, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel} - */ -proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel; - return proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel} - */ -proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.lnrpc.PendingChannelsResponse.PendingChannel; - reader.readMessage(value,proto.lnrpc.PendingChannelsResponse.PendingChannel.deserializeBinaryFromReader); - msg.setChannel(value); - break; - case 2: - var value = /** @type {number} */ (reader.readInt64()); - msg.setLimboBalance(value); - break; - case 3: - var value = new proto.lnrpc.PendingChannelsResponse.Commitments; - reader.readMessage(value,proto.lnrpc.PendingChannelsResponse.Commitments.deserializeBinaryFromReader); - msg.setCommitments(value); - break; - case 4: - var value = /** @type {string} */ (reader.readString()); - msg.setClosingTxid(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getChannel(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.lnrpc.PendingChannelsResponse.PendingChannel.serializeBinaryToWriter - ); - } - f = message.getLimboBalance(); - if (f !== 0) { - writer.writeInt64( - 2, - f - ); - } - f = message.getCommitments(); - if (f != null) { - writer.writeMessage( - 3, - f, - proto.lnrpc.PendingChannelsResponse.Commitments.serializeBinaryToWriter - ); - } - f = message.getClosingTxid(); - if (f.length > 0) { - writer.writeString( - 4, - f - ); - } -}; - - -/** - * optional PendingChannel channel = 1; - * @return {?proto.lnrpc.PendingChannelsResponse.PendingChannel} - */ -proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel.prototype.getChannel = function() { - return /** @type{?proto.lnrpc.PendingChannelsResponse.PendingChannel} */ ( - jspb.Message.getWrapperField(this, proto.lnrpc.PendingChannelsResponse.PendingChannel, 1)); -}; - - -/** - * @param {?proto.lnrpc.PendingChannelsResponse.PendingChannel|undefined} value - * @return {!proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel} returns this -*/ -proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel.prototype.setChannel = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel} returns this - */ -proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel.prototype.clearChannel = function() { - return this.setChannel(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel.prototype.hasChannel = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional int64 limbo_balance = 2; - * @return {number} - */ -proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel.prototype.getLimboBalance = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel} returns this - */ -proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel.prototype.setLimboBalance = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * optional Commitments commitments = 3; - * @return {?proto.lnrpc.PendingChannelsResponse.Commitments} - */ -proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel.prototype.getCommitments = function() { - return /** @type{?proto.lnrpc.PendingChannelsResponse.Commitments} */ ( - jspb.Message.getWrapperField(this, proto.lnrpc.PendingChannelsResponse.Commitments, 3)); -}; - - -/** - * @param {?proto.lnrpc.PendingChannelsResponse.Commitments|undefined} value - * @return {!proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel} returns this -*/ -proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel.prototype.setCommitments = function(value) { - return jspb.Message.setWrapperField(this, 3, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel} returns this - */ -proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel.prototype.clearCommitments = function() { - return this.setCommitments(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel.prototype.hasCommitments = function() { - return jspb.Message.getField(this, 3) != null; -}; - - -/** - * optional string closing_txid = 4; - * @return {string} - */ -proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel.prototype.getClosingTxid = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); -}; - - -/** - * @param {string} value - * @return {!proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel} returns this - */ -proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel.prototype.setClosingTxid = function(value) { - return jspb.Message.setProto3StringField(this, 4, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.PendingChannelsResponse.Commitments.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.PendingChannelsResponse.Commitments.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.PendingChannelsResponse.Commitments} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.PendingChannelsResponse.Commitments.toObject = function(includeInstance, msg) { - var f, obj = { - localTxid: jspb.Message.getFieldWithDefault(msg, 1, ""), - remoteTxid: jspb.Message.getFieldWithDefault(msg, 2, ""), - remotePendingTxid: jspb.Message.getFieldWithDefault(msg, 3, ""), - localCommitFeeSat: jspb.Message.getFieldWithDefault(msg, 4, 0), - remoteCommitFeeSat: jspb.Message.getFieldWithDefault(msg, 5, 0), - remotePendingCommitFeeSat: jspb.Message.getFieldWithDefault(msg, 6, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.PendingChannelsResponse.Commitments} - */ -proto.lnrpc.PendingChannelsResponse.Commitments.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.PendingChannelsResponse.Commitments; - return proto.lnrpc.PendingChannelsResponse.Commitments.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.PendingChannelsResponse.Commitments} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.PendingChannelsResponse.Commitments} - */ -proto.lnrpc.PendingChannelsResponse.Commitments.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setLocalTxid(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setRemoteTxid(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setRemotePendingTxid(value); - break; - case 4: - var value = /** @type {number} */ (reader.readUint64()); - msg.setLocalCommitFeeSat(value); - break; - case 5: - var value = /** @type {number} */ (reader.readUint64()); - msg.setRemoteCommitFeeSat(value); - break; - case 6: - var value = /** @type {number} */ (reader.readUint64()); - msg.setRemotePendingCommitFeeSat(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.PendingChannelsResponse.Commitments.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.PendingChannelsResponse.Commitments.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.PendingChannelsResponse.Commitments} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.PendingChannelsResponse.Commitments.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getLocalTxid(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getRemoteTxid(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getRemotePendingTxid(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } - f = message.getLocalCommitFeeSat(); - if (f !== 0) { - writer.writeUint64( - 4, - f - ); - } - f = message.getRemoteCommitFeeSat(); - if (f !== 0) { - writer.writeUint64( - 5, - f - ); - } - f = message.getRemotePendingCommitFeeSat(); - if (f !== 0) { - writer.writeUint64( - 6, - f - ); - } -}; - - -/** - * optional string local_txid = 1; - * @return {string} - */ -proto.lnrpc.PendingChannelsResponse.Commitments.prototype.getLocalTxid = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.lnrpc.PendingChannelsResponse.Commitments} returns this - */ -proto.lnrpc.PendingChannelsResponse.Commitments.prototype.setLocalTxid = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional string remote_txid = 2; - * @return {string} - */ -proto.lnrpc.PendingChannelsResponse.Commitments.prototype.getRemoteTxid = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.lnrpc.PendingChannelsResponse.Commitments} returns this - */ -proto.lnrpc.PendingChannelsResponse.Commitments.prototype.setRemoteTxid = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional string remote_pending_txid = 3; - * @return {string} - */ -proto.lnrpc.PendingChannelsResponse.Commitments.prototype.getRemotePendingTxid = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * @param {string} value - * @return {!proto.lnrpc.PendingChannelsResponse.Commitments} returns this - */ -proto.lnrpc.PendingChannelsResponse.Commitments.prototype.setRemotePendingTxid = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); -}; - - -/** - * optional uint64 local_commit_fee_sat = 4; - * @return {number} - */ -proto.lnrpc.PendingChannelsResponse.Commitments.prototype.getLocalCommitFeeSat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.PendingChannelsResponse.Commitments} returns this - */ -proto.lnrpc.PendingChannelsResponse.Commitments.prototype.setLocalCommitFeeSat = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); -}; - - -/** - * optional uint64 remote_commit_fee_sat = 5; - * @return {number} - */ -proto.lnrpc.PendingChannelsResponse.Commitments.prototype.getRemoteCommitFeeSat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.PendingChannelsResponse.Commitments} returns this - */ -proto.lnrpc.PendingChannelsResponse.Commitments.prototype.setRemoteCommitFeeSat = function(value) { - return jspb.Message.setProto3IntField(this, 5, value); -}; - - -/** - * optional uint64 remote_pending_commit_fee_sat = 6; - * @return {number} - */ -proto.lnrpc.PendingChannelsResponse.Commitments.prototype.getRemotePendingCommitFeeSat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.PendingChannelsResponse.Commitments} returns this - */ -proto.lnrpc.PendingChannelsResponse.Commitments.prototype.setRemotePendingCommitFeeSat = function(value) { - return jspb.Message.setProto3IntField(this, 6, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.PendingChannelsResponse.ClosedChannel.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.PendingChannelsResponse.ClosedChannel.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.PendingChannelsResponse.ClosedChannel} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.PendingChannelsResponse.ClosedChannel.toObject = function(includeInstance, msg) { - var f, obj = { - channel: (f = msg.getChannel()) && proto.lnrpc.PendingChannelsResponse.PendingChannel.toObject(includeInstance, f), - closingTxid: jspb.Message.getFieldWithDefault(msg, 2, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.PendingChannelsResponse.ClosedChannel} - */ -proto.lnrpc.PendingChannelsResponse.ClosedChannel.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.PendingChannelsResponse.ClosedChannel; - return proto.lnrpc.PendingChannelsResponse.ClosedChannel.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.PendingChannelsResponse.ClosedChannel} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.PendingChannelsResponse.ClosedChannel} - */ -proto.lnrpc.PendingChannelsResponse.ClosedChannel.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.lnrpc.PendingChannelsResponse.PendingChannel; - reader.readMessage(value,proto.lnrpc.PendingChannelsResponse.PendingChannel.deserializeBinaryFromReader); - msg.setChannel(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setClosingTxid(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.PendingChannelsResponse.ClosedChannel.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.PendingChannelsResponse.ClosedChannel.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.PendingChannelsResponse.ClosedChannel} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.PendingChannelsResponse.ClosedChannel.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getChannel(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.lnrpc.PendingChannelsResponse.PendingChannel.serializeBinaryToWriter - ); - } - f = message.getClosingTxid(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } -}; - - -/** - * optional PendingChannel channel = 1; - * @return {?proto.lnrpc.PendingChannelsResponse.PendingChannel} - */ -proto.lnrpc.PendingChannelsResponse.ClosedChannel.prototype.getChannel = function() { - return /** @type{?proto.lnrpc.PendingChannelsResponse.PendingChannel} */ ( - jspb.Message.getWrapperField(this, proto.lnrpc.PendingChannelsResponse.PendingChannel, 1)); -}; - - -/** - * @param {?proto.lnrpc.PendingChannelsResponse.PendingChannel|undefined} value - * @return {!proto.lnrpc.PendingChannelsResponse.ClosedChannel} returns this -*/ -proto.lnrpc.PendingChannelsResponse.ClosedChannel.prototype.setChannel = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.lnrpc.PendingChannelsResponse.ClosedChannel} returns this - */ -proto.lnrpc.PendingChannelsResponse.ClosedChannel.prototype.clearChannel = function() { - return this.setChannel(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.lnrpc.PendingChannelsResponse.ClosedChannel.prototype.hasChannel = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional string closing_txid = 2; - * @return {string} - */ -proto.lnrpc.PendingChannelsResponse.ClosedChannel.prototype.getClosingTxid = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.lnrpc.PendingChannelsResponse.ClosedChannel} returns this - */ -proto.lnrpc.PendingChannelsResponse.ClosedChannel.prototype.setClosingTxid = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.repeatedFields_ = [8]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.PendingChannelsResponse.ForceClosedChannel} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.toObject = function(includeInstance, msg) { - var f, obj = { - channel: (f = msg.getChannel()) && proto.lnrpc.PendingChannelsResponse.PendingChannel.toObject(includeInstance, f), - closingTxid: jspb.Message.getFieldWithDefault(msg, 2, ""), - limboBalance: jspb.Message.getFieldWithDefault(msg, 3, 0), - maturityHeight: jspb.Message.getFieldWithDefault(msg, 4, 0), - blocksTilMaturity: jspb.Message.getFieldWithDefault(msg, 5, 0), - recoveredBalance: jspb.Message.getFieldWithDefault(msg, 6, 0), - pendingHtlcsList: jspb.Message.toObjectList(msg.getPendingHtlcsList(), - proto.lnrpc.PendingHTLC.toObject, includeInstance), - anchor: jspb.Message.getFieldWithDefault(msg, 9, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.PendingChannelsResponse.ForceClosedChannel} - */ -proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.PendingChannelsResponse.ForceClosedChannel; - return proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.PendingChannelsResponse.ForceClosedChannel} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.PendingChannelsResponse.ForceClosedChannel} - */ -proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.lnrpc.PendingChannelsResponse.PendingChannel; - reader.readMessage(value,proto.lnrpc.PendingChannelsResponse.PendingChannel.deserializeBinaryFromReader); - msg.setChannel(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setClosingTxid(value); - break; - case 3: - var value = /** @type {number} */ (reader.readInt64()); - msg.setLimboBalance(value); - break; - case 4: - var value = /** @type {number} */ (reader.readUint32()); - msg.setMaturityHeight(value); - break; - case 5: - var value = /** @type {number} */ (reader.readInt32()); - msg.setBlocksTilMaturity(value); - break; - case 6: - var value = /** @type {number} */ (reader.readInt64()); - msg.setRecoveredBalance(value); - break; - case 8: - var value = new proto.lnrpc.PendingHTLC; - reader.readMessage(value,proto.lnrpc.PendingHTLC.deserializeBinaryFromReader); - msg.addPendingHtlcs(value); - break; - case 9: - var value = /** @type {!proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.AnchorState} */ (reader.readEnum()); - msg.setAnchor(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.PendingChannelsResponse.ForceClosedChannel} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getChannel(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.lnrpc.PendingChannelsResponse.PendingChannel.serializeBinaryToWriter - ); - } - f = message.getClosingTxid(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getLimboBalance(); - if (f !== 0) { - writer.writeInt64( - 3, - f - ); - } - f = message.getMaturityHeight(); - if (f !== 0) { - writer.writeUint32( - 4, - f - ); - } - f = message.getBlocksTilMaturity(); - if (f !== 0) { - writer.writeInt32( - 5, - f - ); - } - f = message.getRecoveredBalance(); - if (f !== 0) { - writer.writeInt64( - 6, - f - ); - } - f = message.getPendingHtlcsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 8, - f, - proto.lnrpc.PendingHTLC.serializeBinaryToWriter - ); - } - f = message.getAnchor(); - if (f !== 0.0) { - writer.writeEnum( - 9, - f - ); - } -}; - - -/** - * @enum {number} - */ -proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.AnchorState = { - LIMBO: 0, - RECOVERED: 1, - LOST: 2 -}; - -/** - * optional PendingChannel channel = 1; - * @return {?proto.lnrpc.PendingChannelsResponse.PendingChannel} - */ -proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.prototype.getChannel = function() { - return /** @type{?proto.lnrpc.PendingChannelsResponse.PendingChannel} */ ( - jspb.Message.getWrapperField(this, proto.lnrpc.PendingChannelsResponse.PendingChannel, 1)); -}; - - -/** - * @param {?proto.lnrpc.PendingChannelsResponse.PendingChannel|undefined} value - * @return {!proto.lnrpc.PendingChannelsResponse.ForceClosedChannel} returns this -*/ -proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.prototype.setChannel = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.lnrpc.PendingChannelsResponse.ForceClosedChannel} returns this - */ -proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.prototype.clearChannel = function() { - return this.setChannel(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.prototype.hasChannel = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional string closing_txid = 2; - * @return {string} - */ -proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.prototype.getClosingTxid = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.lnrpc.PendingChannelsResponse.ForceClosedChannel} returns this - */ -proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.prototype.setClosingTxid = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional int64 limbo_balance = 3; - * @return {number} - */ -proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.prototype.getLimboBalance = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.PendingChannelsResponse.ForceClosedChannel} returns this - */ -proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.prototype.setLimboBalance = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - -/** - * optional uint32 maturity_height = 4; - * @return {number} - */ -proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.prototype.getMaturityHeight = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.PendingChannelsResponse.ForceClosedChannel} returns this - */ -proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.prototype.setMaturityHeight = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); -}; - - -/** - * optional int32 blocks_til_maturity = 5; - * @return {number} - */ -proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.prototype.getBlocksTilMaturity = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.PendingChannelsResponse.ForceClosedChannel} returns this - */ -proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.prototype.setBlocksTilMaturity = function(value) { - return jspb.Message.setProto3IntField(this, 5, value); -}; - - -/** - * optional int64 recovered_balance = 6; - * @return {number} - */ -proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.prototype.getRecoveredBalance = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.PendingChannelsResponse.ForceClosedChannel} returns this - */ -proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.prototype.setRecoveredBalance = function(value) { - return jspb.Message.setProto3IntField(this, 6, value); -}; - - -/** - * repeated PendingHTLC pending_htlcs = 8; - * @return {!Array} - */ -proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.prototype.getPendingHtlcsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.PendingHTLC, 8)); -}; - - -/** - * @param {!Array} value - * @return {!proto.lnrpc.PendingChannelsResponse.ForceClosedChannel} returns this -*/ -proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.prototype.setPendingHtlcsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 8, value); -}; - - -/** - * @param {!proto.lnrpc.PendingHTLC=} opt_value - * @param {number=} opt_index - * @return {!proto.lnrpc.PendingHTLC} - */ -proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.prototype.addPendingHtlcs = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 8, opt_value, proto.lnrpc.PendingHTLC, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.lnrpc.PendingChannelsResponse.ForceClosedChannel} returns this - */ -proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.prototype.clearPendingHtlcsList = function() { - return this.setPendingHtlcsList([]); -}; - - -/** - * optional AnchorState anchor = 9; - * @return {!proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.AnchorState} - */ -proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.prototype.getAnchor = function() { - return /** @type {!proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.AnchorState} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); -}; - - -/** - * @param {!proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.AnchorState} value - * @return {!proto.lnrpc.PendingChannelsResponse.ForceClosedChannel} returns this - */ -proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.prototype.setAnchor = function(value) { - return jspb.Message.setProto3EnumField(this, 9, value); -}; - - -/** - * optional int64 total_limbo_balance = 1; - * @return {number} - */ -proto.lnrpc.PendingChannelsResponse.prototype.getTotalLimboBalance = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.PendingChannelsResponse} returns this - */ -proto.lnrpc.PendingChannelsResponse.prototype.setTotalLimboBalance = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); -}; - - -/** - * repeated PendingOpenChannel pending_open_channels = 2; - * @return {!Array} - */ -proto.lnrpc.PendingChannelsResponse.prototype.getPendingOpenChannelsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.PendingChannelsResponse.PendingOpenChannel, 2)); -}; - - -/** - * @param {!Array} value - * @return {!proto.lnrpc.PendingChannelsResponse} returns this -*/ -proto.lnrpc.PendingChannelsResponse.prototype.setPendingOpenChannelsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 2, value); -}; - - -/** - * @param {!proto.lnrpc.PendingChannelsResponse.PendingOpenChannel=} opt_value - * @param {number=} opt_index - * @return {!proto.lnrpc.PendingChannelsResponse.PendingOpenChannel} - */ -proto.lnrpc.PendingChannelsResponse.prototype.addPendingOpenChannels = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.lnrpc.PendingChannelsResponse.PendingOpenChannel, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.lnrpc.PendingChannelsResponse} returns this - */ -proto.lnrpc.PendingChannelsResponse.prototype.clearPendingOpenChannelsList = function() { - return this.setPendingOpenChannelsList([]); -}; - - -/** - * repeated ClosedChannel pending_closing_channels = 3; - * @return {!Array} - */ -proto.lnrpc.PendingChannelsResponse.prototype.getPendingClosingChannelsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.PendingChannelsResponse.ClosedChannel, 3)); -}; - - -/** - * @param {!Array} value - * @return {!proto.lnrpc.PendingChannelsResponse} returns this -*/ -proto.lnrpc.PendingChannelsResponse.prototype.setPendingClosingChannelsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 3, value); -}; - - -/** - * @param {!proto.lnrpc.PendingChannelsResponse.ClosedChannel=} opt_value - * @param {number=} opt_index - * @return {!proto.lnrpc.PendingChannelsResponse.ClosedChannel} - */ -proto.lnrpc.PendingChannelsResponse.prototype.addPendingClosingChannels = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.lnrpc.PendingChannelsResponse.ClosedChannel, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.lnrpc.PendingChannelsResponse} returns this - */ -proto.lnrpc.PendingChannelsResponse.prototype.clearPendingClosingChannelsList = function() { - return this.setPendingClosingChannelsList([]); -}; - - -/** - * repeated ForceClosedChannel pending_force_closing_channels = 4; - * @return {!Array} - */ -proto.lnrpc.PendingChannelsResponse.prototype.getPendingForceClosingChannelsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.PendingChannelsResponse.ForceClosedChannel, 4)); -}; - - -/** - * @param {!Array} value - * @return {!proto.lnrpc.PendingChannelsResponse} returns this -*/ -proto.lnrpc.PendingChannelsResponse.prototype.setPendingForceClosingChannelsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 4, value); -}; - - -/** - * @param {!proto.lnrpc.PendingChannelsResponse.ForceClosedChannel=} opt_value - * @param {number=} opt_index - * @return {!proto.lnrpc.PendingChannelsResponse.ForceClosedChannel} - */ -proto.lnrpc.PendingChannelsResponse.prototype.addPendingForceClosingChannels = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 4, opt_value, proto.lnrpc.PendingChannelsResponse.ForceClosedChannel, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.lnrpc.PendingChannelsResponse} returns this - */ -proto.lnrpc.PendingChannelsResponse.prototype.clearPendingForceClosingChannelsList = function() { - return this.setPendingForceClosingChannelsList([]); -}; - - -/** - * repeated WaitingCloseChannel waiting_close_channels = 5; - * @return {!Array} - */ -proto.lnrpc.PendingChannelsResponse.prototype.getWaitingCloseChannelsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel, 5)); -}; - - -/** - * @param {!Array} value - * @return {!proto.lnrpc.PendingChannelsResponse} returns this -*/ -proto.lnrpc.PendingChannelsResponse.prototype.setWaitingCloseChannelsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 5, value); -}; - - -/** - * @param {!proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel=} opt_value - * @param {number=} opt_index - * @return {!proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel} - */ -proto.lnrpc.PendingChannelsResponse.prototype.addWaitingCloseChannels = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 5, opt_value, proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.lnrpc.PendingChannelsResponse} returns this - */ -proto.lnrpc.PendingChannelsResponse.prototype.clearWaitingCloseChannelsList = function() { - return this.setWaitingCloseChannelsList([]); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.ChannelEventSubscription.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.ChannelEventSubscription.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.ChannelEventSubscription} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.ChannelEventSubscription.toObject = function(includeInstance, msg) { - var f, obj = { - - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.ChannelEventSubscription} - */ -proto.lnrpc.ChannelEventSubscription.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.ChannelEventSubscription; - return proto.lnrpc.ChannelEventSubscription.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.ChannelEventSubscription} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.ChannelEventSubscription} - */ -proto.lnrpc.ChannelEventSubscription.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.ChannelEventSubscription.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.ChannelEventSubscription.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.ChannelEventSubscription} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.ChannelEventSubscription.serializeBinaryToWriter = function(message, writer) { - var f = undefined; -}; - - - -/** - * Oneof group definitions for this message. Each group defines the field - * numbers belonging to that group. When of these fields' value is set, all - * other fields in the group are cleared. During deserialization, if multiple - * fields are encountered for a group, only the last value seen will be kept. - * @private {!Array>} - * @const - */ -proto.lnrpc.ChannelEventUpdate.oneofGroups_ = [[1,2,3,4,6,7]]; - -/** - * @enum {number} - */ -proto.lnrpc.ChannelEventUpdate.ChannelCase = { - CHANNEL_NOT_SET: 0, - OPEN_CHANNEL: 1, - CLOSED_CHANNEL: 2, - ACTIVE_CHANNEL: 3, - INACTIVE_CHANNEL: 4, - PENDING_OPEN_CHANNEL: 6, - FULLY_RESOLVED_CHANNEL: 7 -}; - -/** - * @return {proto.lnrpc.ChannelEventUpdate.ChannelCase} - */ -proto.lnrpc.ChannelEventUpdate.prototype.getChannelCase = function() { - return /** @type {proto.lnrpc.ChannelEventUpdate.ChannelCase} */(jspb.Message.computeOneofCase(this, proto.lnrpc.ChannelEventUpdate.oneofGroups_[0])); -}; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.ChannelEventUpdate.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.ChannelEventUpdate.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.ChannelEventUpdate} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.ChannelEventUpdate.toObject = function(includeInstance, msg) { - var f, obj = { - openChannel: (f = msg.getOpenChannel()) && proto.lnrpc.Channel.toObject(includeInstance, f), - closedChannel: (f = msg.getClosedChannel()) && proto.lnrpc.ChannelCloseSummary.toObject(includeInstance, f), - activeChannel: (f = msg.getActiveChannel()) && proto.lnrpc.ChannelPoint.toObject(includeInstance, f), - inactiveChannel: (f = msg.getInactiveChannel()) && proto.lnrpc.ChannelPoint.toObject(includeInstance, f), - pendingOpenChannel: (f = msg.getPendingOpenChannel()) && proto.lnrpc.PendingUpdate.toObject(includeInstance, f), - fullyResolvedChannel: (f = msg.getFullyResolvedChannel()) && proto.lnrpc.ChannelPoint.toObject(includeInstance, f), - type: jspb.Message.getFieldWithDefault(msg, 5, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.ChannelEventUpdate} - */ -proto.lnrpc.ChannelEventUpdate.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.ChannelEventUpdate; - return proto.lnrpc.ChannelEventUpdate.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.ChannelEventUpdate} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.ChannelEventUpdate} - */ -proto.lnrpc.ChannelEventUpdate.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.lnrpc.Channel; - reader.readMessage(value,proto.lnrpc.Channel.deserializeBinaryFromReader); - msg.setOpenChannel(value); - break; - case 2: - var value = new proto.lnrpc.ChannelCloseSummary; - reader.readMessage(value,proto.lnrpc.ChannelCloseSummary.deserializeBinaryFromReader); - msg.setClosedChannel(value); - break; - case 3: - var value = new proto.lnrpc.ChannelPoint; - reader.readMessage(value,proto.lnrpc.ChannelPoint.deserializeBinaryFromReader); - msg.setActiveChannel(value); - break; - case 4: - var value = new proto.lnrpc.ChannelPoint; - reader.readMessage(value,proto.lnrpc.ChannelPoint.deserializeBinaryFromReader); - msg.setInactiveChannel(value); - break; - case 6: - var value = new proto.lnrpc.PendingUpdate; - reader.readMessage(value,proto.lnrpc.PendingUpdate.deserializeBinaryFromReader); - msg.setPendingOpenChannel(value); - break; - case 7: - var value = new proto.lnrpc.ChannelPoint; - reader.readMessage(value,proto.lnrpc.ChannelPoint.deserializeBinaryFromReader); - msg.setFullyResolvedChannel(value); - break; - case 5: - var value = /** @type {!proto.lnrpc.ChannelEventUpdate.UpdateType} */ (reader.readEnum()); - msg.setType(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.ChannelEventUpdate.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.ChannelEventUpdate.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.ChannelEventUpdate} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.ChannelEventUpdate.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getOpenChannel(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.lnrpc.Channel.serializeBinaryToWriter - ); - } - f = message.getClosedChannel(); - if (f != null) { - writer.writeMessage( - 2, - f, - proto.lnrpc.ChannelCloseSummary.serializeBinaryToWriter - ); - } - f = message.getActiveChannel(); - if (f != null) { - writer.writeMessage( - 3, - f, - proto.lnrpc.ChannelPoint.serializeBinaryToWriter - ); - } - f = message.getInactiveChannel(); - if (f != null) { - writer.writeMessage( - 4, - f, - proto.lnrpc.ChannelPoint.serializeBinaryToWriter - ); - } - f = message.getPendingOpenChannel(); - if (f != null) { - writer.writeMessage( - 6, - f, - proto.lnrpc.PendingUpdate.serializeBinaryToWriter - ); - } - f = message.getFullyResolvedChannel(); - if (f != null) { - writer.writeMessage( - 7, - f, - proto.lnrpc.ChannelPoint.serializeBinaryToWriter - ); - } - f = message.getType(); - if (f !== 0.0) { - writer.writeEnum( - 5, - f - ); - } -}; - - -/** - * @enum {number} - */ -proto.lnrpc.ChannelEventUpdate.UpdateType = { - OPEN_CHANNEL: 0, - CLOSED_CHANNEL: 1, - ACTIVE_CHANNEL: 2, - INACTIVE_CHANNEL: 3, - PENDING_OPEN_CHANNEL: 4, - FULLY_RESOLVED_CHANNEL: 5 -}; - -/** - * optional Channel open_channel = 1; - * @return {?proto.lnrpc.Channel} - */ -proto.lnrpc.ChannelEventUpdate.prototype.getOpenChannel = function() { - return /** @type{?proto.lnrpc.Channel} */ ( - jspb.Message.getWrapperField(this, proto.lnrpc.Channel, 1)); -}; - - -/** - * @param {?proto.lnrpc.Channel|undefined} value - * @return {!proto.lnrpc.ChannelEventUpdate} returns this -*/ -proto.lnrpc.ChannelEventUpdate.prototype.setOpenChannel = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.lnrpc.ChannelEventUpdate.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.lnrpc.ChannelEventUpdate} returns this - */ -proto.lnrpc.ChannelEventUpdate.prototype.clearOpenChannel = function() { - return this.setOpenChannel(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.lnrpc.ChannelEventUpdate.prototype.hasOpenChannel = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional ChannelCloseSummary closed_channel = 2; - * @return {?proto.lnrpc.ChannelCloseSummary} - */ -proto.lnrpc.ChannelEventUpdate.prototype.getClosedChannel = function() { - return /** @type{?proto.lnrpc.ChannelCloseSummary} */ ( - jspb.Message.getWrapperField(this, proto.lnrpc.ChannelCloseSummary, 2)); -}; - - -/** - * @param {?proto.lnrpc.ChannelCloseSummary|undefined} value - * @return {!proto.lnrpc.ChannelEventUpdate} returns this -*/ -proto.lnrpc.ChannelEventUpdate.prototype.setClosedChannel = function(value) { - return jspb.Message.setOneofWrapperField(this, 2, proto.lnrpc.ChannelEventUpdate.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.lnrpc.ChannelEventUpdate} returns this - */ -proto.lnrpc.ChannelEventUpdate.prototype.clearClosedChannel = function() { - return this.setClosedChannel(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.lnrpc.ChannelEventUpdate.prototype.hasClosedChannel = function() { - return jspb.Message.getField(this, 2) != null; -}; - - -/** - * optional ChannelPoint active_channel = 3; - * @return {?proto.lnrpc.ChannelPoint} - */ -proto.lnrpc.ChannelEventUpdate.prototype.getActiveChannel = function() { - return /** @type{?proto.lnrpc.ChannelPoint} */ ( - jspb.Message.getWrapperField(this, proto.lnrpc.ChannelPoint, 3)); -}; - - -/** - * @param {?proto.lnrpc.ChannelPoint|undefined} value - * @return {!proto.lnrpc.ChannelEventUpdate} returns this -*/ -proto.lnrpc.ChannelEventUpdate.prototype.setActiveChannel = function(value) { - return jspb.Message.setOneofWrapperField(this, 3, proto.lnrpc.ChannelEventUpdate.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.lnrpc.ChannelEventUpdate} returns this - */ -proto.lnrpc.ChannelEventUpdate.prototype.clearActiveChannel = function() { - return this.setActiveChannel(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.lnrpc.ChannelEventUpdate.prototype.hasActiveChannel = function() { - return jspb.Message.getField(this, 3) != null; -}; - - -/** - * optional ChannelPoint inactive_channel = 4; - * @return {?proto.lnrpc.ChannelPoint} - */ -proto.lnrpc.ChannelEventUpdate.prototype.getInactiveChannel = function() { - return /** @type{?proto.lnrpc.ChannelPoint} */ ( - jspb.Message.getWrapperField(this, proto.lnrpc.ChannelPoint, 4)); -}; - - -/** - * @param {?proto.lnrpc.ChannelPoint|undefined} value - * @return {!proto.lnrpc.ChannelEventUpdate} returns this -*/ -proto.lnrpc.ChannelEventUpdate.prototype.setInactiveChannel = function(value) { - return jspb.Message.setOneofWrapperField(this, 4, proto.lnrpc.ChannelEventUpdate.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.lnrpc.ChannelEventUpdate} returns this - */ -proto.lnrpc.ChannelEventUpdate.prototype.clearInactiveChannel = function() { - return this.setInactiveChannel(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.lnrpc.ChannelEventUpdate.prototype.hasInactiveChannel = function() { - return jspb.Message.getField(this, 4) != null; -}; - - -/** - * optional PendingUpdate pending_open_channel = 6; - * @return {?proto.lnrpc.PendingUpdate} - */ -proto.lnrpc.ChannelEventUpdate.prototype.getPendingOpenChannel = function() { - return /** @type{?proto.lnrpc.PendingUpdate} */ ( - jspb.Message.getWrapperField(this, proto.lnrpc.PendingUpdate, 6)); -}; - - -/** - * @param {?proto.lnrpc.PendingUpdate|undefined} value - * @return {!proto.lnrpc.ChannelEventUpdate} returns this -*/ -proto.lnrpc.ChannelEventUpdate.prototype.setPendingOpenChannel = function(value) { - return jspb.Message.setOneofWrapperField(this, 6, proto.lnrpc.ChannelEventUpdate.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.lnrpc.ChannelEventUpdate} returns this - */ -proto.lnrpc.ChannelEventUpdate.prototype.clearPendingOpenChannel = function() { - return this.setPendingOpenChannel(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.lnrpc.ChannelEventUpdate.prototype.hasPendingOpenChannel = function() { - return jspb.Message.getField(this, 6) != null; -}; - - -/** - * optional ChannelPoint fully_resolved_channel = 7; - * @return {?proto.lnrpc.ChannelPoint} - */ -proto.lnrpc.ChannelEventUpdate.prototype.getFullyResolvedChannel = function() { - return /** @type{?proto.lnrpc.ChannelPoint} */ ( - jspb.Message.getWrapperField(this, proto.lnrpc.ChannelPoint, 7)); -}; - - -/** - * @param {?proto.lnrpc.ChannelPoint|undefined} value - * @return {!proto.lnrpc.ChannelEventUpdate} returns this -*/ -proto.lnrpc.ChannelEventUpdate.prototype.setFullyResolvedChannel = function(value) { - return jspb.Message.setOneofWrapperField(this, 7, proto.lnrpc.ChannelEventUpdate.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.lnrpc.ChannelEventUpdate} returns this - */ -proto.lnrpc.ChannelEventUpdate.prototype.clearFullyResolvedChannel = function() { - return this.setFullyResolvedChannel(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.lnrpc.ChannelEventUpdate.prototype.hasFullyResolvedChannel = function() { - return jspb.Message.getField(this, 7) != null; -}; - - -/** - * optional UpdateType type = 5; - * @return {!proto.lnrpc.ChannelEventUpdate.UpdateType} - */ -proto.lnrpc.ChannelEventUpdate.prototype.getType = function() { - return /** @type {!proto.lnrpc.ChannelEventUpdate.UpdateType} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); -}; - - -/** - * @param {!proto.lnrpc.ChannelEventUpdate.UpdateType} value - * @return {!proto.lnrpc.ChannelEventUpdate} returns this - */ -proto.lnrpc.ChannelEventUpdate.prototype.setType = function(value) { - return jspb.Message.setProto3EnumField(this, 5, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.WalletAccountBalance.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.WalletAccountBalance.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.WalletAccountBalance} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.WalletAccountBalance.toObject = function(includeInstance, msg) { - var f, obj = { - confirmedBalance: jspb.Message.getFieldWithDefault(msg, 1, 0), - unconfirmedBalance: jspb.Message.getFieldWithDefault(msg, 2, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.WalletAccountBalance} - */ -proto.lnrpc.WalletAccountBalance.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.WalletAccountBalance; - return proto.lnrpc.WalletAccountBalance.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.WalletAccountBalance} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.WalletAccountBalance} - */ -proto.lnrpc.WalletAccountBalance.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readInt64()); - msg.setConfirmedBalance(value); - break; - case 2: - var value = /** @type {number} */ (reader.readInt64()); - msg.setUnconfirmedBalance(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.WalletAccountBalance.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.WalletAccountBalance.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.WalletAccountBalance} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.WalletAccountBalance.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getConfirmedBalance(); - if (f !== 0) { - writer.writeInt64( - 1, - f - ); - } - f = message.getUnconfirmedBalance(); - if (f !== 0) { - writer.writeInt64( - 2, - f - ); - } -}; - - -/** - * optional int64 confirmed_balance = 1; - * @return {number} - */ -proto.lnrpc.WalletAccountBalance.prototype.getConfirmedBalance = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.WalletAccountBalance} returns this - */ -proto.lnrpc.WalletAccountBalance.prototype.setConfirmedBalance = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); -}; - - -/** - * optional int64 unconfirmed_balance = 2; - * @return {number} - */ -proto.lnrpc.WalletAccountBalance.prototype.getUnconfirmedBalance = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.WalletAccountBalance} returns this - */ -proto.lnrpc.WalletAccountBalance.prototype.setUnconfirmedBalance = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.WalletBalanceRequest.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.WalletBalanceRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.WalletBalanceRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.WalletBalanceRequest.toObject = function(includeInstance, msg) { - var f, obj = { - - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.WalletBalanceRequest} - */ -proto.lnrpc.WalletBalanceRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.WalletBalanceRequest; - return proto.lnrpc.WalletBalanceRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.WalletBalanceRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.WalletBalanceRequest} - */ -proto.lnrpc.WalletBalanceRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.WalletBalanceRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.WalletBalanceRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.WalletBalanceRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.WalletBalanceRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.WalletBalanceResponse.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.WalletBalanceResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.WalletBalanceResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.WalletBalanceResponse.toObject = function(includeInstance, msg) { - var f, obj = { - totalBalance: jspb.Message.getFieldWithDefault(msg, 1, 0), - confirmedBalance: jspb.Message.getFieldWithDefault(msg, 2, 0), - unconfirmedBalance: jspb.Message.getFieldWithDefault(msg, 3, 0), - lockedBalance: jspb.Message.getFieldWithDefault(msg, 5, 0), - accountBalanceMap: (f = msg.getAccountBalanceMap()) ? f.toObject(includeInstance, proto.lnrpc.WalletAccountBalance.toObject) : [] - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.WalletBalanceResponse} - */ -proto.lnrpc.WalletBalanceResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.WalletBalanceResponse; - return proto.lnrpc.WalletBalanceResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.WalletBalanceResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.WalletBalanceResponse} - */ -proto.lnrpc.WalletBalanceResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readInt64()); - msg.setTotalBalance(value); - break; - case 2: - var value = /** @type {number} */ (reader.readInt64()); - msg.setConfirmedBalance(value); - break; - case 3: - var value = /** @type {number} */ (reader.readInt64()); - msg.setUnconfirmedBalance(value); - break; - case 5: - var value = /** @type {number} */ (reader.readInt64()); - msg.setLockedBalance(value); - break; - case 4: - var value = msg.getAccountBalanceMap(); - reader.readMessage(value, function(message, reader) { - jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readMessage, proto.lnrpc.WalletAccountBalance.deserializeBinaryFromReader, "", new proto.lnrpc.WalletAccountBalance()); - }); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.WalletBalanceResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.WalletBalanceResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.WalletBalanceResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.WalletBalanceResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getTotalBalance(); - if (f !== 0) { - writer.writeInt64( - 1, - f - ); - } - f = message.getConfirmedBalance(); - if (f !== 0) { - writer.writeInt64( - 2, - f - ); - } - f = message.getUnconfirmedBalance(); - if (f !== 0) { - writer.writeInt64( - 3, - f - ); - } - f = message.getLockedBalance(); - if (f !== 0) { - writer.writeInt64( - 5, - f - ); - } - f = message.getAccountBalanceMap(true); - if (f && f.getLength() > 0) { - f.serializeBinary(4, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeMessage, proto.lnrpc.WalletAccountBalance.serializeBinaryToWriter); - } -}; - - -/** - * optional int64 total_balance = 1; - * @return {number} - */ -proto.lnrpc.WalletBalanceResponse.prototype.getTotalBalance = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.WalletBalanceResponse} returns this - */ -proto.lnrpc.WalletBalanceResponse.prototype.setTotalBalance = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); -}; - - -/** - * optional int64 confirmed_balance = 2; - * @return {number} - */ -proto.lnrpc.WalletBalanceResponse.prototype.getConfirmedBalance = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.WalletBalanceResponse} returns this - */ -proto.lnrpc.WalletBalanceResponse.prototype.setConfirmedBalance = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * optional int64 unconfirmed_balance = 3; - * @return {number} - */ -proto.lnrpc.WalletBalanceResponse.prototype.getUnconfirmedBalance = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.WalletBalanceResponse} returns this - */ -proto.lnrpc.WalletBalanceResponse.prototype.setUnconfirmedBalance = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - -/** - * optional int64 locked_balance = 5; - * @return {number} - */ -proto.lnrpc.WalletBalanceResponse.prototype.getLockedBalance = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.WalletBalanceResponse} returns this - */ -proto.lnrpc.WalletBalanceResponse.prototype.setLockedBalance = function(value) { - return jspb.Message.setProto3IntField(this, 5, value); -}; - - -/** - * map account_balance = 4; - * @param {boolean=} opt_noLazyCreate Do not create the map if - * empty, instead returning `undefined` - * @return {!jspb.Map} - */ -proto.lnrpc.WalletBalanceResponse.prototype.getAccountBalanceMap = function(opt_noLazyCreate) { - return /** @type {!jspb.Map} */ ( - jspb.Message.getMapField(this, 4, opt_noLazyCreate, - proto.lnrpc.WalletAccountBalance)); -}; - - -/** - * Clears values from the map. The map will be non-null. - * @return {!proto.lnrpc.WalletBalanceResponse} returns this - */ -proto.lnrpc.WalletBalanceResponse.prototype.clearAccountBalanceMap = function() { - this.getAccountBalanceMap().clear(); - return this;}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.Amount.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.Amount.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.Amount} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.Amount.toObject = function(includeInstance, msg) { - var f, obj = { - sat: jspb.Message.getFieldWithDefault(msg, 1, 0), - msat: jspb.Message.getFieldWithDefault(msg, 2, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.Amount} - */ -proto.lnrpc.Amount.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.Amount; - return proto.lnrpc.Amount.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.Amount} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.Amount} - */ -proto.lnrpc.Amount.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readUint64()); - msg.setSat(value); - break; - case 2: - var value = /** @type {number} */ (reader.readUint64()); - msg.setMsat(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.Amount.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.Amount.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.Amount} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.Amount.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getSat(); - if (f !== 0) { - writer.writeUint64( - 1, - f - ); - } - f = message.getMsat(); - if (f !== 0) { - writer.writeUint64( - 2, - f - ); - } -}; - - -/** - * optional uint64 sat = 1; - * @return {number} - */ -proto.lnrpc.Amount.prototype.getSat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.Amount} returns this - */ -proto.lnrpc.Amount.prototype.setSat = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); -}; - - -/** - * optional uint64 msat = 2; - * @return {number} - */ -proto.lnrpc.Amount.prototype.getMsat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.Amount} returns this - */ -proto.lnrpc.Amount.prototype.setMsat = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.ChannelBalanceRequest.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.ChannelBalanceRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.ChannelBalanceRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.ChannelBalanceRequest.toObject = function(includeInstance, msg) { - var f, obj = { - - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.ChannelBalanceRequest} - */ -proto.lnrpc.ChannelBalanceRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.ChannelBalanceRequest; - return proto.lnrpc.ChannelBalanceRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.ChannelBalanceRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.ChannelBalanceRequest} - */ -proto.lnrpc.ChannelBalanceRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.ChannelBalanceRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.ChannelBalanceRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.ChannelBalanceRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.ChannelBalanceRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.ChannelBalanceResponse.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.ChannelBalanceResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.ChannelBalanceResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.ChannelBalanceResponse.toObject = function(includeInstance, msg) { - var f, obj = { - balance: jspb.Message.getFieldWithDefault(msg, 1, 0), - pendingOpenBalance: jspb.Message.getFieldWithDefault(msg, 2, 0), - localBalance: (f = msg.getLocalBalance()) && proto.lnrpc.Amount.toObject(includeInstance, f), - remoteBalance: (f = msg.getRemoteBalance()) && proto.lnrpc.Amount.toObject(includeInstance, f), - unsettledLocalBalance: (f = msg.getUnsettledLocalBalance()) && proto.lnrpc.Amount.toObject(includeInstance, f), - unsettledRemoteBalance: (f = msg.getUnsettledRemoteBalance()) && proto.lnrpc.Amount.toObject(includeInstance, f), - pendingOpenLocalBalance: (f = msg.getPendingOpenLocalBalance()) && proto.lnrpc.Amount.toObject(includeInstance, f), - pendingOpenRemoteBalance: (f = msg.getPendingOpenRemoteBalance()) && proto.lnrpc.Amount.toObject(includeInstance, f) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.ChannelBalanceResponse} - */ -proto.lnrpc.ChannelBalanceResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.ChannelBalanceResponse; - return proto.lnrpc.ChannelBalanceResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.ChannelBalanceResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.ChannelBalanceResponse} - */ -proto.lnrpc.ChannelBalanceResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readInt64()); - msg.setBalance(value); - break; - case 2: - var value = /** @type {number} */ (reader.readInt64()); - msg.setPendingOpenBalance(value); - break; - case 3: - var value = new proto.lnrpc.Amount; - reader.readMessage(value,proto.lnrpc.Amount.deserializeBinaryFromReader); - msg.setLocalBalance(value); - break; - case 4: - var value = new proto.lnrpc.Amount; - reader.readMessage(value,proto.lnrpc.Amount.deserializeBinaryFromReader); - msg.setRemoteBalance(value); - break; - case 5: - var value = new proto.lnrpc.Amount; - reader.readMessage(value,proto.lnrpc.Amount.deserializeBinaryFromReader); - msg.setUnsettledLocalBalance(value); - break; - case 6: - var value = new proto.lnrpc.Amount; - reader.readMessage(value,proto.lnrpc.Amount.deserializeBinaryFromReader); - msg.setUnsettledRemoteBalance(value); - break; - case 7: - var value = new proto.lnrpc.Amount; - reader.readMessage(value,proto.lnrpc.Amount.deserializeBinaryFromReader); - msg.setPendingOpenLocalBalance(value); - break; - case 8: - var value = new proto.lnrpc.Amount; - reader.readMessage(value,proto.lnrpc.Amount.deserializeBinaryFromReader); - msg.setPendingOpenRemoteBalance(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.ChannelBalanceResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.ChannelBalanceResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.ChannelBalanceResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.ChannelBalanceResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getBalance(); - if (f !== 0) { - writer.writeInt64( - 1, - f - ); - } - f = message.getPendingOpenBalance(); - if (f !== 0) { - writer.writeInt64( - 2, - f - ); - } - f = message.getLocalBalance(); - if (f != null) { - writer.writeMessage( - 3, - f, - proto.lnrpc.Amount.serializeBinaryToWriter - ); - } - f = message.getRemoteBalance(); - if (f != null) { - writer.writeMessage( - 4, - f, - proto.lnrpc.Amount.serializeBinaryToWriter - ); - } - f = message.getUnsettledLocalBalance(); - if (f != null) { - writer.writeMessage( - 5, - f, - proto.lnrpc.Amount.serializeBinaryToWriter - ); - } - f = message.getUnsettledRemoteBalance(); - if (f != null) { - writer.writeMessage( - 6, - f, - proto.lnrpc.Amount.serializeBinaryToWriter - ); - } - f = message.getPendingOpenLocalBalance(); - if (f != null) { - writer.writeMessage( - 7, - f, - proto.lnrpc.Amount.serializeBinaryToWriter - ); - } - f = message.getPendingOpenRemoteBalance(); - if (f != null) { - writer.writeMessage( - 8, - f, - proto.lnrpc.Amount.serializeBinaryToWriter - ); - } -}; - - -/** - * optional int64 balance = 1; - * @return {number} - */ -proto.lnrpc.ChannelBalanceResponse.prototype.getBalance = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.ChannelBalanceResponse} returns this - */ -proto.lnrpc.ChannelBalanceResponse.prototype.setBalance = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); -}; - - -/** - * optional int64 pending_open_balance = 2; - * @return {number} - */ -proto.lnrpc.ChannelBalanceResponse.prototype.getPendingOpenBalance = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.ChannelBalanceResponse} returns this - */ -proto.lnrpc.ChannelBalanceResponse.prototype.setPendingOpenBalance = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * optional Amount local_balance = 3; - * @return {?proto.lnrpc.Amount} - */ -proto.lnrpc.ChannelBalanceResponse.prototype.getLocalBalance = function() { - return /** @type{?proto.lnrpc.Amount} */ ( - jspb.Message.getWrapperField(this, proto.lnrpc.Amount, 3)); -}; - - -/** - * @param {?proto.lnrpc.Amount|undefined} value - * @return {!proto.lnrpc.ChannelBalanceResponse} returns this -*/ -proto.lnrpc.ChannelBalanceResponse.prototype.setLocalBalance = function(value) { - return jspb.Message.setWrapperField(this, 3, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.lnrpc.ChannelBalanceResponse} returns this - */ -proto.lnrpc.ChannelBalanceResponse.prototype.clearLocalBalance = function() { - return this.setLocalBalance(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.lnrpc.ChannelBalanceResponse.prototype.hasLocalBalance = function() { - return jspb.Message.getField(this, 3) != null; -}; - - -/** - * optional Amount remote_balance = 4; - * @return {?proto.lnrpc.Amount} - */ -proto.lnrpc.ChannelBalanceResponse.prototype.getRemoteBalance = function() { - return /** @type{?proto.lnrpc.Amount} */ ( - jspb.Message.getWrapperField(this, proto.lnrpc.Amount, 4)); -}; - - -/** - * @param {?proto.lnrpc.Amount|undefined} value - * @return {!proto.lnrpc.ChannelBalanceResponse} returns this -*/ -proto.lnrpc.ChannelBalanceResponse.prototype.setRemoteBalance = function(value) { - return jspb.Message.setWrapperField(this, 4, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.lnrpc.ChannelBalanceResponse} returns this - */ -proto.lnrpc.ChannelBalanceResponse.prototype.clearRemoteBalance = function() { - return this.setRemoteBalance(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.lnrpc.ChannelBalanceResponse.prototype.hasRemoteBalance = function() { - return jspb.Message.getField(this, 4) != null; -}; - - -/** - * optional Amount unsettled_local_balance = 5; - * @return {?proto.lnrpc.Amount} - */ -proto.lnrpc.ChannelBalanceResponse.prototype.getUnsettledLocalBalance = function() { - return /** @type{?proto.lnrpc.Amount} */ ( - jspb.Message.getWrapperField(this, proto.lnrpc.Amount, 5)); -}; - - -/** - * @param {?proto.lnrpc.Amount|undefined} value - * @return {!proto.lnrpc.ChannelBalanceResponse} returns this -*/ -proto.lnrpc.ChannelBalanceResponse.prototype.setUnsettledLocalBalance = function(value) { - return jspb.Message.setWrapperField(this, 5, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.lnrpc.ChannelBalanceResponse} returns this - */ -proto.lnrpc.ChannelBalanceResponse.prototype.clearUnsettledLocalBalance = function() { - return this.setUnsettledLocalBalance(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.lnrpc.ChannelBalanceResponse.prototype.hasUnsettledLocalBalance = function() { - return jspb.Message.getField(this, 5) != null; -}; - - -/** - * optional Amount unsettled_remote_balance = 6; - * @return {?proto.lnrpc.Amount} - */ -proto.lnrpc.ChannelBalanceResponse.prototype.getUnsettledRemoteBalance = function() { - return /** @type{?proto.lnrpc.Amount} */ ( - jspb.Message.getWrapperField(this, proto.lnrpc.Amount, 6)); -}; - - -/** - * @param {?proto.lnrpc.Amount|undefined} value - * @return {!proto.lnrpc.ChannelBalanceResponse} returns this -*/ -proto.lnrpc.ChannelBalanceResponse.prototype.setUnsettledRemoteBalance = function(value) { - return jspb.Message.setWrapperField(this, 6, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.lnrpc.ChannelBalanceResponse} returns this - */ -proto.lnrpc.ChannelBalanceResponse.prototype.clearUnsettledRemoteBalance = function() { - return this.setUnsettledRemoteBalance(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.lnrpc.ChannelBalanceResponse.prototype.hasUnsettledRemoteBalance = function() { - return jspb.Message.getField(this, 6) != null; -}; - - -/** - * optional Amount pending_open_local_balance = 7; - * @return {?proto.lnrpc.Amount} - */ -proto.lnrpc.ChannelBalanceResponse.prototype.getPendingOpenLocalBalance = function() { - return /** @type{?proto.lnrpc.Amount} */ ( - jspb.Message.getWrapperField(this, proto.lnrpc.Amount, 7)); -}; - - -/** - * @param {?proto.lnrpc.Amount|undefined} value - * @return {!proto.lnrpc.ChannelBalanceResponse} returns this -*/ -proto.lnrpc.ChannelBalanceResponse.prototype.setPendingOpenLocalBalance = function(value) { - return jspb.Message.setWrapperField(this, 7, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.lnrpc.ChannelBalanceResponse} returns this - */ -proto.lnrpc.ChannelBalanceResponse.prototype.clearPendingOpenLocalBalance = function() { - return this.setPendingOpenLocalBalance(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.lnrpc.ChannelBalanceResponse.prototype.hasPendingOpenLocalBalance = function() { - return jspb.Message.getField(this, 7) != null; -}; - - -/** - * optional Amount pending_open_remote_balance = 8; - * @return {?proto.lnrpc.Amount} - */ -proto.lnrpc.ChannelBalanceResponse.prototype.getPendingOpenRemoteBalance = function() { - return /** @type{?proto.lnrpc.Amount} */ ( - jspb.Message.getWrapperField(this, proto.lnrpc.Amount, 8)); -}; - - -/** - * @param {?proto.lnrpc.Amount|undefined} value - * @return {!proto.lnrpc.ChannelBalanceResponse} returns this -*/ -proto.lnrpc.ChannelBalanceResponse.prototype.setPendingOpenRemoteBalance = function(value) { - return jspb.Message.setWrapperField(this, 8, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.lnrpc.ChannelBalanceResponse} returns this - */ -proto.lnrpc.ChannelBalanceResponse.prototype.clearPendingOpenRemoteBalance = function() { - return this.setPendingOpenRemoteBalance(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.lnrpc.ChannelBalanceResponse.prototype.hasPendingOpenRemoteBalance = function() { - return jspb.Message.getField(this, 8) != null; -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.lnrpc.QueryRoutesRequest.repeatedFields_ = [6,7,10,16,17]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.QueryRoutesRequest.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.QueryRoutesRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.QueryRoutesRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.QueryRoutesRequest.toObject = function(includeInstance, msg) { - var f, obj = { - pubKey: jspb.Message.getFieldWithDefault(msg, 1, ""), - amt: jspb.Message.getFieldWithDefault(msg, 2, 0), - amtMsat: jspb.Message.getFieldWithDefault(msg, 12, 0), - finalCltvDelta: jspb.Message.getFieldWithDefault(msg, 4, 0), - feeLimit: (f = msg.getFeeLimit()) && proto.lnrpc.FeeLimit.toObject(includeInstance, f), - ignoredNodesList: msg.getIgnoredNodesList_asB64(), - ignoredEdgesList: jspb.Message.toObjectList(msg.getIgnoredEdgesList(), - proto.lnrpc.EdgeLocator.toObject, includeInstance), - sourcePubKey: jspb.Message.getFieldWithDefault(msg, 8, ""), - useMissionControl: jspb.Message.getBooleanFieldWithDefault(msg, 9, false), - ignoredPairsList: jspb.Message.toObjectList(msg.getIgnoredPairsList(), - proto.lnrpc.NodePair.toObject, includeInstance), - cltvLimit: jspb.Message.getFieldWithDefault(msg, 11, 0), - destCustomRecordsMap: (f = msg.getDestCustomRecordsMap()) ? f.toObject(includeInstance, undefined) : [], - outgoingChanId: jspb.Message.getFieldWithDefault(msg, 14, "0"), - lastHopPubkey: msg.getLastHopPubkey_asB64(), - routeHintsList: jspb.Message.toObjectList(msg.getRouteHintsList(), - proto.lnrpc.RouteHint.toObject, includeInstance), - destFeaturesList: (f = jspb.Message.getRepeatedField(msg, 17)) == null ? undefined : f - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.QueryRoutesRequest} - */ -proto.lnrpc.QueryRoutesRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.QueryRoutesRequest; - return proto.lnrpc.QueryRoutesRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.QueryRoutesRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.QueryRoutesRequest} - */ -proto.lnrpc.QueryRoutesRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setPubKey(value); - break; - case 2: - var value = /** @type {number} */ (reader.readInt64()); - msg.setAmt(value); - break; - case 12: - var value = /** @type {number} */ (reader.readInt64()); - msg.setAmtMsat(value); - break; - case 4: - var value = /** @type {number} */ (reader.readInt32()); - msg.setFinalCltvDelta(value); - break; - case 5: - var value = new proto.lnrpc.FeeLimit; - reader.readMessage(value,proto.lnrpc.FeeLimit.deserializeBinaryFromReader); - msg.setFeeLimit(value); - break; - case 6: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.addIgnoredNodes(value); - break; - case 7: - var value = new proto.lnrpc.EdgeLocator; - reader.readMessage(value,proto.lnrpc.EdgeLocator.deserializeBinaryFromReader); - msg.addIgnoredEdges(value); - break; - case 8: - var value = /** @type {string} */ (reader.readString()); - msg.setSourcePubKey(value); - break; - case 9: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setUseMissionControl(value); - break; - case 10: - var value = new proto.lnrpc.NodePair; - reader.readMessage(value,proto.lnrpc.NodePair.deserializeBinaryFromReader); - msg.addIgnoredPairs(value); - break; - case 11: - var value = /** @type {number} */ (reader.readUint32()); - msg.setCltvLimit(value); - break; - case 13: - var value = msg.getDestCustomRecordsMap(); - reader.readMessage(value, function(message, reader) { - jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readUint64, jspb.BinaryReader.prototype.readBytes, null, 0, ""); - }); - break; - case 14: - var value = /** @type {string} */ (reader.readUint64String()); - msg.setOutgoingChanId(value); - break; - case 15: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setLastHopPubkey(value); - break; - case 16: - var value = new proto.lnrpc.RouteHint; - reader.readMessage(value,proto.lnrpc.RouteHint.deserializeBinaryFromReader); - msg.addRouteHints(value); - break; - case 17: - var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedEnum() : [reader.readEnum()]); - for (var i = 0; i < values.length; i++) { - msg.addDestFeatures(values[i]); - } - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.QueryRoutesRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.QueryRoutesRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.QueryRoutesRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.QueryRoutesRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getPubKey(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getAmt(); - if (f !== 0) { - writer.writeInt64( - 2, - f - ); - } - f = message.getAmtMsat(); - if (f !== 0) { - writer.writeInt64( - 12, - f - ); - } - f = message.getFinalCltvDelta(); - if (f !== 0) { - writer.writeInt32( - 4, - f - ); - } - f = message.getFeeLimit(); - if (f != null) { - writer.writeMessage( - 5, - f, - proto.lnrpc.FeeLimit.serializeBinaryToWriter - ); - } - f = message.getIgnoredNodesList_asU8(); - if (f.length > 0) { - writer.writeRepeatedBytes( - 6, - f - ); - } - f = message.getIgnoredEdgesList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 7, - f, - proto.lnrpc.EdgeLocator.serializeBinaryToWriter - ); - } - f = message.getSourcePubKey(); - if (f.length > 0) { - writer.writeString( - 8, - f - ); - } - f = message.getUseMissionControl(); - if (f) { - writer.writeBool( - 9, - f - ); - } - f = message.getIgnoredPairsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 10, - f, - proto.lnrpc.NodePair.serializeBinaryToWriter - ); - } - f = message.getCltvLimit(); - if (f !== 0) { - writer.writeUint32( - 11, - f - ); - } - f = message.getDestCustomRecordsMap(true); - if (f && f.getLength() > 0) { - f.serializeBinary(13, writer, jspb.BinaryWriter.prototype.writeUint64, jspb.BinaryWriter.prototype.writeBytes); - } - f = message.getOutgoingChanId(); - if (parseInt(f, 10) !== 0) { - writer.writeUint64String( - 14, - f - ); - } - f = message.getLastHopPubkey_asU8(); - if (f.length > 0) { - writer.writeBytes( - 15, - f - ); - } - f = message.getRouteHintsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 16, - f, - proto.lnrpc.RouteHint.serializeBinaryToWriter - ); - } - f = message.getDestFeaturesList(); - if (f.length > 0) { - writer.writePackedEnum( - 17, - f - ); - } -}; - - -/** - * optional string pub_key = 1; - * @return {string} - */ -proto.lnrpc.QueryRoutesRequest.prototype.getPubKey = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.lnrpc.QueryRoutesRequest} returns this - */ -proto.lnrpc.QueryRoutesRequest.prototype.setPubKey = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional int64 amt = 2; - * @return {number} - */ -proto.lnrpc.QueryRoutesRequest.prototype.getAmt = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.QueryRoutesRequest} returns this - */ -proto.lnrpc.QueryRoutesRequest.prototype.setAmt = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * optional int64 amt_msat = 12; - * @return {number} - */ -proto.lnrpc.QueryRoutesRequest.prototype.getAmtMsat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 12, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.QueryRoutesRequest} returns this - */ -proto.lnrpc.QueryRoutesRequest.prototype.setAmtMsat = function(value) { - return jspb.Message.setProto3IntField(this, 12, value); -}; - - -/** - * optional int32 final_cltv_delta = 4; - * @return {number} - */ -proto.lnrpc.QueryRoutesRequest.prototype.getFinalCltvDelta = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.QueryRoutesRequest} returns this - */ -proto.lnrpc.QueryRoutesRequest.prototype.setFinalCltvDelta = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); -}; - - -/** - * optional FeeLimit fee_limit = 5; - * @return {?proto.lnrpc.FeeLimit} - */ -proto.lnrpc.QueryRoutesRequest.prototype.getFeeLimit = function() { - return /** @type{?proto.lnrpc.FeeLimit} */ ( - jspb.Message.getWrapperField(this, proto.lnrpc.FeeLimit, 5)); -}; - - -/** - * @param {?proto.lnrpc.FeeLimit|undefined} value - * @return {!proto.lnrpc.QueryRoutesRequest} returns this -*/ -proto.lnrpc.QueryRoutesRequest.prototype.setFeeLimit = function(value) { - return jspb.Message.setWrapperField(this, 5, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.lnrpc.QueryRoutesRequest} returns this - */ -proto.lnrpc.QueryRoutesRequest.prototype.clearFeeLimit = function() { - return this.setFeeLimit(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.lnrpc.QueryRoutesRequest.prototype.hasFeeLimit = function() { - return jspb.Message.getField(this, 5) != null; -}; - - -/** - * repeated bytes ignored_nodes = 6; - * @return {!(Array|Array)} - */ -proto.lnrpc.QueryRoutesRequest.prototype.getIgnoredNodesList = function() { - return /** @type {!(Array|Array)} */ (jspb.Message.getRepeatedField(this, 6)); -}; - - -/** - * repeated bytes ignored_nodes = 6; - * This is a type-conversion wrapper around `getIgnoredNodesList()` - * @return {!Array} - */ -proto.lnrpc.QueryRoutesRequest.prototype.getIgnoredNodesList_asB64 = function() { - return /** @type {!Array} */ (jspb.Message.bytesListAsB64( - this.getIgnoredNodesList())); -}; - - -/** - * repeated bytes ignored_nodes = 6; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getIgnoredNodesList()` - * @return {!Array} - */ -proto.lnrpc.QueryRoutesRequest.prototype.getIgnoredNodesList_asU8 = function() { - return /** @type {!Array} */ (jspb.Message.bytesListAsU8( - this.getIgnoredNodesList())); -}; - - -/** - * @param {!(Array|Array)} value - * @return {!proto.lnrpc.QueryRoutesRequest} returns this - */ -proto.lnrpc.QueryRoutesRequest.prototype.setIgnoredNodesList = function(value) { - return jspb.Message.setField(this, 6, value || []); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @param {number=} opt_index - * @return {!proto.lnrpc.QueryRoutesRequest} returns this - */ -proto.lnrpc.QueryRoutesRequest.prototype.addIgnoredNodes = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 6, value, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.lnrpc.QueryRoutesRequest} returns this - */ -proto.lnrpc.QueryRoutesRequest.prototype.clearIgnoredNodesList = function() { - return this.setIgnoredNodesList([]); -}; - - -/** - * repeated EdgeLocator ignored_edges = 7; - * @return {!Array} - */ -proto.lnrpc.QueryRoutesRequest.prototype.getIgnoredEdgesList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.EdgeLocator, 7)); -}; - - -/** - * @param {!Array} value - * @return {!proto.lnrpc.QueryRoutesRequest} returns this -*/ -proto.lnrpc.QueryRoutesRequest.prototype.setIgnoredEdgesList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 7, value); -}; - - -/** - * @param {!proto.lnrpc.EdgeLocator=} opt_value - * @param {number=} opt_index - * @return {!proto.lnrpc.EdgeLocator} - */ -proto.lnrpc.QueryRoutesRequest.prototype.addIgnoredEdges = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 7, opt_value, proto.lnrpc.EdgeLocator, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.lnrpc.QueryRoutesRequest} returns this - */ -proto.lnrpc.QueryRoutesRequest.prototype.clearIgnoredEdgesList = function() { - return this.setIgnoredEdgesList([]); -}; - - -/** - * optional string source_pub_key = 8; - * @return {string} - */ -proto.lnrpc.QueryRoutesRequest.prototype.getSourcePubKey = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, "")); -}; - - -/** - * @param {string} value - * @return {!proto.lnrpc.QueryRoutesRequest} returns this - */ -proto.lnrpc.QueryRoutesRequest.prototype.setSourcePubKey = function(value) { - return jspb.Message.setProto3StringField(this, 8, value); -}; - - -/** - * optional bool use_mission_control = 9; - * @return {boolean} - */ -proto.lnrpc.QueryRoutesRequest.prototype.getUseMissionControl = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 9, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.lnrpc.QueryRoutesRequest} returns this - */ -proto.lnrpc.QueryRoutesRequest.prototype.setUseMissionControl = function(value) { - return jspb.Message.setProto3BooleanField(this, 9, value); -}; - - -/** - * repeated NodePair ignored_pairs = 10; - * @return {!Array} - */ -proto.lnrpc.QueryRoutesRequest.prototype.getIgnoredPairsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.NodePair, 10)); -}; - - -/** - * @param {!Array} value - * @return {!proto.lnrpc.QueryRoutesRequest} returns this -*/ -proto.lnrpc.QueryRoutesRequest.prototype.setIgnoredPairsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 10, value); -}; - - -/** - * @param {!proto.lnrpc.NodePair=} opt_value - * @param {number=} opt_index - * @return {!proto.lnrpc.NodePair} - */ -proto.lnrpc.QueryRoutesRequest.prototype.addIgnoredPairs = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 10, opt_value, proto.lnrpc.NodePair, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.lnrpc.QueryRoutesRequest} returns this - */ -proto.lnrpc.QueryRoutesRequest.prototype.clearIgnoredPairsList = function() { - return this.setIgnoredPairsList([]); -}; - - -/** - * optional uint32 cltv_limit = 11; - * @return {number} - */ -proto.lnrpc.QueryRoutesRequest.prototype.getCltvLimit = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 11, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.QueryRoutesRequest} returns this - */ -proto.lnrpc.QueryRoutesRequest.prototype.setCltvLimit = function(value) { - return jspb.Message.setProto3IntField(this, 11, value); -}; - - -/** - * map dest_custom_records = 13; - * @param {boolean=} opt_noLazyCreate Do not create the map if - * empty, instead returning `undefined` - * @return {!jspb.Map} - */ -proto.lnrpc.QueryRoutesRequest.prototype.getDestCustomRecordsMap = function(opt_noLazyCreate) { - return /** @type {!jspb.Map} */ ( - jspb.Message.getMapField(this, 13, opt_noLazyCreate, - null)); -}; - - -/** - * Clears values from the map. The map will be non-null. - * @return {!proto.lnrpc.QueryRoutesRequest} returns this - */ -proto.lnrpc.QueryRoutesRequest.prototype.clearDestCustomRecordsMap = function() { - this.getDestCustomRecordsMap().clear(); - return this;}; - - -/** - * optional uint64 outgoing_chan_id = 14; - * @return {string} - */ -proto.lnrpc.QueryRoutesRequest.prototype.getOutgoingChanId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 14, "0")); -}; - - -/** - * @param {string} value - * @return {!proto.lnrpc.QueryRoutesRequest} returns this - */ -proto.lnrpc.QueryRoutesRequest.prototype.setOutgoingChanId = function(value) { - return jspb.Message.setProto3StringIntField(this, 14, value); -}; - - -/** - * optional bytes last_hop_pubkey = 15; - * @return {!(string|Uint8Array)} - */ -proto.lnrpc.QueryRoutesRequest.prototype.getLastHopPubkey = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 15, "")); -}; - - -/** - * optional bytes last_hop_pubkey = 15; - * This is a type-conversion wrapper around `getLastHopPubkey()` - * @return {string} - */ -proto.lnrpc.QueryRoutesRequest.prototype.getLastHopPubkey_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getLastHopPubkey())); -}; - - -/** - * optional bytes last_hop_pubkey = 15; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getLastHopPubkey()` - * @return {!Uint8Array} - */ -proto.lnrpc.QueryRoutesRequest.prototype.getLastHopPubkey_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getLastHopPubkey())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.lnrpc.QueryRoutesRequest} returns this - */ -proto.lnrpc.QueryRoutesRequest.prototype.setLastHopPubkey = function(value) { - return jspb.Message.setProto3BytesField(this, 15, value); -}; - - -/** - * repeated RouteHint route_hints = 16; - * @return {!Array} - */ -proto.lnrpc.QueryRoutesRequest.prototype.getRouteHintsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.RouteHint, 16)); -}; - - -/** - * @param {!Array} value - * @return {!proto.lnrpc.QueryRoutesRequest} returns this -*/ -proto.lnrpc.QueryRoutesRequest.prototype.setRouteHintsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 16, value); -}; - - -/** - * @param {!proto.lnrpc.RouteHint=} opt_value - * @param {number=} opt_index - * @return {!proto.lnrpc.RouteHint} - */ -proto.lnrpc.QueryRoutesRequest.prototype.addRouteHints = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 16, opt_value, proto.lnrpc.RouteHint, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.lnrpc.QueryRoutesRequest} returns this - */ -proto.lnrpc.QueryRoutesRequest.prototype.clearRouteHintsList = function() { - return this.setRouteHintsList([]); -}; - - -/** - * repeated FeatureBit dest_features = 17; - * @return {!Array} - */ -proto.lnrpc.QueryRoutesRequest.prototype.getDestFeaturesList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 17)); -}; - - -/** - * @param {!Array} value - * @return {!proto.lnrpc.QueryRoutesRequest} returns this - */ -proto.lnrpc.QueryRoutesRequest.prototype.setDestFeaturesList = function(value) { - return jspb.Message.setField(this, 17, value || []); -}; - - -/** - * @param {!proto.lnrpc.FeatureBit} value - * @param {number=} opt_index - * @return {!proto.lnrpc.QueryRoutesRequest} returns this - */ -proto.lnrpc.QueryRoutesRequest.prototype.addDestFeatures = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 17, value, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.lnrpc.QueryRoutesRequest} returns this - */ -proto.lnrpc.QueryRoutesRequest.prototype.clearDestFeaturesList = function() { - return this.setDestFeaturesList([]); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.NodePair.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.NodePair.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.NodePair} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.NodePair.toObject = function(includeInstance, msg) { - var f, obj = { - from: msg.getFrom_asB64(), - to: msg.getTo_asB64() - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.NodePair} - */ -proto.lnrpc.NodePair.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.NodePair; - return proto.lnrpc.NodePair.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.NodePair} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.NodePair} - */ -proto.lnrpc.NodePair.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setFrom(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setTo(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.NodePair.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.NodePair.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.NodePair} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.NodePair.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getFrom_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getTo_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } -}; - - -/** - * optional bytes from = 1; - * @return {!(string|Uint8Array)} - */ -proto.lnrpc.NodePair.prototype.getFrom = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes from = 1; - * This is a type-conversion wrapper around `getFrom()` - * @return {string} - */ -proto.lnrpc.NodePair.prototype.getFrom_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getFrom())); -}; - - -/** - * optional bytes from = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getFrom()` - * @return {!Uint8Array} - */ -proto.lnrpc.NodePair.prototype.getFrom_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getFrom())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.lnrpc.NodePair} returns this - */ -proto.lnrpc.NodePair.prototype.setFrom = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional bytes to = 2; - * @return {!(string|Uint8Array)} - */ -proto.lnrpc.NodePair.prototype.getTo = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes to = 2; - * This is a type-conversion wrapper around `getTo()` - * @return {string} - */ -proto.lnrpc.NodePair.prototype.getTo_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getTo())); -}; - - -/** - * optional bytes to = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getTo()` - * @return {!Uint8Array} - */ -proto.lnrpc.NodePair.prototype.getTo_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getTo())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.lnrpc.NodePair} returns this - */ -proto.lnrpc.NodePair.prototype.setTo = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.EdgeLocator.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.EdgeLocator.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.EdgeLocator} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.EdgeLocator.toObject = function(includeInstance, msg) { - var f, obj = { - channelId: jspb.Message.getFieldWithDefault(msg, 1, "0"), - directionReverse: jspb.Message.getBooleanFieldWithDefault(msg, 2, false) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.EdgeLocator} - */ -proto.lnrpc.EdgeLocator.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.EdgeLocator; - return proto.lnrpc.EdgeLocator.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.EdgeLocator} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.EdgeLocator} - */ -proto.lnrpc.EdgeLocator.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readUint64String()); - msg.setChannelId(value); - break; - case 2: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setDirectionReverse(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.EdgeLocator.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.EdgeLocator.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.EdgeLocator} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.EdgeLocator.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getChannelId(); - if (parseInt(f, 10) !== 0) { - writer.writeUint64String( - 1, - f - ); - } - f = message.getDirectionReverse(); - if (f) { - writer.writeBool( - 2, - f - ); - } -}; - - -/** - * optional uint64 channel_id = 1; - * @return {string} - */ -proto.lnrpc.EdgeLocator.prototype.getChannelId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "0")); -}; - - -/** - * @param {string} value - * @return {!proto.lnrpc.EdgeLocator} returns this - */ -proto.lnrpc.EdgeLocator.prototype.setChannelId = function(value) { - return jspb.Message.setProto3StringIntField(this, 1, value); -}; - - -/** - * optional bool direction_reverse = 2; - * @return {boolean} - */ -proto.lnrpc.EdgeLocator.prototype.getDirectionReverse = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.lnrpc.EdgeLocator} returns this - */ -proto.lnrpc.EdgeLocator.prototype.setDirectionReverse = function(value) { - return jspb.Message.setProto3BooleanField(this, 2, value); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.lnrpc.QueryRoutesResponse.repeatedFields_ = [1]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.QueryRoutesResponse.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.QueryRoutesResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.QueryRoutesResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.QueryRoutesResponse.toObject = function(includeInstance, msg) { - var f, obj = { - routesList: jspb.Message.toObjectList(msg.getRoutesList(), - proto.lnrpc.Route.toObject, includeInstance), - successProb: jspb.Message.getFloatingPointFieldWithDefault(msg, 2, 0.0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.QueryRoutesResponse} - */ -proto.lnrpc.QueryRoutesResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.QueryRoutesResponse; - return proto.lnrpc.QueryRoutesResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.QueryRoutesResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.QueryRoutesResponse} - */ -proto.lnrpc.QueryRoutesResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.lnrpc.Route; - reader.readMessage(value,proto.lnrpc.Route.deserializeBinaryFromReader); - msg.addRoutes(value); - break; - case 2: - var value = /** @type {number} */ (reader.readDouble()); - msg.setSuccessProb(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.QueryRoutesResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.QueryRoutesResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.QueryRoutesResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.QueryRoutesResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getRoutesList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 1, - f, - proto.lnrpc.Route.serializeBinaryToWriter - ); - } - f = message.getSuccessProb(); - if (f !== 0.0) { - writer.writeDouble( - 2, - f - ); - } -}; - - -/** - * repeated Route routes = 1; - * @return {!Array} - */ -proto.lnrpc.QueryRoutesResponse.prototype.getRoutesList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.Route, 1)); -}; - - -/** - * @param {!Array} value - * @return {!proto.lnrpc.QueryRoutesResponse} returns this -*/ -proto.lnrpc.QueryRoutesResponse.prototype.setRoutesList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); -}; - - -/** - * @param {!proto.lnrpc.Route=} opt_value - * @param {number=} opt_index - * @return {!proto.lnrpc.Route} - */ -proto.lnrpc.QueryRoutesResponse.prototype.addRoutes = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.lnrpc.Route, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.lnrpc.QueryRoutesResponse} returns this - */ -proto.lnrpc.QueryRoutesResponse.prototype.clearRoutesList = function() { - return this.setRoutesList([]); -}; - - -/** - * optional double success_prob = 2; - * @return {number} - */ -proto.lnrpc.QueryRoutesResponse.prototype.getSuccessProb = function() { - return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 2, 0.0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.QueryRoutesResponse} returns this - */ -proto.lnrpc.QueryRoutesResponse.prototype.setSuccessProb = function(value) { - return jspb.Message.setProto3FloatField(this, 2, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.Hop.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.Hop.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.Hop} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.Hop.toObject = function(includeInstance, msg) { - var f, obj = { - chanId: jspb.Message.getFieldWithDefault(msg, 1, "0"), - chanCapacity: jspb.Message.getFieldWithDefault(msg, 2, 0), - amtToForward: jspb.Message.getFieldWithDefault(msg, 3, 0), - fee: jspb.Message.getFieldWithDefault(msg, 4, 0), - expiry: jspb.Message.getFieldWithDefault(msg, 5, 0), - amtToForwardMsat: jspb.Message.getFieldWithDefault(msg, 6, 0), - feeMsat: jspb.Message.getFieldWithDefault(msg, 7, 0), - pubKey: jspb.Message.getFieldWithDefault(msg, 8, ""), - tlvPayload: jspb.Message.getBooleanFieldWithDefault(msg, 9, false), - mppRecord: (f = msg.getMppRecord()) && proto.lnrpc.MPPRecord.toObject(includeInstance, f), - ampRecord: (f = msg.getAmpRecord()) && proto.lnrpc.AMPRecord.toObject(includeInstance, f), - customRecordsMap: (f = msg.getCustomRecordsMap()) ? f.toObject(includeInstance, undefined) : [] - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.Hop} - */ -proto.lnrpc.Hop.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.Hop; - return proto.lnrpc.Hop.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.Hop} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.Hop} - */ -proto.lnrpc.Hop.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readUint64String()); - msg.setChanId(value); - break; - case 2: - var value = /** @type {number} */ (reader.readInt64()); - msg.setChanCapacity(value); - break; - case 3: - var value = /** @type {number} */ (reader.readInt64()); - msg.setAmtToForward(value); - break; - case 4: - var value = /** @type {number} */ (reader.readInt64()); - msg.setFee(value); - break; - case 5: - var value = /** @type {number} */ (reader.readUint32()); - msg.setExpiry(value); - break; - case 6: - var value = /** @type {number} */ (reader.readInt64()); - msg.setAmtToForwardMsat(value); - break; - case 7: - var value = /** @type {number} */ (reader.readInt64()); - msg.setFeeMsat(value); - break; - case 8: - var value = /** @type {string} */ (reader.readString()); - msg.setPubKey(value); - break; - case 9: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setTlvPayload(value); - break; - case 10: - var value = new proto.lnrpc.MPPRecord; - reader.readMessage(value,proto.lnrpc.MPPRecord.deserializeBinaryFromReader); - msg.setMppRecord(value); - break; - case 12: - var value = new proto.lnrpc.AMPRecord; - reader.readMessage(value,proto.lnrpc.AMPRecord.deserializeBinaryFromReader); - msg.setAmpRecord(value); - break; - case 11: - var value = msg.getCustomRecordsMap(); - reader.readMessage(value, function(message, reader) { - jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readUint64, jspb.BinaryReader.prototype.readBytes, null, 0, ""); - }); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.Hop.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.Hop.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.Hop} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.Hop.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getChanId(); - if (parseInt(f, 10) !== 0) { - writer.writeUint64String( - 1, - f - ); - } - f = message.getChanCapacity(); - if (f !== 0) { - writer.writeInt64( - 2, - f - ); - } - f = message.getAmtToForward(); - if (f !== 0) { - writer.writeInt64( - 3, - f - ); - } - f = message.getFee(); - if (f !== 0) { - writer.writeInt64( - 4, - f - ); - } - f = message.getExpiry(); - if (f !== 0) { - writer.writeUint32( - 5, - f - ); - } - f = message.getAmtToForwardMsat(); - if (f !== 0) { - writer.writeInt64( - 6, - f - ); - } - f = message.getFeeMsat(); - if (f !== 0) { - writer.writeInt64( - 7, - f - ); - } - f = message.getPubKey(); - if (f.length > 0) { - writer.writeString( - 8, - f - ); - } - f = message.getTlvPayload(); - if (f) { - writer.writeBool( - 9, - f - ); - } - f = message.getMppRecord(); - if (f != null) { - writer.writeMessage( - 10, - f, - proto.lnrpc.MPPRecord.serializeBinaryToWriter - ); - } - f = message.getAmpRecord(); - if (f != null) { - writer.writeMessage( - 12, - f, - proto.lnrpc.AMPRecord.serializeBinaryToWriter - ); - } - f = message.getCustomRecordsMap(true); - if (f && f.getLength() > 0) { - f.serializeBinary(11, writer, jspb.BinaryWriter.prototype.writeUint64, jspb.BinaryWriter.prototype.writeBytes); - } -}; - - -/** - * optional uint64 chan_id = 1; - * @return {string} - */ -proto.lnrpc.Hop.prototype.getChanId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "0")); -}; - - -/** - * @param {string} value - * @return {!proto.lnrpc.Hop} returns this - */ -proto.lnrpc.Hop.prototype.setChanId = function(value) { - return jspb.Message.setProto3StringIntField(this, 1, value); -}; - - -/** - * optional int64 chan_capacity = 2; - * @return {number} - */ -proto.lnrpc.Hop.prototype.getChanCapacity = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.Hop} returns this - */ -proto.lnrpc.Hop.prototype.setChanCapacity = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * optional int64 amt_to_forward = 3; - * @return {number} - */ -proto.lnrpc.Hop.prototype.getAmtToForward = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.Hop} returns this - */ -proto.lnrpc.Hop.prototype.setAmtToForward = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - -/** - * optional int64 fee = 4; - * @return {number} - */ -proto.lnrpc.Hop.prototype.getFee = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.Hop} returns this - */ -proto.lnrpc.Hop.prototype.setFee = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); -}; - - -/** - * optional uint32 expiry = 5; - * @return {number} - */ -proto.lnrpc.Hop.prototype.getExpiry = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.Hop} returns this - */ -proto.lnrpc.Hop.prototype.setExpiry = function(value) { - return jspb.Message.setProto3IntField(this, 5, value); -}; - - -/** - * optional int64 amt_to_forward_msat = 6; - * @return {number} - */ -proto.lnrpc.Hop.prototype.getAmtToForwardMsat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.Hop} returns this - */ -proto.lnrpc.Hop.prototype.setAmtToForwardMsat = function(value) { - return jspb.Message.setProto3IntField(this, 6, value); -}; - - -/** - * optional int64 fee_msat = 7; - * @return {number} - */ -proto.lnrpc.Hop.prototype.getFeeMsat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.Hop} returns this - */ -proto.lnrpc.Hop.prototype.setFeeMsat = function(value) { - return jspb.Message.setProto3IntField(this, 7, value); -}; - - -/** - * optional string pub_key = 8; - * @return {string} - */ -proto.lnrpc.Hop.prototype.getPubKey = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, "")); -}; - - -/** - * @param {string} value - * @return {!proto.lnrpc.Hop} returns this - */ -proto.lnrpc.Hop.prototype.setPubKey = function(value) { - return jspb.Message.setProto3StringField(this, 8, value); -}; - - -/** - * optional bool tlv_payload = 9; - * @return {boolean} - */ -proto.lnrpc.Hop.prototype.getTlvPayload = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 9, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.lnrpc.Hop} returns this - */ -proto.lnrpc.Hop.prototype.setTlvPayload = function(value) { - return jspb.Message.setProto3BooleanField(this, 9, value); -}; - - -/** - * optional MPPRecord mpp_record = 10; - * @return {?proto.lnrpc.MPPRecord} - */ -proto.lnrpc.Hop.prototype.getMppRecord = function() { - return /** @type{?proto.lnrpc.MPPRecord} */ ( - jspb.Message.getWrapperField(this, proto.lnrpc.MPPRecord, 10)); -}; - - -/** - * @param {?proto.lnrpc.MPPRecord|undefined} value - * @return {!proto.lnrpc.Hop} returns this -*/ -proto.lnrpc.Hop.prototype.setMppRecord = function(value) { - return jspb.Message.setWrapperField(this, 10, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.lnrpc.Hop} returns this - */ -proto.lnrpc.Hop.prototype.clearMppRecord = function() { - return this.setMppRecord(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.lnrpc.Hop.prototype.hasMppRecord = function() { - return jspb.Message.getField(this, 10) != null; -}; - - -/** - * optional AMPRecord amp_record = 12; - * @return {?proto.lnrpc.AMPRecord} - */ -proto.lnrpc.Hop.prototype.getAmpRecord = function() { - return /** @type{?proto.lnrpc.AMPRecord} */ ( - jspb.Message.getWrapperField(this, proto.lnrpc.AMPRecord, 12)); -}; - - -/** - * @param {?proto.lnrpc.AMPRecord|undefined} value - * @return {!proto.lnrpc.Hop} returns this -*/ -proto.lnrpc.Hop.prototype.setAmpRecord = function(value) { - return jspb.Message.setWrapperField(this, 12, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.lnrpc.Hop} returns this - */ -proto.lnrpc.Hop.prototype.clearAmpRecord = function() { - return this.setAmpRecord(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.lnrpc.Hop.prototype.hasAmpRecord = function() { - return jspb.Message.getField(this, 12) != null; -}; - - -/** - * map custom_records = 11; - * @param {boolean=} opt_noLazyCreate Do not create the map if - * empty, instead returning `undefined` - * @return {!jspb.Map} - */ -proto.lnrpc.Hop.prototype.getCustomRecordsMap = function(opt_noLazyCreate) { - return /** @type {!jspb.Map} */ ( - jspb.Message.getMapField(this, 11, opt_noLazyCreate, - null)); -}; - - -/** - * Clears values from the map. The map will be non-null. - * @return {!proto.lnrpc.Hop} returns this - */ -proto.lnrpc.Hop.prototype.clearCustomRecordsMap = function() { - this.getCustomRecordsMap().clear(); - return this;}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.MPPRecord.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.MPPRecord.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.MPPRecord} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.MPPRecord.toObject = function(includeInstance, msg) { - var f, obj = { - paymentAddr: msg.getPaymentAddr_asB64(), - totalAmtMsat: jspb.Message.getFieldWithDefault(msg, 10, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.MPPRecord} - */ -proto.lnrpc.MPPRecord.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.MPPRecord; - return proto.lnrpc.MPPRecord.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.MPPRecord} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.MPPRecord} - */ -proto.lnrpc.MPPRecord.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 11: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setPaymentAddr(value); - break; - case 10: - var value = /** @type {number} */ (reader.readInt64()); - msg.setTotalAmtMsat(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.MPPRecord.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.MPPRecord.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.MPPRecord} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.MPPRecord.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getPaymentAddr_asU8(); - if (f.length > 0) { - writer.writeBytes( - 11, - f - ); - } - f = message.getTotalAmtMsat(); - if (f !== 0) { - writer.writeInt64( - 10, - f - ); - } -}; - - -/** - * optional bytes payment_addr = 11; - * @return {!(string|Uint8Array)} - */ -proto.lnrpc.MPPRecord.prototype.getPaymentAddr = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 11, "")); -}; - - -/** - * optional bytes payment_addr = 11; - * This is a type-conversion wrapper around `getPaymentAddr()` - * @return {string} - */ -proto.lnrpc.MPPRecord.prototype.getPaymentAddr_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getPaymentAddr())); -}; - - -/** - * optional bytes payment_addr = 11; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getPaymentAddr()` - * @return {!Uint8Array} - */ -proto.lnrpc.MPPRecord.prototype.getPaymentAddr_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getPaymentAddr())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.lnrpc.MPPRecord} returns this - */ -proto.lnrpc.MPPRecord.prototype.setPaymentAddr = function(value) { - return jspb.Message.setProto3BytesField(this, 11, value); -}; - - -/** - * optional int64 total_amt_msat = 10; - * @return {number} - */ -proto.lnrpc.MPPRecord.prototype.getTotalAmtMsat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 10, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.MPPRecord} returns this - */ -proto.lnrpc.MPPRecord.prototype.setTotalAmtMsat = function(value) { - return jspb.Message.setProto3IntField(this, 10, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.AMPRecord.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.AMPRecord.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.AMPRecord} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.AMPRecord.toObject = function(includeInstance, msg) { - var f, obj = { - rootShare: msg.getRootShare_asB64(), - setId: msg.getSetId_asB64(), - childIndex: jspb.Message.getFieldWithDefault(msg, 3, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.AMPRecord} - */ -proto.lnrpc.AMPRecord.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.AMPRecord; - return proto.lnrpc.AMPRecord.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.AMPRecord} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.AMPRecord} - */ -proto.lnrpc.AMPRecord.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setRootShare(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setSetId(value); - break; - case 3: - var value = /** @type {number} */ (reader.readUint32()); - msg.setChildIndex(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.AMPRecord.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.AMPRecord.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.AMPRecord} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.AMPRecord.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getRootShare_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getSetId_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } - f = message.getChildIndex(); - if (f !== 0) { - writer.writeUint32( - 3, - f - ); - } -}; - - -/** - * optional bytes root_share = 1; - * @return {!(string|Uint8Array)} - */ -proto.lnrpc.AMPRecord.prototype.getRootShare = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes root_share = 1; - * This is a type-conversion wrapper around `getRootShare()` - * @return {string} - */ -proto.lnrpc.AMPRecord.prototype.getRootShare_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getRootShare())); -}; - - -/** - * optional bytes root_share = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getRootShare()` - * @return {!Uint8Array} - */ -proto.lnrpc.AMPRecord.prototype.getRootShare_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getRootShare())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.lnrpc.AMPRecord} returns this - */ -proto.lnrpc.AMPRecord.prototype.setRootShare = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional bytes set_id = 2; - * @return {!(string|Uint8Array)} - */ -proto.lnrpc.AMPRecord.prototype.getSetId = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes set_id = 2; - * This is a type-conversion wrapper around `getSetId()` - * @return {string} - */ -proto.lnrpc.AMPRecord.prototype.getSetId_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getSetId())); -}; - - -/** - * optional bytes set_id = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getSetId()` - * @return {!Uint8Array} - */ -proto.lnrpc.AMPRecord.prototype.getSetId_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getSetId())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.lnrpc.AMPRecord} returns this - */ -proto.lnrpc.AMPRecord.prototype.setSetId = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); -}; - - -/** - * optional uint32 child_index = 3; - * @return {number} - */ -proto.lnrpc.AMPRecord.prototype.getChildIndex = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.AMPRecord} returns this - */ -proto.lnrpc.AMPRecord.prototype.setChildIndex = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.lnrpc.Route.repeatedFields_ = [4]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.Route.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.Route.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.Route} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.Route.toObject = function(includeInstance, msg) { - var f, obj = { - totalTimeLock: jspb.Message.getFieldWithDefault(msg, 1, 0), - totalFees: jspb.Message.getFieldWithDefault(msg, 2, 0), - totalAmt: jspb.Message.getFieldWithDefault(msg, 3, 0), - hopsList: jspb.Message.toObjectList(msg.getHopsList(), - proto.lnrpc.Hop.toObject, includeInstance), - totalFeesMsat: jspb.Message.getFieldWithDefault(msg, 5, 0), - totalAmtMsat: jspb.Message.getFieldWithDefault(msg, 6, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.Route} - */ -proto.lnrpc.Route.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.Route; - return proto.lnrpc.Route.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.Route} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.Route} - */ -proto.lnrpc.Route.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readUint32()); - msg.setTotalTimeLock(value); - break; - case 2: - var value = /** @type {number} */ (reader.readInt64()); - msg.setTotalFees(value); - break; - case 3: - var value = /** @type {number} */ (reader.readInt64()); - msg.setTotalAmt(value); - break; - case 4: - var value = new proto.lnrpc.Hop; - reader.readMessage(value,proto.lnrpc.Hop.deserializeBinaryFromReader); - msg.addHops(value); - break; - case 5: - var value = /** @type {number} */ (reader.readInt64()); - msg.setTotalFeesMsat(value); - break; - case 6: - var value = /** @type {number} */ (reader.readInt64()); - msg.setTotalAmtMsat(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.Route.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.Route.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.Route} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.Route.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getTotalTimeLock(); - if (f !== 0) { - writer.writeUint32( - 1, - f - ); - } - f = message.getTotalFees(); - if (f !== 0) { - writer.writeInt64( - 2, - f - ); - } - f = message.getTotalAmt(); - if (f !== 0) { - writer.writeInt64( - 3, - f - ); - } - f = message.getHopsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 4, - f, - proto.lnrpc.Hop.serializeBinaryToWriter - ); - } - f = message.getTotalFeesMsat(); - if (f !== 0) { - writer.writeInt64( - 5, - f - ); - } - f = message.getTotalAmtMsat(); - if (f !== 0) { - writer.writeInt64( - 6, - f - ); - } -}; - - -/** - * optional uint32 total_time_lock = 1; - * @return {number} - */ -proto.lnrpc.Route.prototype.getTotalTimeLock = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.Route} returns this - */ -proto.lnrpc.Route.prototype.setTotalTimeLock = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); -}; - - -/** - * optional int64 total_fees = 2; - * @return {number} - */ -proto.lnrpc.Route.prototype.getTotalFees = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.Route} returns this - */ -proto.lnrpc.Route.prototype.setTotalFees = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * optional int64 total_amt = 3; - * @return {number} - */ -proto.lnrpc.Route.prototype.getTotalAmt = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.Route} returns this - */ -proto.lnrpc.Route.prototype.setTotalAmt = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - -/** - * repeated Hop hops = 4; - * @return {!Array} - */ -proto.lnrpc.Route.prototype.getHopsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.Hop, 4)); -}; - - -/** - * @param {!Array} value - * @return {!proto.lnrpc.Route} returns this -*/ -proto.lnrpc.Route.prototype.setHopsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 4, value); -}; - - -/** - * @param {!proto.lnrpc.Hop=} opt_value - * @param {number=} opt_index - * @return {!proto.lnrpc.Hop} - */ -proto.lnrpc.Route.prototype.addHops = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 4, opt_value, proto.lnrpc.Hop, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.lnrpc.Route} returns this - */ -proto.lnrpc.Route.prototype.clearHopsList = function() { - return this.setHopsList([]); -}; - - -/** - * optional int64 total_fees_msat = 5; - * @return {number} - */ -proto.lnrpc.Route.prototype.getTotalFeesMsat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.Route} returns this - */ -proto.lnrpc.Route.prototype.setTotalFeesMsat = function(value) { - return jspb.Message.setProto3IntField(this, 5, value); -}; - - -/** - * optional int64 total_amt_msat = 6; - * @return {number} - */ -proto.lnrpc.Route.prototype.getTotalAmtMsat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.Route} returns this - */ -proto.lnrpc.Route.prototype.setTotalAmtMsat = function(value) { - return jspb.Message.setProto3IntField(this, 6, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.NodeInfoRequest.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.NodeInfoRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.NodeInfoRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.NodeInfoRequest.toObject = function(includeInstance, msg) { - var f, obj = { - pubKey: jspb.Message.getFieldWithDefault(msg, 1, ""), - includeChannels: jspb.Message.getBooleanFieldWithDefault(msg, 2, false) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.NodeInfoRequest} - */ -proto.lnrpc.NodeInfoRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.NodeInfoRequest; - return proto.lnrpc.NodeInfoRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.NodeInfoRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.NodeInfoRequest} - */ -proto.lnrpc.NodeInfoRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setPubKey(value); - break; - case 2: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setIncludeChannels(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.NodeInfoRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.NodeInfoRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.NodeInfoRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.NodeInfoRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getPubKey(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getIncludeChannels(); - if (f) { - writer.writeBool( - 2, - f - ); - } -}; - - -/** - * optional string pub_key = 1; - * @return {string} - */ -proto.lnrpc.NodeInfoRequest.prototype.getPubKey = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.lnrpc.NodeInfoRequest} returns this - */ -proto.lnrpc.NodeInfoRequest.prototype.setPubKey = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional bool include_channels = 2; - * @return {boolean} - */ -proto.lnrpc.NodeInfoRequest.prototype.getIncludeChannels = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.lnrpc.NodeInfoRequest} returns this - */ -proto.lnrpc.NodeInfoRequest.prototype.setIncludeChannels = function(value) { - return jspb.Message.setProto3BooleanField(this, 2, value); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.lnrpc.NodeInfo.repeatedFields_ = [4]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.NodeInfo.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.NodeInfo.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.NodeInfo} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.NodeInfo.toObject = function(includeInstance, msg) { - var f, obj = { - node: (f = msg.getNode()) && proto.lnrpc.LightningNode.toObject(includeInstance, f), - numChannels: jspb.Message.getFieldWithDefault(msg, 2, 0), - totalCapacity: jspb.Message.getFieldWithDefault(msg, 3, 0), - channelsList: jspb.Message.toObjectList(msg.getChannelsList(), - proto.lnrpc.ChannelEdge.toObject, includeInstance) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.NodeInfo} - */ -proto.lnrpc.NodeInfo.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.NodeInfo; - return proto.lnrpc.NodeInfo.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.NodeInfo} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.NodeInfo} - */ -proto.lnrpc.NodeInfo.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.lnrpc.LightningNode; - reader.readMessage(value,proto.lnrpc.LightningNode.deserializeBinaryFromReader); - msg.setNode(value); - break; - case 2: - var value = /** @type {number} */ (reader.readUint32()); - msg.setNumChannels(value); - break; - case 3: - var value = /** @type {number} */ (reader.readInt64()); - msg.setTotalCapacity(value); - break; - case 4: - var value = new proto.lnrpc.ChannelEdge; - reader.readMessage(value,proto.lnrpc.ChannelEdge.deserializeBinaryFromReader); - msg.addChannels(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.NodeInfo.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.NodeInfo.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.NodeInfo} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.NodeInfo.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getNode(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.lnrpc.LightningNode.serializeBinaryToWriter - ); - } - f = message.getNumChannels(); - if (f !== 0) { - writer.writeUint32( - 2, - f - ); - } - f = message.getTotalCapacity(); - if (f !== 0) { - writer.writeInt64( - 3, - f - ); - } - f = message.getChannelsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 4, - f, - proto.lnrpc.ChannelEdge.serializeBinaryToWriter - ); - } -}; - - -/** - * optional LightningNode node = 1; - * @return {?proto.lnrpc.LightningNode} - */ -proto.lnrpc.NodeInfo.prototype.getNode = function() { - return /** @type{?proto.lnrpc.LightningNode} */ ( - jspb.Message.getWrapperField(this, proto.lnrpc.LightningNode, 1)); -}; - - -/** - * @param {?proto.lnrpc.LightningNode|undefined} value - * @return {!proto.lnrpc.NodeInfo} returns this -*/ -proto.lnrpc.NodeInfo.prototype.setNode = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.lnrpc.NodeInfo} returns this - */ -proto.lnrpc.NodeInfo.prototype.clearNode = function() { - return this.setNode(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.lnrpc.NodeInfo.prototype.hasNode = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional uint32 num_channels = 2; - * @return {number} - */ -proto.lnrpc.NodeInfo.prototype.getNumChannels = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.NodeInfo} returns this - */ -proto.lnrpc.NodeInfo.prototype.setNumChannels = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * optional int64 total_capacity = 3; - * @return {number} - */ -proto.lnrpc.NodeInfo.prototype.getTotalCapacity = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.NodeInfo} returns this - */ -proto.lnrpc.NodeInfo.prototype.setTotalCapacity = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - -/** - * repeated ChannelEdge channels = 4; - * @return {!Array} - */ -proto.lnrpc.NodeInfo.prototype.getChannelsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.ChannelEdge, 4)); -}; - - -/** - * @param {!Array} value - * @return {!proto.lnrpc.NodeInfo} returns this -*/ -proto.lnrpc.NodeInfo.prototype.setChannelsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 4, value); -}; - - -/** - * @param {!proto.lnrpc.ChannelEdge=} opt_value - * @param {number=} opt_index - * @return {!proto.lnrpc.ChannelEdge} - */ -proto.lnrpc.NodeInfo.prototype.addChannels = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 4, opt_value, proto.lnrpc.ChannelEdge, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.lnrpc.NodeInfo} returns this - */ -proto.lnrpc.NodeInfo.prototype.clearChannelsList = function() { - return this.setChannelsList([]); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.lnrpc.LightningNode.repeatedFields_ = [4]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.LightningNode.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.LightningNode.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.LightningNode} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.LightningNode.toObject = function(includeInstance, msg) { - var f, obj = { - lastUpdate: jspb.Message.getFieldWithDefault(msg, 1, 0), - pubKey: jspb.Message.getFieldWithDefault(msg, 2, ""), - alias: jspb.Message.getFieldWithDefault(msg, 3, ""), - addressesList: jspb.Message.toObjectList(msg.getAddressesList(), - proto.lnrpc.NodeAddress.toObject, includeInstance), - color: jspb.Message.getFieldWithDefault(msg, 5, ""), - featuresMap: (f = msg.getFeaturesMap()) ? f.toObject(includeInstance, proto.lnrpc.Feature.toObject) : [] - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.LightningNode} - */ -proto.lnrpc.LightningNode.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.LightningNode; - return proto.lnrpc.LightningNode.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.LightningNode} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.LightningNode} - */ -proto.lnrpc.LightningNode.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readUint32()); - msg.setLastUpdate(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setPubKey(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setAlias(value); - break; - case 4: - var value = new proto.lnrpc.NodeAddress; - reader.readMessage(value,proto.lnrpc.NodeAddress.deserializeBinaryFromReader); - msg.addAddresses(value); - break; - case 5: - var value = /** @type {string} */ (reader.readString()); - msg.setColor(value); - break; - case 6: - var value = msg.getFeaturesMap(); - reader.readMessage(value, function(message, reader) { - jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readUint32, jspb.BinaryReader.prototype.readMessage, proto.lnrpc.Feature.deserializeBinaryFromReader, 0, new proto.lnrpc.Feature()); - }); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.LightningNode.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.LightningNode.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.LightningNode} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.LightningNode.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getLastUpdate(); - if (f !== 0) { - writer.writeUint32( - 1, - f - ); - } - f = message.getPubKey(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getAlias(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } - f = message.getAddressesList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 4, - f, - proto.lnrpc.NodeAddress.serializeBinaryToWriter - ); - } - f = message.getColor(); - if (f.length > 0) { - writer.writeString( - 5, - f - ); - } - f = message.getFeaturesMap(true); - if (f && f.getLength() > 0) { - f.serializeBinary(6, writer, jspb.BinaryWriter.prototype.writeUint32, jspb.BinaryWriter.prototype.writeMessage, proto.lnrpc.Feature.serializeBinaryToWriter); - } -}; - - -/** - * optional uint32 last_update = 1; - * @return {number} - */ -proto.lnrpc.LightningNode.prototype.getLastUpdate = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.LightningNode} returns this - */ -proto.lnrpc.LightningNode.prototype.setLastUpdate = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); -}; - - -/** - * optional string pub_key = 2; - * @return {string} - */ -proto.lnrpc.LightningNode.prototype.getPubKey = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.lnrpc.LightningNode} returns this - */ -proto.lnrpc.LightningNode.prototype.setPubKey = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional string alias = 3; - * @return {string} - */ -proto.lnrpc.LightningNode.prototype.getAlias = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * @param {string} value - * @return {!proto.lnrpc.LightningNode} returns this - */ -proto.lnrpc.LightningNode.prototype.setAlias = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); -}; - - -/** - * repeated NodeAddress addresses = 4; - * @return {!Array} - */ -proto.lnrpc.LightningNode.prototype.getAddressesList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.NodeAddress, 4)); -}; - - -/** - * @param {!Array} value - * @return {!proto.lnrpc.LightningNode} returns this -*/ -proto.lnrpc.LightningNode.prototype.setAddressesList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 4, value); -}; - - -/** - * @param {!proto.lnrpc.NodeAddress=} opt_value - * @param {number=} opt_index - * @return {!proto.lnrpc.NodeAddress} - */ -proto.lnrpc.LightningNode.prototype.addAddresses = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 4, opt_value, proto.lnrpc.NodeAddress, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.lnrpc.LightningNode} returns this - */ -proto.lnrpc.LightningNode.prototype.clearAddressesList = function() { - return this.setAddressesList([]); -}; - - -/** - * optional string color = 5; - * @return {string} - */ -proto.lnrpc.LightningNode.prototype.getColor = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); -}; - - -/** - * @param {string} value - * @return {!proto.lnrpc.LightningNode} returns this - */ -proto.lnrpc.LightningNode.prototype.setColor = function(value) { - return jspb.Message.setProto3StringField(this, 5, value); -}; - - -/** - * map features = 6; - * @param {boolean=} opt_noLazyCreate Do not create the map if - * empty, instead returning `undefined` - * @return {!jspb.Map} - */ -proto.lnrpc.LightningNode.prototype.getFeaturesMap = function(opt_noLazyCreate) { - return /** @type {!jspb.Map} */ ( - jspb.Message.getMapField(this, 6, opt_noLazyCreate, - proto.lnrpc.Feature)); -}; - - -/** - * Clears values from the map. The map will be non-null. - * @return {!proto.lnrpc.LightningNode} returns this - */ -proto.lnrpc.LightningNode.prototype.clearFeaturesMap = function() { - this.getFeaturesMap().clear(); - return this;}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.NodeAddress.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.NodeAddress.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.NodeAddress} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.NodeAddress.toObject = function(includeInstance, msg) { - var f, obj = { - network: jspb.Message.getFieldWithDefault(msg, 1, ""), - addr: jspb.Message.getFieldWithDefault(msg, 2, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.NodeAddress} - */ -proto.lnrpc.NodeAddress.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.NodeAddress; - return proto.lnrpc.NodeAddress.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.NodeAddress} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.NodeAddress} - */ -proto.lnrpc.NodeAddress.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setNetwork(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setAddr(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.NodeAddress.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.NodeAddress.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.NodeAddress} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.NodeAddress.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getNetwork(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getAddr(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } -}; - - -/** - * optional string network = 1; - * @return {string} - */ -proto.lnrpc.NodeAddress.prototype.getNetwork = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.lnrpc.NodeAddress} returns this - */ -proto.lnrpc.NodeAddress.prototype.setNetwork = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional string addr = 2; - * @return {string} - */ -proto.lnrpc.NodeAddress.prototype.getAddr = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.lnrpc.NodeAddress} returns this - */ -proto.lnrpc.NodeAddress.prototype.setAddr = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.RoutingPolicy.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.RoutingPolicy.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.RoutingPolicy} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.RoutingPolicy.toObject = function(includeInstance, msg) { - var f, obj = { - timeLockDelta: jspb.Message.getFieldWithDefault(msg, 1, 0), - minHtlc: jspb.Message.getFieldWithDefault(msg, 2, 0), - feeBaseMsat: jspb.Message.getFieldWithDefault(msg, 3, 0), - feeRateMilliMsat: jspb.Message.getFieldWithDefault(msg, 4, 0), - disabled: jspb.Message.getBooleanFieldWithDefault(msg, 5, false), - maxHtlcMsat: jspb.Message.getFieldWithDefault(msg, 6, 0), - lastUpdate: jspb.Message.getFieldWithDefault(msg, 7, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.RoutingPolicy} - */ -proto.lnrpc.RoutingPolicy.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.RoutingPolicy; - return proto.lnrpc.RoutingPolicy.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.RoutingPolicy} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.RoutingPolicy} - */ -proto.lnrpc.RoutingPolicy.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readUint32()); - msg.setTimeLockDelta(value); - break; - case 2: - var value = /** @type {number} */ (reader.readInt64()); - msg.setMinHtlc(value); - break; - case 3: - var value = /** @type {number} */ (reader.readInt64()); - msg.setFeeBaseMsat(value); - break; - case 4: - var value = /** @type {number} */ (reader.readInt64()); - msg.setFeeRateMilliMsat(value); - break; - case 5: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setDisabled(value); - break; - case 6: - var value = /** @type {number} */ (reader.readUint64()); - msg.setMaxHtlcMsat(value); - break; - case 7: - var value = /** @type {number} */ (reader.readUint32()); - msg.setLastUpdate(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.RoutingPolicy.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.RoutingPolicy.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.RoutingPolicy} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.RoutingPolicy.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getTimeLockDelta(); - if (f !== 0) { - writer.writeUint32( - 1, - f - ); - } - f = message.getMinHtlc(); - if (f !== 0) { - writer.writeInt64( - 2, - f - ); - } - f = message.getFeeBaseMsat(); - if (f !== 0) { - writer.writeInt64( - 3, - f - ); - } - f = message.getFeeRateMilliMsat(); - if (f !== 0) { - writer.writeInt64( - 4, - f - ); - } - f = message.getDisabled(); - if (f) { - writer.writeBool( - 5, - f - ); - } - f = message.getMaxHtlcMsat(); - if (f !== 0) { - writer.writeUint64( - 6, - f - ); - } - f = message.getLastUpdate(); - if (f !== 0) { - writer.writeUint32( - 7, - f - ); - } -}; - - -/** - * optional uint32 time_lock_delta = 1; - * @return {number} - */ -proto.lnrpc.RoutingPolicy.prototype.getTimeLockDelta = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.RoutingPolicy} returns this - */ -proto.lnrpc.RoutingPolicy.prototype.setTimeLockDelta = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); -}; - - -/** - * optional int64 min_htlc = 2; - * @return {number} - */ -proto.lnrpc.RoutingPolicy.prototype.getMinHtlc = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.RoutingPolicy} returns this - */ -proto.lnrpc.RoutingPolicy.prototype.setMinHtlc = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * optional int64 fee_base_msat = 3; - * @return {number} - */ -proto.lnrpc.RoutingPolicy.prototype.getFeeBaseMsat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.RoutingPolicy} returns this - */ -proto.lnrpc.RoutingPolicy.prototype.setFeeBaseMsat = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - -/** - * optional int64 fee_rate_milli_msat = 4; - * @return {number} - */ -proto.lnrpc.RoutingPolicy.prototype.getFeeRateMilliMsat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.RoutingPolicy} returns this - */ -proto.lnrpc.RoutingPolicy.prototype.setFeeRateMilliMsat = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); -}; - - -/** - * optional bool disabled = 5; - * @return {boolean} - */ -proto.lnrpc.RoutingPolicy.prototype.getDisabled = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 5, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.lnrpc.RoutingPolicy} returns this - */ -proto.lnrpc.RoutingPolicy.prototype.setDisabled = function(value) { - return jspb.Message.setProto3BooleanField(this, 5, value); -}; - - -/** - * optional uint64 max_htlc_msat = 6; - * @return {number} - */ -proto.lnrpc.RoutingPolicy.prototype.getMaxHtlcMsat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.RoutingPolicy} returns this - */ -proto.lnrpc.RoutingPolicy.prototype.setMaxHtlcMsat = function(value) { - return jspb.Message.setProto3IntField(this, 6, value); -}; - - -/** - * optional uint32 last_update = 7; - * @return {number} - */ -proto.lnrpc.RoutingPolicy.prototype.getLastUpdate = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.RoutingPolicy} returns this - */ -proto.lnrpc.RoutingPolicy.prototype.setLastUpdate = function(value) { - return jspb.Message.setProto3IntField(this, 7, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.ChannelEdge.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.ChannelEdge.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.ChannelEdge} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.ChannelEdge.toObject = function(includeInstance, msg) { - var f, obj = { - channelId: jspb.Message.getFieldWithDefault(msg, 1, "0"), - chanPoint: jspb.Message.getFieldWithDefault(msg, 2, ""), - lastUpdate: jspb.Message.getFieldWithDefault(msg, 3, 0), - node1Pub: jspb.Message.getFieldWithDefault(msg, 4, ""), - node2Pub: jspb.Message.getFieldWithDefault(msg, 5, ""), - capacity: jspb.Message.getFieldWithDefault(msg, 6, 0), - node1Policy: (f = msg.getNode1Policy()) && proto.lnrpc.RoutingPolicy.toObject(includeInstance, f), - node2Policy: (f = msg.getNode2Policy()) && proto.lnrpc.RoutingPolicy.toObject(includeInstance, f) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.ChannelEdge} - */ -proto.lnrpc.ChannelEdge.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.ChannelEdge; - return proto.lnrpc.ChannelEdge.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.ChannelEdge} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.ChannelEdge} - */ -proto.lnrpc.ChannelEdge.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readUint64String()); - msg.setChannelId(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setChanPoint(value); - break; - case 3: - var value = /** @type {number} */ (reader.readUint32()); - msg.setLastUpdate(value); - break; - case 4: - var value = /** @type {string} */ (reader.readString()); - msg.setNode1Pub(value); - break; - case 5: - var value = /** @type {string} */ (reader.readString()); - msg.setNode2Pub(value); - break; - case 6: - var value = /** @type {number} */ (reader.readInt64()); - msg.setCapacity(value); - break; - case 7: - var value = new proto.lnrpc.RoutingPolicy; - reader.readMessage(value,proto.lnrpc.RoutingPolicy.deserializeBinaryFromReader); - msg.setNode1Policy(value); - break; - case 8: - var value = new proto.lnrpc.RoutingPolicy; - reader.readMessage(value,proto.lnrpc.RoutingPolicy.deserializeBinaryFromReader); - msg.setNode2Policy(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.ChannelEdge.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.ChannelEdge.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.ChannelEdge} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.ChannelEdge.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getChannelId(); - if (parseInt(f, 10) !== 0) { - writer.writeUint64String( - 1, - f - ); - } - f = message.getChanPoint(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getLastUpdate(); - if (f !== 0) { - writer.writeUint32( - 3, - f - ); - } - f = message.getNode1Pub(); - if (f.length > 0) { - writer.writeString( - 4, - f - ); - } - f = message.getNode2Pub(); - if (f.length > 0) { - writer.writeString( - 5, - f - ); - } - f = message.getCapacity(); - if (f !== 0) { - writer.writeInt64( - 6, - f - ); - } - f = message.getNode1Policy(); - if (f != null) { - writer.writeMessage( - 7, - f, - proto.lnrpc.RoutingPolicy.serializeBinaryToWriter - ); - } - f = message.getNode2Policy(); - if (f != null) { - writer.writeMessage( - 8, - f, - proto.lnrpc.RoutingPolicy.serializeBinaryToWriter - ); - } -}; - - -/** - * optional uint64 channel_id = 1; - * @return {string} - */ -proto.lnrpc.ChannelEdge.prototype.getChannelId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "0")); -}; - - -/** - * @param {string} value - * @return {!proto.lnrpc.ChannelEdge} returns this - */ -proto.lnrpc.ChannelEdge.prototype.setChannelId = function(value) { - return jspb.Message.setProto3StringIntField(this, 1, value); -}; - - -/** - * optional string chan_point = 2; - * @return {string} - */ -proto.lnrpc.ChannelEdge.prototype.getChanPoint = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.lnrpc.ChannelEdge} returns this - */ -proto.lnrpc.ChannelEdge.prototype.setChanPoint = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional uint32 last_update = 3; - * @return {number} - */ -proto.lnrpc.ChannelEdge.prototype.getLastUpdate = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.ChannelEdge} returns this - */ -proto.lnrpc.ChannelEdge.prototype.setLastUpdate = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - -/** - * optional string node1_pub = 4; - * @return {string} - */ -proto.lnrpc.ChannelEdge.prototype.getNode1Pub = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); -}; - - -/** - * @param {string} value - * @return {!proto.lnrpc.ChannelEdge} returns this - */ -proto.lnrpc.ChannelEdge.prototype.setNode1Pub = function(value) { - return jspb.Message.setProto3StringField(this, 4, value); -}; - - -/** - * optional string node2_pub = 5; - * @return {string} - */ -proto.lnrpc.ChannelEdge.prototype.getNode2Pub = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); -}; - - -/** - * @param {string} value - * @return {!proto.lnrpc.ChannelEdge} returns this - */ -proto.lnrpc.ChannelEdge.prototype.setNode2Pub = function(value) { - return jspb.Message.setProto3StringField(this, 5, value); -}; - - -/** - * optional int64 capacity = 6; - * @return {number} - */ -proto.lnrpc.ChannelEdge.prototype.getCapacity = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.ChannelEdge} returns this - */ -proto.lnrpc.ChannelEdge.prototype.setCapacity = function(value) { - return jspb.Message.setProto3IntField(this, 6, value); -}; - - -/** - * optional RoutingPolicy node1_policy = 7; - * @return {?proto.lnrpc.RoutingPolicy} - */ -proto.lnrpc.ChannelEdge.prototype.getNode1Policy = function() { - return /** @type{?proto.lnrpc.RoutingPolicy} */ ( - jspb.Message.getWrapperField(this, proto.lnrpc.RoutingPolicy, 7)); -}; - - -/** - * @param {?proto.lnrpc.RoutingPolicy|undefined} value - * @return {!proto.lnrpc.ChannelEdge} returns this -*/ -proto.lnrpc.ChannelEdge.prototype.setNode1Policy = function(value) { - return jspb.Message.setWrapperField(this, 7, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.lnrpc.ChannelEdge} returns this - */ -proto.lnrpc.ChannelEdge.prototype.clearNode1Policy = function() { - return this.setNode1Policy(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.lnrpc.ChannelEdge.prototype.hasNode1Policy = function() { - return jspb.Message.getField(this, 7) != null; -}; - - -/** - * optional RoutingPolicy node2_policy = 8; - * @return {?proto.lnrpc.RoutingPolicy} - */ -proto.lnrpc.ChannelEdge.prototype.getNode2Policy = function() { - return /** @type{?proto.lnrpc.RoutingPolicy} */ ( - jspb.Message.getWrapperField(this, proto.lnrpc.RoutingPolicy, 8)); -}; - - -/** - * @param {?proto.lnrpc.RoutingPolicy|undefined} value - * @return {!proto.lnrpc.ChannelEdge} returns this -*/ -proto.lnrpc.ChannelEdge.prototype.setNode2Policy = function(value) { - return jspb.Message.setWrapperField(this, 8, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.lnrpc.ChannelEdge} returns this - */ -proto.lnrpc.ChannelEdge.prototype.clearNode2Policy = function() { - return this.setNode2Policy(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.lnrpc.ChannelEdge.prototype.hasNode2Policy = function() { - return jspb.Message.getField(this, 8) != null; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.ChannelGraphRequest.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.ChannelGraphRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.ChannelGraphRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.ChannelGraphRequest.toObject = function(includeInstance, msg) { - var f, obj = { - includeUnannounced: jspb.Message.getBooleanFieldWithDefault(msg, 1, false) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.ChannelGraphRequest} - */ -proto.lnrpc.ChannelGraphRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.ChannelGraphRequest; - return proto.lnrpc.ChannelGraphRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.ChannelGraphRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.ChannelGraphRequest} - */ -proto.lnrpc.ChannelGraphRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setIncludeUnannounced(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.ChannelGraphRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.ChannelGraphRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.ChannelGraphRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.ChannelGraphRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getIncludeUnannounced(); - if (f) { - writer.writeBool( - 1, - f - ); - } -}; - - -/** - * optional bool include_unannounced = 1; - * @return {boolean} - */ -proto.lnrpc.ChannelGraphRequest.prototype.getIncludeUnannounced = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.lnrpc.ChannelGraphRequest} returns this - */ -proto.lnrpc.ChannelGraphRequest.prototype.setIncludeUnannounced = function(value) { - return jspb.Message.setProto3BooleanField(this, 1, value); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.lnrpc.ChannelGraph.repeatedFields_ = [1,2]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.ChannelGraph.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.ChannelGraph.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.ChannelGraph} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.ChannelGraph.toObject = function(includeInstance, msg) { - var f, obj = { - nodesList: jspb.Message.toObjectList(msg.getNodesList(), - proto.lnrpc.LightningNode.toObject, includeInstance), - edgesList: jspb.Message.toObjectList(msg.getEdgesList(), - proto.lnrpc.ChannelEdge.toObject, includeInstance) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.ChannelGraph} - */ -proto.lnrpc.ChannelGraph.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.ChannelGraph; - return proto.lnrpc.ChannelGraph.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.ChannelGraph} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.ChannelGraph} - */ -proto.lnrpc.ChannelGraph.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.lnrpc.LightningNode; - reader.readMessage(value,proto.lnrpc.LightningNode.deserializeBinaryFromReader); - msg.addNodes(value); - break; - case 2: - var value = new proto.lnrpc.ChannelEdge; - reader.readMessage(value,proto.lnrpc.ChannelEdge.deserializeBinaryFromReader); - msg.addEdges(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.ChannelGraph.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.ChannelGraph.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.ChannelGraph} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.ChannelGraph.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getNodesList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 1, - f, - proto.lnrpc.LightningNode.serializeBinaryToWriter - ); - } - f = message.getEdgesList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 2, - f, - proto.lnrpc.ChannelEdge.serializeBinaryToWriter - ); - } -}; - - -/** - * repeated LightningNode nodes = 1; - * @return {!Array} - */ -proto.lnrpc.ChannelGraph.prototype.getNodesList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.LightningNode, 1)); -}; - - -/** - * @param {!Array} value - * @return {!proto.lnrpc.ChannelGraph} returns this -*/ -proto.lnrpc.ChannelGraph.prototype.setNodesList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); -}; - - -/** - * @param {!proto.lnrpc.LightningNode=} opt_value - * @param {number=} opt_index - * @return {!proto.lnrpc.LightningNode} - */ -proto.lnrpc.ChannelGraph.prototype.addNodes = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.lnrpc.LightningNode, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.lnrpc.ChannelGraph} returns this - */ -proto.lnrpc.ChannelGraph.prototype.clearNodesList = function() { - return this.setNodesList([]); -}; - - -/** - * repeated ChannelEdge edges = 2; - * @return {!Array} - */ -proto.lnrpc.ChannelGraph.prototype.getEdgesList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.ChannelEdge, 2)); -}; - - -/** - * @param {!Array} value - * @return {!proto.lnrpc.ChannelGraph} returns this -*/ -proto.lnrpc.ChannelGraph.prototype.setEdgesList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 2, value); -}; - - -/** - * @param {!proto.lnrpc.ChannelEdge=} opt_value - * @param {number=} opt_index - * @return {!proto.lnrpc.ChannelEdge} - */ -proto.lnrpc.ChannelGraph.prototype.addEdges = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.lnrpc.ChannelEdge, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.lnrpc.ChannelGraph} returns this - */ -proto.lnrpc.ChannelGraph.prototype.clearEdgesList = function() { - return this.setEdgesList([]); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.lnrpc.NodeMetricsRequest.repeatedFields_ = [1]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.NodeMetricsRequest.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.NodeMetricsRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.NodeMetricsRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.NodeMetricsRequest.toObject = function(includeInstance, msg) { - var f, obj = { - typesList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : f - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.NodeMetricsRequest} - */ -proto.lnrpc.NodeMetricsRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.NodeMetricsRequest; - return proto.lnrpc.NodeMetricsRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.NodeMetricsRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.NodeMetricsRequest} - */ -proto.lnrpc.NodeMetricsRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedEnum() : [reader.readEnum()]); - for (var i = 0; i < values.length; i++) { - msg.addTypes(values[i]); - } - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.NodeMetricsRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.NodeMetricsRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.NodeMetricsRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.NodeMetricsRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getTypesList(); - if (f.length > 0) { - writer.writePackedEnum( - 1, - f - ); - } -}; - - -/** - * repeated NodeMetricType types = 1; - * @return {!Array} - */ -proto.lnrpc.NodeMetricsRequest.prototype.getTypesList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); -}; - - -/** - * @param {!Array} value - * @return {!proto.lnrpc.NodeMetricsRequest} returns this - */ -proto.lnrpc.NodeMetricsRequest.prototype.setTypesList = function(value) { - return jspb.Message.setField(this, 1, value || []); -}; - - -/** - * @param {!proto.lnrpc.NodeMetricType} value - * @param {number=} opt_index - * @return {!proto.lnrpc.NodeMetricsRequest} returns this - */ -proto.lnrpc.NodeMetricsRequest.prototype.addTypes = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 1, value, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.lnrpc.NodeMetricsRequest} returns this - */ -proto.lnrpc.NodeMetricsRequest.prototype.clearTypesList = function() { - return this.setTypesList([]); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.NodeMetricsResponse.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.NodeMetricsResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.NodeMetricsResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.NodeMetricsResponse.toObject = function(includeInstance, msg) { - var f, obj = { - betweennessCentralityMap: (f = msg.getBetweennessCentralityMap()) ? f.toObject(includeInstance, proto.lnrpc.FloatMetric.toObject) : [] - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.NodeMetricsResponse} - */ -proto.lnrpc.NodeMetricsResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.NodeMetricsResponse; - return proto.lnrpc.NodeMetricsResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.NodeMetricsResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.NodeMetricsResponse} - */ -proto.lnrpc.NodeMetricsResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = msg.getBetweennessCentralityMap(); - reader.readMessage(value, function(message, reader) { - jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readMessage, proto.lnrpc.FloatMetric.deserializeBinaryFromReader, "", new proto.lnrpc.FloatMetric()); - }); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.NodeMetricsResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.NodeMetricsResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.NodeMetricsResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.NodeMetricsResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getBetweennessCentralityMap(true); - if (f && f.getLength() > 0) { - f.serializeBinary(1, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeMessage, proto.lnrpc.FloatMetric.serializeBinaryToWriter); - } -}; - - -/** - * map betweenness_centrality = 1; - * @param {boolean=} opt_noLazyCreate Do not create the map if - * empty, instead returning `undefined` - * @return {!jspb.Map} - */ -proto.lnrpc.NodeMetricsResponse.prototype.getBetweennessCentralityMap = function(opt_noLazyCreate) { - return /** @type {!jspb.Map} */ ( - jspb.Message.getMapField(this, 1, opt_noLazyCreate, - proto.lnrpc.FloatMetric)); -}; - - -/** - * Clears values from the map. The map will be non-null. - * @return {!proto.lnrpc.NodeMetricsResponse} returns this - */ -proto.lnrpc.NodeMetricsResponse.prototype.clearBetweennessCentralityMap = function() { - this.getBetweennessCentralityMap().clear(); - return this;}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.FloatMetric.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.FloatMetric.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.FloatMetric} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.FloatMetric.toObject = function(includeInstance, msg) { - var f, obj = { - value: jspb.Message.getFloatingPointFieldWithDefault(msg, 1, 0.0), - normalizedValue: jspb.Message.getFloatingPointFieldWithDefault(msg, 2, 0.0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.FloatMetric} - */ -proto.lnrpc.FloatMetric.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.FloatMetric; - return proto.lnrpc.FloatMetric.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.FloatMetric} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.FloatMetric} - */ -proto.lnrpc.FloatMetric.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readDouble()); - msg.setValue(value); - break; - case 2: - var value = /** @type {number} */ (reader.readDouble()); - msg.setNormalizedValue(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.FloatMetric.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.FloatMetric.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.FloatMetric} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.FloatMetric.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getValue(); - if (f !== 0.0) { - writer.writeDouble( - 1, - f - ); - } - f = message.getNormalizedValue(); - if (f !== 0.0) { - writer.writeDouble( - 2, - f - ); - } -}; - - -/** - * optional double value = 1; - * @return {number} - */ -proto.lnrpc.FloatMetric.prototype.getValue = function() { - return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 1, 0.0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.FloatMetric} returns this - */ -proto.lnrpc.FloatMetric.prototype.setValue = function(value) { - return jspb.Message.setProto3FloatField(this, 1, value); -}; - - -/** - * optional double normalized_value = 2; - * @return {number} - */ -proto.lnrpc.FloatMetric.prototype.getNormalizedValue = function() { - return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 2, 0.0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.FloatMetric} returns this - */ -proto.lnrpc.FloatMetric.prototype.setNormalizedValue = function(value) { - return jspb.Message.setProto3FloatField(this, 2, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.ChanInfoRequest.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.ChanInfoRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.ChanInfoRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.ChanInfoRequest.toObject = function(includeInstance, msg) { - var f, obj = { - chanId: jspb.Message.getFieldWithDefault(msg, 1, "0") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.ChanInfoRequest} - */ -proto.lnrpc.ChanInfoRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.ChanInfoRequest; - return proto.lnrpc.ChanInfoRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.ChanInfoRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.ChanInfoRequest} - */ -proto.lnrpc.ChanInfoRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readUint64String()); - msg.setChanId(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.ChanInfoRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.ChanInfoRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.ChanInfoRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.ChanInfoRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getChanId(); - if (parseInt(f, 10) !== 0) { - writer.writeUint64String( - 1, - f - ); - } -}; - - -/** - * optional uint64 chan_id = 1; - * @return {string} - */ -proto.lnrpc.ChanInfoRequest.prototype.getChanId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "0")); -}; - - -/** - * @param {string} value - * @return {!proto.lnrpc.ChanInfoRequest} returns this - */ -proto.lnrpc.ChanInfoRequest.prototype.setChanId = function(value) { - return jspb.Message.setProto3StringIntField(this, 1, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.NetworkInfoRequest.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.NetworkInfoRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.NetworkInfoRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.NetworkInfoRequest.toObject = function(includeInstance, msg) { - var f, obj = { - - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.NetworkInfoRequest} - */ -proto.lnrpc.NetworkInfoRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.NetworkInfoRequest; - return proto.lnrpc.NetworkInfoRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.NetworkInfoRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.NetworkInfoRequest} - */ -proto.lnrpc.NetworkInfoRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.NetworkInfoRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.NetworkInfoRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.NetworkInfoRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.NetworkInfoRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.NetworkInfo.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.NetworkInfo.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.NetworkInfo} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.NetworkInfo.toObject = function(includeInstance, msg) { - var f, obj = { - graphDiameter: jspb.Message.getFieldWithDefault(msg, 1, 0), - avgOutDegree: jspb.Message.getFloatingPointFieldWithDefault(msg, 2, 0.0), - maxOutDegree: jspb.Message.getFieldWithDefault(msg, 3, 0), - numNodes: jspb.Message.getFieldWithDefault(msg, 4, 0), - numChannels: jspb.Message.getFieldWithDefault(msg, 5, 0), - totalNetworkCapacity: jspb.Message.getFieldWithDefault(msg, 6, 0), - avgChannelSize: jspb.Message.getFloatingPointFieldWithDefault(msg, 7, 0.0), - minChannelSize: jspb.Message.getFieldWithDefault(msg, 8, 0), - maxChannelSize: jspb.Message.getFieldWithDefault(msg, 9, 0), - medianChannelSizeSat: jspb.Message.getFieldWithDefault(msg, 10, 0), - numZombieChans: jspb.Message.getFieldWithDefault(msg, 11, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.NetworkInfo} - */ -proto.lnrpc.NetworkInfo.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.NetworkInfo; - return proto.lnrpc.NetworkInfo.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.NetworkInfo} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.NetworkInfo} - */ -proto.lnrpc.NetworkInfo.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readUint32()); - msg.setGraphDiameter(value); - break; - case 2: - var value = /** @type {number} */ (reader.readDouble()); - msg.setAvgOutDegree(value); - break; - case 3: - var value = /** @type {number} */ (reader.readUint32()); - msg.setMaxOutDegree(value); - break; - case 4: - var value = /** @type {number} */ (reader.readUint32()); - msg.setNumNodes(value); - break; - case 5: - var value = /** @type {number} */ (reader.readUint32()); - msg.setNumChannels(value); - break; - case 6: - var value = /** @type {number} */ (reader.readInt64()); - msg.setTotalNetworkCapacity(value); - break; - case 7: - var value = /** @type {number} */ (reader.readDouble()); - msg.setAvgChannelSize(value); - break; - case 8: - var value = /** @type {number} */ (reader.readInt64()); - msg.setMinChannelSize(value); - break; - case 9: - var value = /** @type {number} */ (reader.readInt64()); - msg.setMaxChannelSize(value); - break; - case 10: - var value = /** @type {number} */ (reader.readInt64()); - msg.setMedianChannelSizeSat(value); - break; - case 11: - var value = /** @type {number} */ (reader.readUint64()); - msg.setNumZombieChans(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.NetworkInfo.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.NetworkInfo.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.NetworkInfo} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.NetworkInfo.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getGraphDiameter(); - if (f !== 0) { - writer.writeUint32( - 1, - f - ); - } - f = message.getAvgOutDegree(); - if (f !== 0.0) { - writer.writeDouble( - 2, - f - ); - } - f = message.getMaxOutDegree(); - if (f !== 0) { - writer.writeUint32( - 3, - f - ); - } - f = message.getNumNodes(); - if (f !== 0) { - writer.writeUint32( - 4, - f - ); - } - f = message.getNumChannels(); - if (f !== 0) { - writer.writeUint32( - 5, - f - ); - } - f = message.getTotalNetworkCapacity(); - if (f !== 0) { - writer.writeInt64( - 6, - f - ); - } - f = message.getAvgChannelSize(); - if (f !== 0.0) { - writer.writeDouble( - 7, - f - ); - } - f = message.getMinChannelSize(); - if (f !== 0) { - writer.writeInt64( - 8, - f - ); - } - f = message.getMaxChannelSize(); - if (f !== 0) { - writer.writeInt64( - 9, - f - ); - } - f = message.getMedianChannelSizeSat(); - if (f !== 0) { - writer.writeInt64( - 10, - f - ); - } - f = message.getNumZombieChans(); - if (f !== 0) { - writer.writeUint64( - 11, - f - ); - } -}; - - -/** - * optional uint32 graph_diameter = 1; - * @return {number} - */ -proto.lnrpc.NetworkInfo.prototype.getGraphDiameter = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.NetworkInfo} returns this - */ -proto.lnrpc.NetworkInfo.prototype.setGraphDiameter = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); -}; - - -/** - * optional double avg_out_degree = 2; - * @return {number} - */ -proto.lnrpc.NetworkInfo.prototype.getAvgOutDegree = function() { - return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 2, 0.0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.NetworkInfo} returns this - */ -proto.lnrpc.NetworkInfo.prototype.setAvgOutDegree = function(value) { - return jspb.Message.setProto3FloatField(this, 2, value); -}; - - -/** - * optional uint32 max_out_degree = 3; - * @return {number} - */ -proto.lnrpc.NetworkInfo.prototype.getMaxOutDegree = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.NetworkInfo} returns this - */ -proto.lnrpc.NetworkInfo.prototype.setMaxOutDegree = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - -/** - * optional uint32 num_nodes = 4; - * @return {number} - */ -proto.lnrpc.NetworkInfo.prototype.getNumNodes = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.NetworkInfo} returns this - */ -proto.lnrpc.NetworkInfo.prototype.setNumNodes = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); -}; - - -/** - * optional uint32 num_channels = 5; - * @return {number} - */ -proto.lnrpc.NetworkInfo.prototype.getNumChannels = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.NetworkInfo} returns this - */ -proto.lnrpc.NetworkInfo.prototype.setNumChannels = function(value) { - return jspb.Message.setProto3IntField(this, 5, value); -}; - - -/** - * optional int64 total_network_capacity = 6; - * @return {number} - */ -proto.lnrpc.NetworkInfo.prototype.getTotalNetworkCapacity = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.NetworkInfo} returns this - */ -proto.lnrpc.NetworkInfo.prototype.setTotalNetworkCapacity = function(value) { - return jspb.Message.setProto3IntField(this, 6, value); -}; - - -/** - * optional double avg_channel_size = 7; - * @return {number} - */ -proto.lnrpc.NetworkInfo.prototype.getAvgChannelSize = function() { - return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 7, 0.0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.NetworkInfo} returns this - */ -proto.lnrpc.NetworkInfo.prototype.setAvgChannelSize = function(value) { - return jspb.Message.setProto3FloatField(this, 7, value); -}; - - -/** - * optional int64 min_channel_size = 8; - * @return {number} - */ -proto.lnrpc.NetworkInfo.prototype.getMinChannelSize = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.NetworkInfo} returns this - */ -proto.lnrpc.NetworkInfo.prototype.setMinChannelSize = function(value) { - return jspb.Message.setProto3IntField(this, 8, value); -}; - - -/** - * optional int64 max_channel_size = 9; - * @return {number} - */ -proto.lnrpc.NetworkInfo.prototype.getMaxChannelSize = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.NetworkInfo} returns this - */ -proto.lnrpc.NetworkInfo.prototype.setMaxChannelSize = function(value) { - return jspb.Message.setProto3IntField(this, 9, value); -}; - - -/** - * optional int64 median_channel_size_sat = 10; - * @return {number} - */ -proto.lnrpc.NetworkInfo.prototype.getMedianChannelSizeSat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 10, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.NetworkInfo} returns this - */ -proto.lnrpc.NetworkInfo.prototype.setMedianChannelSizeSat = function(value) { - return jspb.Message.setProto3IntField(this, 10, value); -}; - - -/** - * optional uint64 num_zombie_chans = 11; - * @return {number} - */ -proto.lnrpc.NetworkInfo.prototype.getNumZombieChans = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 11, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.NetworkInfo} returns this - */ -proto.lnrpc.NetworkInfo.prototype.setNumZombieChans = function(value) { - return jspb.Message.setProto3IntField(this, 11, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.StopRequest.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.StopRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.StopRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.StopRequest.toObject = function(includeInstance, msg) { - var f, obj = { - - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.StopRequest} - */ -proto.lnrpc.StopRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.StopRequest; - return proto.lnrpc.StopRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.StopRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.StopRequest} - */ -proto.lnrpc.StopRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.StopRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.StopRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.StopRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.StopRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.StopResponse.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.StopResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.StopResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.StopResponse.toObject = function(includeInstance, msg) { - var f, obj = { - - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.StopResponse} - */ -proto.lnrpc.StopResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.StopResponse; - return proto.lnrpc.StopResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.StopResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.StopResponse} - */ -proto.lnrpc.StopResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.StopResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.StopResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.StopResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.StopResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.GraphTopologySubscription.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.GraphTopologySubscription.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.GraphTopologySubscription} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.GraphTopologySubscription.toObject = function(includeInstance, msg) { - var f, obj = { - - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.GraphTopologySubscription} - */ -proto.lnrpc.GraphTopologySubscription.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.GraphTopologySubscription; - return proto.lnrpc.GraphTopologySubscription.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.GraphTopologySubscription} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.GraphTopologySubscription} - */ -proto.lnrpc.GraphTopologySubscription.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.GraphTopologySubscription.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.GraphTopologySubscription.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.GraphTopologySubscription} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.GraphTopologySubscription.serializeBinaryToWriter = function(message, writer) { - var f = undefined; -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.lnrpc.GraphTopologyUpdate.repeatedFields_ = [1,2,3]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.GraphTopologyUpdate.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.GraphTopologyUpdate.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.GraphTopologyUpdate} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.GraphTopologyUpdate.toObject = function(includeInstance, msg) { - var f, obj = { - nodeUpdatesList: jspb.Message.toObjectList(msg.getNodeUpdatesList(), - proto.lnrpc.NodeUpdate.toObject, includeInstance), - channelUpdatesList: jspb.Message.toObjectList(msg.getChannelUpdatesList(), - proto.lnrpc.ChannelEdgeUpdate.toObject, includeInstance), - closedChansList: jspb.Message.toObjectList(msg.getClosedChansList(), - proto.lnrpc.ClosedChannelUpdate.toObject, includeInstance) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.GraphTopologyUpdate} - */ -proto.lnrpc.GraphTopologyUpdate.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.GraphTopologyUpdate; - return proto.lnrpc.GraphTopologyUpdate.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.GraphTopologyUpdate} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.GraphTopologyUpdate} - */ -proto.lnrpc.GraphTopologyUpdate.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.lnrpc.NodeUpdate; - reader.readMessage(value,proto.lnrpc.NodeUpdate.deserializeBinaryFromReader); - msg.addNodeUpdates(value); - break; - case 2: - var value = new proto.lnrpc.ChannelEdgeUpdate; - reader.readMessage(value,proto.lnrpc.ChannelEdgeUpdate.deserializeBinaryFromReader); - msg.addChannelUpdates(value); - break; - case 3: - var value = new proto.lnrpc.ClosedChannelUpdate; - reader.readMessage(value,proto.lnrpc.ClosedChannelUpdate.deserializeBinaryFromReader); - msg.addClosedChans(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.GraphTopologyUpdate.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.GraphTopologyUpdate.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.GraphTopologyUpdate} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.GraphTopologyUpdate.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getNodeUpdatesList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 1, - f, - proto.lnrpc.NodeUpdate.serializeBinaryToWriter - ); - } - f = message.getChannelUpdatesList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 2, - f, - proto.lnrpc.ChannelEdgeUpdate.serializeBinaryToWriter - ); - } - f = message.getClosedChansList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 3, - f, - proto.lnrpc.ClosedChannelUpdate.serializeBinaryToWriter - ); - } -}; - - -/** - * repeated NodeUpdate node_updates = 1; - * @return {!Array} - */ -proto.lnrpc.GraphTopologyUpdate.prototype.getNodeUpdatesList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.NodeUpdate, 1)); -}; - - -/** - * @param {!Array} value - * @return {!proto.lnrpc.GraphTopologyUpdate} returns this -*/ -proto.lnrpc.GraphTopologyUpdate.prototype.setNodeUpdatesList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); -}; - - -/** - * @param {!proto.lnrpc.NodeUpdate=} opt_value - * @param {number=} opt_index - * @return {!proto.lnrpc.NodeUpdate} - */ -proto.lnrpc.GraphTopologyUpdate.prototype.addNodeUpdates = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.lnrpc.NodeUpdate, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.lnrpc.GraphTopologyUpdate} returns this - */ -proto.lnrpc.GraphTopologyUpdate.prototype.clearNodeUpdatesList = function() { - return this.setNodeUpdatesList([]); -}; - - -/** - * repeated ChannelEdgeUpdate channel_updates = 2; - * @return {!Array} - */ -proto.lnrpc.GraphTopologyUpdate.prototype.getChannelUpdatesList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.ChannelEdgeUpdate, 2)); -}; - - -/** - * @param {!Array} value - * @return {!proto.lnrpc.GraphTopologyUpdate} returns this -*/ -proto.lnrpc.GraphTopologyUpdate.prototype.setChannelUpdatesList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 2, value); -}; - - -/** - * @param {!proto.lnrpc.ChannelEdgeUpdate=} opt_value - * @param {number=} opt_index - * @return {!proto.lnrpc.ChannelEdgeUpdate} - */ -proto.lnrpc.GraphTopologyUpdate.prototype.addChannelUpdates = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.lnrpc.ChannelEdgeUpdate, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.lnrpc.GraphTopologyUpdate} returns this - */ -proto.lnrpc.GraphTopologyUpdate.prototype.clearChannelUpdatesList = function() { - return this.setChannelUpdatesList([]); -}; - - -/** - * repeated ClosedChannelUpdate closed_chans = 3; - * @return {!Array} - */ -proto.lnrpc.GraphTopologyUpdate.prototype.getClosedChansList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.ClosedChannelUpdate, 3)); -}; - - -/** - * @param {!Array} value - * @return {!proto.lnrpc.GraphTopologyUpdate} returns this -*/ -proto.lnrpc.GraphTopologyUpdate.prototype.setClosedChansList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 3, value); -}; - - -/** - * @param {!proto.lnrpc.ClosedChannelUpdate=} opt_value - * @param {number=} opt_index - * @return {!proto.lnrpc.ClosedChannelUpdate} - */ -proto.lnrpc.GraphTopologyUpdate.prototype.addClosedChans = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.lnrpc.ClosedChannelUpdate, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.lnrpc.GraphTopologyUpdate} returns this - */ -proto.lnrpc.GraphTopologyUpdate.prototype.clearClosedChansList = function() { - return this.setClosedChansList([]); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.lnrpc.NodeUpdate.repeatedFields_ = [1,7]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.NodeUpdate.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.NodeUpdate.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.NodeUpdate} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.NodeUpdate.toObject = function(includeInstance, msg) { - var f, obj = { - addressesList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : f, - identityKey: jspb.Message.getFieldWithDefault(msg, 2, ""), - globalFeatures: msg.getGlobalFeatures_asB64(), - alias: jspb.Message.getFieldWithDefault(msg, 4, ""), - color: jspb.Message.getFieldWithDefault(msg, 5, ""), - nodeAddressesList: jspb.Message.toObjectList(msg.getNodeAddressesList(), - proto.lnrpc.NodeAddress.toObject, includeInstance), - featuresMap: (f = msg.getFeaturesMap()) ? f.toObject(includeInstance, proto.lnrpc.Feature.toObject) : [] - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.NodeUpdate} - */ -proto.lnrpc.NodeUpdate.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.NodeUpdate; - return proto.lnrpc.NodeUpdate.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.NodeUpdate} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.NodeUpdate} - */ -proto.lnrpc.NodeUpdate.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.addAddresses(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setIdentityKey(value); - break; - case 3: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setGlobalFeatures(value); - break; - case 4: - var value = /** @type {string} */ (reader.readString()); - msg.setAlias(value); - break; - case 5: - var value = /** @type {string} */ (reader.readString()); - msg.setColor(value); - break; - case 7: - var value = new proto.lnrpc.NodeAddress; - reader.readMessage(value,proto.lnrpc.NodeAddress.deserializeBinaryFromReader); - msg.addNodeAddresses(value); - break; - case 6: - var value = msg.getFeaturesMap(); - reader.readMessage(value, function(message, reader) { - jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readUint32, jspb.BinaryReader.prototype.readMessage, proto.lnrpc.Feature.deserializeBinaryFromReader, 0, new proto.lnrpc.Feature()); - }); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.NodeUpdate.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.NodeUpdate.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.NodeUpdate} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.NodeUpdate.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getAddressesList(); - if (f.length > 0) { - writer.writeRepeatedString( - 1, - f - ); - } - f = message.getIdentityKey(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getGlobalFeatures_asU8(); - if (f.length > 0) { - writer.writeBytes( - 3, - f - ); - } - f = message.getAlias(); - if (f.length > 0) { - writer.writeString( - 4, - f - ); - } - f = message.getColor(); - if (f.length > 0) { - writer.writeString( - 5, - f - ); - } - f = message.getNodeAddressesList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 7, - f, - proto.lnrpc.NodeAddress.serializeBinaryToWriter - ); - } - f = message.getFeaturesMap(true); - if (f && f.getLength() > 0) { - f.serializeBinary(6, writer, jspb.BinaryWriter.prototype.writeUint32, jspb.BinaryWriter.prototype.writeMessage, proto.lnrpc.Feature.serializeBinaryToWriter); - } -}; - - -/** - * repeated string addresses = 1; - * @return {!Array} - */ -proto.lnrpc.NodeUpdate.prototype.getAddressesList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); -}; - - -/** - * @param {!Array} value - * @return {!proto.lnrpc.NodeUpdate} returns this - */ -proto.lnrpc.NodeUpdate.prototype.setAddressesList = function(value) { - return jspb.Message.setField(this, 1, value || []); -}; - - -/** - * @param {string} value - * @param {number=} opt_index - * @return {!proto.lnrpc.NodeUpdate} returns this - */ -proto.lnrpc.NodeUpdate.prototype.addAddresses = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 1, value, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.lnrpc.NodeUpdate} returns this - */ -proto.lnrpc.NodeUpdate.prototype.clearAddressesList = function() { - return this.setAddressesList([]); -}; - - -/** - * optional string identity_key = 2; - * @return {string} - */ -proto.lnrpc.NodeUpdate.prototype.getIdentityKey = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.lnrpc.NodeUpdate} returns this - */ -proto.lnrpc.NodeUpdate.prototype.setIdentityKey = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional bytes global_features = 3; - * @return {!(string|Uint8Array)} - */ -proto.lnrpc.NodeUpdate.prototype.getGlobalFeatures = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * optional bytes global_features = 3; - * This is a type-conversion wrapper around `getGlobalFeatures()` - * @return {string} - */ -proto.lnrpc.NodeUpdate.prototype.getGlobalFeatures_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getGlobalFeatures())); -}; - - -/** - * optional bytes global_features = 3; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getGlobalFeatures()` - * @return {!Uint8Array} - */ -proto.lnrpc.NodeUpdate.prototype.getGlobalFeatures_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getGlobalFeatures())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.lnrpc.NodeUpdate} returns this - */ -proto.lnrpc.NodeUpdate.prototype.setGlobalFeatures = function(value) { - return jspb.Message.setProto3BytesField(this, 3, value); -}; - - -/** - * optional string alias = 4; - * @return {string} - */ -proto.lnrpc.NodeUpdate.prototype.getAlias = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); -}; - - -/** - * @param {string} value - * @return {!proto.lnrpc.NodeUpdate} returns this - */ -proto.lnrpc.NodeUpdate.prototype.setAlias = function(value) { - return jspb.Message.setProto3StringField(this, 4, value); -}; - - -/** - * optional string color = 5; - * @return {string} - */ -proto.lnrpc.NodeUpdate.prototype.getColor = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); -}; - - -/** - * @param {string} value - * @return {!proto.lnrpc.NodeUpdate} returns this - */ -proto.lnrpc.NodeUpdate.prototype.setColor = function(value) { - return jspb.Message.setProto3StringField(this, 5, value); -}; - - -/** - * repeated NodeAddress node_addresses = 7; - * @return {!Array} - */ -proto.lnrpc.NodeUpdate.prototype.getNodeAddressesList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.NodeAddress, 7)); -}; - - -/** - * @param {!Array} value - * @return {!proto.lnrpc.NodeUpdate} returns this -*/ -proto.lnrpc.NodeUpdate.prototype.setNodeAddressesList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 7, value); -}; - - -/** - * @param {!proto.lnrpc.NodeAddress=} opt_value - * @param {number=} opt_index - * @return {!proto.lnrpc.NodeAddress} - */ -proto.lnrpc.NodeUpdate.prototype.addNodeAddresses = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 7, opt_value, proto.lnrpc.NodeAddress, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.lnrpc.NodeUpdate} returns this - */ -proto.lnrpc.NodeUpdate.prototype.clearNodeAddressesList = function() { - return this.setNodeAddressesList([]); -}; - - -/** - * map features = 6; - * @param {boolean=} opt_noLazyCreate Do not create the map if - * empty, instead returning `undefined` - * @return {!jspb.Map} - */ -proto.lnrpc.NodeUpdate.prototype.getFeaturesMap = function(opt_noLazyCreate) { - return /** @type {!jspb.Map} */ ( - jspb.Message.getMapField(this, 6, opt_noLazyCreate, - proto.lnrpc.Feature)); -}; - - -/** - * Clears values from the map. The map will be non-null. - * @return {!proto.lnrpc.NodeUpdate} returns this - */ -proto.lnrpc.NodeUpdate.prototype.clearFeaturesMap = function() { - this.getFeaturesMap().clear(); - return this;}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.ChannelEdgeUpdate.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.ChannelEdgeUpdate.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.ChannelEdgeUpdate} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.ChannelEdgeUpdate.toObject = function(includeInstance, msg) { - var f, obj = { - chanId: jspb.Message.getFieldWithDefault(msg, 1, "0"), - chanPoint: (f = msg.getChanPoint()) && proto.lnrpc.ChannelPoint.toObject(includeInstance, f), - capacity: jspb.Message.getFieldWithDefault(msg, 3, 0), - routingPolicy: (f = msg.getRoutingPolicy()) && proto.lnrpc.RoutingPolicy.toObject(includeInstance, f), - advertisingNode: jspb.Message.getFieldWithDefault(msg, 5, ""), - connectingNode: jspb.Message.getFieldWithDefault(msg, 6, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.ChannelEdgeUpdate} - */ -proto.lnrpc.ChannelEdgeUpdate.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.ChannelEdgeUpdate; - return proto.lnrpc.ChannelEdgeUpdate.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.ChannelEdgeUpdate} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.ChannelEdgeUpdate} - */ -proto.lnrpc.ChannelEdgeUpdate.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readUint64String()); - msg.setChanId(value); - break; - case 2: - var value = new proto.lnrpc.ChannelPoint; - reader.readMessage(value,proto.lnrpc.ChannelPoint.deserializeBinaryFromReader); - msg.setChanPoint(value); - break; - case 3: - var value = /** @type {number} */ (reader.readInt64()); - msg.setCapacity(value); - break; - case 4: - var value = new proto.lnrpc.RoutingPolicy; - reader.readMessage(value,proto.lnrpc.RoutingPolicy.deserializeBinaryFromReader); - msg.setRoutingPolicy(value); - break; - case 5: - var value = /** @type {string} */ (reader.readString()); - msg.setAdvertisingNode(value); - break; - case 6: - var value = /** @type {string} */ (reader.readString()); - msg.setConnectingNode(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.ChannelEdgeUpdate.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.ChannelEdgeUpdate.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.ChannelEdgeUpdate} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.ChannelEdgeUpdate.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getChanId(); - if (parseInt(f, 10) !== 0) { - writer.writeUint64String( - 1, - f - ); - } - f = message.getChanPoint(); - if (f != null) { - writer.writeMessage( - 2, - f, - proto.lnrpc.ChannelPoint.serializeBinaryToWriter - ); - } - f = message.getCapacity(); - if (f !== 0) { - writer.writeInt64( - 3, - f - ); - } - f = message.getRoutingPolicy(); - if (f != null) { - writer.writeMessage( - 4, - f, - proto.lnrpc.RoutingPolicy.serializeBinaryToWriter - ); - } - f = message.getAdvertisingNode(); - if (f.length > 0) { - writer.writeString( - 5, - f - ); - } - f = message.getConnectingNode(); - if (f.length > 0) { - writer.writeString( - 6, - f - ); - } -}; - - -/** - * optional uint64 chan_id = 1; - * @return {string} - */ -proto.lnrpc.ChannelEdgeUpdate.prototype.getChanId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "0")); -}; - - -/** - * @param {string} value - * @return {!proto.lnrpc.ChannelEdgeUpdate} returns this - */ -proto.lnrpc.ChannelEdgeUpdate.prototype.setChanId = function(value) { - return jspb.Message.setProto3StringIntField(this, 1, value); -}; - - -/** - * optional ChannelPoint chan_point = 2; - * @return {?proto.lnrpc.ChannelPoint} - */ -proto.lnrpc.ChannelEdgeUpdate.prototype.getChanPoint = function() { - return /** @type{?proto.lnrpc.ChannelPoint} */ ( - jspb.Message.getWrapperField(this, proto.lnrpc.ChannelPoint, 2)); -}; - - -/** - * @param {?proto.lnrpc.ChannelPoint|undefined} value - * @return {!proto.lnrpc.ChannelEdgeUpdate} returns this -*/ -proto.lnrpc.ChannelEdgeUpdate.prototype.setChanPoint = function(value) { - return jspb.Message.setWrapperField(this, 2, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.lnrpc.ChannelEdgeUpdate} returns this - */ -proto.lnrpc.ChannelEdgeUpdate.prototype.clearChanPoint = function() { - return this.setChanPoint(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.lnrpc.ChannelEdgeUpdate.prototype.hasChanPoint = function() { - return jspb.Message.getField(this, 2) != null; -}; - - -/** - * optional int64 capacity = 3; - * @return {number} - */ -proto.lnrpc.ChannelEdgeUpdate.prototype.getCapacity = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.ChannelEdgeUpdate} returns this - */ -proto.lnrpc.ChannelEdgeUpdate.prototype.setCapacity = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - -/** - * optional RoutingPolicy routing_policy = 4; - * @return {?proto.lnrpc.RoutingPolicy} - */ -proto.lnrpc.ChannelEdgeUpdate.prototype.getRoutingPolicy = function() { - return /** @type{?proto.lnrpc.RoutingPolicy} */ ( - jspb.Message.getWrapperField(this, proto.lnrpc.RoutingPolicy, 4)); -}; - - -/** - * @param {?proto.lnrpc.RoutingPolicy|undefined} value - * @return {!proto.lnrpc.ChannelEdgeUpdate} returns this -*/ -proto.lnrpc.ChannelEdgeUpdate.prototype.setRoutingPolicy = function(value) { - return jspb.Message.setWrapperField(this, 4, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.lnrpc.ChannelEdgeUpdate} returns this - */ -proto.lnrpc.ChannelEdgeUpdate.prototype.clearRoutingPolicy = function() { - return this.setRoutingPolicy(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.lnrpc.ChannelEdgeUpdate.prototype.hasRoutingPolicy = function() { - return jspb.Message.getField(this, 4) != null; -}; - - -/** - * optional string advertising_node = 5; - * @return {string} - */ -proto.lnrpc.ChannelEdgeUpdate.prototype.getAdvertisingNode = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); -}; - - -/** - * @param {string} value - * @return {!proto.lnrpc.ChannelEdgeUpdate} returns this - */ -proto.lnrpc.ChannelEdgeUpdate.prototype.setAdvertisingNode = function(value) { - return jspb.Message.setProto3StringField(this, 5, value); -}; - - -/** - * optional string connecting_node = 6; - * @return {string} - */ -proto.lnrpc.ChannelEdgeUpdate.prototype.getConnectingNode = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); -}; - - -/** - * @param {string} value - * @return {!proto.lnrpc.ChannelEdgeUpdate} returns this - */ -proto.lnrpc.ChannelEdgeUpdate.prototype.setConnectingNode = function(value) { - return jspb.Message.setProto3StringField(this, 6, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.ClosedChannelUpdate.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.ClosedChannelUpdate.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.ClosedChannelUpdate} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.ClosedChannelUpdate.toObject = function(includeInstance, msg) { - var f, obj = { - chanId: jspb.Message.getFieldWithDefault(msg, 1, "0"), - capacity: jspb.Message.getFieldWithDefault(msg, 2, 0), - closedHeight: jspb.Message.getFieldWithDefault(msg, 3, 0), - chanPoint: (f = msg.getChanPoint()) && proto.lnrpc.ChannelPoint.toObject(includeInstance, f) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.ClosedChannelUpdate} - */ -proto.lnrpc.ClosedChannelUpdate.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.ClosedChannelUpdate; - return proto.lnrpc.ClosedChannelUpdate.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.ClosedChannelUpdate} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.ClosedChannelUpdate} - */ -proto.lnrpc.ClosedChannelUpdate.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readUint64String()); - msg.setChanId(value); - break; - case 2: - var value = /** @type {number} */ (reader.readInt64()); - msg.setCapacity(value); - break; - case 3: - var value = /** @type {number} */ (reader.readUint32()); - msg.setClosedHeight(value); - break; - case 4: - var value = new proto.lnrpc.ChannelPoint; - reader.readMessage(value,proto.lnrpc.ChannelPoint.deserializeBinaryFromReader); - msg.setChanPoint(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.ClosedChannelUpdate.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.ClosedChannelUpdate.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.ClosedChannelUpdate} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.ClosedChannelUpdate.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getChanId(); - if (parseInt(f, 10) !== 0) { - writer.writeUint64String( - 1, - f - ); - } - f = message.getCapacity(); - if (f !== 0) { - writer.writeInt64( - 2, - f - ); - } - f = message.getClosedHeight(); - if (f !== 0) { - writer.writeUint32( - 3, - f - ); - } - f = message.getChanPoint(); - if (f != null) { - writer.writeMessage( - 4, - f, - proto.lnrpc.ChannelPoint.serializeBinaryToWriter - ); - } -}; - - -/** - * optional uint64 chan_id = 1; - * @return {string} - */ -proto.lnrpc.ClosedChannelUpdate.prototype.getChanId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "0")); -}; - - -/** - * @param {string} value - * @return {!proto.lnrpc.ClosedChannelUpdate} returns this - */ -proto.lnrpc.ClosedChannelUpdate.prototype.setChanId = function(value) { - return jspb.Message.setProto3StringIntField(this, 1, value); -}; - - -/** - * optional int64 capacity = 2; - * @return {number} - */ -proto.lnrpc.ClosedChannelUpdate.prototype.getCapacity = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.ClosedChannelUpdate} returns this - */ -proto.lnrpc.ClosedChannelUpdate.prototype.setCapacity = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * optional uint32 closed_height = 3; - * @return {number} - */ -proto.lnrpc.ClosedChannelUpdate.prototype.getClosedHeight = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.ClosedChannelUpdate} returns this - */ -proto.lnrpc.ClosedChannelUpdate.prototype.setClosedHeight = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - -/** - * optional ChannelPoint chan_point = 4; - * @return {?proto.lnrpc.ChannelPoint} - */ -proto.lnrpc.ClosedChannelUpdate.prototype.getChanPoint = function() { - return /** @type{?proto.lnrpc.ChannelPoint} */ ( - jspb.Message.getWrapperField(this, proto.lnrpc.ChannelPoint, 4)); -}; - - -/** - * @param {?proto.lnrpc.ChannelPoint|undefined} value - * @return {!proto.lnrpc.ClosedChannelUpdate} returns this -*/ -proto.lnrpc.ClosedChannelUpdate.prototype.setChanPoint = function(value) { - return jspb.Message.setWrapperField(this, 4, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.lnrpc.ClosedChannelUpdate} returns this - */ -proto.lnrpc.ClosedChannelUpdate.prototype.clearChanPoint = function() { - return this.setChanPoint(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.lnrpc.ClosedChannelUpdate.prototype.hasChanPoint = function() { - return jspb.Message.getField(this, 4) != null; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.HopHint.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.HopHint.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.HopHint} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.HopHint.toObject = function(includeInstance, msg) { - var f, obj = { - nodeId: jspb.Message.getFieldWithDefault(msg, 1, ""), - chanId: jspb.Message.getFieldWithDefault(msg, 2, "0"), - feeBaseMsat: jspb.Message.getFieldWithDefault(msg, 3, 0), - feeProportionalMillionths: jspb.Message.getFieldWithDefault(msg, 4, 0), - cltvExpiryDelta: jspb.Message.getFieldWithDefault(msg, 5, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.HopHint} - */ -proto.lnrpc.HopHint.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.HopHint; - return proto.lnrpc.HopHint.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.HopHint} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.HopHint} - */ -proto.lnrpc.HopHint.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setNodeId(value); - break; - case 2: - var value = /** @type {string} */ (reader.readUint64String()); - msg.setChanId(value); - break; - case 3: - var value = /** @type {number} */ (reader.readUint32()); - msg.setFeeBaseMsat(value); - break; - case 4: - var value = /** @type {number} */ (reader.readUint32()); - msg.setFeeProportionalMillionths(value); - break; - case 5: - var value = /** @type {number} */ (reader.readUint32()); - msg.setCltvExpiryDelta(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.HopHint.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.HopHint.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.HopHint} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.HopHint.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getNodeId(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getChanId(); - if (parseInt(f, 10) !== 0) { - writer.writeUint64String( - 2, - f - ); - } - f = message.getFeeBaseMsat(); - if (f !== 0) { - writer.writeUint32( - 3, - f - ); - } - f = message.getFeeProportionalMillionths(); - if (f !== 0) { - writer.writeUint32( - 4, - f - ); - } - f = message.getCltvExpiryDelta(); - if (f !== 0) { - writer.writeUint32( - 5, - f - ); - } -}; - - -/** - * optional string node_id = 1; - * @return {string} - */ -proto.lnrpc.HopHint.prototype.getNodeId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.lnrpc.HopHint} returns this - */ -proto.lnrpc.HopHint.prototype.setNodeId = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional uint64 chan_id = 2; - * @return {string} - */ -proto.lnrpc.HopHint.prototype.getChanId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "0")); -}; - - -/** - * @param {string} value - * @return {!proto.lnrpc.HopHint} returns this - */ -proto.lnrpc.HopHint.prototype.setChanId = function(value) { - return jspb.Message.setProto3StringIntField(this, 2, value); -}; - - -/** - * optional uint32 fee_base_msat = 3; - * @return {number} - */ -proto.lnrpc.HopHint.prototype.getFeeBaseMsat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.HopHint} returns this - */ -proto.lnrpc.HopHint.prototype.setFeeBaseMsat = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - -/** - * optional uint32 fee_proportional_millionths = 4; - * @return {number} - */ -proto.lnrpc.HopHint.prototype.getFeeProportionalMillionths = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.HopHint} returns this - */ -proto.lnrpc.HopHint.prototype.setFeeProportionalMillionths = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); -}; - - -/** - * optional uint32 cltv_expiry_delta = 5; - * @return {number} - */ -proto.lnrpc.HopHint.prototype.getCltvExpiryDelta = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.HopHint} returns this - */ -proto.lnrpc.HopHint.prototype.setCltvExpiryDelta = function(value) { - return jspb.Message.setProto3IntField(this, 5, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.SetID.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.SetID.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.SetID} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.SetID.toObject = function(includeInstance, msg) { - var f, obj = { - setId: msg.getSetId_asB64() - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.SetID} - */ -proto.lnrpc.SetID.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.SetID; - return proto.lnrpc.SetID.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.SetID} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.SetID} - */ -proto.lnrpc.SetID.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setSetId(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.SetID.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.SetID.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.SetID} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.SetID.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getSetId_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } -}; - - -/** - * optional bytes set_id = 1; - * @return {!(string|Uint8Array)} - */ -proto.lnrpc.SetID.prototype.getSetId = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes set_id = 1; - * This is a type-conversion wrapper around `getSetId()` - * @return {string} - */ -proto.lnrpc.SetID.prototype.getSetId_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getSetId())); -}; - - -/** - * optional bytes set_id = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getSetId()` - * @return {!Uint8Array} - */ -proto.lnrpc.SetID.prototype.getSetId_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getSetId())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.lnrpc.SetID} returns this - */ -proto.lnrpc.SetID.prototype.setSetId = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.lnrpc.RouteHint.repeatedFields_ = [1]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.RouteHint.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.RouteHint.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.RouteHint} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.RouteHint.toObject = function(includeInstance, msg) { - var f, obj = { - hopHintsList: jspb.Message.toObjectList(msg.getHopHintsList(), - proto.lnrpc.HopHint.toObject, includeInstance) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.RouteHint} - */ -proto.lnrpc.RouteHint.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.RouteHint; - return proto.lnrpc.RouteHint.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.RouteHint} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.RouteHint} - */ -proto.lnrpc.RouteHint.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.lnrpc.HopHint; - reader.readMessage(value,proto.lnrpc.HopHint.deserializeBinaryFromReader); - msg.addHopHints(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.RouteHint.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.RouteHint.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.RouteHint} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.RouteHint.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getHopHintsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 1, - f, - proto.lnrpc.HopHint.serializeBinaryToWriter - ); - } -}; - - -/** - * repeated HopHint hop_hints = 1; - * @return {!Array} - */ -proto.lnrpc.RouteHint.prototype.getHopHintsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.HopHint, 1)); -}; - - -/** - * @param {!Array} value - * @return {!proto.lnrpc.RouteHint} returns this -*/ -proto.lnrpc.RouteHint.prototype.setHopHintsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); -}; - - -/** - * @param {!proto.lnrpc.HopHint=} opt_value - * @param {number=} opt_index - * @return {!proto.lnrpc.HopHint} - */ -proto.lnrpc.RouteHint.prototype.addHopHints = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.lnrpc.HopHint, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.lnrpc.RouteHint} returns this - */ -proto.lnrpc.RouteHint.prototype.clearHopHintsList = function() { - return this.setHopHintsList([]); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.AMPInvoiceState.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.AMPInvoiceState.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.AMPInvoiceState} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.AMPInvoiceState.toObject = function(includeInstance, msg) { - var f, obj = { - state: jspb.Message.getFieldWithDefault(msg, 1, 0), - settleIndex: jspb.Message.getFieldWithDefault(msg, 2, 0), - settleTime: jspb.Message.getFieldWithDefault(msg, 3, 0), - amtPaidMsat: jspb.Message.getFieldWithDefault(msg, 5, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.AMPInvoiceState} - */ -proto.lnrpc.AMPInvoiceState.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.AMPInvoiceState; - return proto.lnrpc.AMPInvoiceState.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.AMPInvoiceState} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.AMPInvoiceState} - */ -proto.lnrpc.AMPInvoiceState.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!proto.lnrpc.InvoiceHTLCState} */ (reader.readEnum()); - msg.setState(value); - break; - case 2: - var value = /** @type {number} */ (reader.readUint64()); - msg.setSettleIndex(value); - break; - case 3: - var value = /** @type {number} */ (reader.readInt64()); - msg.setSettleTime(value); - break; - case 5: - var value = /** @type {number} */ (reader.readInt64()); - msg.setAmtPaidMsat(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.AMPInvoiceState.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.AMPInvoiceState.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.AMPInvoiceState} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.AMPInvoiceState.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getState(); - if (f !== 0.0) { - writer.writeEnum( - 1, - f - ); - } - f = message.getSettleIndex(); - if (f !== 0) { - writer.writeUint64( - 2, - f - ); - } - f = message.getSettleTime(); - if (f !== 0) { - writer.writeInt64( - 3, - f - ); - } - f = message.getAmtPaidMsat(); - if (f !== 0) { - writer.writeInt64( - 5, - f - ); - } -}; - - -/** - * optional InvoiceHTLCState state = 1; - * @return {!proto.lnrpc.InvoiceHTLCState} - */ -proto.lnrpc.AMPInvoiceState.prototype.getState = function() { - return /** @type {!proto.lnrpc.InvoiceHTLCState} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {!proto.lnrpc.InvoiceHTLCState} value - * @return {!proto.lnrpc.AMPInvoiceState} returns this - */ -proto.lnrpc.AMPInvoiceState.prototype.setState = function(value) { - return jspb.Message.setProto3EnumField(this, 1, value); -}; - - -/** - * optional uint64 settle_index = 2; - * @return {number} - */ -proto.lnrpc.AMPInvoiceState.prototype.getSettleIndex = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.AMPInvoiceState} returns this - */ -proto.lnrpc.AMPInvoiceState.prototype.setSettleIndex = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * optional int64 settle_time = 3; - * @return {number} - */ -proto.lnrpc.AMPInvoiceState.prototype.getSettleTime = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.AMPInvoiceState} returns this - */ -proto.lnrpc.AMPInvoiceState.prototype.setSettleTime = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - -/** - * optional int64 amt_paid_msat = 5; - * @return {number} - */ -proto.lnrpc.AMPInvoiceState.prototype.getAmtPaidMsat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.AMPInvoiceState} returns this - */ -proto.lnrpc.AMPInvoiceState.prototype.setAmtPaidMsat = function(value) { - return jspb.Message.setProto3IntField(this, 5, value); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.lnrpc.Invoice.repeatedFields_ = [14,22]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.Invoice.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.Invoice.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.Invoice} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.Invoice.toObject = function(includeInstance, msg) { - var f, obj = { - memo: jspb.Message.getFieldWithDefault(msg, 1, ""), - rPreimage: msg.getRPreimage_asB64(), - rHash: msg.getRHash_asB64(), - value: jspb.Message.getFieldWithDefault(msg, 5, 0), - valueMsat: jspb.Message.getFieldWithDefault(msg, 23, 0), - settled: jspb.Message.getBooleanFieldWithDefault(msg, 6, false), - creationDate: jspb.Message.getFieldWithDefault(msg, 7, 0), - settleDate: jspb.Message.getFieldWithDefault(msg, 8, 0), - paymentRequest: jspb.Message.getFieldWithDefault(msg, 9, ""), - descriptionHash: msg.getDescriptionHash_asB64(), - expiry: jspb.Message.getFieldWithDefault(msg, 11, 0), - fallbackAddr: jspb.Message.getFieldWithDefault(msg, 12, ""), - cltvExpiry: jspb.Message.getFieldWithDefault(msg, 13, 0), - routeHintsList: jspb.Message.toObjectList(msg.getRouteHintsList(), - proto.lnrpc.RouteHint.toObject, includeInstance), - pb_private: jspb.Message.getBooleanFieldWithDefault(msg, 15, false), - addIndex: jspb.Message.getFieldWithDefault(msg, 16, 0), - settleIndex: jspb.Message.getFieldWithDefault(msg, 17, 0), - amtPaid: jspb.Message.getFieldWithDefault(msg, 18, 0), - amtPaidSat: jspb.Message.getFieldWithDefault(msg, 19, 0), - amtPaidMsat: jspb.Message.getFieldWithDefault(msg, 20, 0), - state: jspb.Message.getFieldWithDefault(msg, 21, 0), - htlcsList: jspb.Message.toObjectList(msg.getHtlcsList(), - proto.lnrpc.InvoiceHTLC.toObject, includeInstance), - featuresMap: (f = msg.getFeaturesMap()) ? f.toObject(includeInstance, proto.lnrpc.Feature.toObject) : [], - isKeysend: jspb.Message.getBooleanFieldWithDefault(msg, 25, false), - paymentAddr: msg.getPaymentAddr_asB64(), - isAmp: jspb.Message.getBooleanFieldWithDefault(msg, 27, false), - ampInvoiceStateMap: (f = msg.getAmpInvoiceStateMap()) ? f.toObject(includeInstance, proto.lnrpc.AMPInvoiceState.toObject) : [] - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.Invoice} - */ -proto.lnrpc.Invoice.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.Invoice; - return proto.lnrpc.Invoice.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.Invoice} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.Invoice} - */ -proto.lnrpc.Invoice.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setMemo(value); - break; - case 3: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setRPreimage(value); - break; - case 4: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setRHash(value); - break; - case 5: - var value = /** @type {number} */ (reader.readInt64()); - msg.setValue(value); - break; - case 23: - var value = /** @type {number} */ (reader.readInt64()); - msg.setValueMsat(value); - break; - case 6: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setSettled(value); - break; - case 7: - var value = /** @type {number} */ (reader.readInt64()); - msg.setCreationDate(value); - break; - case 8: - var value = /** @type {number} */ (reader.readInt64()); - msg.setSettleDate(value); - break; - case 9: - var value = /** @type {string} */ (reader.readString()); - msg.setPaymentRequest(value); - break; - case 10: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setDescriptionHash(value); - break; - case 11: - var value = /** @type {number} */ (reader.readInt64()); - msg.setExpiry(value); - break; - case 12: - var value = /** @type {string} */ (reader.readString()); - msg.setFallbackAddr(value); - break; - case 13: - var value = /** @type {number} */ (reader.readUint64()); - msg.setCltvExpiry(value); - break; - case 14: - var value = new proto.lnrpc.RouteHint; - reader.readMessage(value,proto.lnrpc.RouteHint.deserializeBinaryFromReader); - msg.addRouteHints(value); - break; - case 15: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setPrivate(value); - break; - case 16: - var value = /** @type {number} */ (reader.readUint64()); - msg.setAddIndex(value); - break; - case 17: - var value = /** @type {number} */ (reader.readUint64()); - msg.setSettleIndex(value); - break; - case 18: - var value = /** @type {number} */ (reader.readInt64()); - msg.setAmtPaid(value); - break; - case 19: - var value = /** @type {number} */ (reader.readInt64()); - msg.setAmtPaidSat(value); - break; - case 20: - var value = /** @type {number} */ (reader.readInt64()); - msg.setAmtPaidMsat(value); - break; - case 21: - var value = /** @type {!proto.lnrpc.Invoice.InvoiceState} */ (reader.readEnum()); - msg.setState(value); - break; - case 22: - var value = new proto.lnrpc.InvoiceHTLC; - reader.readMessage(value,proto.lnrpc.InvoiceHTLC.deserializeBinaryFromReader); - msg.addHtlcs(value); - break; - case 24: - var value = msg.getFeaturesMap(); - reader.readMessage(value, function(message, reader) { - jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readUint32, jspb.BinaryReader.prototype.readMessage, proto.lnrpc.Feature.deserializeBinaryFromReader, 0, new proto.lnrpc.Feature()); - }); - break; - case 25: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setIsKeysend(value); - break; - case 26: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setPaymentAddr(value); - break; - case 27: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setIsAmp(value); - break; - case 28: - var value = msg.getAmpInvoiceStateMap(); - reader.readMessage(value, function(message, reader) { - jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readMessage, proto.lnrpc.AMPInvoiceState.deserializeBinaryFromReader, "", new proto.lnrpc.AMPInvoiceState()); - }); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.Invoice.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.Invoice.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.Invoice} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.Invoice.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getMemo(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getRPreimage_asU8(); - if (f.length > 0) { - writer.writeBytes( - 3, - f - ); - } - f = message.getRHash_asU8(); - if (f.length > 0) { - writer.writeBytes( - 4, - f - ); - } - f = message.getValue(); - if (f !== 0) { - writer.writeInt64( - 5, - f - ); - } - f = message.getValueMsat(); - if (f !== 0) { - writer.writeInt64( - 23, - f - ); - } - f = message.getSettled(); - if (f) { - writer.writeBool( - 6, - f - ); - } - f = message.getCreationDate(); - if (f !== 0) { - writer.writeInt64( - 7, - f - ); - } - f = message.getSettleDate(); - if (f !== 0) { - writer.writeInt64( - 8, - f - ); - } - f = message.getPaymentRequest(); - if (f.length > 0) { - writer.writeString( - 9, - f - ); - } - f = message.getDescriptionHash_asU8(); - if (f.length > 0) { - writer.writeBytes( - 10, - f - ); - } - f = message.getExpiry(); - if (f !== 0) { - writer.writeInt64( - 11, - f - ); - } - f = message.getFallbackAddr(); - if (f.length > 0) { - writer.writeString( - 12, - f - ); - } - f = message.getCltvExpiry(); - if (f !== 0) { - writer.writeUint64( - 13, - f - ); - } - f = message.getRouteHintsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 14, - f, - proto.lnrpc.RouteHint.serializeBinaryToWriter - ); - } - f = message.getPrivate(); - if (f) { - writer.writeBool( - 15, - f - ); - } - f = message.getAddIndex(); - if (f !== 0) { - writer.writeUint64( - 16, - f - ); - } - f = message.getSettleIndex(); - if (f !== 0) { - writer.writeUint64( - 17, - f - ); - } - f = message.getAmtPaid(); - if (f !== 0) { - writer.writeInt64( - 18, - f - ); - } - f = message.getAmtPaidSat(); - if (f !== 0) { - writer.writeInt64( - 19, - f - ); - } - f = message.getAmtPaidMsat(); - if (f !== 0) { - writer.writeInt64( - 20, - f - ); - } - f = message.getState(); - if (f !== 0.0) { - writer.writeEnum( - 21, - f - ); - } - f = message.getHtlcsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 22, - f, - proto.lnrpc.InvoiceHTLC.serializeBinaryToWriter - ); - } - f = message.getFeaturesMap(true); - if (f && f.getLength() > 0) { - f.serializeBinary(24, writer, jspb.BinaryWriter.prototype.writeUint32, jspb.BinaryWriter.prototype.writeMessage, proto.lnrpc.Feature.serializeBinaryToWriter); - } - f = message.getIsKeysend(); - if (f) { - writer.writeBool( - 25, - f - ); - } - f = message.getPaymentAddr_asU8(); - if (f.length > 0) { - writer.writeBytes( - 26, - f - ); - } - f = message.getIsAmp(); - if (f) { - writer.writeBool( - 27, - f - ); - } - f = message.getAmpInvoiceStateMap(true); - if (f && f.getLength() > 0) { - f.serializeBinary(28, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeMessage, proto.lnrpc.AMPInvoiceState.serializeBinaryToWriter); - } -}; - - -/** - * @enum {number} - */ -proto.lnrpc.Invoice.InvoiceState = { - OPEN: 0, - SETTLED: 1, - CANCELED: 2, - ACCEPTED: 3 -}; - -/** - * optional string memo = 1; - * @return {string} - */ -proto.lnrpc.Invoice.prototype.getMemo = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.lnrpc.Invoice} returns this - */ -proto.lnrpc.Invoice.prototype.setMemo = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional bytes r_preimage = 3; - * @return {!(string|Uint8Array)} - */ -proto.lnrpc.Invoice.prototype.getRPreimage = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * optional bytes r_preimage = 3; - * This is a type-conversion wrapper around `getRPreimage()` - * @return {string} - */ -proto.lnrpc.Invoice.prototype.getRPreimage_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getRPreimage())); -}; - - -/** - * optional bytes r_preimage = 3; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getRPreimage()` - * @return {!Uint8Array} - */ -proto.lnrpc.Invoice.prototype.getRPreimage_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getRPreimage())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.lnrpc.Invoice} returns this - */ -proto.lnrpc.Invoice.prototype.setRPreimage = function(value) { - return jspb.Message.setProto3BytesField(this, 3, value); -}; - - -/** - * optional bytes r_hash = 4; - * @return {!(string|Uint8Array)} - */ -proto.lnrpc.Invoice.prototype.getRHash = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 4, "")); -}; - - -/** - * optional bytes r_hash = 4; - * This is a type-conversion wrapper around `getRHash()` - * @return {string} - */ -proto.lnrpc.Invoice.prototype.getRHash_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getRHash())); -}; - - -/** - * optional bytes r_hash = 4; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getRHash()` - * @return {!Uint8Array} - */ -proto.lnrpc.Invoice.prototype.getRHash_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getRHash())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.lnrpc.Invoice} returns this - */ -proto.lnrpc.Invoice.prototype.setRHash = function(value) { - return jspb.Message.setProto3BytesField(this, 4, value); -}; - - -/** - * optional int64 value = 5; - * @return {number} - */ -proto.lnrpc.Invoice.prototype.getValue = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.Invoice} returns this - */ -proto.lnrpc.Invoice.prototype.setValue = function(value) { - return jspb.Message.setProto3IntField(this, 5, value); -}; - - -/** - * optional int64 value_msat = 23; - * @return {number} - */ -proto.lnrpc.Invoice.prototype.getValueMsat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 23, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.Invoice} returns this - */ -proto.lnrpc.Invoice.prototype.setValueMsat = function(value) { - return jspb.Message.setProto3IntField(this, 23, value); -}; - - -/** - * optional bool settled = 6; - * @return {boolean} - */ -proto.lnrpc.Invoice.prototype.getSettled = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 6, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.lnrpc.Invoice} returns this - */ -proto.lnrpc.Invoice.prototype.setSettled = function(value) { - return jspb.Message.setProto3BooleanField(this, 6, value); -}; - - -/** - * optional int64 creation_date = 7; - * @return {number} - */ -proto.lnrpc.Invoice.prototype.getCreationDate = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.Invoice} returns this - */ -proto.lnrpc.Invoice.prototype.setCreationDate = function(value) { - return jspb.Message.setProto3IntField(this, 7, value); -}; - - -/** - * optional int64 settle_date = 8; - * @return {number} - */ -proto.lnrpc.Invoice.prototype.getSettleDate = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.Invoice} returns this - */ -proto.lnrpc.Invoice.prototype.setSettleDate = function(value) { - return jspb.Message.setProto3IntField(this, 8, value); -}; - - -/** - * optional string payment_request = 9; - * @return {string} - */ -proto.lnrpc.Invoice.prototype.getPaymentRequest = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 9, "")); -}; - - -/** - * @param {string} value - * @return {!proto.lnrpc.Invoice} returns this - */ -proto.lnrpc.Invoice.prototype.setPaymentRequest = function(value) { - return jspb.Message.setProto3StringField(this, 9, value); -}; - - -/** - * optional bytes description_hash = 10; - * @return {!(string|Uint8Array)} - */ -proto.lnrpc.Invoice.prototype.getDescriptionHash = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 10, "")); -}; - - -/** - * optional bytes description_hash = 10; - * This is a type-conversion wrapper around `getDescriptionHash()` - * @return {string} - */ -proto.lnrpc.Invoice.prototype.getDescriptionHash_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getDescriptionHash())); -}; - - -/** - * optional bytes description_hash = 10; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getDescriptionHash()` - * @return {!Uint8Array} - */ -proto.lnrpc.Invoice.prototype.getDescriptionHash_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getDescriptionHash())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.lnrpc.Invoice} returns this - */ -proto.lnrpc.Invoice.prototype.setDescriptionHash = function(value) { - return jspb.Message.setProto3BytesField(this, 10, value); -}; - - -/** - * optional int64 expiry = 11; - * @return {number} - */ -proto.lnrpc.Invoice.prototype.getExpiry = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 11, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.Invoice} returns this - */ -proto.lnrpc.Invoice.prototype.setExpiry = function(value) { - return jspb.Message.setProto3IntField(this, 11, value); -}; - - -/** - * optional string fallback_addr = 12; - * @return {string} - */ -proto.lnrpc.Invoice.prototype.getFallbackAddr = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 12, "")); -}; - - -/** - * @param {string} value - * @return {!proto.lnrpc.Invoice} returns this - */ -proto.lnrpc.Invoice.prototype.setFallbackAddr = function(value) { - return jspb.Message.setProto3StringField(this, 12, value); -}; - - -/** - * optional uint64 cltv_expiry = 13; - * @return {number} - */ -proto.lnrpc.Invoice.prototype.getCltvExpiry = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 13, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.Invoice} returns this - */ -proto.lnrpc.Invoice.prototype.setCltvExpiry = function(value) { - return jspb.Message.setProto3IntField(this, 13, value); -}; - - -/** - * repeated RouteHint route_hints = 14; - * @return {!Array} - */ -proto.lnrpc.Invoice.prototype.getRouteHintsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.RouteHint, 14)); -}; - - -/** - * @param {!Array} value - * @return {!proto.lnrpc.Invoice} returns this -*/ -proto.lnrpc.Invoice.prototype.setRouteHintsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 14, value); -}; - - -/** - * @param {!proto.lnrpc.RouteHint=} opt_value - * @param {number=} opt_index - * @return {!proto.lnrpc.RouteHint} - */ -proto.lnrpc.Invoice.prototype.addRouteHints = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 14, opt_value, proto.lnrpc.RouteHint, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.lnrpc.Invoice} returns this - */ -proto.lnrpc.Invoice.prototype.clearRouteHintsList = function() { - return this.setRouteHintsList([]); -}; - - -/** - * optional bool private = 15; - * @return {boolean} - */ -proto.lnrpc.Invoice.prototype.getPrivate = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 15, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.lnrpc.Invoice} returns this - */ -proto.lnrpc.Invoice.prototype.setPrivate = function(value) { - return jspb.Message.setProto3BooleanField(this, 15, value); -}; - - -/** - * optional uint64 add_index = 16; - * @return {number} - */ -proto.lnrpc.Invoice.prototype.getAddIndex = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 16, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.Invoice} returns this - */ -proto.lnrpc.Invoice.prototype.setAddIndex = function(value) { - return jspb.Message.setProto3IntField(this, 16, value); -}; - - -/** - * optional uint64 settle_index = 17; - * @return {number} - */ -proto.lnrpc.Invoice.prototype.getSettleIndex = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 17, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.Invoice} returns this - */ -proto.lnrpc.Invoice.prototype.setSettleIndex = function(value) { - return jspb.Message.setProto3IntField(this, 17, value); -}; - - -/** - * optional int64 amt_paid = 18; - * @return {number} - */ -proto.lnrpc.Invoice.prototype.getAmtPaid = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 18, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.Invoice} returns this - */ -proto.lnrpc.Invoice.prototype.setAmtPaid = function(value) { - return jspb.Message.setProto3IntField(this, 18, value); -}; - - -/** - * optional int64 amt_paid_sat = 19; - * @return {number} - */ -proto.lnrpc.Invoice.prototype.getAmtPaidSat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 19, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.Invoice} returns this - */ -proto.lnrpc.Invoice.prototype.setAmtPaidSat = function(value) { - return jspb.Message.setProto3IntField(this, 19, value); -}; - - -/** - * optional int64 amt_paid_msat = 20; - * @return {number} - */ -proto.lnrpc.Invoice.prototype.getAmtPaidMsat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 20, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.Invoice} returns this - */ -proto.lnrpc.Invoice.prototype.setAmtPaidMsat = function(value) { - return jspb.Message.setProto3IntField(this, 20, value); -}; - - -/** - * optional InvoiceState state = 21; - * @return {!proto.lnrpc.Invoice.InvoiceState} - */ -proto.lnrpc.Invoice.prototype.getState = function() { - return /** @type {!proto.lnrpc.Invoice.InvoiceState} */ (jspb.Message.getFieldWithDefault(this, 21, 0)); -}; - - -/** - * @param {!proto.lnrpc.Invoice.InvoiceState} value - * @return {!proto.lnrpc.Invoice} returns this - */ -proto.lnrpc.Invoice.prototype.setState = function(value) { - return jspb.Message.setProto3EnumField(this, 21, value); -}; - - -/** - * repeated InvoiceHTLC htlcs = 22; - * @return {!Array} - */ -proto.lnrpc.Invoice.prototype.getHtlcsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.InvoiceHTLC, 22)); -}; - - -/** - * @param {!Array} value - * @return {!proto.lnrpc.Invoice} returns this -*/ -proto.lnrpc.Invoice.prototype.setHtlcsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 22, value); -}; - - -/** - * @param {!proto.lnrpc.InvoiceHTLC=} opt_value - * @param {number=} opt_index - * @return {!proto.lnrpc.InvoiceHTLC} - */ -proto.lnrpc.Invoice.prototype.addHtlcs = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 22, opt_value, proto.lnrpc.InvoiceHTLC, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.lnrpc.Invoice} returns this - */ -proto.lnrpc.Invoice.prototype.clearHtlcsList = function() { - return this.setHtlcsList([]); -}; - - -/** - * map features = 24; - * @param {boolean=} opt_noLazyCreate Do not create the map if - * empty, instead returning `undefined` - * @return {!jspb.Map} - */ -proto.lnrpc.Invoice.prototype.getFeaturesMap = function(opt_noLazyCreate) { - return /** @type {!jspb.Map} */ ( - jspb.Message.getMapField(this, 24, opt_noLazyCreate, - proto.lnrpc.Feature)); -}; - - -/** - * Clears values from the map. The map will be non-null. - * @return {!proto.lnrpc.Invoice} returns this - */ -proto.lnrpc.Invoice.prototype.clearFeaturesMap = function() { - this.getFeaturesMap().clear(); - return this;}; - - -/** - * optional bool is_keysend = 25; - * @return {boolean} - */ -proto.lnrpc.Invoice.prototype.getIsKeysend = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 25, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.lnrpc.Invoice} returns this - */ -proto.lnrpc.Invoice.prototype.setIsKeysend = function(value) { - return jspb.Message.setProto3BooleanField(this, 25, value); -}; - - -/** - * optional bytes payment_addr = 26; - * @return {!(string|Uint8Array)} - */ -proto.lnrpc.Invoice.prototype.getPaymentAddr = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 26, "")); -}; - - -/** - * optional bytes payment_addr = 26; - * This is a type-conversion wrapper around `getPaymentAddr()` - * @return {string} - */ -proto.lnrpc.Invoice.prototype.getPaymentAddr_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getPaymentAddr())); -}; - - -/** - * optional bytes payment_addr = 26; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getPaymentAddr()` - * @return {!Uint8Array} - */ -proto.lnrpc.Invoice.prototype.getPaymentAddr_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getPaymentAddr())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.lnrpc.Invoice} returns this - */ -proto.lnrpc.Invoice.prototype.setPaymentAddr = function(value) { - return jspb.Message.setProto3BytesField(this, 26, value); -}; - - -/** - * optional bool is_amp = 27; - * @return {boolean} - */ -proto.lnrpc.Invoice.prototype.getIsAmp = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 27, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.lnrpc.Invoice} returns this - */ -proto.lnrpc.Invoice.prototype.setIsAmp = function(value) { - return jspb.Message.setProto3BooleanField(this, 27, value); -}; - - -/** - * map amp_invoice_state = 28; - * @param {boolean=} opt_noLazyCreate Do not create the map if - * empty, instead returning `undefined` - * @return {!jspb.Map} - */ -proto.lnrpc.Invoice.prototype.getAmpInvoiceStateMap = function(opt_noLazyCreate) { - return /** @type {!jspb.Map} */ ( - jspb.Message.getMapField(this, 28, opt_noLazyCreate, - proto.lnrpc.AMPInvoiceState)); -}; - - -/** - * Clears values from the map. The map will be non-null. - * @return {!proto.lnrpc.Invoice} returns this - */ -proto.lnrpc.Invoice.prototype.clearAmpInvoiceStateMap = function() { - this.getAmpInvoiceStateMap().clear(); - return this;}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.InvoiceHTLC.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.InvoiceHTLC.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.InvoiceHTLC} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.InvoiceHTLC.toObject = function(includeInstance, msg) { - var f, obj = { - chanId: jspb.Message.getFieldWithDefault(msg, 1, "0"), - htlcIndex: jspb.Message.getFieldWithDefault(msg, 2, 0), - amtMsat: jspb.Message.getFieldWithDefault(msg, 3, 0), - acceptHeight: jspb.Message.getFieldWithDefault(msg, 4, 0), - acceptTime: jspb.Message.getFieldWithDefault(msg, 5, 0), - resolveTime: jspb.Message.getFieldWithDefault(msg, 6, 0), - expiryHeight: jspb.Message.getFieldWithDefault(msg, 7, 0), - state: jspb.Message.getFieldWithDefault(msg, 8, 0), - customRecordsMap: (f = msg.getCustomRecordsMap()) ? f.toObject(includeInstance, undefined) : [], - mppTotalAmtMsat: jspb.Message.getFieldWithDefault(msg, 10, 0), - amp: (f = msg.getAmp()) && proto.lnrpc.AMP.toObject(includeInstance, f) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.InvoiceHTLC} - */ -proto.lnrpc.InvoiceHTLC.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.InvoiceHTLC; - return proto.lnrpc.InvoiceHTLC.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.InvoiceHTLC} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.InvoiceHTLC} - */ -proto.lnrpc.InvoiceHTLC.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readUint64String()); - msg.setChanId(value); - break; - case 2: - var value = /** @type {number} */ (reader.readUint64()); - msg.setHtlcIndex(value); - break; - case 3: - var value = /** @type {number} */ (reader.readUint64()); - msg.setAmtMsat(value); - break; - case 4: - var value = /** @type {number} */ (reader.readInt32()); - msg.setAcceptHeight(value); - break; - case 5: - var value = /** @type {number} */ (reader.readInt64()); - msg.setAcceptTime(value); - break; - case 6: - var value = /** @type {number} */ (reader.readInt64()); - msg.setResolveTime(value); - break; - case 7: - var value = /** @type {number} */ (reader.readInt32()); - msg.setExpiryHeight(value); - break; - case 8: - var value = /** @type {!proto.lnrpc.InvoiceHTLCState} */ (reader.readEnum()); - msg.setState(value); - break; - case 9: - var value = msg.getCustomRecordsMap(); - reader.readMessage(value, function(message, reader) { - jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readUint64, jspb.BinaryReader.prototype.readBytes, null, 0, ""); - }); - break; - case 10: - var value = /** @type {number} */ (reader.readUint64()); - msg.setMppTotalAmtMsat(value); - break; - case 11: - var value = new proto.lnrpc.AMP; - reader.readMessage(value,proto.lnrpc.AMP.deserializeBinaryFromReader); - msg.setAmp(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.InvoiceHTLC.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.InvoiceHTLC.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.InvoiceHTLC} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.InvoiceHTLC.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getChanId(); - if (parseInt(f, 10) !== 0) { - writer.writeUint64String( - 1, - f - ); - } - f = message.getHtlcIndex(); - if (f !== 0) { - writer.writeUint64( - 2, - f - ); - } - f = message.getAmtMsat(); - if (f !== 0) { - writer.writeUint64( - 3, - f - ); - } - f = message.getAcceptHeight(); - if (f !== 0) { - writer.writeInt32( - 4, - f - ); - } - f = message.getAcceptTime(); - if (f !== 0) { - writer.writeInt64( - 5, - f - ); - } - f = message.getResolveTime(); - if (f !== 0) { - writer.writeInt64( - 6, - f - ); - } - f = message.getExpiryHeight(); - if (f !== 0) { - writer.writeInt32( - 7, - f - ); - } - f = message.getState(); - if (f !== 0.0) { - writer.writeEnum( - 8, - f - ); - } - f = message.getCustomRecordsMap(true); - if (f && f.getLength() > 0) { - f.serializeBinary(9, writer, jspb.BinaryWriter.prototype.writeUint64, jspb.BinaryWriter.prototype.writeBytes); - } - f = message.getMppTotalAmtMsat(); - if (f !== 0) { - writer.writeUint64( - 10, - f - ); - } - f = message.getAmp(); - if (f != null) { - writer.writeMessage( - 11, - f, - proto.lnrpc.AMP.serializeBinaryToWriter - ); - } -}; - - -/** - * optional uint64 chan_id = 1; - * @return {string} - */ -proto.lnrpc.InvoiceHTLC.prototype.getChanId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "0")); -}; - - -/** - * @param {string} value - * @return {!proto.lnrpc.InvoiceHTLC} returns this - */ -proto.lnrpc.InvoiceHTLC.prototype.setChanId = function(value) { - return jspb.Message.setProto3StringIntField(this, 1, value); -}; - - -/** - * optional uint64 htlc_index = 2; - * @return {number} - */ -proto.lnrpc.InvoiceHTLC.prototype.getHtlcIndex = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.InvoiceHTLC} returns this - */ -proto.lnrpc.InvoiceHTLC.prototype.setHtlcIndex = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * optional uint64 amt_msat = 3; - * @return {number} - */ -proto.lnrpc.InvoiceHTLC.prototype.getAmtMsat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.InvoiceHTLC} returns this - */ -proto.lnrpc.InvoiceHTLC.prototype.setAmtMsat = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - -/** - * optional int32 accept_height = 4; - * @return {number} - */ -proto.lnrpc.InvoiceHTLC.prototype.getAcceptHeight = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.InvoiceHTLC} returns this - */ -proto.lnrpc.InvoiceHTLC.prototype.setAcceptHeight = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); -}; - - -/** - * optional int64 accept_time = 5; - * @return {number} - */ -proto.lnrpc.InvoiceHTLC.prototype.getAcceptTime = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.InvoiceHTLC} returns this - */ -proto.lnrpc.InvoiceHTLC.prototype.setAcceptTime = function(value) { - return jspb.Message.setProto3IntField(this, 5, value); -}; - - -/** - * optional int64 resolve_time = 6; - * @return {number} - */ -proto.lnrpc.InvoiceHTLC.prototype.getResolveTime = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.InvoiceHTLC} returns this - */ -proto.lnrpc.InvoiceHTLC.prototype.setResolveTime = function(value) { - return jspb.Message.setProto3IntField(this, 6, value); -}; - - -/** - * optional int32 expiry_height = 7; - * @return {number} - */ -proto.lnrpc.InvoiceHTLC.prototype.getExpiryHeight = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.InvoiceHTLC} returns this - */ -proto.lnrpc.InvoiceHTLC.prototype.setExpiryHeight = function(value) { - return jspb.Message.setProto3IntField(this, 7, value); -}; - - -/** - * optional InvoiceHTLCState state = 8; - * @return {!proto.lnrpc.InvoiceHTLCState} - */ -proto.lnrpc.InvoiceHTLC.prototype.getState = function() { - return /** @type {!proto.lnrpc.InvoiceHTLCState} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); -}; - - -/** - * @param {!proto.lnrpc.InvoiceHTLCState} value - * @return {!proto.lnrpc.InvoiceHTLC} returns this - */ -proto.lnrpc.InvoiceHTLC.prototype.setState = function(value) { - return jspb.Message.setProto3EnumField(this, 8, value); -}; - - -/** - * map custom_records = 9; - * @param {boolean=} opt_noLazyCreate Do not create the map if - * empty, instead returning `undefined` - * @return {!jspb.Map} - */ -proto.lnrpc.InvoiceHTLC.prototype.getCustomRecordsMap = function(opt_noLazyCreate) { - return /** @type {!jspb.Map} */ ( - jspb.Message.getMapField(this, 9, opt_noLazyCreate, - null)); -}; - - -/** - * Clears values from the map. The map will be non-null. - * @return {!proto.lnrpc.InvoiceHTLC} returns this - */ -proto.lnrpc.InvoiceHTLC.prototype.clearCustomRecordsMap = function() { - this.getCustomRecordsMap().clear(); - return this;}; - - -/** - * optional uint64 mpp_total_amt_msat = 10; - * @return {number} - */ -proto.lnrpc.InvoiceHTLC.prototype.getMppTotalAmtMsat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 10, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.InvoiceHTLC} returns this - */ -proto.lnrpc.InvoiceHTLC.prototype.setMppTotalAmtMsat = function(value) { - return jspb.Message.setProto3IntField(this, 10, value); -}; - - -/** - * optional AMP amp = 11; - * @return {?proto.lnrpc.AMP} - */ -proto.lnrpc.InvoiceHTLC.prototype.getAmp = function() { - return /** @type{?proto.lnrpc.AMP} */ ( - jspb.Message.getWrapperField(this, proto.lnrpc.AMP, 11)); -}; - - -/** - * @param {?proto.lnrpc.AMP|undefined} value - * @return {!proto.lnrpc.InvoiceHTLC} returns this -*/ -proto.lnrpc.InvoiceHTLC.prototype.setAmp = function(value) { - return jspb.Message.setWrapperField(this, 11, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.lnrpc.InvoiceHTLC} returns this - */ -proto.lnrpc.InvoiceHTLC.prototype.clearAmp = function() { - return this.setAmp(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.lnrpc.InvoiceHTLC.prototype.hasAmp = function() { - return jspb.Message.getField(this, 11) != null; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.AMP.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.AMP.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.AMP} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.AMP.toObject = function(includeInstance, msg) { - var f, obj = { - rootShare: msg.getRootShare_asB64(), - setId: msg.getSetId_asB64(), - childIndex: jspb.Message.getFieldWithDefault(msg, 3, 0), - hash: msg.getHash_asB64(), - preimage: msg.getPreimage_asB64() - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.AMP} - */ -proto.lnrpc.AMP.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.AMP; - return proto.lnrpc.AMP.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.AMP} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.AMP} - */ -proto.lnrpc.AMP.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setRootShare(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setSetId(value); - break; - case 3: - var value = /** @type {number} */ (reader.readUint32()); - msg.setChildIndex(value); - break; - case 4: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setHash(value); - break; - case 5: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setPreimage(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.AMP.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.AMP.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.AMP} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.AMP.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getRootShare_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getSetId_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } - f = message.getChildIndex(); - if (f !== 0) { - writer.writeUint32( - 3, - f - ); - } - f = message.getHash_asU8(); - if (f.length > 0) { - writer.writeBytes( - 4, - f - ); - } - f = message.getPreimage_asU8(); - if (f.length > 0) { - writer.writeBytes( - 5, - f - ); - } -}; - - -/** - * optional bytes root_share = 1; - * @return {!(string|Uint8Array)} - */ -proto.lnrpc.AMP.prototype.getRootShare = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes root_share = 1; - * This is a type-conversion wrapper around `getRootShare()` - * @return {string} - */ -proto.lnrpc.AMP.prototype.getRootShare_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getRootShare())); -}; - - -/** - * optional bytes root_share = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getRootShare()` - * @return {!Uint8Array} - */ -proto.lnrpc.AMP.prototype.getRootShare_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getRootShare())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.lnrpc.AMP} returns this - */ -proto.lnrpc.AMP.prototype.setRootShare = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional bytes set_id = 2; - * @return {!(string|Uint8Array)} - */ -proto.lnrpc.AMP.prototype.getSetId = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes set_id = 2; - * This is a type-conversion wrapper around `getSetId()` - * @return {string} - */ -proto.lnrpc.AMP.prototype.getSetId_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getSetId())); -}; - - -/** - * optional bytes set_id = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getSetId()` - * @return {!Uint8Array} - */ -proto.lnrpc.AMP.prototype.getSetId_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getSetId())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.lnrpc.AMP} returns this - */ -proto.lnrpc.AMP.prototype.setSetId = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); -}; - - -/** - * optional uint32 child_index = 3; - * @return {number} - */ -proto.lnrpc.AMP.prototype.getChildIndex = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.AMP} returns this - */ -proto.lnrpc.AMP.prototype.setChildIndex = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - -/** - * optional bytes hash = 4; - * @return {!(string|Uint8Array)} - */ -proto.lnrpc.AMP.prototype.getHash = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 4, "")); -}; - - -/** - * optional bytes hash = 4; - * This is a type-conversion wrapper around `getHash()` - * @return {string} - */ -proto.lnrpc.AMP.prototype.getHash_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getHash())); -}; - - -/** - * optional bytes hash = 4; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getHash()` - * @return {!Uint8Array} - */ -proto.lnrpc.AMP.prototype.getHash_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getHash())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.lnrpc.AMP} returns this - */ -proto.lnrpc.AMP.prototype.setHash = function(value) { - return jspb.Message.setProto3BytesField(this, 4, value); -}; - - -/** - * optional bytes preimage = 5; - * @return {!(string|Uint8Array)} - */ -proto.lnrpc.AMP.prototype.getPreimage = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 5, "")); -}; - - -/** - * optional bytes preimage = 5; - * This is a type-conversion wrapper around `getPreimage()` - * @return {string} - */ -proto.lnrpc.AMP.prototype.getPreimage_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getPreimage())); -}; - - -/** - * optional bytes preimage = 5; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getPreimage()` - * @return {!Uint8Array} - */ -proto.lnrpc.AMP.prototype.getPreimage_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getPreimage())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.lnrpc.AMP} returns this - */ -proto.lnrpc.AMP.prototype.setPreimage = function(value) { - return jspb.Message.setProto3BytesField(this, 5, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.AddInvoiceResponse.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.AddInvoiceResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.AddInvoiceResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.AddInvoiceResponse.toObject = function(includeInstance, msg) { - var f, obj = { - rHash: msg.getRHash_asB64(), - paymentRequest: jspb.Message.getFieldWithDefault(msg, 2, ""), - addIndex: jspb.Message.getFieldWithDefault(msg, 16, 0), - paymentAddr: msg.getPaymentAddr_asB64() - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.AddInvoiceResponse} - */ -proto.lnrpc.AddInvoiceResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.AddInvoiceResponse; - return proto.lnrpc.AddInvoiceResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.AddInvoiceResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.AddInvoiceResponse} - */ -proto.lnrpc.AddInvoiceResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setRHash(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setPaymentRequest(value); - break; - case 16: - var value = /** @type {number} */ (reader.readUint64()); - msg.setAddIndex(value); - break; - case 17: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setPaymentAddr(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.AddInvoiceResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.AddInvoiceResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.AddInvoiceResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.AddInvoiceResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getRHash_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getPaymentRequest(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getAddIndex(); - if (f !== 0) { - writer.writeUint64( - 16, - f - ); - } - f = message.getPaymentAddr_asU8(); - if (f.length > 0) { - writer.writeBytes( - 17, - f - ); - } -}; - - -/** - * optional bytes r_hash = 1; - * @return {!(string|Uint8Array)} - */ -proto.lnrpc.AddInvoiceResponse.prototype.getRHash = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes r_hash = 1; - * This is a type-conversion wrapper around `getRHash()` - * @return {string} - */ -proto.lnrpc.AddInvoiceResponse.prototype.getRHash_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getRHash())); -}; - - -/** - * optional bytes r_hash = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getRHash()` - * @return {!Uint8Array} - */ -proto.lnrpc.AddInvoiceResponse.prototype.getRHash_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getRHash())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.lnrpc.AddInvoiceResponse} returns this - */ -proto.lnrpc.AddInvoiceResponse.prototype.setRHash = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional string payment_request = 2; - * @return {string} - */ -proto.lnrpc.AddInvoiceResponse.prototype.getPaymentRequest = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.lnrpc.AddInvoiceResponse} returns this - */ -proto.lnrpc.AddInvoiceResponse.prototype.setPaymentRequest = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional uint64 add_index = 16; - * @return {number} - */ -proto.lnrpc.AddInvoiceResponse.prototype.getAddIndex = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 16, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.AddInvoiceResponse} returns this - */ -proto.lnrpc.AddInvoiceResponse.prototype.setAddIndex = function(value) { - return jspb.Message.setProto3IntField(this, 16, value); -}; - - -/** - * optional bytes payment_addr = 17; - * @return {!(string|Uint8Array)} - */ -proto.lnrpc.AddInvoiceResponse.prototype.getPaymentAddr = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 17, "")); -}; - - -/** - * optional bytes payment_addr = 17; - * This is a type-conversion wrapper around `getPaymentAddr()` - * @return {string} - */ -proto.lnrpc.AddInvoiceResponse.prototype.getPaymentAddr_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getPaymentAddr())); -}; - - -/** - * optional bytes payment_addr = 17; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getPaymentAddr()` - * @return {!Uint8Array} - */ -proto.lnrpc.AddInvoiceResponse.prototype.getPaymentAddr_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getPaymentAddr())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.lnrpc.AddInvoiceResponse} returns this - */ -proto.lnrpc.AddInvoiceResponse.prototype.setPaymentAddr = function(value) { - return jspb.Message.setProto3BytesField(this, 17, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.PaymentHash.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.PaymentHash.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.PaymentHash} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.PaymentHash.toObject = function(includeInstance, msg) { - var f, obj = { - rHashStr: jspb.Message.getFieldWithDefault(msg, 1, ""), - rHash: msg.getRHash_asB64() - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.PaymentHash} - */ -proto.lnrpc.PaymentHash.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.PaymentHash; - return proto.lnrpc.PaymentHash.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.PaymentHash} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.PaymentHash} - */ -proto.lnrpc.PaymentHash.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setRHashStr(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setRHash(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.PaymentHash.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.PaymentHash.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.PaymentHash} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.PaymentHash.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getRHashStr(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getRHash_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } -}; - - -/** - * optional string r_hash_str = 1; - * @return {string} - */ -proto.lnrpc.PaymentHash.prototype.getRHashStr = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.lnrpc.PaymentHash} returns this - */ -proto.lnrpc.PaymentHash.prototype.setRHashStr = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional bytes r_hash = 2; - * @return {!(string|Uint8Array)} - */ -proto.lnrpc.PaymentHash.prototype.getRHash = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes r_hash = 2; - * This is a type-conversion wrapper around `getRHash()` - * @return {string} - */ -proto.lnrpc.PaymentHash.prototype.getRHash_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getRHash())); -}; - - -/** - * optional bytes r_hash = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getRHash()` - * @return {!Uint8Array} - */ -proto.lnrpc.PaymentHash.prototype.getRHash_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getRHash())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.lnrpc.PaymentHash} returns this - */ -proto.lnrpc.PaymentHash.prototype.setRHash = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.ListInvoiceRequest.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.ListInvoiceRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.ListInvoiceRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.ListInvoiceRequest.toObject = function(includeInstance, msg) { - var f, obj = { - pendingOnly: jspb.Message.getBooleanFieldWithDefault(msg, 1, false), - indexOffset: jspb.Message.getFieldWithDefault(msg, 4, 0), - numMaxInvoices: jspb.Message.getFieldWithDefault(msg, 5, 0), - reversed: jspb.Message.getBooleanFieldWithDefault(msg, 6, false) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.ListInvoiceRequest} - */ -proto.lnrpc.ListInvoiceRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.ListInvoiceRequest; - return proto.lnrpc.ListInvoiceRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.ListInvoiceRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.ListInvoiceRequest} - */ -proto.lnrpc.ListInvoiceRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setPendingOnly(value); - break; - case 4: - var value = /** @type {number} */ (reader.readUint64()); - msg.setIndexOffset(value); - break; - case 5: - var value = /** @type {number} */ (reader.readUint64()); - msg.setNumMaxInvoices(value); - break; - case 6: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setReversed(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.ListInvoiceRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.ListInvoiceRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.ListInvoiceRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.ListInvoiceRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getPendingOnly(); - if (f) { - writer.writeBool( - 1, - f - ); - } - f = message.getIndexOffset(); - if (f !== 0) { - writer.writeUint64( - 4, - f - ); - } - f = message.getNumMaxInvoices(); - if (f !== 0) { - writer.writeUint64( - 5, - f - ); - } - f = message.getReversed(); - if (f) { - writer.writeBool( - 6, - f - ); - } -}; - - -/** - * optional bool pending_only = 1; - * @return {boolean} - */ -proto.lnrpc.ListInvoiceRequest.prototype.getPendingOnly = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.lnrpc.ListInvoiceRequest} returns this - */ -proto.lnrpc.ListInvoiceRequest.prototype.setPendingOnly = function(value) { - return jspb.Message.setProto3BooleanField(this, 1, value); -}; - - -/** - * optional uint64 index_offset = 4; - * @return {number} - */ -proto.lnrpc.ListInvoiceRequest.prototype.getIndexOffset = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.ListInvoiceRequest} returns this - */ -proto.lnrpc.ListInvoiceRequest.prototype.setIndexOffset = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); -}; - - -/** - * optional uint64 num_max_invoices = 5; - * @return {number} - */ -proto.lnrpc.ListInvoiceRequest.prototype.getNumMaxInvoices = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.ListInvoiceRequest} returns this - */ -proto.lnrpc.ListInvoiceRequest.prototype.setNumMaxInvoices = function(value) { - return jspb.Message.setProto3IntField(this, 5, value); -}; - - -/** - * optional bool reversed = 6; - * @return {boolean} - */ -proto.lnrpc.ListInvoiceRequest.prototype.getReversed = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 6, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.lnrpc.ListInvoiceRequest} returns this - */ -proto.lnrpc.ListInvoiceRequest.prototype.setReversed = function(value) { - return jspb.Message.setProto3BooleanField(this, 6, value); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.lnrpc.ListInvoiceResponse.repeatedFields_ = [1]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.ListInvoiceResponse.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.ListInvoiceResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.ListInvoiceResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.ListInvoiceResponse.toObject = function(includeInstance, msg) { - var f, obj = { - invoicesList: jspb.Message.toObjectList(msg.getInvoicesList(), - proto.lnrpc.Invoice.toObject, includeInstance), - lastIndexOffset: jspb.Message.getFieldWithDefault(msg, 2, 0), - firstIndexOffset: jspb.Message.getFieldWithDefault(msg, 3, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.ListInvoiceResponse} - */ -proto.lnrpc.ListInvoiceResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.ListInvoiceResponse; - return proto.lnrpc.ListInvoiceResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.ListInvoiceResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.ListInvoiceResponse} - */ -proto.lnrpc.ListInvoiceResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.lnrpc.Invoice; - reader.readMessage(value,proto.lnrpc.Invoice.deserializeBinaryFromReader); - msg.addInvoices(value); - break; - case 2: - var value = /** @type {number} */ (reader.readUint64()); - msg.setLastIndexOffset(value); - break; - case 3: - var value = /** @type {number} */ (reader.readUint64()); - msg.setFirstIndexOffset(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.ListInvoiceResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.ListInvoiceResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.ListInvoiceResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.ListInvoiceResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getInvoicesList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 1, - f, - proto.lnrpc.Invoice.serializeBinaryToWriter - ); - } - f = message.getLastIndexOffset(); - if (f !== 0) { - writer.writeUint64( - 2, - f - ); - } - f = message.getFirstIndexOffset(); - if (f !== 0) { - writer.writeUint64( - 3, - f - ); - } -}; - - -/** - * repeated Invoice invoices = 1; - * @return {!Array} - */ -proto.lnrpc.ListInvoiceResponse.prototype.getInvoicesList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.Invoice, 1)); -}; - - -/** - * @param {!Array} value - * @return {!proto.lnrpc.ListInvoiceResponse} returns this -*/ -proto.lnrpc.ListInvoiceResponse.prototype.setInvoicesList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); -}; - - -/** - * @param {!proto.lnrpc.Invoice=} opt_value - * @param {number=} opt_index - * @return {!proto.lnrpc.Invoice} - */ -proto.lnrpc.ListInvoiceResponse.prototype.addInvoices = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.lnrpc.Invoice, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.lnrpc.ListInvoiceResponse} returns this - */ -proto.lnrpc.ListInvoiceResponse.prototype.clearInvoicesList = function() { - return this.setInvoicesList([]); -}; - - -/** - * optional uint64 last_index_offset = 2; - * @return {number} - */ -proto.lnrpc.ListInvoiceResponse.prototype.getLastIndexOffset = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.ListInvoiceResponse} returns this - */ -proto.lnrpc.ListInvoiceResponse.prototype.setLastIndexOffset = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * optional uint64 first_index_offset = 3; - * @return {number} - */ -proto.lnrpc.ListInvoiceResponse.prototype.getFirstIndexOffset = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.ListInvoiceResponse} returns this - */ -proto.lnrpc.ListInvoiceResponse.prototype.setFirstIndexOffset = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.InvoiceSubscription.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.InvoiceSubscription.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.InvoiceSubscription} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.InvoiceSubscription.toObject = function(includeInstance, msg) { - var f, obj = { - addIndex: jspb.Message.getFieldWithDefault(msg, 1, 0), - settleIndex: jspb.Message.getFieldWithDefault(msg, 2, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.InvoiceSubscription} - */ -proto.lnrpc.InvoiceSubscription.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.InvoiceSubscription; - return proto.lnrpc.InvoiceSubscription.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.InvoiceSubscription} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.InvoiceSubscription} - */ -proto.lnrpc.InvoiceSubscription.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readUint64()); - msg.setAddIndex(value); - break; - case 2: - var value = /** @type {number} */ (reader.readUint64()); - msg.setSettleIndex(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.InvoiceSubscription.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.InvoiceSubscription.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.InvoiceSubscription} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.InvoiceSubscription.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getAddIndex(); - if (f !== 0) { - writer.writeUint64( - 1, - f - ); - } - f = message.getSettleIndex(); - if (f !== 0) { - writer.writeUint64( - 2, - f - ); - } -}; - - -/** - * optional uint64 add_index = 1; - * @return {number} - */ -proto.lnrpc.InvoiceSubscription.prototype.getAddIndex = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.InvoiceSubscription} returns this - */ -proto.lnrpc.InvoiceSubscription.prototype.setAddIndex = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); -}; - - -/** - * optional uint64 settle_index = 2; - * @return {number} - */ -proto.lnrpc.InvoiceSubscription.prototype.getSettleIndex = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.InvoiceSubscription} returns this - */ -proto.lnrpc.InvoiceSubscription.prototype.setSettleIndex = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.lnrpc.Payment.repeatedFields_ = [14]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.Payment.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.Payment.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.Payment} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.Payment.toObject = function(includeInstance, msg) { - var f, obj = { - paymentHash: jspb.Message.getFieldWithDefault(msg, 1, ""), - value: jspb.Message.getFieldWithDefault(msg, 2, 0), - creationDate: jspb.Message.getFieldWithDefault(msg, 3, 0), - fee: jspb.Message.getFieldWithDefault(msg, 5, 0), - paymentPreimage: jspb.Message.getFieldWithDefault(msg, 6, ""), - valueSat: jspb.Message.getFieldWithDefault(msg, 7, 0), - valueMsat: jspb.Message.getFieldWithDefault(msg, 8, 0), - paymentRequest: jspb.Message.getFieldWithDefault(msg, 9, ""), - status: jspb.Message.getFieldWithDefault(msg, 10, 0), - feeSat: jspb.Message.getFieldWithDefault(msg, 11, 0), - feeMsat: jspb.Message.getFieldWithDefault(msg, 12, 0), - creationTimeNs: jspb.Message.getFieldWithDefault(msg, 13, 0), - htlcsList: jspb.Message.toObjectList(msg.getHtlcsList(), - proto.lnrpc.HTLCAttempt.toObject, includeInstance), - paymentIndex: jspb.Message.getFieldWithDefault(msg, 15, 0), - failureReason: jspb.Message.getFieldWithDefault(msg, 16, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.Payment} - */ -proto.lnrpc.Payment.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.Payment; - return proto.lnrpc.Payment.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.Payment} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.Payment} - */ -proto.lnrpc.Payment.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setPaymentHash(value); - break; - case 2: - var value = /** @type {number} */ (reader.readInt64()); - msg.setValue(value); - break; - case 3: - var value = /** @type {number} */ (reader.readInt64()); - msg.setCreationDate(value); - break; - case 5: - var value = /** @type {number} */ (reader.readInt64()); - msg.setFee(value); - break; - case 6: - var value = /** @type {string} */ (reader.readString()); - msg.setPaymentPreimage(value); - break; - case 7: - var value = /** @type {number} */ (reader.readInt64()); - msg.setValueSat(value); - break; - case 8: - var value = /** @type {number} */ (reader.readInt64()); - msg.setValueMsat(value); - break; - case 9: - var value = /** @type {string} */ (reader.readString()); - msg.setPaymentRequest(value); - break; - case 10: - var value = /** @type {!proto.lnrpc.Payment.PaymentStatus} */ (reader.readEnum()); - msg.setStatus(value); - break; - case 11: - var value = /** @type {number} */ (reader.readInt64()); - msg.setFeeSat(value); - break; - case 12: - var value = /** @type {number} */ (reader.readInt64()); - msg.setFeeMsat(value); - break; - case 13: - var value = /** @type {number} */ (reader.readInt64()); - msg.setCreationTimeNs(value); - break; - case 14: - var value = new proto.lnrpc.HTLCAttempt; - reader.readMessage(value,proto.lnrpc.HTLCAttempt.deserializeBinaryFromReader); - msg.addHtlcs(value); - break; - case 15: - var value = /** @type {number} */ (reader.readUint64()); - msg.setPaymentIndex(value); - break; - case 16: - var value = /** @type {!proto.lnrpc.PaymentFailureReason} */ (reader.readEnum()); - msg.setFailureReason(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.Payment.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.Payment.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.Payment} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.Payment.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getPaymentHash(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getValue(); - if (f !== 0) { - writer.writeInt64( - 2, - f - ); - } - f = message.getCreationDate(); - if (f !== 0) { - writer.writeInt64( - 3, - f - ); - } - f = message.getFee(); - if (f !== 0) { - writer.writeInt64( - 5, - f - ); - } - f = message.getPaymentPreimage(); - if (f.length > 0) { - writer.writeString( - 6, - f - ); - } - f = message.getValueSat(); - if (f !== 0) { - writer.writeInt64( - 7, - f - ); - } - f = message.getValueMsat(); - if (f !== 0) { - writer.writeInt64( - 8, - f - ); - } - f = message.getPaymentRequest(); - if (f.length > 0) { - writer.writeString( - 9, - f - ); - } - f = message.getStatus(); - if (f !== 0.0) { - writer.writeEnum( - 10, - f - ); - } - f = message.getFeeSat(); - if (f !== 0) { - writer.writeInt64( - 11, - f - ); - } - f = message.getFeeMsat(); - if (f !== 0) { - writer.writeInt64( - 12, - f - ); - } - f = message.getCreationTimeNs(); - if (f !== 0) { - writer.writeInt64( - 13, - f - ); - } - f = message.getHtlcsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 14, - f, - proto.lnrpc.HTLCAttempt.serializeBinaryToWriter - ); - } - f = message.getPaymentIndex(); - if (f !== 0) { - writer.writeUint64( - 15, - f - ); - } - f = message.getFailureReason(); - if (f !== 0.0) { - writer.writeEnum( - 16, - f - ); - } -}; - - -/** - * @enum {number} - */ -proto.lnrpc.Payment.PaymentStatus = { - UNKNOWN: 0, - IN_FLIGHT: 1, - SUCCEEDED: 2, - FAILED: 3 -}; - -/** - * optional string payment_hash = 1; - * @return {string} - */ -proto.lnrpc.Payment.prototype.getPaymentHash = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.lnrpc.Payment} returns this - */ -proto.lnrpc.Payment.prototype.setPaymentHash = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional int64 value = 2; - * @return {number} - */ -proto.lnrpc.Payment.prototype.getValue = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.Payment} returns this - */ -proto.lnrpc.Payment.prototype.setValue = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * optional int64 creation_date = 3; - * @return {number} - */ -proto.lnrpc.Payment.prototype.getCreationDate = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.Payment} returns this - */ -proto.lnrpc.Payment.prototype.setCreationDate = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - -/** - * optional int64 fee = 5; - * @return {number} - */ -proto.lnrpc.Payment.prototype.getFee = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.Payment} returns this - */ -proto.lnrpc.Payment.prototype.setFee = function(value) { - return jspb.Message.setProto3IntField(this, 5, value); -}; - - -/** - * optional string payment_preimage = 6; - * @return {string} - */ -proto.lnrpc.Payment.prototype.getPaymentPreimage = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); -}; - - -/** - * @param {string} value - * @return {!proto.lnrpc.Payment} returns this - */ -proto.lnrpc.Payment.prototype.setPaymentPreimage = function(value) { - return jspb.Message.setProto3StringField(this, 6, value); -}; - - -/** - * optional int64 value_sat = 7; - * @return {number} - */ -proto.lnrpc.Payment.prototype.getValueSat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.Payment} returns this - */ -proto.lnrpc.Payment.prototype.setValueSat = function(value) { - return jspb.Message.setProto3IntField(this, 7, value); -}; - - -/** - * optional int64 value_msat = 8; - * @return {number} - */ -proto.lnrpc.Payment.prototype.getValueMsat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.Payment} returns this - */ -proto.lnrpc.Payment.prototype.setValueMsat = function(value) { - return jspb.Message.setProto3IntField(this, 8, value); -}; - - -/** - * optional string payment_request = 9; - * @return {string} - */ -proto.lnrpc.Payment.prototype.getPaymentRequest = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 9, "")); -}; - - -/** - * @param {string} value - * @return {!proto.lnrpc.Payment} returns this - */ -proto.lnrpc.Payment.prototype.setPaymentRequest = function(value) { - return jspb.Message.setProto3StringField(this, 9, value); -}; - - -/** - * optional PaymentStatus status = 10; - * @return {!proto.lnrpc.Payment.PaymentStatus} - */ -proto.lnrpc.Payment.prototype.getStatus = function() { - return /** @type {!proto.lnrpc.Payment.PaymentStatus} */ (jspb.Message.getFieldWithDefault(this, 10, 0)); -}; - - -/** - * @param {!proto.lnrpc.Payment.PaymentStatus} value - * @return {!proto.lnrpc.Payment} returns this - */ -proto.lnrpc.Payment.prototype.setStatus = function(value) { - return jspb.Message.setProto3EnumField(this, 10, value); -}; - - -/** - * optional int64 fee_sat = 11; - * @return {number} - */ -proto.lnrpc.Payment.prototype.getFeeSat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 11, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.Payment} returns this - */ -proto.lnrpc.Payment.prototype.setFeeSat = function(value) { - return jspb.Message.setProto3IntField(this, 11, value); -}; - - -/** - * optional int64 fee_msat = 12; - * @return {number} - */ -proto.lnrpc.Payment.prototype.getFeeMsat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 12, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.Payment} returns this - */ -proto.lnrpc.Payment.prototype.setFeeMsat = function(value) { - return jspb.Message.setProto3IntField(this, 12, value); -}; - - -/** - * optional int64 creation_time_ns = 13; - * @return {number} - */ -proto.lnrpc.Payment.prototype.getCreationTimeNs = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 13, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.Payment} returns this - */ -proto.lnrpc.Payment.prototype.setCreationTimeNs = function(value) { - return jspb.Message.setProto3IntField(this, 13, value); -}; - - -/** - * repeated HTLCAttempt htlcs = 14; - * @return {!Array} - */ -proto.lnrpc.Payment.prototype.getHtlcsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.HTLCAttempt, 14)); -}; - - -/** - * @param {!Array} value - * @return {!proto.lnrpc.Payment} returns this -*/ -proto.lnrpc.Payment.prototype.setHtlcsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 14, value); -}; - - -/** - * @param {!proto.lnrpc.HTLCAttempt=} opt_value - * @param {number=} opt_index - * @return {!proto.lnrpc.HTLCAttempt} - */ -proto.lnrpc.Payment.prototype.addHtlcs = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 14, opt_value, proto.lnrpc.HTLCAttempt, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.lnrpc.Payment} returns this - */ -proto.lnrpc.Payment.prototype.clearHtlcsList = function() { - return this.setHtlcsList([]); -}; - - -/** - * optional uint64 payment_index = 15; - * @return {number} - */ -proto.lnrpc.Payment.prototype.getPaymentIndex = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 15, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.Payment} returns this - */ -proto.lnrpc.Payment.prototype.setPaymentIndex = function(value) { - return jspb.Message.setProto3IntField(this, 15, value); -}; - - -/** - * optional PaymentFailureReason failure_reason = 16; - * @return {!proto.lnrpc.PaymentFailureReason} - */ -proto.lnrpc.Payment.prototype.getFailureReason = function() { - return /** @type {!proto.lnrpc.PaymentFailureReason} */ (jspb.Message.getFieldWithDefault(this, 16, 0)); -}; - - -/** - * @param {!proto.lnrpc.PaymentFailureReason} value - * @return {!proto.lnrpc.Payment} returns this - */ -proto.lnrpc.Payment.prototype.setFailureReason = function(value) { - return jspb.Message.setProto3EnumField(this, 16, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.HTLCAttempt.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.HTLCAttempt.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.HTLCAttempt} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.HTLCAttempt.toObject = function(includeInstance, msg) { - var f, obj = { - attemptId: jspb.Message.getFieldWithDefault(msg, 7, 0), - status: jspb.Message.getFieldWithDefault(msg, 1, 0), - route: (f = msg.getRoute()) && proto.lnrpc.Route.toObject(includeInstance, f), - attemptTimeNs: jspb.Message.getFieldWithDefault(msg, 3, 0), - resolveTimeNs: jspb.Message.getFieldWithDefault(msg, 4, 0), - failure: (f = msg.getFailure()) && proto.lnrpc.Failure.toObject(includeInstance, f), - preimage: msg.getPreimage_asB64() - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.HTLCAttempt} - */ -proto.lnrpc.HTLCAttempt.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.HTLCAttempt; - return proto.lnrpc.HTLCAttempt.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.HTLCAttempt} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.HTLCAttempt} - */ -proto.lnrpc.HTLCAttempt.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 7: - var value = /** @type {number} */ (reader.readUint64()); - msg.setAttemptId(value); - break; - case 1: - var value = /** @type {!proto.lnrpc.HTLCAttempt.HTLCStatus} */ (reader.readEnum()); - msg.setStatus(value); - break; - case 2: - var value = new proto.lnrpc.Route; - reader.readMessage(value,proto.lnrpc.Route.deserializeBinaryFromReader); - msg.setRoute(value); - break; - case 3: - var value = /** @type {number} */ (reader.readInt64()); - msg.setAttemptTimeNs(value); - break; - case 4: - var value = /** @type {number} */ (reader.readInt64()); - msg.setResolveTimeNs(value); - break; - case 5: - var value = new proto.lnrpc.Failure; - reader.readMessage(value,proto.lnrpc.Failure.deserializeBinaryFromReader); - msg.setFailure(value); - break; - case 6: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setPreimage(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.HTLCAttempt.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.HTLCAttempt.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.HTLCAttempt} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.HTLCAttempt.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getAttemptId(); - if (f !== 0) { - writer.writeUint64( - 7, - f - ); - } - f = message.getStatus(); - if (f !== 0.0) { - writer.writeEnum( - 1, - f - ); - } - f = message.getRoute(); - if (f != null) { - writer.writeMessage( - 2, - f, - proto.lnrpc.Route.serializeBinaryToWriter - ); - } - f = message.getAttemptTimeNs(); - if (f !== 0) { - writer.writeInt64( - 3, - f - ); - } - f = message.getResolveTimeNs(); - if (f !== 0) { - writer.writeInt64( - 4, - f - ); - } - f = message.getFailure(); - if (f != null) { - writer.writeMessage( - 5, - f, - proto.lnrpc.Failure.serializeBinaryToWriter - ); - } - f = message.getPreimage_asU8(); - if (f.length > 0) { - writer.writeBytes( - 6, - f - ); - } -}; - - -/** - * @enum {number} - */ -proto.lnrpc.HTLCAttempt.HTLCStatus = { - IN_FLIGHT: 0, - SUCCEEDED: 1, - FAILED: 2 -}; - -/** - * optional uint64 attempt_id = 7; - * @return {number} - */ -proto.lnrpc.HTLCAttempt.prototype.getAttemptId = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.HTLCAttempt} returns this - */ -proto.lnrpc.HTLCAttempt.prototype.setAttemptId = function(value) { - return jspb.Message.setProto3IntField(this, 7, value); -}; - - -/** - * optional HTLCStatus status = 1; - * @return {!proto.lnrpc.HTLCAttempt.HTLCStatus} - */ -proto.lnrpc.HTLCAttempt.prototype.getStatus = function() { - return /** @type {!proto.lnrpc.HTLCAttempt.HTLCStatus} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {!proto.lnrpc.HTLCAttempt.HTLCStatus} value - * @return {!proto.lnrpc.HTLCAttempt} returns this - */ -proto.lnrpc.HTLCAttempt.prototype.setStatus = function(value) { - return jspb.Message.setProto3EnumField(this, 1, value); -}; - - -/** - * optional Route route = 2; - * @return {?proto.lnrpc.Route} - */ -proto.lnrpc.HTLCAttempt.prototype.getRoute = function() { - return /** @type{?proto.lnrpc.Route} */ ( - jspb.Message.getWrapperField(this, proto.lnrpc.Route, 2)); -}; - - -/** - * @param {?proto.lnrpc.Route|undefined} value - * @return {!proto.lnrpc.HTLCAttempt} returns this -*/ -proto.lnrpc.HTLCAttempt.prototype.setRoute = function(value) { - return jspb.Message.setWrapperField(this, 2, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.lnrpc.HTLCAttempt} returns this - */ -proto.lnrpc.HTLCAttempt.prototype.clearRoute = function() { - return this.setRoute(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.lnrpc.HTLCAttempt.prototype.hasRoute = function() { - return jspb.Message.getField(this, 2) != null; -}; - - -/** - * optional int64 attempt_time_ns = 3; - * @return {number} - */ -proto.lnrpc.HTLCAttempt.prototype.getAttemptTimeNs = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.HTLCAttempt} returns this - */ -proto.lnrpc.HTLCAttempt.prototype.setAttemptTimeNs = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - -/** - * optional int64 resolve_time_ns = 4; - * @return {number} - */ -proto.lnrpc.HTLCAttempt.prototype.getResolveTimeNs = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.HTLCAttempt} returns this - */ -proto.lnrpc.HTLCAttempt.prototype.setResolveTimeNs = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); -}; - - -/** - * optional Failure failure = 5; - * @return {?proto.lnrpc.Failure} - */ -proto.lnrpc.HTLCAttempt.prototype.getFailure = function() { - return /** @type{?proto.lnrpc.Failure} */ ( - jspb.Message.getWrapperField(this, proto.lnrpc.Failure, 5)); -}; - - -/** - * @param {?proto.lnrpc.Failure|undefined} value - * @return {!proto.lnrpc.HTLCAttempt} returns this -*/ -proto.lnrpc.HTLCAttempt.prototype.setFailure = function(value) { - return jspb.Message.setWrapperField(this, 5, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.lnrpc.HTLCAttempt} returns this - */ -proto.lnrpc.HTLCAttempt.prototype.clearFailure = function() { - return this.setFailure(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.lnrpc.HTLCAttempt.prototype.hasFailure = function() { - return jspb.Message.getField(this, 5) != null; -}; - - -/** - * optional bytes preimage = 6; - * @return {!(string|Uint8Array)} - */ -proto.lnrpc.HTLCAttempt.prototype.getPreimage = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 6, "")); -}; - - -/** - * optional bytes preimage = 6; - * This is a type-conversion wrapper around `getPreimage()` - * @return {string} - */ -proto.lnrpc.HTLCAttempt.prototype.getPreimage_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getPreimage())); -}; - - -/** - * optional bytes preimage = 6; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getPreimage()` - * @return {!Uint8Array} - */ -proto.lnrpc.HTLCAttempt.prototype.getPreimage_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getPreimage())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.lnrpc.HTLCAttempt} returns this - */ -proto.lnrpc.HTLCAttempt.prototype.setPreimage = function(value) { - return jspb.Message.setProto3BytesField(this, 6, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.ListPaymentsRequest.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.ListPaymentsRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.ListPaymentsRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.ListPaymentsRequest.toObject = function(includeInstance, msg) { - var f, obj = { - includeIncomplete: jspb.Message.getBooleanFieldWithDefault(msg, 1, false), - indexOffset: jspb.Message.getFieldWithDefault(msg, 2, 0), - maxPayments: jspb.Message.getFieldWithDefault(msg, 3, 0), - reversed: jspb.Message.getBooleanFieldWithDefault(msg, 4, false) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.ListPaymentsRequest} - */ -proto.lnrpc.ListPaymentsRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.ListPaymentsRequest; - return proto.lnrpc.ListPaymentsRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.ListPaymentsRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.ListPaymentsRequest} - */ -proto.lnrpc.ListPaymentsRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setIncludeIncomplete(value); - break; - case 2: - var value = /** @type {number} */ (reader.readUint64()); - msg.setIndexOffset(value); - break; - case 3: - var value = /** @type {number} */ (reader.readUint64()); - msg.setMaxPayments(value); - break; - case 4: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setReversed(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.ListPaymentsRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.ListPaymentsRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.ListPaymentsRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.ListPaymentsRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getIncludeIncomplete(); - if (f) { - writer.writeBool( - 1, - f - ); - } - f = message.getIndexOffset(); - if (f !== 0) { - writer.writeUint64( - 2, - f - ); - } - f = message.getMaxPayments(); - if (f !== 0) { - writer.writeUint64( - 3, - f - ); - } - f = message.getReversed(); - if (f) { - writer.writeBool( - 4, - f - ); - } -}; - - -/** - * optional bool include_incomplete = 1; - * @return {boolean} - */ -proto.lnrpc.ListPaymentsRequest.prototype.getIncludeIncomplete = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.lnrpc.ListPaymentsRequest} returns this - */ -proto.lnrpc.ListPaymentsRequest.prototype.setIncludeIncomplete = function(value) { - return jspb.Message.setProto3BooleanField(this, 1, value); -}; - - -/** - * optional uint64 index_offset = 2; - * @return {number} - */ -proto.lnrpc.ListPaymentsRequest.prototype.getIndexOffset = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.ListPaymentsRequest} returns this - */ -proto.lnrpc.ListPaymentsRequest.prototype.setIndexOffset = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * optional uint64 max_payments = 3; - * @return {number} - */ -proto.lnrpc.ListPaymentsRequest.prototype.getMaxPayments = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.ListPaymentsRequest} returns this - */ -proto.lnrpc.ListPaymentsRequest.prototype.setMaxPayments = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - -/** - * optional bool reversed = 4; - * @return {boolean} - */ -proto.lnrpc.ListPaymentsRequest.prototype.getReversed = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 4, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.lnrpc.ListPaymentsRequest} returns this - */ -proto.lnrpc.ListPaymentsRequest.prototype.setReversed = function(value) { - return jspb.Message.setProto3BooleanField(this, 4, value); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.lnrpc.ListPaymentsResponse.repeatedFields_ = [1]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.ListPaymentsResponse.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.ListPaymentsResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.ListPaymentsResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.ListPaymentsResponse.toObject = function(includeInstance, msg) { - var f, obj = { - paymentsList: jspb.Message.toObjectList(msg.getPaymentsList(), - proto.lnrpc.Payment.toObject, includeInstance), - firstIndexOffset: jspb.Message.getFieldWithDefault(msg, 2, 0), - lastIndexOffset: jspb.Message.getFieldWithDefault(msg, 3, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.ListPaymentsResponse} - */ -proto.lnrpc.ListPaymentsResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.ListPaymentsResponse; - return proto.lnrpc.ListPaymentsResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.ListPaymentsResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.ListPaymentsResponse} - */ -proto.lnrpc.ListPaymentsResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.lnrpc.Payment; - reader.readMessage(value,proto.lnrpc.Payment.deserializeBinaryFromReader); - msg.addPayments(value); - break; - case 2: - var value = /** @type {number} */ (reader.readUint64()); - msg.setFirstIndexOffset(value); - break; - case 3: - var value = /** @type {number} */ (reader.readUint64()); - msg.setLastIndexOffset(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.ListPaymentsResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.ListPaymentsResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.ListPaymentsResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.ListPaymentsResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getPaymentsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 1, - f, - proto.lnrpc.Payment.serializeBinaryToWriter - ); - } - f = message.getFirstIndexOffset(); - if (f !== 0) { - writer.writeUint64( - 2, - f - ); - } - f = message.getLastIndexOffset(); - if (f !== 0) { - writer.writeUint64( - 3, - f - ); - } -}; - - -/** - * repeated Payment payments = 1; - * @return {!Array} - */ -proto.lnrpc.ListPaymentsResponse.prototype.getPaymentsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.Payment, 1)); -}; - - -/** - * @param {!Array} value - * @return {!proto.lnrpc.ListPaymentsResponse} returns this -*/ -proto.lnrpc.ListPaymentsResponse.prototype.setPaymentsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); -}; - - -/** - * @param {!proto.lnrpc.Payment=} opt_value - * @param {number=} opt_index - * @return {!proto.lnrpc.Payment} - */ -proto.lnrpc.ListPaymentsResponse.prototype.addPayments = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.lnrpc.Payment, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.lnrpc.ListPaymentsResponse} returns this - */ -proto.lnrpc.ListPaymentsResponse.prototype.clearPaymentsList = function() { - return this.setPaymentsList([]); -}; - - -/** - * optional uint64 first_index_offset = 2; - * @return {number} - */ -proto.lnrpc.ListPaymentsResponse.prototype.getFirstIndexOffset = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.ListPaymentsResponse} returns this - */ -proto.lnrpc.ListPaymentsResponse.prototype.setFirstIndexOffset = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * optional uint64 last_index_offset = 3; - * @return {number} - */ -proto.lnrpc.ListPaymentsResponse.prototype.getLastIndexOffset = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.ListPaymentsResponse} returns this - */ -proto.lnrpc.ListPaymentsResponse.prototype.setLastIndexOffset = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.DeletePaymentRequest.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.DeletePaymentRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.DeletePaymentRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.DeletePaymentRequest.toObject = function(includeInstance, msg) { - var f, obj = { - paymentHash: msg.getPaymentHash_asB64(), - failedHtlcsOnly: jspb.Message.getBooleanFieldWithDefault(msg, 2, false) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.DeletePaymentRequest} - */ -proto.lnrpc.DeletePaymentRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.DeletePaymentRequest; - return proto.lnrpc.DeletePaymentRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.DeletePaymentRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.DeletePaymentRequest} - */ -proto.lnrpc.DeletePaymentRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setPaymentHash(value); - break; - case 2: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setFailedHtlcsOnly(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.DeletePaymentRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.DeletePaymentRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.DeletePaymentRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.DeletePaymentRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getPaymentHash_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getFailedHtlcsOnly(); - if (f) { - writer.writeBool( - 2, - f - ); - } -}; - - -/** - * optional bytes payment_hash = 1; - * @return {!(string|Uint8Array)} - */ -proto.lnrpc.DeletePaymentRequest.prototype.getPaymentHash = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes payment_hash = 1; - * This is a type-conversion wrapper around `getPaymentHash()` - * @return {string} - */ -proto.lnrpc.DeletePaymentRequest.prototype.getPaymentHash_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getPaymentHash())); -}; - - -/** - * optional bytes payment_hash = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getPaymentHash()` - * @return {!Uint8Array} - */ -proto.lnrpc.DeletePaymentRequest.prototype.getPaymentHash_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getPaymentHash())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.lnrpc.DeletePaymentRequest} returns this - */ -proto.lnrpc.DeletePaymentRequest.prototype.setPaymentHash = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional bool failed_htlcs_only = 2; - * @return {boolean} - */ -proto.lnrpc.DeletePaymentRequest.prototype.getFailedHtlcsOnly = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.lnrpc.DeletePaymentRequest} returns this - */ -proto.lnrpc.DeletePaymentRequest.prototype.setFailedHtlcsOnly = function(value) { - return jspb.Message.setProto3BooleanField(this, 2, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.DeleteAllPaymentsRequest.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.DeleteAllPaymentsRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.DeleteAllPaymentsRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.DeleteAllPaymentsRequest.toObject = function(includeInstance, msg) { - var f, obj = { - failedPaymentsOnly: jspb.Message.getBooleanFieldWithDefault(msg, 1, false), - failedHtlcsOnly: jspb.Message.getBooleanFieldWithDefault(msg, 2, false) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.DeleteAllPaymentsRequest} - */ -proto.lnrpc.DeleteAllPaymentsRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.DeleteAllPaymentsRequest; - return proto.lnrpc.DeleteAllPaymentsRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.DeleteAllPaymentsRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.DeleteAllPaymentsRequest} - */ -proto.lnrpc.DeleteAllPaymentsRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setFailedPaymentsOnly(value); - break; - case 2: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setFailedHtlcsOnly(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.DeleteAllPaymentsRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.DeleteAllPaymentsRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.DeleteAllPaymentsRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.DeleteAllPaymentsRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getFailedPaymentsOnly(); - if (f) { - writer.writeBool( - 1, - f - ); - } - f = message.getFailedHtlcsOnly(); - if (f) { - writer.writeBool( - 2, - f - ); - } -}; - - -/** - * optional bool failed_payments_only = 1; - * @return {boolean} - */ -proto.lnrpc.DeleteAllPaymentsRequest.prototype.getFailedPaymentsOnly = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.lnrpc.DeleteAllPaymentsRequest} returns this - */ -proto.lnrpc.DeleteAllPaymentsRequest.prototype.setFailedPaymentsOnly = function(value) { - return jspb.Message.setProto3BooleanField(this, 1, value); -}; - - -/** - * optional bool failed_htlcs_only = 2; - * @return {boolean} - */ -proto.lnrpc.DeleteAllPaymentsRequest.prototype.getFailedHtlcsOnly = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.lnrpc.DeleteAllPaymentsRequest} returns this - */ -proto.lnrpc.DeleteAllPaymentsRequest.prototype.setFailedHtlcsOnly = function(value) { - return jspb.Message.setProto3BooleanField(this, 2, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.DeletePaymentResponse.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.DeletePaymentResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.DeletePaymentResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.DeletePaymentResponse.toObject = function(includeInstance, msg) { - var f, obj = { - - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.DeletePaymentResponse} - */ -proto.lnrpc.DeletePaymentResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.DeletePaymentResponse; - return proto.lnrpc.DeletePaymentResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.DeletePaymentResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.DeletePaymentResponse} - */ -proto.lnrpc.DeletePaymentResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.DeletePaymentResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.DeletePaymentResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.DeletePaymentResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.DeletePaymentResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.DeleteAllPaymentsResponse.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.DeleteAllPaymentsResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.DeleteAllPaymentsResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.DeleteAllPaymentsResponse.toObject = function(includeInstance, msg) { - var f, obj = { - - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.DeleteAllPaymentsResponse} - */ -proto.lnrpc.DeleteAllPaymentsResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.DeleteAllPaymentsResponse; - return proto.lnrpc.DeleteAllPaymentsResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.DeleteAllPaymentsResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.DeleteAllPaymentsResponse} - */ -proto.lnrpc.DeleteAllPaymentsResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.DeleteAllPaymentsResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.DeleteAllPaymentsResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.DeleteAllPaymentsResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.DeleteAllPaymentsResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.AbandonChannelRequest.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.AbandonChannelRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.AbandonChannelRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.AbandonChannelRequest.toObject = function(includeInstance, msg) { - var f, obj = { - channelPoint: (f = msg.getChannelPoint()) && proto.lnrpc.ChannelPoint.toObject(includeInstance, f), - pendingFundingShimOnly: jspb.Message.getBooleanFieldWithDefault(msg, 2, false), - iKnowWhatIAmDoing: jspb.Message.getBooleanFieldWithDefault(msg, 3, false) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.AbandonChannelRequest} - */ -proto.lnrpc.AbandonChannelRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.AbandonChannelRequest; - return proto.lnrpc.AbandonChannelRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.AbandonChannelRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.AbandonChannelRequest} - */ -proto.lnrpc.AbandonChannelRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.lnrpc.ChannelPoint; - reader.readMessage(value,proto.lnrpc.ChannelPoint.deserializeBinaryFromReader); - msg.setChannelPoint(value); - break; - case 2: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setPendingFundingShimOnly(value); - break; - case 3: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setIKnowWhatIAmDoing(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.AbandonChannelRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.AbandonChannelRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.AbandonChannelRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.AbandonChannelRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getChannelPoint(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.lnrpc.ChannelPoint.serializeBinaryToWriter - ); - } - f = message.getPendingFundingShimOnly(); - if (f) { - writer.writeBool( - 2, - f - ); - } - f = message.getIKnowWhatIAmDoing(); - if (f) { - writer.writeBool( - 3, - f - ); - } -}; - - -/** - * optional ChannelPoint channel_point = 1; - * @return {?proto.lnrpc.ChannelPoint} - */ -proto.lnrpc.AbandonChannelRequest.prototype.getChannelPoint = function() { - return /** @type{?proto.lnrpc.ChannelPoint} */ ( - jspb.Message.getWrapperField(this, proto.lnrpc.ChannelPoint, 1)); -}; - - -/** - * @param {?proto.lnrpc.ChannelPoint|undefined} value - * @return {!proto.lnrpc.AbandonChannelRequest} returns this -*/ -proto.lnrpc.AbandonChannelRequest.prototype.setChannelPoint = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.lnrpc.AbandonChannelRequest} returns this - */ -proto.lnrpc.AbandonChannelRequest.prototype.clearChannelPoint = function() { - return this.setChannelPoint(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.lnrpc.AbandonChannelRequest.prototype.hasChannelPoint = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional bool pending_funding_shim_only = 2; - * @return {boolean} - */ -proto.lnrpc.AbandonChannelRequest.prototype.getPendingFundingShimOnly = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.lnrpc.AbandonChannelRequest} returns this - */ -proto.lnrpc.AbandonChannelRequest.prototype.setPendingFundingShimOnly = function(value) { - return jspb.Message.setProto3BooleanField(this, 2, value); -}; - - -/** - * optional bool i_know_what_i_am_doing = 3; - * @return {boolean} - */ -proto.lnrpc.AbandonChannelRequest.prototype.getIKnowWhatIAmDoing = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.lnrpc.AbandonChannelRequest} returns this - */ -proto.lnrpc.AbandonChannelRequest.prototype.setIKnowWhatIAmDoing = function(value) { - return jspb.Message.setProto3BooleanField(this, 3, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.AbandonChannelResponse.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.AbandonChannelResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.AbandonChannelResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.AbandonChannelResponse.toObject = function(includeInstance, msg) { - var f, obj = { - - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.AbandonChannelResponse} - */ -proto.lnrpc.AbandonChannelResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.AbandonChannelResponse; - return proto.lnrpc.AbandonChannelResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.AbandonChannelResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.AbandonChannelResponse} - */ -proto.lnrpc.AbandonChannelResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.AbandonChannelResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.AbandonChannelResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.AbandonChannelResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.AbandonChannelResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.DebugLevelRequest.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.DebugLevelRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.DebugLevelRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.DebugLevelRequest.toObject = function(includeInstance, msg) { - var f, obj = { - show: jspb.Message.getBooleanFieldWithDefault(msg, 1, false), - levelSpec: jspb.Message.getFieldWithDefault(msg, 2, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.DebugLevelRequest} - */ -proto.lnrpc.DebugLevelRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.DebugLevelRequest; - return proto.lnrpc.DebugLevelRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.DebugLevelRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.DebugLevelRequest} - */ -proto.lnrpc.DebugLevelRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setShow(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setLevelSpec(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.DebugLevelRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.DebugLevelRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.DebugLevelRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.DebugLevelRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getShow(); - if (f) { - writer.writeBool( - 1, - f - ); - } - f = message.getLevelSpec(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } -}; - - -/** - * optional bool show = 1; - * @return {boolean} - */ -proto.lnrpc.DebugLevelRequest.prototype.getShow = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.lnrpc.DebugLevelRequest} returns this - */ -proto.lnrpc.DebugLevelRequest.prototype.setShow = function(value) { - return jspb.Message.setProto3BooleanField(this, 1, value); -}; - - -/** - * optional string level_spec = 2; - * @return {string} - */ -proto.lnrpc.DebugLevelRequest.prototype.getLevelSpec = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.lnrpc.DebugLevelRequest} returns this - */ -proto.lnrpc.DebugLevelRequest.prototype.setLevelSpec = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.DebugLevelResponse.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.DebugLevelResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.DebugLevelResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.DebugLevelResponse.toObject = function(includeInstance, msg) { - var f, obj = { - subSystems: jspb.Message.getFieldWithDefault(msg, 1, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.DebugLevelResponse} - */ -proto.lnrpc.DebugLevelResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.DebugLevelResponse; - return proto.lnrpc.DebugLevelResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.DebugLevelResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.DebugLevelResponse} - */ -proto.lnrpc.DebugLevelResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setSubSystems(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.DebugLevelResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.DebugLevelResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.DebugLevelResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.DebugLevelResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getSubSystems(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } -}; - - -/** - * optional string sub_systems = 1; - * @return {string} - */ -proto.lnrpc.DebugLevelResponse.prototype.getSubSystems = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.lnrpc.DebugLevelResponse} returns this - */ -proto.lnrpc.DebugLevelResponse.prototype.setSubSystems = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.PayReqString.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.PayReqString.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.PayReqString} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.PayReqString.toObject = function(includeInstance, msg) { - var f, obj = { - payReq: jspb.Message.getFieldWithDefault(msg, 1, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.PayReqString} - */ -proto.lnrpc.PayReqString.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.PayReqString; - return proto.lnrpc.PayReqString.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.PayReqString} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.PayReqString} - */ -proto.lnrpc.PayReqString.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setPayReq(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.PayReqString.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.PayReqString.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.PayReqString} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.PayReqString.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getPayReq(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } -}; - - -/** - * optional string pay_req = 1; - * @return {string} - */ -proto.lnrpc.PayReqString.prototype.getPayReq = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.lnrpc.PayReqString} returns this - */ -proto.lnrpc.PayReqString.prototype.setPayReq = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.lnrpc.PayReq.repeatedFields_ = [10]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.PayReq.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.PayReq.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.PayReq} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.PayReq.toObject = function(includeInstance, msg) { - var f, obj = { - destination: jspb.Message.getFieldWithDefault(msg, 1, ""), - paymentHash: jspb.Message.getFieldWithDefault(msg, 2, ""), - numSatoshis: jspb.Message.getFieldWithDefault(msg, 3, 0), - timestamp: jspb.Message.getFieldWithDefault(msg, 4, 0), - expiry: jspb.Message.getFieldWithDefault(msg, 5, 0), - description: jspb.Message.getFieldWithDefault(msg, 6, ""), - descriptionHash: jspb.Message.getFieldWithDefault(msg, 7, ""), - fallbackAddr: jspb.Message.getFieldWithDefault(msg, 8, ""), - cltvExpiry: jspb.Message.getFieldWithDefault(msg, 9, 0), - routeHintsList: jspb.Message.toObjectList(msg.getRouteHintsList(), - proto.lnrpc.RouteHint.toObject, includeInstance), - paymentAddr: msg.getPaymentAddr_asB64(), - numMsat: jspb.Message.getFieldWithDefault(msg, 12, 0), - featuresMap: (f = msg.getFeaturesMap()) ? f.toObject(includeInstance, proto.lnrpc.Feature.toObject) : [] - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.PayReq} - */ -proto.lnrpc.PayReq.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.PayReq; - return proto.lnrpc.PayReq.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.PayReq} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.PayReq} - */ -proto.lnrpc.PayReq.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setDestination(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setPaymentHash(value); - break; - case 3: - var value = /** @type {number} */ (reader.readInt64()); - msg.setNumSatoshis(value); - break; - case 4: - var value = /** @type {number} */ (reader.readInt64()); - msg.setTimestamp(value); - break; - case 5: - var value = /** @type {number} */ (reader.readInt64()); - msg.setExpiry(value); - break; - case 6: - var value = /** @type {string} */ (reader.readString()); - msg.setDescription(value); - break; - case 7: - var value = /** @type {string} */ (reader.readString()); - msg.setDescriptionHash(value); - break; - case 8: - var value = /** @type {string} */ (reader.readString()); - msg.setFallbackAddr(value); - break; - case 9: - var value = /** @type {number} */ (reader.readInt64()); - msg.setCltvExpiry(value); - break; - case 10: - var value = new proto.lnrpc.RouteHint; - reader.readMessage(value,proto.lnrpc.RouteHint.deserializeBinaryFromReader); - msg.addRouteHints(value); - break; - case 11: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setPaymentAddr(value); - break; - case 12: - var value = /** @type {number} */ (reader.readInt64()); - msg.setNumMsat(value); - break; - case 13: - var value = msg.getFeaturesMap(); - reader.readMessage(value, function(message, reader) { - jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readUint32, jspb.BinaryReader.prototype.readMessage, proto.lnrpc.Feature.deserializeBinaryFromReader, 0, new proto.lnrpc.Feature()); - }); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.PayReq.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.PayReq.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.PayReq} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.PayReq.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getDestination(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getPaymentHash(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getNumSatoshis(); - if (f !== 0) { - writer.writeInt64( - 3, - f - ); - } - f = message.getTimestamp(); - if (f !== 0) { - writer.writeInt64( - 4, - f - ); - } - f = message.getExpiry(); - if (f !== 0) { - writer.writeInt64( - 5, - f - ); - } - f = message.getDescription(); - if (f.length > 0) { - writer.writeString( - 6, - f - ); - } - f = message.getDescriptionHash(); - if (f.length > 0) { - writer.writeString( - 7, - f - ); - } - f = message.getFallbackAddr(); - if (f.length > 0) { - writer.writeString( - 8, - f - ); - } - f = message.getCltvExpiry(); - if (f !== 0) { - writer.writeInt64( - 9, - f - ); - } - f = message.getRouteHintsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 10, - f, - proto.lnrpc.RouteHint.serializeBinaryToWriter - ); - } - f = message.getPaymentAddr_asU8(); - if (f.length > 0) { - writer.writeBytes( - 11, - f - ); - } - f = message.getNumMsat(); - if (f !== 0) { - writer.writeInt64( - 12, - f - ); - } - f = message.getFeaturesMap(true); - if (f && f.getLength() > 0) { - f.serializeBinary(13, writer, jspb.BinaryWriter.prototype.writeUint32, jspb.BinaryWriter.prototype.writeMessage, proto.lnrpc.Feature.serializeBinaryToWriter); - } -}; - - -/** - * optional string destination = 1; - * @return {string} - */ -proto.lnrpc.PayReq.prototype.getDestination = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.lnrpc.PayReq} returns this - */ -proto.lnrpc.PayReq.prototype.setDestination = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional string payment_hash = 2; - * @return {string} - */ -proto.lnrpc.PayReq.prototype.getPaymentHash = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.lnrpc.PayReq} returns this - */ -proto.lnrpc.PayReq.prototype.setPaymentHash = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional int64 num_satoshis = 3; - * @return {number} - */ -proto.lnrpc.PayReq.prototype.getNumSatoshis = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.PayReq} returns this - */ -proto.lnrpc.PayReq.prototype.setNumSatoshis = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - -/** - * optional int64 timestamp = 4; - * @return {number} - */ -proto.lnrpc.PayReq.prototype.getTimestamp = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.PayReq} returns this - */ -proto.lnrpc.PayReq.prototype.setTimestamp = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); -}; - - -/** - * optional int64 expiry = 5; - * @return {number} - */ -proto.lnrpc.PayReq.prototype.getExpiry = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.PayReq} returns this - */ -proto.lnrpc.PayReq.prototype.setExpiry = function(value) { - return jspb.Message.setProto3IntField(this, 5, value); -}; - - -/** - * optional string description = 6; - * @return {string} - */ -proto.lnrpc.PayReq.prototype.getDescription = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); -}; - - -/** - * @param {string} value - * @return {!proto.lnrpc.PayReq} returns this - */ -proto.lnrpc.PayReq.prototype.setDescription = function(value) { - return jspb.Message.setProto3StringField(this, 6, value); -}; - - -/** - * optional string description_hash = 7; - * @return {string} - */ -proto.lnrpc.PayReq.prototype.getDescriptionHash = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); -}; - - -/** - * @param {string} value - * @return {!proto.lnrpc.PayReq} returns this - */ -proto.lnrpc.PayReq.prototype.setDescriptionHash = function(value) { - return jspb.Message.setProto3StringField(this, 7, value); -}; - - -/** - * optional string fallback_addr = 8; - * @return {string} - */ -proto.lnrpc.PayReq.prototype.getFallbackAddr = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, "")); -}; - - -/** - * @param {string} value - * @return {!proto.lnrpc.PayReq} returns this - */ -proto.lnrpc.PayReq.prototype.setFallbackAddr = function(value) { - return jspb.Message.setProto3StringField(this, 8, value); -}; - - -/** - * optional int64 cltv_expiry = 9; - * @return {number} - */ -proto.lnrpc.PayReq.prototype.getCltvExpiry = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.PayReq} returns this - */ -proto.lnrpc.PayReq.prototype.setCltvExpiry = function(value) { - return jspb.Message.setProto3IntField(this, 9, value); -}; - - -/** - * repeated RouteHint route_hints = 10; - * @return {!Array} - */ -proto.lnrpc.PayReq.prototype.getRouteHintsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.RouteHint, 10)); -}; - - -/** - * @param {!Array} value - * @return {!proto.lnrpc.PayReq} returns this -*/ -proto.lnrpc.PayReq.prototype.setRouteHintsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 10, value); -}; - - -/** - * @param {!proto.lnrpc.RouteHint=} opt_value - * @param {number=} opt_index - * @return {!proto.lnrpc.RouteHint} - */ -proto.lnrpc.PayReq.prototype.addRouteHints = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 10, opt_value, proto.lnrpc.RouteHint, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.lnrpc.PayReq} returns this - */ -proto.lnrpc.PayReq.prototype.clearRouteHintsList = function() { - return this.setRouteHintsList([]); -}; - - -/** - * optional bytes payment_addr = 11; - * @return {!(string|Uint8Array)} - */ -proto.lnrpc.PayReq.prototype.getPaymentAddr = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 11, "")); -}; - - -/** - * optional bytes payment_addr = 11; - * This is a type-conversion wrapper around `getPaymentAddr()` - * @return {string} - */ -proto.lnrpc.PayReq.prototype.getPaymentAddr_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getPaymentAddr())); -}; - - -/** - * optional bytes payment_addr = 11; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getPaymentAddr()` - * @return {!Uint8Array} - */ -proto.lnrpc.PayReq.prototype.getPaymentAddr_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getPaymentAddr())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.lnrpc.PayReq} returns this - */ -proto.lnrpc.PayReq.prototype.setPaymentAddr = function(value) { - return jspb.Message.setProto3BytesField(this, 11, value); -}; - - -/** - * optional int64 num_msat = 12; - * @return {number} - */ -proto.lnrpc.PayReq.prototype.getNumMsat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 12, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.PayReq} returns this - */ -proto.lnrpc.PayReq.prototype.setNumMsat = function(value) { - return jspb.Message.setProto3IntField(this, 12, value); -}; - - -/** - * map features = 13; - * @param {boolean=} opt_noLazyCreate Do not create the map if - * empty, instead returning `undefined` - * @return {!jspb.Map} - */ -proto.lnrpc.PayReq.prototype.getFeaturesMap = function(opt_noLazyCreate) { - return /** @type {!jspb.Map} */ ( - jspb.Message.getMapField(this, 13, opt_noLazyCreate, - proto.lnrpc.Feature)); -}; - - -/** - * Clears values from the map. The map will be non-null. - * @return {!proto.lnrpc.PayReq} returns this - */ -proto.lnrpc.PayReq.prototype.clearFeaturesMap = function() { - this.getFeaturesMap().clear(); - return this;}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.Feature.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.Feature.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.Feature} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.Feature.toObject = function(includeInstance, msg) { - var f, obj = { - name: jspb.Message.getFieldWithDefault(msg, 2, ""), - isRequired: jspb.Message.getBooleanFieldWithDefault(msg, 3, false), - isKnown: jspb.Message.getBooleanFieldWithDefault(msg, 4, false) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.Feature} - */ -proto.lnrpc.Feature.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.Feature; - return proto.lnrpc.Feature.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.Feature} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.Feature} - */ -proto.lnrpc.Feature.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setName(value); - break; - case 3: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setIsRequired(value); - break; - case 4: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setIsKnown(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.Feature.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.Feature.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.Feature} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.Feature.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getName(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getIsRequired(); - if (f) { - writer.writeBool( - 3, - f - ); - } - f = message.getIsKnown(); - if (f) { - writer.writeBool( - 4, - f - ); - } -}; - - -/** - * optional string name = 2; - * @return {string} - */ -proto.lnrpc.Feature.prototype.getName = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.lnrpc.Feature} returns this - */ -proto.lnrpc.Feature.prototype.setName = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional bool is_required = 3; - * @return {boolean} - */ -proto.lnrpc.Feature.prototype.getIsRequired = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.lnrpc.Feature} returns this - */ -proto.lnrpc.Feature.prototype.setIsRequired = function(value) { - return jspb.Message.setProto3BooleanField(this, 3, value); -}; - - -/** - * optional bool is_known = 4; - * @return {boolean} - */ -proto.lnrpc.Feature.prototype.getIsKnown = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 4, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.lnrpc.Feature} returns this - */ -proto.lnrpc.Feature.prototype.setIsKnown = function(value) { - return jspb.Message.setProto3BooleanField(this, 4, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.FeeReportRequest.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.FeeReportRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.FeeReportRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.FeeReportRequest.toObject = function(includeInstance, msg) { - var f, obj = { - - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.FeeReportRequest} - */ -proto.lnrpc.FeeReportRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.FeeReportRequest; - return proto.lnrpc.FeeReportRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.FeeReportRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.FeeReportRequest} - */ -proto.lnrpc.FeeReportRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.FeeReportRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.FeeReportRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.FeeReportRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.FeeReportRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.ChannelFeeReport.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.ChannelFeeReport.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.ChannelFeeReport} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.ChannelFeeReport.toObject = function(includeInstance, msg) { - var f, obj = { - chanId: jspb.Message.getFieldWithDefault(msg, 5, "0"), - channelPoint: jspb.Message.getFieldWithDefault(msg, 1, ""), - baseFeeMsat: jspb.Message.getFieldWithDefault(msg, 2, 0), - feePerMil: jspb.Message.getFieldWithDefault(msg, 3, 0), - feeRate: jspb.Message.getFloatingPointFieldWithDefault(msg, 4, 0.0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.ChannelFeeReport} - */ -proto.lnrpc.ChannelFeeReport.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.ChannelFeeReport; - return proto.lnrpc.ChannelFeeReport.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.ChannelFeeReport} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.ChannelFeeReport} - */ -proto.lnrpc.ChannelFeeReport.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 5: - var value = /** @type {string} */ (reader.readUint64String()); - msg.setChanId(value); - break; - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setChannelPoint(value); - break; - case 2: - var value = /** @type {number} */ (reader.readInt64()); - msg.setBaseFeeMsat(value); - break; - case 3: - var value = /** @type {number} */ (reader.readInt64()); - msg.setFeePerMil(value); - break; - case 4: - var value = /** @type {number} */ (reader.readDouble()); - msg.setFeeRate(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.ChannelFeeReport.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.ChannelFeeReport.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.ChannelFeeReport} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.ChannelFeeReport.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getChanId(); - if (parseInt(f, 10) !== 0) { - writer.writeUint64String( - 5, - f - ); - } - f = message.getChannelPoint(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getBaseFeeMsat(); - if (f !== 0) { - writer.writeInt64( - 2, - f - ); - } - f = message.getFeePerMil(); - if (f !== 0) { - writer.writeInt64( - 3, - f - ); - } - f = message.getFeeRate(); - if (f !== 0.0) { - writer.writeDouble( - 4, - f - ); - } -}; - - -/** - * optional uint64 chan_id = 5; - * @return {string} - */ -proto.lnrpc.ChannelFeeReport.prototype.getChanId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "0")); -}; - - -/** - * @param {string} value - * @return {!proto.lnrpc.ChannelFeeReport} returns this - */ -proto.lnrpc.ChannelFeeReport.prototype.setChanId = function(value) { - return jspb.Message.setProto3StringIntField(this, 5, value); -}; - - -/** - * optional string channel_point = 1; - * @return {string} - */ -proto.lnrpc.ChannelFeeReport.prototype.getChannelPoint = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.lnrpc.ChannelFeeReport} returns this - */ -proto.lnrpc.ChannelFeeReport.prototype.setChannelPoint = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional int64 base_fee_msat = 2; - * @return {number} - */ -proto.lnrpc.ChannelFeeReport.prototype.getBaseFeeMsat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.ChannelFeeReport} returns this - */ -proto.lnrpc.ChannelFeeReport.prototype.setBaseFeeMsat = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * optional int64 fee_per_mil = 3; - * @return {number} - */ -proto.lnrpc.ChannelFeeReport.prototype.getFeePerMil = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.ChannelFeeReport} returns this - */ -proto.lnrpc.ChannelFeeReport.prototype.setFeePerMil = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - -/** - * optional double fee_rate = 4; - * @return {number} - */ -proto.lnrpc.ChannelFeeReport.prototype.getFeeRate = function() { - return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 4, 0.0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.ChannelFeeReport} returns this - */ -proto.lnrpc.ChannelFeeReport.prototype.setFeeRate = function(value) { - return jspb.Message.setProto3FloatField(this, 4, value); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.lnrpc.FeeReportResponse.repeatedFields_ = [1]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.FeeReportResponse.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.FeeReportResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.FeeReportResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.FeeReportResponse.toObject = function(includeInstance, msg) { - var f, obj = { - channelFeesList: jspb.Message.toObjectList(msg.getChannelFeesList(), - proto.lnrpc.ChannelFeeReport.toObject, includeInstance), - dayFeeSum: jspb.Message.getFieldWithDefault(msg, 2, 0), - weekFeeSum: jspb.Message.getFieldWithDefault(msg, 3, 0), - monthFeeSum: jspb.Message.getFieldWithDefault(msg, 4, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.FeeReportResponse} - */ -proto.lnrpc.FeeReportResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.FeeReportResponse; - return proto.lnrpc.FeeReportResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.FeeReportResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.FeeReportResponse} - */ -proto.lnrpc.FeeReportResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.lnrpc.ChannelFeeReport; - reader.readMessage(value,proto.lnrpc.ChannelFeeReport.deserializeBinaryFromReader); - msg.addChannelFees(value); - break; - case 2: - var value = /** @type {number} */ (reader.readUint64()); - msg.setDayFeeSum(value); - break; - case 3: - var value = /** @type {number} */ (reader.readUint64()); - msg.setWeekFeeSum(value); - break; - case 4: - var value = /** @type {number} */ (reader.readUint64()); - msg.setMonthFeeSum(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.FeeReportResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.FeeReportResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.FeeReportResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.FeeReportResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getChannelFeesList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 1, - f, - proto.lnrpc.ChannelFeeReport.serializeBinaryToWriter - ); - } - f = message.getDayFeeSum(); - if (f !== 0) { - writer.writeUint64( - 2, - f - ); - } - f = message.getWeekFeeSum(); - if (f !== 0) { - writer.writeUint64( - 3, - f - ); - } - f = message.getMonthFeeSum(); - if (f !== 0) { - writer.writeUint64( - 4, - f - ); - } -}; - - -/** - * repeated ChannelFeeReport channel_fees = 1; - * @return {!Array} - */ -proto.lnrpc.FeeReportResponse.prototype.getChannelFeesList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.ChannelFeeReport, 1)); -}; - - -/** - * @param {!Array} value - * @return {!proto.lnrpc.FeeReportResponse} returns this -*/ -proto.lnrpc.FeeReportResponse.prototype.setChannelFeesList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); -}; - - -/** - * @param {!proto.lnrpc.ChannelFeeReport=} opt_value - * @param {number=} opt_index - * @return {!proto.lnrpc.ChannelFeeReport} - */ -proto.lnrpc.FeeReportResponse.prototype.addChannelFees = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.lnrpc.ChannelFeeReport, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.lnrpc.FeeReportResponse} returns this - */ -proto.lnrpc.FeeReportResponse.prototype.clearChannelFeesList = function() { - return this.setChannelFeesList([]); -}; - - -/** - * optional uint64 day_fee_sum = 2; - * @return {number} - */ -proto.lnrpc.FeeReportResponse.prototype.getDayFeeSum = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.FeeReportResponse} returns this - */ -proto.lnrpc.FeeReportResponse.prototype.setDayFeeSum = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * optional uint64 week_fee_sum = 3; - * @return {number} - */ -proto.lnrpc.FeeReportResponse.prototype.getWeekFeeSum = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.FeeReportResponse} returns this - */ -proto.lnrpc.FeeReportResponse.prototype.setWeekFeeSum = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - -/** - * optional uint64 month_fee_sum = 4; - * @return {number} - */ -proto.lnrpc.FeeReportResponse.prototype.getMonthFeeSum = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.FeeReportResponse} returns this - */ -proto.lnrpc.FeeReportResponse.prototype.setMonthFeeSum = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); -}; - - - -/** - * Oneof group definitions for this message. Each group defines the field - * numbers belonging to that group. When of these fields' value is set, all - * other fields in the group are cleared. During deserialization, if multiple - * fields are encountered for a group, only the last value seen will be kept. - * @private {!Array>} - * @const - */ -proto.lnrpc.PolicyUpdateRequest.oneofGroups_ = [[1,2]]; - -/** - * @enum {number} - */ -proto.lnrpc.PolicyUpdateRequest.ScopeCase = { - SCOPE_NOT_SET: 0, - GLOBAL: 1, - CHAN_POINT: 2 -}; - -/** - * @return {proto.lnrpc.PolicyUpdateRequest.ScopeCase} - */ -proto.lnrpc.PolicyUpdateRequest.prototype.getScopeCase = function() { - return /** @type {proto.lnrpc.PolicyUpdateRequest.ScopeCase} */(jspb.Message.computeOneofCase(this, proto.lnrpc.PolicyUpdateRequest.oneofGroups_[0])); -}; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.PolicyUpdateRequest.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.PolicyUpdateRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.PolicyUpdateRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.PolicyUpdateRequest.toObject = function(includeInstance, msg) { - var f, obj = { - global: jspb.Message.getBooleanFieldWithDefault(msg, 1, false), - chanPoint: (f = msg.getChanPoint()) && proto.lnrpc.ChannelPoint.toObject(includeInstance, f), - baseFeeMsat: jspb.Message.getFieldWithDefault(msg, 3, 0), - feeRate: jspb.Message.getFloatingPointFieldWithDefault(msg, 4, 0.0), - feeRatePpm: jspb.Message.getFieldWithDefault(msg, 9, 0), - timeLockDelta: jspb.Message.getFieldWithDefault(msg, 5, 0), - maxHtlcMsat: jspb.Message.getFieldWithDefault(msg, 6, 0), - minHtlcMsat: jspb.Message.getFieldWithDefault(msg, 7, 0), - minHtlcMsatSpecified: jspb.Message.getBooleanFieldWithDefault(msg, 8, false) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.PolicyUpdateRequest} - */ -proto.lnrpc.PolicyUpdateRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.PolicyUpdateRequest; - return proto.lnrpc.PolicyUpdateRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.PolicyUpdateRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.PolicyUpdateRequest} - */ -proto.lnrpc.PolicyUpdateRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setGlobal(value); - break; - case 2: - var value = new proto.lnrpc.ChannelPoint; - reader.readMessage(value,proto.lnrpc.ChannelPoint.deserializeBinaryFromReader); - msg.setChanPoint(value); - break; - case 3: - var value = /** @type {number} */ (reader.readInt64()); - msg.setBaseFeeMsat(value); - break; - case 4: - var value = /** @type {number} */ (reader.readDouble()); - msg.setFeeRate(value); - break; - case 9: - var value = /** @type {number} */ (reader.readUint32()); - msg.setFeeRatePpm(value); - break; - case 5: - var value = /** @type {number} */ (reader.readUint32()); - msg.setTimeLockDelta(value); - break; - case 6: - var value = /** @type {number} */ (reader.readUint64()); - msg.setMaxHtlcMsat(value); - break; - case 7: - var value = /** @type {number} */ (reader.readUint64()); - msg.setMinHtlcMsat(value); - break; - case 8: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setMinHtlcMsatSpecified(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.PolicyUpdateRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.PolicyUpdateRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.PolicyUpdateRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.PolicyUpdateRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = /** @type {boolean} */ (jspb.Message.getField(message, 1)); - if (f != null) { - writer.writeBool( - 1, - f - ); - } - f = message.getChanPoint(); - if (f != null) { - writer.writeMessage( - 2, - f, - proto.lnrpc.ChannelPoint.serializeBinaryToWriter - ); - } - f = message.getBaseFeeMsat(); - if (f !== 0) { - writer.writeInt64( - 3, - f - ); - } - f = message.getFeeRate(); - if (f !== 0.0) { - writer.writeDouble( - 4, - f - ); - } - f = message.getFeeRatePpm(); - if (f !== 0) { - writer.writeUint32( - 9, - f - ); - } - f = message.getTimeLockDelta(); - if (f !== 0) { - writer.writeUint32( - 5, - f - ); - } - f = message.getMaxHtlcMsat(); - if (f !== 0) { - writer.writeUint64( - 6, - f - ); - } - f = message.getMinHtlcMsat(); - if (f !== 0) { - writer.writeUint64( - 7, - f - ); - } - f = message.getMinHtlcMsatSpecified(); - if (f) { - writer.writeBool( - 8, - f - ); - } -}; - - -/** - * optional bool global = 1; - * @return {boolean} - */ -proto.lnrpc.PolicyUpdateRequest.prototype.getGlobal = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.lnrpc.PolicyUpdateRequest} returns this - */ -proto.lnrpc.PolicyUpdateRequest.prototype.setGlobal = function(value) { - return jspb.Message.setOneofField(this, 1, proto.lnrpc.PolicyUpdateRequest.oneofGroups_[0], value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.lnrpc.PolicyUpdateRequest} returns this - */ -proto.lnrpc.PolicyUpdateRequest.prototype.clearGlobal = function() { - return jspb.Message.setOneofField(this, 1, proto.lnrpc.PolicyUpdateRequest.oneofGroups_[0], undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.lnrpc.PolicyUpdateRequest.prototype.hasGlobal = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional ChannelPoint chan_point = 2; - * @return {?proto.lnrpc.ChannelPoint} - */ -proto.lnrpc.PolicyUpdateRequest.prototype.getChanPoint = function() { - return /** @type{?proto.lnrpc.ChannelPoint} */ ( - jspb.Message.getWrapperField(this, proto.lnrpc.ChannelPoint, 2)); -}; - - -/** - * @param {?proto.lnrpc.ChannelPoint|undefined} value - * @return {!proto.lnrpc.PolicyUpdateRequest} returns this -*/ -proto.lnrpc.PolicyUpdateRequest.prototype.setChanPoint = function(value) { - return jspb.Message.setOneofWrapperField(this, 2, proto.lnrpc.PolicyUpdateRequest.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.lnrpc.PolicyUpdateRequest} returns this - */ -proto.lnrpc.PolicyUpdateRequest.prototype.clearChanPoint = function() { - return this.setChanPoint(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.lnrpc.PolicyUpdateRequest.prototype.hasChanPoint = function() { - return jspb.Message.getField(this, 2) != null; -}; - - -/** - * optional int64 base_fee_msat = 3; - * @return {number} - */ -proto.lnrpc.PolicyUpdateRequest.prototype.getBaseFeeMsat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.PolicyUpdateRequest} returns this - */ -proto.lnrpc.PolicyUpdateRequest.prototype.setBaseFeeMsat = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - -/** - * optional double fee_rate = 4; - * @return {number} - */ -proto.lnrpc.PolicyUpdateRequest.prototype.getFeeRate = function() { - return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 4, 0.0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.PolicyUpdateRequest} returns this - */ -proto.lnrpc.PolicyUpdateRequest.prototype.setFeeRate = function(value) { - return jspb.Message.setProto3FloatField(this, 4, value); -}; - - -/** - * optional uint32 fee_rate_ppm = 9; - * @return {number} - */ -proto.lnrpc.PolicyUpdateRequest.prototype.getFeeRatePpm = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.PolicyUpdateRequest} returns this - */ -proto.lnrpc.PolicyUpdateRequest.prototype.setFeeRatePpm = function(value) { - return jspb.Message.setProto3IntField(this, 9, value); -}; - - -/** - * optional uint32 time_lock_delta = 5; - * @return {number} - */ -proto.lnrpc.PolicyUpdateRequest.prototype.getTimeLockDelta = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.PolicyUpdateRequest} returns this - */ -proto.lnrpc.PolicyUpdateRequest.prototype.setTimeLockDelta = function(value) { - return jspb.Message.setProto3IntField(this, 5, value); -}; - - -/** - * optional uint64 max_htlc_msat = 6; - * @return {number} - */ -proto.lnrpc.PolicyUpdateRequest.prototype.getMaxHtlcMsat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.PolicyUpdateRequest} returns this - */ -proto.lnrpc.PolicyUpdateRequest.prototype.setMaxHtlcMsat = function(value) { - return jspb.Message.setProto3IntField(this, 6, value); -}; - - -/** - * optional uint64 min_htlc_msat = 7; - * @return {number} - */ -proto.lnrpc.PolicyUpdateRequest.prototype.getMinHtlcMsat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.PolicyUpdateRequest} returns this - */ -proto.lnrpc.PolicyUpdateRequest.prototype.setMinHtlcMsat = function(value) { - return jspb.Message.setProto3IntField(this, 7, value); -}; - - -/** - * optional bool min_htlc_msat_specified = 8; - * @return {boolean} - */ -proto.lnrpc.PolicyUpdateRequest.prototype.getMinHtlcMsatSpecified = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 8, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.lnrpc.PolicyUpdateRequest} returns this - */ -proto.lnrpc.PolicyUpdateRequest.prototype.setMinHtlcMsatSpecified = function(value) { - return jspb.Message.setProto3BooleanField(this, 8, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.FailedUpdate.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.FailedUpdate.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.FailedUpdate} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.FailedUpdate.toObject = function(includeInstance, msg) { - var f, obj = { - outpoint: (f = msg.getOutpoint()) && proto.lnrpc.OutPoint.toObject(includeInstance, f), - reason: jspb.Message.getFieldWithDefault(msg, 2, 0), - updateError: jspb.Message.getFieldWithDefault(msg, 3, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.FailedUpdate} - */ -proto.lnrpc.FailedUpdate.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.FailedUpdate; - return proto.lnrpc.FailedUpdate.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.FailedUpdate} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.FailedUpdate} - */ -proto.lnrpc.FailedUpdate.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.lnrpc.OutPoint; - reader.readMessage(value,proto.lnrpc.OutPoint.deserializeBinaryFromReader); - msg.setOutpoint(value); - break; - case 2: - var value = /** @type {!proto.lnrpc.UpdateFailure} */ (reader.readEnum()); - msg.setReason(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setUpdateError(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.FailedUpdate.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.FailedUpdate.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.FailedUpdate} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.FailedUpdate.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getOutpoint(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.lnrpc.OutPoint.serializeBinaryToWriter - ); - } - f = message.getReason(); - if (f !== 0.0) { - writer.writeEnum( - 2, - f - ); - } - f = message.getUpdateError(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } -}; - - -/** - * optional OutPoint outpoint = 1; - * @return {?proto.lnrpc.OutPoint} - */ -proto.lnrpc.FailedUpdate.prototype.getOutpoint = function() { - return /** @type{?proto.lnrpc.OutPoint} */ ( - jspb.Message.getWrapperField(this, proto.lnrpc.OutPoint, 1)); -}; - - -/** - * @param {?proto.lnrpc.OutPoint|undefined} value - * @return {!proto.lnrpc.FailedUpdate} returns this -*/ -proto.lnrpc.FailedUpdate.prototype.setOutpoint = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.lnrpc.FailedUpdate} returns this - */ -proto.lnrpc.FailedUpdate.prototype.clearOutpoint = function() { - return this.setOutpoint(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.lnrpc.FailedUpdate.prototype.hasOutpoint = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional UpdateFailure reason = 2; - * @return {!proto.lnrpc.UpdateFailure} - */ -proto.lnrpc.FailedUpdate.prototype.getReason = function() { - return /** @type {!proto.lnrpc.UpdateFailure} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {!proto.lnrpc.UpdateFailure} value - * @return {!proto.lnrpc.FailedUpdate} returns this - */ -proto.lnrpc.FailedUpdate.prototype.setReason = function(value) { - return jspb.Message.setProto3EnumField(this, 2, value); -}; - - -/** - * optional string update_error = 3; - * @return {string} - */ -proto.lnrpc.FailedUpdate.prototype.getUpdateError = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * @param {string} value - * @return {!proto.lnrpc.FailedUpdate} returns this - */ -proto.lnrpc.FailedUpdate.prototype.setUpdateError = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.lnrpc.PolicyUpdateResponse.repeatedFields_ = [1]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.PolicyUpdateResponse.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.PolicyUpdateResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.PolicyUpdateResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.PolicyUpdateResponse.toObject = function(includeInstance, msg) { - var f, obj = { - failedUpdatesList: jspb.Message.toObjectList(msg.getFailedUpdatesList(), - proto.lnrpc.FailedUpdate.toObject, includeInstance) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.PolicyUpdateResponse} - */ -proto.lnrpc.PolicyUpdateResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.PolicyUpdateResponse; - return proto.lnrpc.PolicyUpdateResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.PolicyUpdateResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.PolicyUpdateResponse} - */ -proto.lnrpc.PolicyUpdateResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.lnrpc.FailedUpdate; - reader.readMessage(value,proto.lnrpc.FailedUpdate.deserializeBinaryFromReader); - msg.addFailedUpdates(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.PolicyUpdateResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.PolicyUpdateResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.PolicyUpdateResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.PolicyUpdateResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getFailedUpdatesList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 1, - f, - proto.lnrpc.FailedUpdate.serializeBinaryToWriter - ); - } -}; - - -/** - * repeated FailedUpdate failed_updates = 1; - * @return {!Array} - */ -proto.lnrpc.PolicyUpdateResponse.prototype.getFailedUpdatesList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.FailedUpdate, 1)); -}; - - -/** - * @param {!Array} value - * @return {!proto.lnrpc.PolicyUpdateResponse} returns this -*/ -proto.lnrpc.PolicyUpdateResponse.prototype.setFailedUpdatesList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); -}; - - -/** - * @param {!proto.lnrpc.FailedUpdate=} opt_value - * @param {number=} opt_index - * @return {!proto.lnrpc.FailedUpdate} - */ -proto.lnrpc.PolicyUpdateResponse.prototype.addFailedUpdates = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.lnrpc.FailedUpdate, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.lnrpc.PolicyUpdateResponse} returns this - */ -proto.lnrpc.PolicyUpdateResponse.prototype.clearFailedUpdatesList = function() { - return this.setFailedUpdatesList([]); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.ForwardingHistoryRequest.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.ForwardingHistoryRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.ForwardingHistoryRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.ForwardingHistoryRequest.toObject = function(includeInstance, msg) { - var f, obj = { - startTime: jspb.Message.getFieldWithDefault(msg, 1, 0), - endTime: jspb.Message.getFieldWithDefault(msg, 2, 0), - indexOffset: jspb.Message.getFieldWithDefault(msg, 3, 0), - numMaxEvents: jspb.Message.getFieldWithDefault(msg, 4, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.ForwardingHistoryRequest} - */ -proto.lnrpc.ForwardingHistoryRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.ForwardingHistoryRequest; - return proto.lnrpc.ForwardingHistoryRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.ForwardingHistoryRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.ForwardingHistoryRequest} - */ -proto.lnrpc.ForwardingHistoryRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readUint64()); - msg.setStartTime(value); - break; - case 2: - var value = /** @type {number} */ (reader.readUint64()); - msg.setEndTime(value); - break; - case 3: - var value = /** @type {number} */ (reader.readUint32()); - msg.setIndexOffset(value); - break; - case 4: - var value = /** @type {number} */ (reader.readUint32()); - msg.setNumMaxEvents(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.ForwardingHistoryRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.ForwardingHistoryRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.ForwardingHistoryRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.ForwardingHistoryRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getStartTime(); - if (f !== 0) { - writer.writeUint64( - 1, - f - ); - } - f = message.getEndTime(); - if (f !== 0) { - writer.writeUint64( - 2, - f - ); - } - f = message.getIndexOffset(); - if (f !== 0) { - writer.writeUint32( - 3, - f - ); - } - f = message.getNumMaxEvents(); - if (f !== 0) { - writer.writeUint32( - 4, - f - ); - } -}; - - -/** - * optional uint64 start_time = 1; - * @return {number} - */ -proto.lnrpc.ForwardingHistoryRequest.prototype.getStartTime = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.ForwardingHistoryRequest} returns this - */ -proto.lnrpc.ForwardingHistoryRequest.prototype.setStartTime = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); -}; - - -/** - * optional uint64 end_time = 2; - * @return {number} - */ -proto.lnrpc.ForwardingHistoryRequest.prototype.getEndTime = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.ForwardingHistoryRequest} returns this - */ -proto.lnrpc.ForwardingHistoryRequest.prototype.setEndTime = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * optional uint32 index_offset = 3; - * @return {number} - */ -proto.lnrpc.ForwardingHistoryRequest.prototype.getIndexOffset = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.ForwardingHistoryRequest} returns this - */ -proto.lnrpc.ForwardingHistoryRequest.prototype.setIndexOffset = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - -/** - * optional uint32 num_max_events = 4; - * @return {number} - */ -proto.lnrpc.ForwardingHistoryRequest.prototype.getNumMaxEvents = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.ForwardingHistoryRequest} returns this - */ -proto.lnrpc.ForwardingHistoryRequest.prototype.setNumMaxEvents = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.ForwardingEvent.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.ForwardingEvent.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.ForwardingEvent} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.ForwardingEvent.toObject = function(includeInstance, msg) { - var f, obj = { - timestamp: jspb.Message.getFieldWithDefault(msg, 1, 0), - chanIdIn: jspb.Message.getFieldWithDefault(msg, 2, "0"), - chanIdOut: jspb.Message.getFieldWithDefault(msg, 4, "0"), - amtIn: jspb.Message.getFieldWithDefault(msg, 5, 0), - amtOut: jspb.Message.getFieldWithDefault(msg, 6, 0), - fee: jspb.Message.getFieldWithDefault(msg, 7, 0), - feeMsat: jspb.Message.getFieldWithDefault(msg, 8, 0), - amtInMsat: jspb.Message.getFieldWithDefault(msg, 9, 0), - amtOutMsat: jspb.Message.getFieldWithDefault(msg, 10, 0), - timestampNs: jspb.Message.getFieldWithDefault(msg, 11, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.ForwardingEvent} - */ -proto.lnrpc.ForwardingEvent.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.ForwardingEvent; - return proto.lnrpc.ForwardingEvent.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.ForwardingEvent} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.ForwardingEvent} - */ -proto.lnrpc.ForwardingEvent.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readUint64()); - msg.setTimestamp(value); - break; - case 2: - var value = /** @type {string} */ (reader.readUint64String()); - msg.setChanIdIn(value); - break; - case 4: - var value = /** @type {string} */ (reader.readUint64String()); - msg.setChanIdOut(value); - break; - case 5: - var value = /** @type {number} */ (reader.readUint64()); - msg.setAmtIn(value); - break; - case 6: - var value = /** @type {number} */ (reader.readUint64()); - msg.setAmtOut(value); - break; - case 7: - var value = /** @type {number} */ (reader.readUint64()); - msg.setFee(value); - break; - case 8: - var value = /** @type {number} */ (reader.readUint64()); - msg.setFeeMsat(value); - break; - case 9: - var value = /** @type {number} */ (reader.readUint64()); - msg.setAmtInMsat(value); - break; - case 10: - var value = /** @type {number} */ (reader.readUint64()); - msg.setAmtOutMsat(value); - break; - case 11: - var value = /** @type {number} */ (reader.readUint64()); - msg.setTimestampNs(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.ForwardingEvent.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.ForwardingEvent.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.ForwardingEvent} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.ForwardingEvent.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getTimestamp(); - if (f !== 0) { - writer.writeUint64( - 1, - f - ); - } - f = message.getChanIdIn(); - if (parseInt(f, 10) !== 0) { - writer.writeUint64String( - 2, - f - ); - } - f = message.getChanIdOut(); - if (parseInt(f, 10) !== 0) { - writer.writeUint64String( - 4, - f - ); - } - f = message.getAmtIn(); - if (f !== 0) { - writer.writeUint64( - 5, - f - ); - } - f = message.getAmtOut(); - if (f !== 0) { - writer.writeUint64( - 6, - f - ); - } - f = message.getFee(); - if (f !== 0) { - writer.writeUint64( - 7, - f - ); - } - f = message.getFeeMsat(); - if (f !== 0) { - writer.writeUint64( - 8, - f - ); - } - f = message.getAmtInMsat(); - if (f !== 0) { - writer.writeUint64( - 9, - f - ); - } - f = message.getAmtOutMsat(); - if (f !== 0) { - writer.writeUint64( - 10, - f - ); - } - f = message.getTimestampNs(); - if (f !== 0) { - writer.writeUint64( - 11, - f - ); - } -}; - - -/** - * optional uint64 timestamp = 1; - * @return {number} - */ -proto.lnrpc.ForwardingEvent.prototype.getTimestamp = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.ForwardingEvent} returns this - */ -proto.lnrpc.ForwardingEvent.prototype.setTimestamp = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); -}; - - -/** - * optional uint64 chan_id_in = 2; - * @return {string} - */ -proto.lnrpc.ForwardingEvent.prototype.getChanIdIn = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "0")); -}; - - -/** - * @param {string} value - * @return {!proto.lnrpc.ForwardingEvent} returns this - */ -proto.lnrpc.ForwardingEvent.prototype.setChanIdIn = function(value) { - return jspb.Message.setProto3StringIntField(this, 2, value); -}; - - -/** - * optional uint64 chan_id_out = 4; - * @return {string} - */ -proto.lnrpc.ForwardingEvent.prototype.getChanIdOut = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "0")); -}; - - -/** - * @param {string} value - * @return {!proto.lnrpc.ForwardingEvent} returns this - */ -proto.lnrpc.ForwardingEvent.prototype.setChanIdOut = function(value) { - return jspb.Message.setProto3StringIntField(this, 4, value); -}; - - -/** - * optional uint64 amt_in = 5; - * @return {number} - */ -proto.lnrpc.ForwardingEvent.prototype.getAmtIn = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.ForwardingEvent} returns this - */ -proto.lnrpc.ForwardingEvent.prototype.setAmtIn = function(value) { - return jspb.Message.setProto3IntField(this, 5, value); -}; - - -/** - * optional uint64 amt_out = 6; - * @return {number} - */ -proto.lnrpc.ForwardingEvent.prototype.getAmtOut = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.ForwardingEvent} returns this - */ -proto.lnrpc.ForwardingEvent.prototype.setAmtOut = function(value) { - return jspb.Message.setProto3IntField(this, 6, value); -}; - - -/** - * optional uint64 fee = 7; - * @return {number} - */ -proto.lnrpc.ForwardingEvent.prototype.getFee = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.ForwardingEvent} returns this - */ -proto.lnrpc.ForwardingEvent.prototype.setFee = function(value) { - return jspb.Message.setProto3IntField(this, 7, value); -}; - - -/** - * optional uint64 fee_msat = 8; - * @return {number} - */ -proto.lnrpc.ForwardingEvent.prototype.getFeeMsat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.ForwardingEvent} returns this - */ -proto.lnrpc.ForwardingEvent.prototype.setFeeMsat = function(value) { - return jspb.Message.setProto3IntField(this, 8, value); -}; - - -/** - * optional uint64 amt_in_msat = 9; - * @return {number} - */ -proto.lnrpc.ForwardingEvent.prototype.getAmtInMsat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.ForwardingEvent} returns this - */ -proto.lnrpc.ForwardingEvent.prototype.setAmtInMsat = function(value) { - return jspb.Message.setProto3IntField(this, 9, value); -}; - - -/** - * optional uint64 amt_out_msat = 10; - * @return {number} - */ -proto.lnrpc.ForwardingEvent.prototype.getAmtOutMsat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 10, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.ForwardingEvent} returns this - */ -proto.lnrpc.ForwardingEvent.prototype.setAmtOutMsat = function(value) { - return jspb.Message.setProto3IntField(this, 10, value); -}; - - -/** - * optional uint64 timestamp_ns = 11; - * @return {number} - */ -proto.lnrpc.ForwardingEvent.prototype.getTimestampNs = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 11, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.ForwardingEvent} returns this - */ -proto.lnrpc.ForwardingEvent.prototype.setTimestampNs = function(value) { - return jspb.Message.setProto3IntField(this, 11, value); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.lnrpc.ForwardingHistoryResponse.repeatedFields_ = [1]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.ForwardingHistoryResponse.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.ForwardingHistoryResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.ForwardingHistoryResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.ForwardingHistoryResponse.toObject = function(includeInstance, msg) { - var f, obj = { - forwardingEventsList: jspb.Message.toObjectList(msg.getForwardingEventsList(), - proto.lnrpc.ForwardingEvent.toObject, includeInstance), - lastOffsetIndex: jspb.Message.getFieldWithDefault(msg, 2, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.ForwardingHistoryResponse} - */ -proto.lnrpc.ForwardingHistoryResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.ForwardingHistoryResponse; - return proto.lnrpc.ForwardingHistoryResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.ForwardingHistoryResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.ForwardingHistoryResponse} - */ -proto.lnrpc.ForwardingHistoryResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.lnrpc.ForwardingEvent; - reader.readMessage(value,proto.lnrpc.ForwardingEvent.deserializeBinaryFromReader); - msg.addForwardingEvents(value); - break; - case 2: - var value = /** @type {number} */ (reader.readUint32()); - msg.setLastOffsetIndex(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.ForwardingHistoryResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.ForwardingHistoryResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.ForwardingHistoryResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.ForwardingHistoryResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getForwardingEventsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 1, - f, - proto.lnrpc.ForwardingEvent.serializeBinaryToWriter - ); - } - f = message.getLastOffsetIndex(); - if (f !== 0) { - writer.writeUint32( - 2, - f - ); - } -}; - - -/** - * repeated ForwardingEvent forwarding_events = 1; - * @return {!Array} - */ -proto.lnrpc.ForwardingHistoryResponse.prototype.getForwardingEventsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.ForwardingEvent, 1)); -}; - - -/** - * @param {!Array} value - * @return {!proto.lnrpc.ForwardingHistoryResponse} returns this -*/ -proto.lnrpc.ForwardingHistoryResponse.prototype.setForwardingEventsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); -}; - - -/** - * @param {!proto.lnrpc.ForwardingEvent=} opt_value - * @param {number=} opt_index - * @return {!proto.lnrpc.ForwardingEvent} - */ -proto.lnrpc.ForwardingHistoryResponse.prototype.addForwardingEvents = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.lnrpc.ForwardingEvent, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.lnrpc.ForwardingHistoryResponse} returns this - */ -proto.lnrpc.ForwardingHistoryResponse.prototype.clearForwardingEventsList = function() { - return this.setForwardingEventsList([]); -}; - - -/** - * optional uint32 last_offset_index = 2; - * @return {number} - */ -proto.lnrpc.ForwardingHistoryResponse.prototype.getLastOffsetIndex = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.ForwardingHistoryResponse} returns this - */ -proto.lnrpc.ForwardingHistoryResponse.prototype.setLastOffsetIndex = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.ExportChannelBackupRequest.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.ExportChannelBackupRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.ExportChannelBackupRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.ExportChannelBackupRequest.toObject = function(includeInstance, msg) { - var f, obj = { - chanPoint: (f = msg.getChanPoint()) && proto.lnrpc.ChannelPoint.toObject(includeInstance, f) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.ExportChannelBackupRequest} - */ -proto.lnrpc.ExportChannelBackupRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.ExportChannelBackupRequest; - return proto.lnrpc.ExportChannelBackupRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.ExportChannelBackupRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.ExportChannelBackupRequest} - */ -proto.lnrpc.ExportChannelBackupRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.lnrpc.ChannelPoint; - reader.readMessage(value,proto.lnrpc.ChannelPoint.deserializeBinaryFromReader); - msg.setChanPoint(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.ExportChannelBackupRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.ExportChannelBackupRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.ExportChannelBackupRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.ExportChannelBackupRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getChanPoint(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.lnrpc.ChannelPoint.serializeBinaryToWriter - ); - } -}; - - -/** - * optional ChannelPoint chan_point = 1; - * @return {?proto.lnrpc.ChannelPoint} - */ -proto.lnrpc.ExportChannelBackupRequest.prototype.getChanPoint = function() { - return /** @type{?proto.lnrpc.ChannelPoint} */ ( - jspb.Message.getWrapperField(this, proto.lnrpc.ChannelPoint, 1)); -}; - - -/** - * @param {?proto.lnrpc.ChannelPoint|undefined} value - * @return {!proto.lnrpc.ExportChannelBackupRequest} returns this -*/ -proto.lnrpc.ExportChannelBackupRequest.prototype.setChanPoint = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.lnrpc.ExportChannelBackupRequest} returns this - */ -proto.lnrpc.ExportChannelBackupRequest.prototype.clearChanPoint = function() { - return this.setChanPoint(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.lnrpc.ExportChannelBackupRequest.prototype.hasChanPoint = function() { - return jspb.Message.getField(this, 1) != null; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.ChannelBackup.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.ChannelBackup.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.ChannelBackup} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.ChannelBackup.toObject = function(includeInstance, msg) { - var f, obj = { - chanPoint: (f = msg.getChanPoint()) && proto.lnrpc.ChannelPoint.toObject(includeInstance, f), - chanBackup: msg.getChanBackup_asB64() - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.ChannelBackup} - */ -proto.lnrpc.ChannelBackup.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.ChannelBackup; - return proto.lnrpc.ChannelBackup.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.ChannelBackup} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.ChannelBackup} - */ -proto.lnrpc.ChannelBackup.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.lnrpc.ChannelPoint; - reader.readMessage(value,proto.lnrpc.ChannelPoint.deserializeBinaryFromReader); - msg.setChanPoint(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setChanBackup(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.ChannelBackup.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.ChannelBackup.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.ChannelBackup} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.ChannelBackup.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getChanPoint(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.lnrpc.ChannelPoint.serializeBinaryToWriter - ); - } - f = message.getChanBackup_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } -}; - - -/** - * optional ChannelPoint chan_point = 1; - * @return {?proto.lnrpc.ChannelPoint} - */ -proto.lnrpc.ChannelBackup.prototype.getChanPoint = function() { - return /** @type{?proto.lnrpc.ChannelPoint} */ ( - jspb.Message.getWrapperField(this, proto.lnrpc.ChannelPoint, 1)); -}; - - -/** - * @param {?proto.lnrpc.ChannelPoint|undefined} value - * @return {!proto.lnrpc.ChannelBackup} returns this -*/ -proto.lnrpc.ChannelBackup.prototype.setChanPoint = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.lnrpc.ChannelBackup} returns this - */ -proto.lnrpc.ChannelBackup.prototype.clearChanPoint = function() { - return this.setChanPoint(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.lnrpc.ChannelBackup.prototype.hasChanPoint = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional bytes chan_backup = 2; - * @return {!(string|Uint8Array)} - */ -proto.lnrpc.ChannelBackup.prototype.getChanBackup = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes chan_backup = 2; - * This is a type-conversion wrapper around `getChanBackup()` - * @return {string} - */ -proto.lnrpc.ChannelBackup.prototype.getChanBackup_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getChanBackup())); -}; - - -/** - * optional bytes chan_backup = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getChanBackup()` - * @return {!Uint8Array} - */ -proto.lnrpc.ChannelBackup.prototype.getChanBackup_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getChanBackup())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.lnrpc.ChannelBackup} returns this - */ -proto.lnrpc.ChannelBackup.prototype.setChanBackup = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.lnrpc.MultiChanBackup.repeatedFields_ = [1]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.MultiChanBackup.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.MultiChanBackup.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.MultiChanBackup} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.MultiChanBackup.toObject = function(includeInstance, msg) { - var f, obj = { - chanPointsList: jspb.Message.toObjectList(msg.getChanPointsList(), - proto.lnrpc.ChannelPoint.toObject, includeInstance), - multiChanBackup: msg.getMultiChanBackup_asB64() - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.MultiChanBackup} - */ -proto.lnrpc.MultiChanBackup.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.MultiChanBackup; - return proto.lnrpc.MultiChanBackup.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.MultiChanBackup} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.MultiChanBackup} - */ -proto.lnrpc.MultiChanBackup.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.lnrpc.ChannelPoint; - reader.readMessage(value,proto.lnrpc.ChannelPoint.deserializeBinaryFromReader); - msg.addChanPoints(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setMultiChanBackup(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.MultiChanBackup.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.MultiChanBackup.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.MultiChanBackup} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.MultiChanBackup.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getChanPointsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 1, - f, - proto.lnrpc.ChannelPoint.serializeBinaryToWriter - ); - } - f = message.getMultiChanBackup_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } -}; - - -/** - * repeated ChannelPoint chan_points = 1; - * @return {!Array} - */ -proto.lnrpc.MultiChanBackup.prototype.getChanPointsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.ChannelPoint, 1)); -}; - - -/** - * @param {!Array} value - * @return {!proto.lnrpc.MultiChanBackup} returns this -*/ -proto.lnrpc.MultiChanBackup.prototype.setChanPointsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); -}; - - -/** - * @param {!proto.lnrpc.ChannelPoint=} opt_value - * @param {number=} opt_index - * @return {!proto.lnrpc.ChannelPoint} - */ -proto.lnrpc.MultiChanBackup.prototype.addChanPoints = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.lnrpc.ChannelPoint, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.lnrpc.MultiChanBackup} returns this - */ -proto.lnrpc.MultiChanBackup.prototype.clearChanPointsList = function() { - return this.setChanPointsList([]); -}; - - -/** - * optional bytes multi_chan_backup = 2; - * @return {!(string|Uint8Array)} - */ -proto.lnrpc.MultiChanBackup.prototype.getMultiChanBackup = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes multi_chan_backup = 2; - * This is a type-conversion wrapper around `getMultiChanBackup()` - * @return {string} - */ -proto.lnrpc.MultiChanBackup.prototype.getMultiChanBackup_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getMultiChanBackup())); -}; - - -/** - * optional bytes multi_chan_backup = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getMultiChanBackup()` - * @return {!Uint8Array} - */ -proto.lnrpc.MultiChanBackup.prototype.getMultiChanBackup_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getMultiChanBackup())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.lnrpc.MultiChanBackup} returns this - */ -proto.lnrpc.MultiChanBackup.prototype.setMultiChanBackup = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.ChanBackupExportRequest.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.ChanBackupExportRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.ChanBackupExportRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.ChanBackupExportRequest.toObject = function(includeInstance, msg) { - var f, obj = { - - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.ChanBackupExportRequest} - */ -proto.lnrpc.ChanBackupExportRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.ChanBackupExportRequest; - return proto.lnrpc.ChanBackupExportRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.ChanBackupExportRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.ChanBackupExportRequest} - */ -proto.lnrpc.ChanBackupExportRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.ChanBackupExportRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.ChanBackupExportRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.ChanBackupExportRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.ChanBackupExportRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.ChanBackupSnapshot.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.ChanBackupSnapshot.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.ChanBackupSnapshot} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.ChanBackupSnapshot.toObject = function(includeInstance, msg) { - var f, obj = { - singleChanBackups: (f = msg.getSingleChanBackups()) && proto.lnrpc.ChannelBackups.toObject(includeInstance, f), - multiChanBackup: (f = msg.getMultiChanBackup()) && proto.lnrpc.MultiChanBackup.toObject(includeInstance, f) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.ChanBackupSnapshot} - */ -proto.lnrpc.ChanBackupSnapshot.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.ChanBackupSnapshot; - return proto.lnrpc.ChanBackupSnapshot.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.ChanBackupSnapshot} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.ChanBackupSnapshot} - */ -proto.lnrpc.ChanBackupSnapshot.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.lnrpc.ChannelBackups; - reader.readMessage(value,proto.lnrpc.ChannelBackups.deserializeBinaryFromReader); - msg.setSingleChanBackups(value); - break; - case 2: - var value = new proto.lnrpc.MultiChanBackup; - reader.readMessage(value,proto.lnrpc.MultiChanBackup.deserializeBinaryFromReader); - msg.setMultiChanBackup(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.ChanBackupSnapshot.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.ChanBackupSnapshot.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.ChanBackupSnapshot} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.ChanBackupSnapshot.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getSingleChanBackups(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.lnrpc.ChannelBackups.serializeBinaryToWriter - ); - } - f = message.getMultiChanBackup(); - if (f != null) { - writer.writeMessage( - 2, - f, - proto.lnrpc.MultiChanBackup.serializeBinaryToWriter - ); - } -}; - - -/** - * optional ChannelBackups single_chan_backups = 1; - * @return {?proto.lnrpc.ChannelBackups} - */ -proto.lnrpc.ChanBackupSnapshot.prototype.getSingleChanBackups = function() { - return /** @type{?proto.lnrpc.ChannelBackups} */ ( - jspb.Message.getWrapperField(this, proto.lnrpc.ChannelBackups, 1)); -}; - - -/** - * @param {?proto.lnrpc.ChannelBackups|undefined} value - * @return {!proto.lnrpc.ChanBackupSnapshot} returns this -*/ -proto.lnrpc.ChanBackupSnapshot.prototype.setSingleChanBackups = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.lnrpc.ChanBackupSnapshot} returns this - */ -proto.lnrpc.ChanBackupSnapshot.prototype.clearSingleChanBackups = function() { - return this.setSingleChanBackups(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.lnrpc.ChanBackupSnapshot.prototype.hasSingleChanBackups = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional MultiChanBackup multi_chan_backup = 2; - * @return {?proto.lnrpc.MultiChanBackup} - */ -proto.lnrpc.ChanBackupSnapshot.prototype.getMultiChanBackup = function() { - return /** @type{?proto.lnrpc.MultiChanBackup} */ ( - jspb.Message.getWrapperField(this, proto.lnrpc.MultiChanBackup, 2)); -}; - - -/** - * @param {?proto.lnrpc.MultiChanBackup|undefined} value - * @return {!proto.lnrpc.ChanBackupSnapshot} returns this -*/ -proto.lnrpc.ChanBackupSnapshot.prototype.setMultiChanBackup = function(value) { - return jspb.Message.setWrapperField(this, 2, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.lnrpc.ChanBackupSnapshot} returns this - */ -proto.lnrpc.ChanBackupSnapshot.prototype.clearMultiChanBackup = function() { - return this.setMultiChanBackup(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.lnrpc.ChanBackupSnapshot.prototype.hasMultiChanBackup = function() { - return jspb.Message.getField(this, 2) != null; -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.lnrpc.ChannelBackups.repeatedFields_ = [1]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.ChannelBackups.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.ChannelBackups.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.ChannelBackups} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.ChannelBackups.toObject = function(includeInstance, msg) { - var f, obj = { - chanBackupsList: jspb.Message.toObjectList(msg.getChanBackupsList(), - proto.lnrpc.ChannelBackup.toObject, includeInstance) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.ChannelBackups} - */ -proto.lnrpc.ChannelBackups.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.ChannelBackups; - return proto.lnrpc.ChannelBackups.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.ChannelBackups} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.ChannelBackups} - */ -proto.lnrpc.ChannelBackups.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.lnrpc.ChannelBackup; - reader.readMessage(value,proto.lnrpc.ChannelBackup.deserializeBinaryFromReader); - msg.addChanBackups(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.ChannelBackups.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.ChannelBackups.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.ChannelBackups} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.ChannelBackups.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getChanBackupsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 1, - f, - proto.lnrpc.ChannelBackup.serializeBinaryToWriter - ); - } -}; - - -/** - * repeated ChannelBackup chan_backups = 1; - * @return {!Array} - */ -proto.lnrpc.ChannelBackups.prototype.getChanBackupsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.ChannelBackup, 1)); -}; - - -/** - * @param {!Array} value - * @return {!proto.lnrpc.ChannelBackups} returns this -*/ -proto.lnrpc.ChannelBackups.prototype.setChanBackupsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); -}; - - -/** - * @param {!proto.lnrpc.ChannelBackup=} opt_value - * @param {number=} opt_index - * @return {!proto.lnrpc.ChannelBackup} - */ -proto.lnrpc.ChannelBackups.prototype.addChanBackups = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.lnrpc.ChannelBackup, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.lnrpc.ChannelBackups} returns this - */ -proto.lnrpc.ChannelBackups.prototype.clearChanBackupsList = function() { - return this.setChanBackupsList([]); -}; - - - -/** - * Oneof group definitions for this message. Each group defines the field - * numbers belonging to that group. When of these fields' value is set, all - * other fields in the group are cleared. During deserialization, if multiple - * fields are encountered for a group, only the last value seen will be kept. - * @private {!Array>} - * @const - */ -proto.lnrpc.RestoreChanBackupRequest.oneofGroups_ = [[1,2]]; - -/** - * @enum {number} - */ -proto.lnrpc.RestoreChanBackupRequest.BackupCase = { - BACKUP_NOT_SET: 0, - CHAN_BACKUPS: 1, - MULTI_CHAN_BACKUP: 2 -}; - -/** - * @return {proto.lnrpc.RestoreChanBackupRequest.BackupCase} - */ -proto.lnrpc.RestoreChanBackupRequest.prototype.getBackupCase = function() { - return /** @type {proto.lnrpc.RestoreChanBackupRequest.BackupCase} */(jspb.Message.computeOneofCase(this, proto.lnrpc.RestoreChanBackupRequest.oneofGroups_[0])); -}; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.RestoreChanBackupRequest.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.RestoreChanBackupRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.RestoreChanBackupRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.RestoreChanBackupRequest.toObject = function(includeInstance, msg) { - var f, obj = { - chanBackups: (f = msg.getChanBackups()) && proto.lnrpc.ChannelBackups.toObject(includeInstance, f), - multiChanBackup: msg.getMultiChanBackup_asB64() - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.RestoreChanBackupRequest} - */ -proto.lnrpc.RestoreChanBackupRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.RestoreChanBackupRequest; - return proto.lnrpc.RestoreChanBackupRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.RestoreChanBackupRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.RestoreChanBackupRequest} - */ -proto.lnrpc.RestoreChanBackupRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.lnrpc.ChannelBackups; - reader.readMessage(value,proto.lnrpc.ChannelBackups.deserializeBinaryFromReader); - msg.setChanBackups(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setMultiChanBackup(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.RestoreChanBackupRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.RestoreChanBackupRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.RestoreChanBackupRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.RestoreChanBackupRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getChanBackups(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.lnrpc.ChannelBackups.serializeBinaryToWriter - ); - } - f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 2)); - if (f != null) { - writer.writeBytes( - 2, - f - ); - } -}; - - -/** - * optional ChannelBackups chan_backups = 1; - * @return {?proto.lnrpc.ChannelBackups} - */ -proto.lnrpc.RestoreChanBackupRequest.prototype.getChanBackups = function() { - return /** @type{?proto.lnrpc.ChannelBackups} */ ( - jspb.Message.getWrapperField(this, proto.lnrpc.ChannelBackups, 1)); -}; - - -/** - * @param {?proto.lnrpc.ChannelBackups|undefined} value - * @return {!proto.lnrpc.RestoreChanBackupRequest} returns this -*/ -proto.lnrpc.RestoreChanBackupRequest.prototype.setChanBackups = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.lnrpc.RestoreChanBackupRequest.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.lnrpc.RestoreChanBackupRequest} returns this - */ -proto.lnrpc.RestoreChanBackupRequest.prototype.clearChanBackups = function() { - return this.setChanBackups(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.lnrpc.RestoreChanBackupRequest.prototype.hasChanBackups = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional bytes multi_chan_backup = 2; - * @return {!(string|Uint8Array)} - */ -proto.lnrpc.RestoreChanBackupRequest.prototype.getMultiChanBackup = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes multi_chan_backup = 2; - * This is a type-conversion wrapper around `getMultiChanBackup()` - * @return {string} - */ -proto.lnrpc.RestoreChanBackupRequest.prototype.getMultiChanBackup_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getMultiChanBackup())); -}; - - -/** - * optional bytes multi_chan_backup = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getMultiChanBackup()` - * @return {!Uint8Array} - */ -proto.lnrpc.RestoreChanBackupRequest.prototype.getMultiChanBackup_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getMultiChanBackup())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.lnrpc.RestoreChanBackupRequest} returns this - */ -proto.lnrpc.RestoreChanBackupRequest.prototype.setMultiChanBackup = function(value) { - return jspb.Message.setOneofField(this, 2, proto.lnrpc.RestoreChanBackupRequest.oneofGroups_[0], value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.lnrpc.RestoreChanBackupRequest} returns this - */ -proto.lnrpc.RestoreChanBackupRequest.prototype.clearMultiChanBackup = function() { - return jspb.Message.setOneofField(this, 2, proto.lnrpc.RestoreChanBackupRequest.oneofGroups_[0], undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.lnrpc.RestoreChanBackupRequest.prototype.hasMultiChanBackup = function() { - return jspb.Message.getField(this, 2) != null; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.RestoreBackupResponse.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.RestoreBackupResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.RestoreBackupResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.RestoreBackupResponse.toObject = function(includeInstance, msg) { - var f, obj = { - - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.RestoreBackupResponse} - */ -proto.lnrpc.RestoreBackupResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.RestoreBackupResponse; - return proto.lnrpc.RestoreBackupResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.RestoreBackupResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.RestoreBackupResponse} - */ -proto.lnrpc.RestoreBackupResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.RestoreBackupResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.RestoreBackupResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.RestoreBackupResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.RestoreBackupResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.ChannelBackupSubscription.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.ChannelBackupSubscription.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.ChannelBackupSubscription} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.ChannelBackupSubscription.toObject = function(includeInstance, msg) { - var f, obj = { - - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.ChannelBackupSubscription} - */ -proto.lnrpc.ChannelBackupSubscription.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.ChannelBackupSubscription; - return proto.lnrpc.ChannelBackupSubscription.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.ChannelBackupSubscription} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.ChannelBackupSubscription} - */ -proto.lnrpc.ChannelBackupSubscription.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.ChannelBackupSubscription.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.ChannelBackupSubscription.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.ChannelBackupSubscription} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.ChannelBackupSubscription.serializeBinaryToWriter = function(message, writer) { - var f = undefined; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.VerifyChanBackupResponse.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.VerifyChanBackupResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.VerifyChanBackupResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.VerifyChanBackupResponse.toObject = function(includeInstance, msg) { - var f, obj = { - - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.VerifyChanBackupResponse} - */ -proto.lnrpc.VerifyChanBackupResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.VerifyChanBackupResponse; - return proto.lnrpc.VerifyChanBackupResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.VerifyChanBackupResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.VerifyChanBackupResponse} - */ -proto.lnrpc.VerifyChanBackupResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.VerifyChanBackupResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.VerifyChanBackupResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.VerifyChanBackupResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.VerifyChanBackupResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.MacaroonPermission.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.MacaroonPermission.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.MacaroonPermission} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.MacaroonPermission.toObject = function(includeInstance, msg) { - var f, obj = { - entity: jspb.Message.getFieldWithDefault(msg, 1, ""), - action: jspb.Message.getFieldWithDefault(msg, 2, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.MacaroonPermission} - */ -proto.lnrpc.MacaroonPermission.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.MacaroonPermission; - return proto.lnrpc.MacaroonPermission.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.MacaroonPermission} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.MacaroonPermission} - */ -proto.lnrpc.MacaroonPermission.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setEntity(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setAction(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.MacaroonPermission.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.MacaroonPermission.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.MacaroonPermission} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.MacaroonPermission.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getEntity(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getAction(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } -}; - - -/** - * optional string entity = 1; - * @return {string} - */ -proto.lnrpc.MacaroonPermission.prototype.getEntity = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.lnrpc.MacaroonPermission} returns this - */ -proto.lnrpc.MacaroonPermission.prototype.setEntity = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional string action = 2; - * @return {string} - */ -proto.lnrpc.MacaroonPermission.prototype.getAction = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.lnrpc.MacaroonPermission} returns this - */ -proto.lnrpc.MacaroonPermission.prototype.setAction = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.lnrpc.BakeMacaroonRequest.repeatedFields_ = [1]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.BakeMacaroonRequest.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.BakeMacaroonRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.BakeMacaroonRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.BakeMacaroonRequest.toObject = function(includeInstance, msg) { - var f, obj = { - permissionsList: jspb.Message.toObjectList(msg.getPermissionsList(), - proto.lnrpc.MacaroonPermission.toObject, includeInstance), - rootKeyId: jspb.Message.getFieldWithDefault(msg, 2, 0), - allowExternalPermissions: jspb.Message.getBooleanFieldWithDefault(msg, 3, false) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.BakeMacaroonRequest} - */ -proto.lnrpc.BakeMacaroonRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.BakeMacaroonRequest; - return proto.lnrpc.BakeMacaroonRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.BakeMacaroonRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.BakeMacaroonRequest} - */ -proto.lnrpc.BakeMacaroonRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.lnrpc.MacaroonPermission; - reader.readMessage(value,proto.lnrpc.MacaroonPermission.deserializeBinaryFromReader); - msg.addPermissions(value); - break; - case 2: - var value = /** @type {number} */ (reader.readUint64()); - msg.setRootKeyId(value); - break; - case 3: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setAllowExternalPermissions(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.BakeMacaroonRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.BakeMacaroonRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.BakeMacaroonRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.BakeMacaroonRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getPermissionsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 1, - f, - proto.lnrpc.MacaroonPermission.serializeBinaryToWriter - ); - } - f = message.getRootKeyId(); - if (f !== 0) { - writer.writeUint64( - 2, - f - ); - } - f = message.getAllowExternalPermissions(); - if (f) { - writer.writeBool( - 3, - f - ); - } -}; - - -/** - * repeated MacaroonPermission permissions = 1; - * @return {!Array} - */ -proto.lnrpc.BakeMacaroonRequest.prototype.getPermissionsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.MacaroonPermission, 1)); -}; - - -/** - * @param {!Array} value - * @return {!proto.lnrpc.BakeMacaroonRequest} returns this -*/ -proto.lnrpc.BakeMacaroonRequest.prototype.setPermissionsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); -}; - - -/** - * @param {!proto.lnrpc.MacaroonPermission=} opt_value - * @param {number=} opt_index - * @return {!proto.lnrpc.MacaroonPermission} - */ -proto.lnrpc.BakeMacaroonRequest.prototype.addPermissions = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.lnrpc.MacaroonPermission, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.lnrpc.BakeMacaroonRequest} returns this - */ -proto.lnrpc.BakeMacaroonRequest.prototype.clearPermissionsList = function() { - return this.setPermissionsList([]); -}; - - -/** - * optional uint64 root_key_id = 2; - * @return {number} - */ -proto.lnrpc.BakeMacaroonRequest.prototype.getRootKeyId = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.BakeMacaroonRequest} returns this - */ -proto.lnrpc.BakeMacaroonRequest.prototype.setRootKeyId = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * optional bool allow_external_permissions = 3; - * @return {boolean} - */ -proto.lnrpc.BakeMacaroonRequest.prototype.getAllowExternalPermissions = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.lnrpc.BakeMacaroonRequest} returns this - */ -proto.lnrpc.BakeMacaroonRequest.prototype.setAllowExternalPermissions = function(value) { - return jspb.Message.setProto3BooleanField(this, 3, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.BakeMacaroonResponse.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.BakeMacaroonResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.BakeMacaroonResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.BakeMacaroonResponse.toObject = function(includeInstance, msg) { - var f, obj = { - macaroon: jspb.Message.getFieldWithDefault(msg, 1, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.BakeMacaroonResponse} - */ -proto.lnrpc.BakeMacaroonResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.BakeMacaroonResponse; - return proto.lnrpc.BakeMacaroonResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.BakeMacaroonResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.BakeMacaroonResponse} - */ -proto.lnrpc.BakeMacaroonResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setMacaroon(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.BakeMacaroonResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.BakeMacaroonResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.BakeMacaroonResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.BakeMacaroonResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getMacaroon(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } -}; - - -/** - * optional string macaroon = 1; - * @return {string} - */ -proto.lnrpc.BakeMacaroonResponse.prototype.getMacaroon = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.lnrpc.BakeMacaroonResponse} returns this - */ -proto.lnrpc.BakeMacaroonResponse.prototype.setMacaroon = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.ListMacaroonIDsRequest.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.ListMacaroonIDsRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.ListMacaroonIDsRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.ListMacaroonIDsRequest.toObject = function(includeInstance, msg) { - var f, obj = { - - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.ListMacaroonIDsRequest} - */ -proto.lnrpc.ListMacaroonIDsRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.ListMacaroonIDsRequest; - return proto.lnrpc.ListMacaroonIDsRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.ListMacaroonIDsRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.ListMacaroonIDsRequest} - */ -proto.lnrpc.ListMacaroonIDsRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.ListMacaroonIDsRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.ListMacaroonIDsRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.ListMacaroonIDsRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.ListMacaroonIDsRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.lnrpc.ListMacaroonIDsResponse.repeatedFields_ = [1]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.ListMacaroonIDsResponse.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.ListMacaroonIDsResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.ListMacaroonIDsResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.ListMacaroonIDsResponse.toObject = function(includeInstance, msg) { - var f, obj = { - rootKeyIdsList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : f - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.ListMacaroonIDsResponse} - */ -proto.lnrpc.ListMacaroonIDsResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.ListMacaroonIDsResponse; - return proto.lnrpc.ListMacaroonIDsResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.ListMacaroonIDsResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.ListMacaroonIDsResponse} - */ -proto.lnrpc.ListMacaroonIDsResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedUint64() : [reader.readUint64()]); - for (var i = 0; i < values.length; i++) { - msg.addRootKeyIds(values[i]); - } - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.ListMacaroonIDsResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.ListMacaroonIDsResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.ListMacaroonIDsResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.ListMacaroonIDsResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getRootKeyIdsList(); - if (f.length > 0) { - writer.writePackedUint64( - 1, - f - ); - } -}; - - -/** - * repeated uint64 root_key_ids = 1; - * @return {!Array} - */ -proto.lnrpc.ListMacaroonIDsResponse.prototype.getRootKeyIdsList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); -}; - - -/** - * @param {!Array} value - * @return {!proto.lnrpc.ListMacaroonIDsResponse} returns this - */ -proto.lnrpc.ListMacaroonIDsResponse.prototype.setRootKeyIdsList = function(value) { - return jspb.Message.setField(this, 1, value || []); -}; - - -/** - * @param {number} value - * @param {number=} opt_index - * @return {!proto.lnrpc.ListMacaroonIDsResponse} returns this - */ -proto.lnrpc.ListMacaroonIDsResponse.prototype.addRootKeyIds = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 1, value, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.lnrpc.ListMacaroonIDsResponse} returns this - */ -proto.lnrpc.ListMacaroonIDsResponse.prototype.clearRootKeyIdsList = function() { - return this.setRootKeyIdsList([]); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.DeleteMacaroonIDRequest.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.DeleteMacaroonIDRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.DeleteMacaroonIDRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.DeleteMacaroonIDRequest.toObject = function(includeInstance, msg) { - var f, obj = { - rootKeyId: jspb.Message.getFieldWithDefault(msg, 1, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.DeleteMacaroonIDRequest} - */ -proto.lnrpc.DeleteMacaroonIDRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.DeleteMacaroonIDRequest; - return proto.lnrpc.DeleteMacaroonIDRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.DeleteMacaroonIDRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.DeleteMacaroonIDRequest} - */ -proto.lnrpc.DeleteMacaroonIDRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readUint64()); - msg.setRootKeyId(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.DeleteMacaroonIDRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.DeleteMacaroonIDRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.DeleteMacaroonIDRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.DeleteMacaroonIDRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getRootKeyId(); - if (f !== 0) { - writer.writeUint64( - 1, - f - ); - } -}; - - -/** - * optional uint64 root_key_id = 1; - * @return {number} - */ -proto.lnrpc.DeleteMacaroonIDRequest.prototype.getRootKeyId = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.DeleteMacaroonIDRequest} returns this - */ -proto.lnrpc.DeleteMacaroonIDRequest.prototype.setRootKeyId = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.DeleteMacaroonIDResponse.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.DeleteMacaroonIDResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.DeleteMacaroonIDResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.DeleteMacaroonIDResponse.toObject = function(includeInstance, msg) { - var f, obj = { - deleted: jspb.Message.getBooleanFieldWithDefault(msg, 1, false) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.DeleteMacaroonIDResponse} - */ -proto.lnrpc.DeleteMacaroonIDResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.DeleteMacaroonIDResponse; - return proto.lnrpc.DeleteMacaroonIDResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.DeleteMacaroonIDResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.DeleteMacaroonIDResponse} - */ -proto.lnrpc.DeleteMacaroonIDResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setDeleted(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.DeleteMacaroonIDResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.DeleteMacaroonIDResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.DeleteMacaroonIDResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.DeleteMacaroonIDResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getDeleted(); - if (f) { - writer.writeBool( - 1, - f - ); - } -}; - - -/** - * optional bool deleted = 1; - * @return {boolean} - */ -proto.lnrpc.DeleteMacaroonIDResponse.prototype.getDeleted = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.lnrpc.DeleteMacaroonIDResponse} returns this - */ -proto.lnrpc.DeleteMacaroonIDResponse.prototype.setDeleted = function(value) { - return jspb.Message.setProto3BooleanField(this, 1, value); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.lnrpc.MacaroonPermissionList.repeatedFields_ = [1]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.MacaroonPermissionList.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.MacaroonPermissionList.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.MacaroonPermissionList} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.MacaroonPermissionList.toObject = function(includeInstance, msg) { - var f, obj = { - permissionsList: jspb.Message.toObjectList(msg.getPermissionsList(), - proto.lnrpc.MacaroonPermission.toObject, includeInstance) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.MacaroonPermissionList} - */ -proto.lnrpc.MacaroonPermissionList.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.MacaroonPermissionList; - return proto.lnrpc.MacaroonPermissionList.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.MacaroonPermissionList} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.MacaroonPermissionList} - */ -proto.lnrpc.MacaroonPermissionList.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.lnrpc.MacaroonPermission; - reader.readMessage(value,proto.lnrpc.MacaroonPermission.deserializeBinaryFromReader); - msg.addPermissions(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.MacaroonPermissionList.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.MacaroonPermissionList.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.MacaroonPermissionList} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.MacaroonPermissionList.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getPermissionsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 1, - f, - proto.lnrpc.MacaroonPermission.serializeBinaryToWriter - ); - } -}; - - -/** - * repeated MacaroonPermission permissions = 1; - * @return {!Array} - */ -proto.lnrpc.MacaroonPermissionList.prototype.getPermissionsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.MacaroonPermission, 1)); -}; - - -/** - * @param {!Array} value - * @return {!proto.lnrpc.MacaroonPermissionList} returns this -*/ -proto.lnrpc.MacaroonPermissionList.prototype.setPermissionsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); -}; - - -/** - * @param {!proto.lnrpc.MacaroonPermission=} opt_value - * @param {number=} opt_index - * @return {!proto.lnrpc.MacaroonPermission} - */ -proto.lnrpc.MacaroonPermissionList.prototype.addPermissions = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.lnrpc.MacaroonPermission, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.lnrpc.MacaroonPermissionList} returns this - */ -proto.lnrpc.MacaroonPermissionList.prototype.clearPermissionsList = function() { - return this.setPermissionsList([]); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.ListPermissionsRequest.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.ListPermissionsRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.ListPermissionsRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.ListPermissionsRequest.toObject = function(includeInstance, msg) { - var f, obj = { - - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.ListPermissionsRequest} - */ -proto.lnrpc.ListPermissionsRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.ListPermissionsRequest; - return proto.lnrpc.ListPermissionsRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.ListPermissionsRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.ListPermissionsRequest} - */ -proto.lnrpc.ListPermissionsRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.ListPermissionsRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.ListPermissionsRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.ListPermissionsRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.ListPermissionsRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.ListPermissionsResponse.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.ListPermissionsResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.ListPermissionsResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.ListPermissionsResponse.toObject = function(includeInstance, msg) { - var f, obj = { - methodPermissionsMap: (f = msg.getMethodPermissionsMap()) ? f.toObject(includeInstance, proto.lnrpc.MacaroonPermissionList.toObject) : [] - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.ListPermissionsResponse} - */ -proto.lnrpc.ListPermissionsResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.ListPermissionsResponse; - return proto.lnrpc.ListPermissionsResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.ListPermissionsResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.ListPermissionsResponse} - */ -proto.lnrpc.ListPermissionsResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = msg.getMethodPermissionsMap(); - reader.readMessage(value, function(message, reader) { - jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readMessage, proto.lnrpc.MacaroonPermissionList.deserializeBinaryFromReader, "", new proto.lnrpc.MacaroonPermissionList()); - }); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.ListPermissionsResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.ListPermissionsResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.ListPermissionsResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.ListPermissionsResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getMethodPermissionsMap(true); - if (f && f.getLength() > 0) { - f.serializeBinary(1, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeMessage, proto.lnrpc.MacaroonPermissionList.serializeBinaryToWriter); - } -}; - - -/** - * map method_permissions = 1; - * @param {boolean=} opt_noLazyCreate Do not create the map if - * empty, instead returning `undefined` - * @return {!jspb.Map} - */ -proto.lnrpc.ListPermissionsResponse.prototype.getMethodPermissionsMap = function(opt_noLazyCreate) { - return /** @type {!jspb.Map} */ ( - jspb.Message.getMapField(this, 1, opt_noLazyCreate, - proto.lnrpc.MacaroonPermissionList)); -}; - - -/** - * Clears values from the map. The map will be non-null. - * @return {!proto.lnrpc.ListPermissionsResponse} returns this - */ -proto.lnrpc.ListPermissionsResponse.prototype.clearMethodPermissionsMap = function() { - this.getMethodPermissionsMap().clear(); - return this;}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.Failure.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.Failure.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.Failure} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.Failure.toObject = function(includeInstance, msg) { - var f, obj = { - code: jspb.Message.getFieldWithDefault(msg, 1, 0), - channelUpdate: (f = msg.getChannelUpdate()) && proto.lnrpc.ChannelUpdate.toObject(includeInstance, f), - htlcMsat: jspb.Message.getFieldWithDefault(msg, 4, 0), - onionSha256: msg.getOnionSha256_asB64(), - cltvExpiry: jspb.Message.getFieldWithDefault(msg, 6, 0), - flags: jspb.Message.getFieldWithDefault(msg, 7, 0), - failureSourceIndex: jspb.Message.getFieldWithDefault(msg, 8, 0), - height: jspb.Message.getFieldWithDefault(msg, 9, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.Failure} - */ -proto.lnrpc.Failure.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.Failure; - return proto.lnrpc.Failure.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.Failure} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.Failure} - */ -proto.lnrpc.Failure.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!proto.lnrpc.Failure.FailureCode} */ (reader.readEnum()); - msg.setCode(value); - break; - case 3: - var value = new proto.lnrpc.ChannelUpdate; - reader.readMessage(value,proto.lnrpc.ChannelUpdate.deserializeBinaryFromReader); - msg.setChannelUpdate(value); - break; - case 4: - var value = /** @type {number} */ (reader.readUint64()); - msg.setHtlcMsat(value); - break; - case 5: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setOnionSha256(value); - break; - case 6: - var value = /** @type {number} */ (reader.readUint32()); - msg.setCltvExpiry(value); - break; - case 7: - var value = /** @type {number} */ (reader.readUint32()); - msg.setFlags(value); - break; - case 8: - var value = /** @type {number} */ (reader.readUint32()); - msg.setFailureSourceIndex(value); - break; - case 9: - var value = /** @type {number} */ (reader.readUint32()); - msg.setHeight(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.Failure.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.Failure.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.Failure} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.Failure.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getCode(); - if (f !== 0.0) { - writer.writeEnum( - 1, - f - ); - } - f = message.getChannelUpdate(); - if (f != null) { - writer.writeMessage( - 3, - f, - proto.lnrpc.ChannelUpdate.serializeBinaryToWriter - ); - } - f = message.getHtlcMsat(); - if (f !== 0) { - writer.writeUint64( - 4, - f - ); - } - f = message.getOnionSha256_asU8(); - if (f.length > 0) { - writer.writeBytes( - 5, - f - ); - } - f = message.getCltvExpiry(); - if (f !== 0) { - writer.writeUint32( - 6, - f - ); - } - f = message.getFlags(); - if (f !== 0) { - writer.writeUint32( - 7, - f - ); - } - f = message.getFailureSourceIndex(); - if (f !== 0) { - writer.writeUint32( - 8, - f - ); - } - f = message.getHeight(); - if (f !== 0) { - writer.writeUint32( - 9, - f - ); - } -}; - - -/** - * @enum {number} - */ -proto.lnrpc.Failure.FailureCode = { - RESERVED: 0, - INCORRECT_OR_UNKNOWN_PAYMENT_DETAILS: 1, - INCORRECT_PAYMENT_AMOUNT: 2, - FINAL_INCORRECT_CLTV_EXPIRY: 3, - FINAL_INCORRECT_HTLC_AMOUNT: 4, - FINAL_EXPIRY_TOO_SOON: 5, - INVALID_REALM: 6, - EXPIRY_TOO_SOON: 7, - INVALID_ONION_VERSION: 8, - INVALID_ONION_HMAC: 9, - INVALID_ONION_KEY: 10, - AMOUNT_BELOW_MINIMUM: 11, - FEE_INSUFFICIENT: 12, - INCORRECT_CLTV_EXPIRY: 13, - CHANNEL_DISABLED: 14, - TEMPORARY_CHANNEL_FAILURE: 15, - REQUIRED_NODE_FEATURE_MISSING: 16, - REQUIRED_CHANNEL_FEATURE_MISSING: 17, - UNKNOWN_NEXT_PEER: 18, - TEMPORARY_NODE_FAILURE: 19, - PERMANENT_NODE_FAILURE: 20, - PERMANENT_CHANNEL_FAILURE: 21, - EXPIRY_TOO_FAR: 22, - MPP_TIMEOUT: 23, - INVALID_ONION_PAYLOAD: 24, - INTERNAL_FAILURE: 997, - UNKNOWN_FAILURE: 998, - UNREADABLE_FAILURE: 999 -}; - -/** - * optional FailureCode code = 1; - * @return {!proto.lnrpc.Failure.FailureCode} - */ -proto.lnrpc.Failure.prototype.getCode = function() { - return /** @type {!proto.lnrpc.Failure.FailureCode} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {!proto.lnrpc.Failure.FailureCode} value - * @return {!proto.lnrpc.Failure} returns this - */ -proto.lnrpc.Failure.prototype.setCode = function(value) { - return jspb.Message.setProto3EnumField(this, 1, value); -}; - - -/** - * optional ChannelUpdate channel_update = 3; - * @return {?proto.lnrpc.ChannelUpdate} - */ -proto.lnrpc.Failure.prototype.getChannelUpdate = function() { - return /** @type{?proto.lnrpc.ChannelUpdate} */ ( - jspb.Message.getWrapperField(this, proto.lnrpc.ChannelUpdate, 3)); -}; - - -/** - * @param {?proto.lnrpc.ChannelUpdate|undefined} value - * @return {!proto.lnrpc.Failure} returns this -*/ -proto.lnrpc.Failure.prototype.setChannelUpdate = function(value) { - return jspb.Message.setWrapperField(this, 3, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.lnrpc.Failure} returns this - */ -proto.lnrpc.Failure.prototype.clearChannelUpdate = function() { - return this.setChannelUpdate(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.lnrpc.Failure.prototype.hasChannelUpdate = function() { - return jspb.Message.getField(this, 3) != null; -}; - - -/** - * optional uint64 htlc_msat = 4; - * @return {number} - */ -proto.lnrpc.Failure.prototype.getHtlcMsat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.Failure} returns this - */ -proto.lnrpc.Failure.prototype.setHtlcMsat = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); -}; - - -/** - * optional bytes onion_sha_256 = 5; - * @return {!(string|Uint8Array)} - */ -proto.lnrpc.Failure.prototype.getOnionSha256 = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 5, "")); -}; - - -/** - * optional bytes onion_sha_256 = 5; - * This is a type-conversion wrapper around `getOnionSha256()` - * @return {string} - */ -proto.lnrpc.Failure.prototype.getOnionSha256_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getOnionSha256())); -}; - - -/** - * optional bytes onion_sha_256 = 5; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getOnionSha256()` - * @return {!Uint8Array} - */ -proto.lnrpc.Failure.prototype.getOnionSha256_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getOnionSha256())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.lnrpc.Failure} returns this - */ -proto.lnrpc.Failure.prototype.setOnionSha256 = function(value) { - return jspb.Message.setProto3BytesField(this, 5, value); -}; - - -/** - * optional uint32 cltv_expiry = 6; - * @return {number} - */ -proto.lnrpc.Failure.prototype.getCltvExpiry = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.Failure} returns this - */ -proto.lnrpc.Failure.prototype.setCltvExpiry = function(value) { - return jspb.Message.setProto3IntField(this, 6, value); -}; - - -/** - * optional uint32 flags = 7; - * @return {number} - */ -proto.lnrpc.Failure.prototype.getFlags = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.Failure} returns this - */ -proto.lnrpc.Failure.prototype.setFlags = function(value) { - return jspb.Message.setProto3IntField(this, 7, value); -}; - - -/** - * optional uint32 failure_source_index = 8; - * @return {number} - */ -proto.lnrpc.Failure.prototype.getFailureSourceIndex = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.Failure} returns this - */ -proto.lnrpc.Failure.prototype.setFailureSourceIndex = function(value) { - return jspb.Message.setProto3IntField(this, 8, value); -}; - - -/** - * optional uint32 height = 9; - * @return {number} - */ -proto.lnrpc.Failure.prototype.getHeight = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.Failure} returns this - */ -proto.lnrpc.Failure.prototype.setHeight = function(value) { - return jspb.Message.setProto3IntField(this, 9, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.ChannelUpdate.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.ChannelUpdate.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.ChannelUpdate} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.ChannelUpdate.toObject = function(includeInstance, msg) { - var f, obj = { - signature: msg.getSignature_asB64(), - chainHash: msg.getChainHash_asB64(), - chanId: jspb.Message.getFieldWithDefault(msg, 3, "0"), - timestamp: jspb.Message.getFieldWithDefault(msg, 4, 0), - messageFlags: jspb.Message.getFieldWithDefault(msg, 10, 0), - channelFlags: jspb.Message.getFieldWithDefault(msg, 5, 0), - timeLockDelta: jspb.Message.getFieldWithDefault(msg, 6, 0), - htlcMinimumMsat: jspb.Message.getFieldWithDefault(msg, 7, 0), - baseFee: jspb.Message.getFieldWithDefault(msg, 8, 0), - feeRate: jspb.Message.getFieldWithDefault(msg, 9, 0), - htlcMaximumMsat: jspb.Message.getFieldWithDefault(msg, 11, 0), - extraOpaqueData: msg.getExtraOpaqueData_asB64() - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.ChannelUpdate} - */ -proto.lnrpc.ChannelUpdate.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.ChannelUpdate; - return proto.lnrpc.ChannelUpdate.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.ChannelUpdate} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.ChannelUpdate} - */ -proto.lnrpc.ChannelUpdate.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setSignature(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setChainHash(value); - break; - case 3: - var value = /** @type {string} */ (reader.readUint64String()); - msg.setChanId(value); - break; - case 4: - var value = /** @type {number} */ (reader.readUint32()); - msg.setTimestamp(value); - break; - case 10: - var value = /** @type {number} */ (reader.readUint32()); - msg.setMessageFlags(value); - break; - case 5: - var value = /** @type {number} */ (reader.readUint32()); - msg.setChannelFlags(value); - break; - case 6: - var value = /** @type {number} */ (reader.readUint32()); - msg.setTimeLockDelta(value); - break; - case 7: - var value = /** @type {number} */ (reader.readUint64()); - msg.setHtlcMinimumMsat(value); - break; - case 8: - var value = /** @type {number} */ (reader.readUint32()); - msg.setBaseFee(value); - break; - case 9: - var value = /** @type {number} */ (reader.readUint32()); - msg.setFeeRate(value); - break; - case 11: - var value = /** @type {number} */ (reader.readUint64()); - msg.setHtlcMaximumMsat(value); - break; - case 12: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setExtraOpaqueData(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.ChannelUpdate.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.ChannelUpdate.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.ChannelUpdate} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.ChannelUpdate.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getSignature_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getChainHash_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } - f = message.getChanId(); - if (parseInt(f, 10) !== 0) { - writer.writeUint64String( - 3, - f - ); - } - f = message.getTimestamp(); - if (f !== 0) { - writer.writeUint32( - 4, - f - ); - } - f = message.getMessageFlags(); - if (f !== 0) { - writer.writeUint32( - 10, - f - ); - } - f = message.getChannelFlags(); - if (f !== 0) { - writer.writeUint32( - 5, - f - ); - } - f = message.getTimeLockDelta(); - if (f !== 0) { - writer.writeUint32( - 6, - f - ); - } - f = message.getHtlcMinimumMsat(); - if (f !== 0) { - writer.writeUint64( - 7, - f - ); - } - f = message.getBaseFee(); - if (f !== 0) { - writer.writeUint32( - 8, - f - ); - } - f = message.getFeeRate(); - if (f !== 0) { - writer.writeUint32( - 9, - f - ); - } - f = message.getHtlcMaximumMsat(); - if (f !== 0) { - writer.writeUint64( - 11, - f - ); - } - f = message.getExtraOpaqueData_asU8(); - if (f.length > 0) { - writer.writeBytes( - 12, - f - ); - } -}; - - -/** - * optional bytes signature = 1; - * @return {!(string|Uint8Array)} - */ -proto.lnrpc.ChannelUpdate.prototype.getSignature = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes signature = 1; - * This is a type-conversion wrapper around `getSignature()` - * @return {string} - */ -proto.lnrpc.ChannelUpdate.prototype.getSignature_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getSignature())); -}; - - -/** - * optional bytes signature = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getSignature()` - * @return {!Uint8Array} - */ -proto.lnrpc.ChannelUpdate.prototype.getSignature_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getSignature())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.lnrpc.ChannelUpdate} returns this - */ -proto.lnrpc.ChannelUpdate.prototype.setSignature = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional bytes chain_hash = 2; - * @return {!(string|Uint8Array)} - */ -proto.lnrpc.ChannelUpdate.prototype.getChainHash = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes chain_hash = 2; - * This is a type-conversion wrapper around `getChainHash()` - * @return {string} - */ -proto.lnrpc.ChannelUpdate.prototype.getChainHash_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getChainHash())); -}; - - -/** - * optional bytes chain_hash = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getChainHash()` - * @return {!Uint8Array} - */ -proto.lnrpc.ChannelUpdate.prototype.getChainHash_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getChainHash())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.lnrpc.ChannelUpdate} returns this - */ -proto.lnrpc.ChannelUpdate.prototype.setChainHash = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); -}; - - -/** - * optional uint64 chan_id = 3; - * @return {string} - */ -proto.lnrpc.ChannelUpdate.prototype.getChanId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "0")); -}; - - -/** - * @param {string} value - * @return {!proto.lnrpc.ChannelUpdate} returns this - */ -proto.lnrpc.ChannelUpdate.prototype.setChanId = function(value) { - return jspb.Message.setProto3StringIntField(this, 3, value); -}; - - -/** - * optional uint32 timestamp = 4; - * @return {number} - */ -proto.lnrpc.ChannelUpdate.prototype.getTimestamp = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.ChannelUpdate} returns this - */ -proto.lnrpc.ChannelUpdate.prototype.setTimestamp = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); -}; - - -/** - * optional uint32 message_flags = 10; - * @return {number} - */ -proto.lnrpc.ChannelUpdate.prototype.getMessageFlags = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 10, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.ChannelUpdate} returns this - */ -proto.lnrpc.ChannelUpdate.prototype.setMessageFlags = function(value) { - return jspb.Message.setProto3IntField(this, 10, value); -}; - - -/** - * optional uint32 channel_flags = 5; - * @return {number} - */ -proto.lnrpc.ChannelUpdate.prototype.getChannelFlags = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.ChannelUpdate} returns this - */ -proto.lnrpc.ChannelUpdate.prototype.setChannelFlags = function(value) { - return jspb.Message.setProto3IntField(this, 5, value); -}; - - -/** - * optional uint32 time_lock_delta = 6; - * @return {number} - */ -proto.lnrpc.ChannelUpdate.prototype.getTimeLockDelta = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.ChannelUpdate} returns this - */ -proto.lnrpc.ChannelUpdate.prototype.setTimeLockDelta = function(value) { - return jspb.Message.setProto3IntField(this, 6, value); -}; - - -/** - * optional uint64 htlc_minimum_msat = 7; - * @return {number} - */ -proto.lnrpc.ChannelUpdate.prototype.getHtlcMinimumMsat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.ChannelUpdate} returns this - */ -proto.lnrpc.ChannelUpdate.prototype.setHtlcMinimumMsat = function(value) { - return jspb.Message.setProto3IntField(this, 7, value); -}; - - -/** - * optional uint32 base_fee = 8; - * @return {number} - */ -proto.lnrpc.ChannelUpdate.prototype.getBaseFee = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.ChannelUpdate} returns this - */ -proto.lnrpc.ChannelUpdate.prototype.setBaseFee = function(value) { - return jspb.Message.setProto3IntField(this, 8, value); -}; - - -/** - * optional uint32 fee_rate = 9; - * @return {number} - */ -proto.lnrpc.ChannelUpdate.prototype.getFeeRate = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.ChannelUpdate} returns this - */ -proto.lnrpc.ChannelUpdate.prototype.setFeeRate = function(value) { - return jspb.Message.setProto3IntField(this, 9, value); -}; - - -/** - * optional uint64 htlc_maximum_msat = 11; - * @return {number} - */ -proto.lnrpc.ChannelUpdate.prototype.getHtlcMaximumMsat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 11, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.ChannelUpdate} returns this - */ -proto.lnrpc.ChannelUpdate.prototype.setHtlcMaximumMsat = function(value) { - return jspb.Message.setProto3IntField(this, 11, value); -}; - - -/** - * optional bytes extra_opaque_data = 12; - * @return {!(string|Uint8Array)} - */ -proto.lnrpc.ChannelUpdate.prototype.getExtraOpaqueData = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 12, "")); -}; - - -/** - * optional bytes extra_opaque_data = 12; - * This is a type-conversion wrapper around `getExtraOpaqueData()` - * @return {string} - */ -proto.lnrpc.ChannelUpdate.prototype.getExtraOpaqueData_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getExtraOpaqueData())); -}; - - -/** - * optional bytes extra_opaque_data = 12; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getExtraOpaqueData()` - * @return {!Uint8Array} - */ -proto.lnrpc.ChannelUpdate.prototype.getExtraOpaqueData_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getExtraOpaqueData())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.lnrpc.ChannelUpdate} returns this - */ -proto.lnrpc.ChannelUpdate.prototype.setExtraOpaqueData = function(value) { - return jspb.Message.setProto3BytesField(this, 12, value); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.lnrpc.MacaroonId.repeatedFields_ = [3]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.MacaroonId.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.MacaroonId.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.MacaroonId} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.MacaroonId.toObject = function(includeInstance, msg) { - var f, obj = { - nonce: msg.getNonce_asB64(), - storageid: msg.getStorageid_asB64(), - opsList: jspb.Message.toObjectList(msg.getOpsList(), - proto.lnrpc.Op.toObject, includeInstance) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.MacaroonId} - */ -proto.lnrpc.MacaroonId.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.MacaroonId; - return proto.lnrpc.MacaroonId.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.MacaroonId} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.MacaroonId} - */ -proto.lnrpc.MacaroonId.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setNonce(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setStorageid(value); - break; - case 3: - var value = new proto.lnrpc.Op; - reader.readMessage(value,proto.lnrpc.Op.deserializeBinaryFromReader); - msg.addOps(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.MacaroonId.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.MacaroonId.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.MacaroonId} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.MacaroonId.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getNonce_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getStorageid_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } - f = message.getOpsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 3, - f, - proto.lnrpc.Op.serializeBinaryToWriter - ); - } -}; - - -/** - * optional bytes nonce = 1; - * @return {!(string|Uint8Array)} - */ -proto.lnrpc.MacaroonId.prototype.getNonce = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes nonce = 1; - * This is a type-conversion wrapper around `getNonce()` - * @return {string} - */ -proto.lnrpc.MacaroonId.prototype.getNonce_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getNonce())); -}; - - -/** - * optional bytes nonce = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getNonce()` - * @return {!Uint8Array} - */ -proto.lnrpc.MacaroonId.prototype.getNonce_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getNonce())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.lnrpc.MacaroonId} returns this - */ -proto.lnrpc.MacaroonId.prototype.setNonce = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional bytes storageId = 2; - * @return {!(string|Uint8Array)} - */ -proto.lnrpc.MacaroonId.prototype.getStorageid = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes storageId = 2; - * This is a type-conversion wrapper around `getStorageid()` - * @return {string} - */ -proto.lnrpc.MacaroonId.prototype.getStorageid_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getStorageid())); -}; - - -/** - * optional bytes storageId = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getStorageid()` - * @return {!Uint8Array} - */ -proto.lnrpc.MacaroonId.prototype.getStorageid_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getStorageid())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.lnrpc.MacaroonId} returns this - */ -proto.lnrpc.MacaroonId.prototype.setStorageid = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); -}; - - -/** - * repeated Op ops = 3; - * @return {!Array} - */ -proto.lnrpc.MacaroonId.prototype.getOpsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.Op, 3)); -}; - - -/** - * @param {!Array} value - * @return {!proto.lnrpc.MacaroonId} returns this -*/ -proto.lnrpc.MacaroonId.prototype.setOpsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 3, value); -}; - - -/** - * @param {!proto.lnrpc.Op=} opt_value - * @param {number=} opt_index - * @return {!proto.lnrpc.Op} - */ -proto.lnrpc.MacaroonId.prototype.addOps = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.lnrpc.Op, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.lnrpc.MacaroonId} returns this - */ -proto.lnrpc.MacaroonId.prototype.clearOpsList = function() { - return this.setOpsList([]); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.lnrpc.Op.repeatedFields_ = [2]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.Op.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.Op.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.Op} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.Op.toObject = function(includeInstance, msg) { - var f, obj = { - entity: jspb.Message.getFieldWithDefault(msg, 1, ""), - actionsList: (f = jspb.Message.getRepeatedField(msg, 2)) == null ? undefined : f - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.Op} - */ -proto.lnrpc.Op.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.Op; - return proto.lnrpc.Op.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.Op} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.Op} - */ -proto.lnrpc.Op.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setEntity(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.addActions(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.Op.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.Op.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.Op} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.Op.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getEntity(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getActionsList(); - if (f.length > 0) { - writer.writeRepeatedString( - 2, - f - ); - } -}; - - -/** - * optional string entity = 1; - * @return {string} - */ -proto.lnrpc.Op.prototype.getEntity = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.lnrpc.Op} returns this - */ -proto.lnrpc.Op.prototype.setEntity = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * repeated string actions = 2; - * @return {!Array} - */ -proto.lnrpc.Op.prototype.getActionsList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 2)); -}; - - -/** - * @param {!Array} value - * @return {!proto.lnrpc.Op} returns this - */ -proto.lnrpc.Op.prototype.setActionsList = function(value) { - return jspb.Message.setField(this, 2, value || []); -}; - - -/** - * @param {string} value - * @param {number=} opt_index - * @return {!proto.lnrpc.Op} returns this - */ -proto.lnrpc.Op.prototype.addActions = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 2, value, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.lnrpc.Op} returns this - */ -proto.lnrpc.Op.prototype.clearActionsList = function() { - return this.setActionsList([]); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.lnrpc.CheckMacPermRequest.repeatedFields_ = [2]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.CheckMacPermRequest.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.CheckMacPermRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.CheckMacPermRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.CheckMacPermRequest.toObject = function(includeInstance, msg) { - var f, obj = { - macaroon: msg.getMacaroon_asB64(), - permissionsList: jspb.Message.toObjectList(msg.getPermissionsList(), - proto.lnrpc.MacaroonPermission.toObject, includeInstance), - fullmethod: jspb.Message.getFieldWithDefault(msg, 3, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.CheckMacPermRequest} - */ -proto.lnrpc.CheckMacPermRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.CheckMacPermRequest; - return proto.lnrpc.CheckMacPermRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.CheckMacPermRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.CheckMacPermRequest} - */ -proto.lnrpc.CheckMacPermRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setMacaroon(value); - break; - case 2: - var value = new proto.lnrpc.MacaroonPermission; - reader.readMessage(value,proto.lnrpc.MacaroonPermission.deserializeBinaryFromReader); - msg.addPermissions(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setFullmethod(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.CheckMacPermRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.CheckMacPermRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.CheckMacPermRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.CheckMacPermRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getMacaroon_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getPermissionsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 2, - f, - proto.lnrpc.MacaroonPermission.serializeBinaryToWriter - ); - } - f = message.getFullmethod(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } -}; - - -/** - * optional bytes macaroon = 1; - * @return {!(string|Uint8Array)} - */ -proto.lnrpc.CheckMacPermRequest.prototype.getMacaroon = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes macaroon = 1; - * This is a type-conversion wrapper around `getMacaroon()` - * @return {string} - */ -proto.lnrpc.CheckMacPermRequest.prototype.getMacaroon_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getMacaroon())); -}; - - -/** - * optional bytes macaroon = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getMacaroon()` - * @return {!Uint8Array} - */ -proto.lnrpc.CheckMacPermRequest.prototype.getMacaroon_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getMacaroon())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.lnrpc.CheckMacPermRequest} returns this - */ -proto.lnrpc.CheckMacPermRequest.prototype.setMacaroon = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * repeated MacaroonPermission permissions = 2; - * @return {!Array} - */ -proto.lnrpc.CheckMacPermRequest.prototype.getPermissionsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.MacaroonPermission, 2)); -}; - - -/** - * @param {!Array} value - * @return {!proto.lnrpc.CheckMacPermRequest} returns this -*/ -proto.lnrpc.CheckMacPermRequest.prototype.setPermissionsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 2, value); -}; - - -/** - * @param {!proto.lnrpc.MacaroonPermission=} opt_value - * @param {number=} opt_index - * @return {!proto.lnrpc.MacaroonPermission} - */ -proto.lnrpc.CheckMacPermRequest.prototype.addPermissions = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.lnrpc.MacaroonPermission, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.lnrpc.CheckMacPermRequest} returns this - */ -proto.lnrpc.CheckMacPermRequest.prototype.clearPermissionsList = function() { - return this.setPermissionsList([]); -}; - - -/** - * optional string fullMethod = 3; - * @return {string} - */ -proto.lnrpc.CheckMacPermRequest.prototype.getFullmethod = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * @param {string} value - * @return {!proto.lnrpc.CheckMacPermRequest} returns this - */ -proto.lnrpc.CheckMacPermRequest.prototype.setFullmethod = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.CheckMacPermResponse.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.CheckMacPermResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.CheckMacPermResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.CheckMacPermResponse.toObject = function(includeInstance, msg) { - var f, obj = { - valid: jspb.Message.getBooleanFieldWithDefault(msg, 1, false) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.CheckMacPermResponse} - */ -proto.lnrpc.CheckMacPermResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.CheckMacPermResponse; - return proto.lnrpc.CheckMacPermResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.CheckMacPermResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.CheckMacPermResponse} - */ -proto.lnrpc.CheckMacPermResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setValid(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.CheckMacPermResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.CheckMacPermResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.CheckMacPermResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.CheckMacPermResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getValid(); - if (f) { - writer.writeBool( - 1, - f - ); - } -}; - - -/** - * optional bool valid = 1; - * @return {boolean} - */ -proto.lnrpc.CheckMacPermResponse.prototype.getValid = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.lnrpc.CheckMacPermResponse} returns this - */ -proto.lnrpc.CheckMacPermResponse.prototype.setValid = function(value) { - return jspb.Message.setProto3BooleanField(this, 1, value); -}; - - - -/** - * Oneof group definitions for this message. Each group defines the field - * numbers belonging to that group. When of these fields' value is set, all - * other fields in the group are cleared. During deserialization, if multiple - * fields are encountered for a group, only the last value seen will be kept. - * @private {!Array>} - * @const - */ -proto.lnrpc.RPCMiddlewareRequest.oneofGroups_ = [[4,5,6]]; - -/** - * @enum {number} - */ -proto.lnrpc.RPCMiddlewareRequest.InterceptTypeCase = { - INTERCEPT_TYPE_NOT_SET: 0, - STREAM_AUTH: 4, - REQUEST: 5, - RESPONSE: 6 -}; - -/** - * @return {proto.lnrpc.RPCMiddlewareRequest.InterceptTypeCase} - */ -proto.lnrpc.RPCMiddlewareRequest.prototype.getInterceptTypeCase = function() { - return /** @type {proto.lnrpc.RPCMiddlewareRequest.InterceptTypeCase} */(jspb.Message.computeOneofCase(this, proto.lnrpc.RPCMiddlewareRequest.oneofGroups_[0])); -}; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.RPCMiddlewareRequest.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.RPCMiddlewareRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.RPCMiddlewareRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.RPCMiddlewareRequest.toObject = function(includeInstance, msg) { - var f, obj = { - requestId: jspb.Message.getFieldWithDefault(msg, 1, 0), - rawMacaroon: msg.getRawMacaroon_asB64(), - customCaveatCondition: jspb.Message.getFieldWithDefault(msg, 3, ""), - streamAuth: (f = msg.getStreamAuth()) && proto.lnrpc.StreamAuth.toObject(includeInstance, f), - request: (f = msg.getRequest()) && proto.lnrpc.RPCMessage.toObject(includeInstance, f), - response: (f = msg.getResponse()) && proto.lnrpc.RPCMessage.toObject(includeInstance, f), - msgId: jspb.Message.getFieldWithDefault(msg, 7, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.RPCMiddlewareRequest} - */ -proto.lnrpc.RPCMiddlewareRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.RPCMiddlewareRequest; - return proto.lnrpc.RPCMiddlewareRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.RPCMiddlewareRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.RPCMiddlewareRequest} - */ -proto.lnrpc.RPCMiddlewareRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readUint64()); - msg.setRequestId(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setRawMacaroon(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setCustomCaveatCondition(value); - break; - case 4: - var value = new proto.lnrpc.StreamAuth; - reader.readMessage(value,proto.lnrpc.StreamAuth.deserializeBinaryFromReader); - msg.setStreamAuth(value); - break; - case 5: - var value = new proto.lnrpc.RPCMessage; - reader.readMessage(value,proto.lnrpc.RPCMessage.deserializeBinaryFromReader); - msg.setRequest(value); - break; - case 6: - var value = new proto.lnrpc.RPCMessage; - reader.readMessage(value,proto.lnrpc.RPCMessage.deserializeBinaryFromReader); - msg.setResponse(value); - break; - case 7: - var value = /** @type {number} */ (reader.readUint64()); - msg.setMsgId(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.RPCMiddlewareRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.RPCMiddlewareRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.RPCMiddlewareRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.RPCMiddlewareRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getRequestId(); - if (f !== 0) { - writer.writeUint64( - 1, - f - ); - } - f = message.getRawMacaroon_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } - f = message.getCustomCaveatCondition(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } - f = message.getStreamAuth(); - if (f != null) { - writer.writeMessage( - 4, - f, - proto.lnrpc.StreamAuth.serializeBinaryToWriter - ); - } - f = message.getRequest(); - if (f != null) { - writer.writeMessage( - 5, - f, - proto.lnrpc.RPCMessage.serializeBinaryToWriter - ); - } - f = message.getResponse(); - if (f != null) { - writer.writeMessage( - 6, - f, - proto.lnrpc.RPCMessage.serializeBinaryToWriter - ); - } - f = message.getMsgId(); - if (f !== 0) { - writer.writeUint64( - 7, - f - ); - } -}; - - -/** - * optional uint64 request_id = 1; - * @return {number} - */ -proto.lnrpc.RPCMiddlewareRequest.prototype.getRequestId = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.RPCMiddlewareRequest} returns this - */ -proto.lnrpc.RPCMiddlewareRequest.prototype.setRequestId = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); -}; - - -/** - * optional bytes raw_macaroon = 2; - * @return {!(string|Uint8Array)} - */ -proto.lnrpc.RPCMiddlewareRequest.prototype.getRawMacaroon = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes raw_macaroon = 2; - * This is a type-conversion wrapper around `getRawMacaroon()` - * @return {string} - */ -proto.lnrpc.RPCMiddlewareRequest.prototype.getRawMacaroon_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getRawMacaroon())); -}; - - -/** - * optional bytes raw_macaroon = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getRawMacaroon()` - * @return {!Uint8Array} - */ -proto.lnrpc.RPCMiddlewareRequest.prototype.getRawMacaroon_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getRawMacaroon())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.lnrpc.RPCMiddlewareRequest} returns this - */ -proto.lnrpc.RPCMiddlewareRequest.prototype.setRawMacaroon = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); -}; - - -/** - * optional string custom_caveat_condition = 3; - * @return {string} - */ -proto.lnrpc.RPCMiddlewareRequest.prototype.getCustomCaveatCondition = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * @param {string} value - * @return {!proto.lnrpc.RPCMiddlewareRequest} returns this - */ -proto.lnrpc.RPCMiddlewareRequest.prototype.setCustomCaveatCondition = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); -}; - - -/** - * optional StreamAuth stream_auth = 4; - * @return {?proto.lnrpc.StreamAuth} - */ -proto.lnrpc.RPCMiddlewareRequest.prototype.getStreamAuth = function() { - return /** @type{?proto.lnrpc.StreamAuth} */ ( - jspb.Message.getWrapperField(this, proto.lnrpc.StreamAuth, 4)); -}; - - -/** - * @param {?proto.lnrpc.StreamAuth|undefined} value - * @return {!proto.lnrpc.RPCMiddlewareRequest} returns this -*/ -proto.lnrpc.RPCMiddlewareRequest.prototype.setStreamAuth = function(value) { - return jspb.Message.setOneofWrapperField(this, 4, proto.lnrpc.RPCMiddlewareRequest.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.lnrpc.RPCMiddlewareRequest} returns this - */ -proto.lnrpc.RPCMiddlewareRequest.prototype.clearStreamAuth = function() { - return this.setStreamAuth(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.lnrpc.RPCMiddlewareRequest.prototype.hasStreamAuth = function() { - return jspb.Message.getField(this, 4) != null; -}; - - -/** - * optional RPCMessage request = 5; - * @return {?proto.lnrpc.RPCMessage} - */ -proto.lnrpc.RPCMiddlewareRequest.prototype.getRequest = function() { - return /** @type{?proto.lnrpc.RPCMessage} */ ( - jspb.Message.getWrapperField(this, proto.lnrpc.RPCMessage, 5)); -}; - - -/** - * @param {?proto.lnrpc.RPCMessage|undefined} value - * @return {!proto.lnrpc.RPCMiddlewareRequest} returns this -*/ -proto.lnrpc.RPCMiddlewareRequest.prototype.setRequest = function(value) { - return jspb.Message.setOneofWrapperField(this, 5, proto.lnrpc.RPCMiddlewareRequest.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.lnrpc.RPCMiddlewareRequest} returns this - */ -proto.lnrpc.RPCMiddlewareRequest.prototype.clearRequest = function() { - return this.setRequest(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.lnrpc.RPCMiddlewareRequest.prototype.hasRequest = function() { - return jspb.Message.getField(this, 5) != null; -}; - - -/** - * optional RPCMessage response = 6; - * @return {?proto.lnrpc.RPCMessage} - */ -proto.lnrpc.RPCMiddlewareRequest.prototype.getResponse = function() { - return /** @type{?proto.lnrpc.RPCMessage} */ ( - jspb.Message.getWrapperField(this, proto.lnrpc.RPCMessage, 6)); -}; - - -/** - * @param {?proto.lnrpc.RPCMessage|undefined} value - * @return {!proto.lnrpc.RPCMiddlewareRequest} returns this -*/ -proto.lnrpc.RPCMiddlewareRequest.prototype.setResponse = function(value) { - return jspb.Message.setOneofWrapperField(this, 6, proto.lnrpc.RPCMiddlewareRequest.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.lnrpc.RPCMiddlewareRequest} returns this - */ -proto.lnrpc.RPCMiddlewareRequest.prototype.clearResponse = function() { - return this.setResponse(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.lnrpc.RPCMiddlewareRequest.prototype.hasResponse = function() { - return jspb.Message.getField(this, 6) != null; -}; - - -/** - * optional uint64 msg_id = 7; - * @return {number} - */ -proto.lnrpc.RPCMiddlewareRequest.prototype.getMsgId = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.RPCMiddlewareRequest} returns this - */ -proto.lnrpc.RPCMiddlewareRequest.prototype.setMsgId = function(value) { - return jspb.Message.setProto3IntField(this, 7, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.StreamAuth.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.StreamAuth.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.StreamAuth} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.StreamAuth.toObject = function(includeInstance, msg) { - var f, obj = { - methodFullUri: jspb.Message.getFieldWithDefault(msg, 1, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.StreamAuth} - */ -proto.lnrpc.StreamAuth.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.StreamAuth; - return proto.lnrpc.StreamAuth.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.StreamAuth} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.StreamAuth} - */ -proto.lnrpc.StreamAuth.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setMethodFullUri(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.StreamAuth.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.StreamAuth.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.StreamAuth} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.StreamAuth.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getMethodFullUri(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } -}; - - -/** - * optional string method_full_uri = 1; - * @return {string} - */ -proto.lnrpc.StreamAuth.prototype.getMethodFullUri = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.lnrpc.StreamAuth} returns this - */ -proto.lnrpc.StreamAuth.prototype.setMethodFullUri = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.RPCMessage.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.RPCMessage.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.RPCMessage} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.RPCMessage.toObject = function(includeInstance, msg) { - var f, obj = { - methodFullUri: jspb.Message.getFieldWithDefault(msg, 1, ""), - streamRpc: jspb.Message.getBooleanFieldWithDefault(msg, 2, false), - typeName: jspb.Message.getFieldWithDefault(msg, 3, ""), - serialized: msg.getSerialized_asB64() - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.RPCMessage} - */ -proto.lnrpc.RPCMessage.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.RPCMessage; - return proto.lnrpc.RPCMessage.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.RPCMessage} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.RPCMessage} - */ -proto.lnrpc.RPCMessage.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setMethodFullUri(value); - break; - case 2: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setStreamRpc(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setTypeName(value); - break; - case 4: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setSerialized(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.RPCMessage.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.RPCMessage.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.RPCMessage} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.RPCMessage.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getMethodFullUri(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getStreamRpc(); - if (f) { - writer.writeBool( - 2, - f - ); - } - f = message.getTypeName(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } - f = message.getSerialized_asU8(); - if (f.length > 0) { - writer.writeBytes( - 4, - f - ); - } -}; - - -/** - * optional string method_full_uri = 1; - * @return {string} - */ -proto.lnrpc.RPCMessage.prototype.getMethodFullUri = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.lnrpc.RPCMessage} returns this - */ -proto.lnrpc.RPCMessage.prototype.setMethodFullUri = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional bool stream_rpc = 2; - * @return {boolean} - */ -proto.lnrpc.RPCMessage.prototype.getStreamRpc = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.lnrpc.RPCMessage} returns this - */ -proto.lnrpc.RPCMessage.prototype.setStreamRpc = function(value) { - return jspb.Message.setProto3BooleanField(this, 2, value); -}; - - -/** - * optional string type_name = 3; - * @return {string} - */ -proto.lnrpc.RPCMessage.prototype.getTypeName = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * @param {string} value - * @return {!proto.lnrpc.RPCMessage} returns this - */ -proto.lnrpc.RPCMessage.prototype.setTypeName = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); -}; - - -/** - * optional bytes serialized = 4; - * @return {!(string|Uint8Array)} - */ -proto.lnrpc.RPCMessage.prototype.getSerialized = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 4, "")); -}; - - -/** - * optional bytes serialized = 4; - * This is a type-conversion wrapper around `getSerialized()` - * @return {string} - */ -proto.lnrpc.RPCMessage.prototype.getSerialized_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getSerialized())); -}; - - -/** - * optional bytes serialized = 4; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getSerialized()` - * @return {!Uint8Array} - */ -proto.lnrpc.RPCMessage.prototype.getSerialized_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getSerialized())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.lnrpc.RPCMessage} returns this - */ -proto.lnrpc.RPCMessage.prototype.setSerialized = function(value) { - return jspb.Message.setProto3BytesField(this, 4, value); -}; - - - -/** - * Oneof group definitions for this message. Each group defines the field - * numbers belonging to that group. When of these fields' value is set, all - * other fields in the group are cleared. During deserialization, if multiple - * fields are encountered for a group, only the last value seen will be kept. - * @private {!Array>} - * @const - */ -proto.lnrpc.RPCMiddlewareResponse.oneofGroups_ = [[2,3]]; - -/** - * @enum {number} - */ -proto.lnrpc.RPCMiddlewareResponse.MiddlewareMessageCase = { - MIDDLEWARE_MESSAGE_NOT_SET: 0, - REGISTER: 2, - FEEDBACK: 3 -}; - -/** - * @return {proto.lnrpc.RPCMiddlewareResponse.MiddlewareMessageCase} - */ -proto.lnrpc.RPCMiddlewareResponse.prototype.getMiddlewareMessageCase = function() { - return /** @type {proto.lnrpc.RPCMiddlewareResponse.MiddlewareMessageCase} */(jspb.Message.computeOneofCase(this, proto.lnrpc.RPCMiddlewareResponse.oneofGroups_[0])); -}; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.RPCMiddlewareResponse.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.RPCMiddlewareResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.RPCMiddlewareResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.RPCMiddlewareResponse.toObject = function(includeInstance, msg) { - var f, obj = { - refMsgId: jspb.Message.getFieldWithDefault(msg, 1, 0), - register: (f = msg.getRegister()) && proto.lnrpc.MiddlewareRegistration.toObject(includeInstance, f), - feedback: (f = msg.getFeedback()) && proto.lnrpc.InterceptFeedback.toObject(includeInstance, f) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.RPCMiddlewareResponse} - */ -proto.lnrpc.RPCMiddlewareResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.RPCMiddlewareResponse; - return proto.lnrpc.RPCMiddlewareResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.RPCMiddlewareResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.RPCMiddlewareResponse} - */ -proto.lnrpc.RPCMiddlewareResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readUint64()); - msg.setRefMsgId(value); - break; - case 2: - var value = new proto.lnrpc.MiddlewareRegistration; - reader.readMessage(value,proto.lnrpc.MiddlewareRegistration.deserializeBinaryFromReader); - msg.setRegister(value); - break; - case 3: - var value = new proto.lnrpc.InterceptFeedback; - reader.readMessage(value,proto.lnrpc.InterceptFeedback.deserializeBinaryFromReader); - msg.setFeedback(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.RPCMiddlewareResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.RPCMiddlewareResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.RPCMiddlewareResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.RPCMiddlewareResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getRefMsgId(); - if (f !== 0) { - writer.writeUint64( - 1, - f - ); - } - f = message.getRegister(); - if (f != null) { - writer.writeMessage( - 2, - f, - proto.lnrpc.MiddlewareRegistration.serializeBinaryToWriter - ); - } - f = message.getFeedback(); - if (f != null) { - writer.writeMessage( - 3, - f, - proto.lnrpc.InterceptFeedback.serializeBinaryToWriter - ); - } -}; - - -/** - * optional uint64 ref_msg_id = 1; - * @return {number} - */ -proto.lnrpc.RPCMiddlewareResponse.prototype.getRefMsgId = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.RPCMiddlewareResponse} returns this - */ -proto.lnrpc.RPCMiddlewareResponse.prototype.setRefMsgId = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); -}; - - -/** - * optional MiddlewareRegistration register = 2; - * @return {?proto.lnrpc.MiddlewareRegistration} - */ -proto.lnrpc.RPCMiddlewareResponse.prototype.getRegister = function() { - return /** @type{?proto.lnrpc.MiddlewareRegistration} */ ( - jspb.Message.getWrapperField(this, proto.lnrpc.MiddlewareRegistration, 2)); -}; - - -/** - * @param {?proto.lnrpc.MiddlewareRegistration|undefined} value - * @return {!proto.lnrpc.RPCMiddlewareResponse} returns this -*/ -proto.lnrpc.RPCMiddlewareResponse.prototype.setRegister = function(value) { - return jspb.Message.setOneofWrapperField(this, 2, proto.lnrpc.RPCMiddlewareResponse.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.lnrpc.RPCMiddlewareResponse} returns this - */ -proto.lnrpc.RPCMiddlewareResponse.prototype.clearRegister = function() { - return this.setRegister(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.lnrpc.RPCMiddlewareResponse.prototype.hasRegister = function() { - return jspb.Message.getField(this, 2) != null; -}; - - -/** - * optional InterceptFeedback feedback = 3; - * @return {?proto.lnrpc.InterceptFeedback} - */ -proto.lnrpc.RPCMiddlewareResponse.prototype.getFeedback = function() { - return /** @type{?proto.lnrpc.InterceptFeedback} */ ( - jspb.Message.getWrapperField(this, proto.lnrpc.InterceptFeedback, 3)); -}; - - -/** - * @param {?proto.lnrpc.InterceptFeedback|undefined} value - * @return {!proto.lnrpc.RPCMiddlewareResponse} returns this -*/ -proto.lnrpc.RPCMiddlewareResponse.prototype.setFeedback = function(value) { - return jspb.Message.setOneofWrapperField(this, 3, proto.lnrpc.RPCMiddlewareResponse.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.lnrpc.RPCMiddlewareResponse} returns this - */ -proto.lnrpc.RPCMiddlewareResponse.prototype.clearFeedback = function() { - return this.setFeedback(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.lnrpc.RPCMiddlewareResponse.prototype.hasFeedback = function() { - return jspb.Message.getField(this, 3) != null; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.MiddlewareRegistration.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.MiddlewareRegistration.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.MiddlewareRegistration} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.MiddlewareRegistration.toObject = function(includeInstance, msg) { - var f, obj = { - middlewareName: jspb.Message.getFieldWithDefault(msg, 1, ""), - customMacaroonCaveatName: jspb.Message.getFieldWithDefault(msg, 2, ""), - readOnlyMode: jspb.Message.getBooleanFieldWithDefault(msg, 3, false) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.MiddlewareRegistration} - */ -proto.lnrpc.MiddlewareRegistration.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.MiddlewareRegistration; - return proto.lnrpc.MiddlewareRegistration.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.MiddlewareRegistration} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.MiddlewareRegistration} - */ -proto.lnrpc.MiddlewareRegistration.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setMiddlewareName(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setCustomMacaroonCaveatName(value); - break; - case 3: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setReadOnlyMode(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.MiddlewareRegistration.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.MiddlewareRegistration.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.MiddlewareRegistration} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.MiddlewareRegistration.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getMiddlewareName(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getCustomMacaroonCaveatName(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getReadOnlyMode(); - if (f) { - writer.writeBool( - 3, - f - ); - } -}; - - -/** - * optional string middleware_name = 1; - * @return {string} - */ -proto.lnrpc.MiddlewareRegistration.prototype.getMiddlewareName = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.lnrpc.MiddlewareRegistration} returns this - */ -proto.lnrpc.MiddlewareRegistration.prototype.setMiddlewareName = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional string custom_macaroon_caveat_name = 2; - * @return {string} - */ -proto.lnrpc.MiddlewareRegistration.prototype.getCustomMacaroonCaveatName = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.lnrpc.MiddlewareRegistration} returns this - */ -proto.lnrpc.MiddlewareRegistration.prototype.setCustomMacaroonCaveatName = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional bool read_only_mode = 3; - * @return {boolean} - */ -proto.lnrpc.MiddlewareRegistration.prototype.getReadOnlyMode = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.lnrpc.MiddlewareRegistration} returns this - */ -proto.lnrpc.MiddlewareRegistration.prototype.setReadOnlyMode = function(value) { - return jspb.Message.setProto3BooleanField(this, 3, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.InterceptFeedback.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.InterceptFeedback.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.InterceptFeedback} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.InterceptFeedback.toObject = function(includeInstance, msg) { - var f, obj = { - error: jspb.Message.getFieldWithDefault(msg, 1, ""), - replaceResponse: jspb.Message.getBooleanFieldWithDefault(msg, 2, false), - replacementSerialized: msg.getReplacementSerialized_asB64() - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.InterceptFeedback} - */ -proto.lnrpc.InterceptFeedback.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.InterceptFeedback; - return proto.lnrpc.InterceptFeedback.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.InterceptFeedback} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.InterceptFeedback} - */ -proto.lnrpc.InterceptFeedback.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setError(value); - break; - case 2: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setReplaceResponse(value); - break; - case 3: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setReplacementSerialized(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.InterceptFeedback.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.InterceptFeedback.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.InterceptFeedback} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.InterceptFeedback.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getError(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getReplaceResponse(); - if (f) { - writer.writeBool( - 2, - f - ); - } - f = message.getReplacementSerialized_asU8(); - if (f.length > 0) { - writer.writeBytes( - 3, - f - ); - } -}; - - -/** - * optional string error = 1; - * @return {string} - */ -proto.lnrpc.InterceptFeedback.prototype.getError = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.lnrpc.InterceptFeedback} returns this - */ -proto.lnrpc.InterceptFeedback.prototype.setError = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional bool replace_response = 2; - * @return {boolean} - */ -proto.lnrpc.InterceptFeedback.prototype.getReplaceResponse = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.lnrpc.InterceptFeedback} returns this - */ -proto.lnrpc.InterceptFeedback.prototype.setReplaceResponse = function(value) { - return jspb.Message.setProto3BooleanField(this, 2, value); -}; - - -/** - * optional bytes replacement_serialized = 3; - * @return {!(string|Uint8Array)} - */ -proto.lnrpc.InterceptFeedback.prototype.getReplacementSerialized = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * optional bytes replacement_serialized = 3; - * This is a type-conversion wrapper around `getReplacementSerialized()` - * @return {string} - */ -proto.lnrpc.InterceptFeedback.prototype.getReplacementSerialized_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getReplacementSerialized())); -}; - - -/** - * optional bytes replacement_serialized = 3; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getReplacementSerialized()` - * @return {!Uint8Array} - */ -proto.lnrpc.InterceptFeedback.prototype.getReplacementSerialized_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getReplacementSerialized())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.lnrpc.InterceptFeedback} returns this - */ -proto.lnrpc.InterceptFeedback.prototype.setReplacementSerialized = function(value) { - return jspb.Message.setProto3BytesField(this, 3, value); -}; - - -/** - * @enum {number} - */ -proto.lnrpc.AddressType = { - WITNESS_PUBKEY_HASH: 0, - NESTED_PUBKEY_HASH: 1, - UNUSED_WITNESS_PUBKEY_HASH: 2, - UNUSED_NESTED_PUBKEY_HASH: 3 -}; - -/** - * @enum {number} - */ -proto.lnrpc.CommitmentType = { - UNKNOWN_COMMITMENT_TYPE: 0, - LEGACY: 1, - STATIC_REMOTE_KEY: 2, - ANCHORS: 3, - SCRIPT_ENFORCED_LEASE: 4 -}; - -/** - * @enum {number} - */ -proto.lnrpc.Initiator = { - INITIATOR_UNKNOWN: 0, - INITIATOR_LOCAL: 1, - INITIATOR_REMOTE: 2, - INITIATOR_BOTH: 3 -}; - -/** - * @enum {number} - */ -proto.lnrpc.ResolutionType = { - TYPE_UNKNOWN: 0, - ANCHOR: 1, - INCOMING_HTLC: 2, - OUTGOING_HTLC: 3, - COMMIT: 4 -}; - -/** - * @enum {number} - */ -proto.lnrpc.ResolutionOutcome = { - OUTCOME_UNKNOWN: 0, - CLAIMED: 1, - UNCLAIMED: 2, - ABANDONED: 3, - FIRST_STAGE: 4, - TIMEOUT: 5 -}; - -/** - * @enum {number} - */ -proto.lnrpc.NodeMetricType = { - UNKNOWN: 0, - BETWEENNESS_CENTRALITY: 1 -}; - -/** - * @enum {number} - */ -proto.lnrpc.InvoiceHTLCState = { - ACCEPTED: 0, - SETTLED: 1, - CANCELED: 2 -}; - -/** - * @enum {number} - */ -proto.lnrpc.PaymentFailureReason = { - FAILURE_REASON_NONE: 0, - FAILURE_REASON_TIMEOUT: 1, - FAILURE_REASON_NO_ROUTE: 2, - FAILURE_REASON_ERROR: 3, - FAILURE_REASON_INCORRECT_PAYMENT_DETAILS: 4, - FAILURE_REASON_INSUFFICIENT_BALANCE: 5 -}; - -/** - * @enum {number} - */ -proto.lnrpc.FeatureBit = { - DATALOSS_PROTECT_REQ: 0, - DATALOSS_PROTECT_OPT: 1, - INITIAL_ROUING_SYNC: 3, - UPFRONT_SHUTDOWN_SCRIPT_REQ: 4, - UPFRONT_SHUTDOWN_SCRIPT_OPT: 5, - GOSSIP_QUERIES_REQ: 6, - GOSSIP_QUERIES_OPT: 7, - TLV_ONION_REQ: 8, - TLV_ONION_OPT: 9, - EXT_GOSSIP_QUERIES_REQ: 10, - EXT_GOSSIP_QUERIES_OPT: 11, - STATIC_REMOTE_KEY_REQ: 12, - STATIC_REMOTE_KEY_OPT: 13, - PAYMENT_ADDR_REQ: 14, - PAYMENT_ADDR_OPT: 15, - MPP_REQ: 16, - MPP_OPT: 17, - WUMBO_CHANNELS_REQ: 18, - WUMBO_CHANNELS_OPT: 19, - ANCHORS_REQ: 20, - ANCHORS_OPT: 21, - ANCHORS_ZERO_FEE_HTLC_REQ: 22, - ANCHORS_ZERO_FEE_HTLC_OPT: 23, - AMP_REQ: 30, - AMP_OPT: 31 -}; - -/** - * @enum {number} - */ -proto.lnrpc.UpdateFailure = { - UPDATE_FAILURE_UNKNOWN: 0, - UPDATE_FAILURE_PENDING: 1, - UPDATE_FAILURE_NOT_FOUND: 2, - UPDATE_FAILURE_INTERNAL_ERR: 3, - UPDATE_FAILURE_INVALID_PARAMETER: 4 -}; - -goog.object.extend(exports, proto.lnrpc); diff --git a/lib/types/generated/lightning_pb_service.d.ts b/lib/types/generated/lightning_pb_service.d.ts deleted file mode 100644 index c513a90..0000000 --- a/lib/types/generated/lightning_pb_service.d.ts +++ /dev/null @@ -1,1175 +0,0 @@ -// package: lnrpc -// file: lightning.proto - -import * as lightning_pb from "./lightning_pb"; -import {grpc} from "@improbable-eng/grpc-web"; - -type LightningWalletBalance = { - readonly methodName: string; - readonly service: typeof Lightning; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof lightning_pb.WalletBalanceRequest; - readonly responseType: typeof lightning_pb.WalletBalanceResponse; -}; - -type LightningChannelBalance = { - readonly methodName: string; - readonly service: typeof Lightning; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof lightning_pb.ChannelBalanceRequest; - readonly responseType: typeof lightning_pb.ChannelBalanceResponse; -}; - -type LightningGetTransactions = { - readonly methodName: string; - readonly service: typeof Lightning; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof lightning_pb.GetTransactionsRequest; - readonly responseType: typeof lightning_pb.TransactionDetails; -}; - -type LightningEstimateFee = { - readonly methodName: string; - readonly service: typeof Lightning; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof lightning_pb.EstimateFeeRequest; - readonly responseType: typeof lightning_pb.EstimateFeeResponse; -}; - -type LightningSendCoins = { - readonly methodName: string; - readonly service: typeof Lightning; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof lightning_pb.SendCoinsRequest; - readonly responseType: typeof lightning_pb.SendCoinsResponse; -}; - -type LightningListUnspent = { - readonly methodName: string; - readonly service: typeof Lightning; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof lightning_pb.ListUnspentRequest; - readonly responseType: typeof lightning_pb.ListUnspentResponse; -}; - -type LightningSubscribeTransactions = { - readonly methodName: string; - readonly service: typeof Lightning; - readonly requestStream: false; - readonly responseStream: true; - readonly requestType: typeof lightning_pb.GetTransactionsRequest; - readonly responseType: typeof lightning_pb.Transaction; -}; - -type LightningSendMany = { - readonly methodName: string; - readonly service: typeof Lightning; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof lightning_pb.SendManyRequest; - readonly responseType: typeof lightning_pb.SendManyResponse; -}; - -type LightningNewAddress = { - readonly methodName: string; - readonly service: typeof Lightning; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof lightning_pb.NewAddressRequest; - readonly responseType: typeof lightning_pb.NewAddressResponse; -}; - -type LightningSignMessage = { - readonly methodName: string; - readonly service: typeof Lightning; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof lightning_pb.SignMessageRequest; - readonly responseType: typeof lightning_pb.SignMessageResponse; -}; - -type LightningVerifyMessage = { - readonly methodName: string; - readonly service: typeof Lightning; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof lightning_pb.VerifyMessageRequest; - readonly responseType: typeof lightning_pb.VerifyMessageResponse; -}; - -type LightningConnectPeer = { - readonly methodName: string; - readonly service: typeof Lightning; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof lightning_pb.ConnectPeerRequest; - readonly responseType: typeof lightning_pb.ConnectPeerResponse; -}; - -type LightningDisconnectPeer = { - readonly methodName: string; - readonly service: typeof Lightning; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof lightning_pb.DisconnectPeerRequest; - readonly responseType: typeof lightning_pb.DisconnectPeerResponse; -}; - -type LightningListPeers = { - readonly methodName: string; - readonly service: typeof Lightning; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof lightning_pb.ListPeersRequest; - readonly responseType: typeof lightning_pb.ListPeersResponse; -}; - -type LightningSubscribePeerEvents = { - readonly methodName: string; - readonly service: typeof Lightning; - readonly requestStream: false; - readonly responseStream: true; - readonly requestType: typeof lightning_pb.PeerEventSubscription; - readonly responseType: typeof lightning_pb.PeerEvent; -}; - -type LightningGetInfo = { - readonly methodName: string; - readonly service: typeof Lightning; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof lightning_pb.GetInfoRequest; - readonly responseType: typeof lightning_pb.GetInfoResponse; -}; - -type LightningGetRecoveryInfo = { - readonly methodName: string; - readonly service: typeof Lightning; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof lightning_pb.GetRecoveryInfoRequest; - readonly responseType: typeof lightning_pb.GetRecoveryInfoResponse; -}; - -type LightningPendingChannels = { - readonly methodName: string; - readonly service: typeof Lightning; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof lightning_pb.PendingChannelsRequest; - readonly responseType: typeof lightning_pb.PendingChannelsResponse; -}; - -type LightningListChannels = { - readonly methodName: string; - readonly service: typeof Lightning; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof lightning_pb.ListChannelsRequest; - readonly responseType: typeof lightning_pb.ListChannelsResponse; -}; - -type LightningSubscribeChannelEvents = { - readonly methodName: string; - readonly service: typeof Lightning; - readonly requestStream: false; - readonly responseStream: true; - readonly requestType: typeof lightning_pb.ChannelEventSubscription; - readonly responseType: typeof lightning_pb.ChannelEventUpdate; -}; - -type LightningClosedChannels = { - readonly methodName: string; - readonly service: typeof Lightning; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof lightning_pb.ClosedChannelsRequest; - readonly responseType: typeof lightning_pb.ClosedChannelsResponse; -}; - -type LightningOpenChannelSync = { - readonly methodName: string; - readonly service: typeof Lightning; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof lightning_pb.OpenChannelRequest; - readonly responseType: typeof lightning_pb.ChannelPoint; -}; - -type LightningOpenChannel = { - readonly methodName: string; - readonly service: typeof Lightning; - readonly requestStream: false; - readonly responseStream: true; - readonly requestType: typeof lightning_pb.OpenChannelRequest; - readonly responseType: typeof lightning_pb.OpenStatusUpdate; -}; - -type LightningBatchOpenChannel = { - readonly methodName: string; - readonly service: typeof Lightning; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof lightning_pb.BatchOpenChannelRequest; - readonly responseType: typeof lightning_pb.BatchOpenChannelResponse; -}; - -type LightningFundingStateStep = { - readonly methodName: string; - readonly service: typeof Lightning; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof lightning_pb.FundingTransitionMsg; - readonly responseType: typeof lightning_pb.FundingStateStepResp; -}; - -type LightningChannelAcceptor = { - readonly methodName: string; - readonly service: typeof Lightning; - readonly requestStream: true; - readonly responseStream: true; - readonly requestType: typeof lightning_pb.ChannelAcceptResponse; - readonly responseType: typeof lightning_pb.ChannelAcceptRequest; -}; - -type LightningCloseChannel = { - readonly methodName: string; - readonly service: typeof Lightning; - readonly requestStream: false; - readonly responseStream: true; - readonly requestType: typeof lightning_pb.CloseChannelRequest; - readonly responseType: typeof lightning_pb.CloseStatusUpdate; -}; - -type LightningAbandonChannel = { - readonly methodName: string; - readonly service: typeof Lightning; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof lightning_pb.AbandonChannelRequest; - readonly responseType: typeof lightning_pb.AbandonChannelResponse; -}; - -type LightningSendPayment = { - readonly methodName: string; - readonly service: typeof Lightning; - readonly requestStream: true; - readonly responseStream: true; - readonly requestType: typeof lightning_pb.SendRequest; - readonly responseType: typeof lightning_pb.SendResponse; -}; - -type LightningSendPaymentSync = { - readonly methodName: string; - readonly service: typeof Lightning; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof lightning_pb.SendRequest; - readonly responseType: typeof lightning_pb.SendResponse; -}; - -type LightningSendToRoute = { - readonly methodName: string; - readonly service: typeof Lightning; - readonly requestStream: true; - readonly responseStream: true; - readonly requestType: typeof lightning_pb.SendToRouteRequest; - readonly responseType: typeof lightning_pb.SendResponse; -}; - -type LightningSendToRouteSync = { - readonly methodName: string; - readonly service: typeof Lightning; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof lightning_pb.SendToRouteRequest; - readonly responseType: typeof lightning_pb.SendResponse; -}; - -type LightningAddInvoice = { - readonly methodName: string; - readonly service: typeof Lightning; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof lightning_pb.Invoice; - readonly responseType: typeof lightning_pb.AddInvoiceResponse; -}; - -type LightningListInvoices = { - readonly methodName: string; - readonly service: typeof Lightning; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof lightning_pb.ListInvoiceRequest; - readonly responseType: typeof lightning_pb.ListInvoiceResponse; -}; - -type LightningLookupInvoice = { - readonly methodName: string; - readonly service: typeof Lightning; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof lightning_pb.PaymentHash; - readonly responseType: typeof lightning_pb.Invoice; -}; - -type LightningSubscribeInvoices = { - readonly methodName: string; - readonly service: typeof Lightning; - readonly requestStream: false; - readonly responseStream: true; - readonly requestType: typeof lightning_pb.InvoiceSubscription; - readonly responseType: typeof lightning_pb.Invoice; -}; - -type LightningDecodePayReq = { - readonly methodName: string; - readonly service: typeof Lightning; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof lightning_pb.PayReqString; - readonly responseType: typeof lightning_pb.PayReq; -}; - -type LightningListPayments = { - readonly methodName: string; - readonly service: typeof Lightning; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof lightning_pb.ListPaymentsRequest; - readonly responseType: typeof lightning_pb.ListPaymentsResponse; -}; - -type LightningDeletePayment = { - readonly methodName: string; - readonly service: typeof Lightning; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof lightning_pb.DeletePaymentRequest; - readonly responseType: typeof lightning_pb.DeletePaymentResponse; -}; - -type LightningDeleteAllPayments = { - readonly methodName: string; - readonly service: typeof Lightning; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof lightning_pb.DeleteAllPaymentsRequest; - readonly responseType: typeof lightning_pb.DeleteAllPaymentsResponse; -}; - -type LightningDescribeGraph = { - readonly methodName: string; - readonly service: typeof Lightning; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof lightning_pb.ChannelGraphRequest; - readonly responseType: typeof lightning_pb.ChannelGraph; -}; - -type LightningGetNodeMetrics = { - readonly methodName: string; - readonly service: typeof Lightning; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof lightning_pb.NodeMetricsRequest; - readonly responseType: typeof lightning_pb.NodeMetricsResponse; -}; - -type LightningGetChanInfo = { - readonly methodName: string; - readonly service: typeof Lightning; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof lightning_pb.ChanInfoRequest; - readonly responseType: typeof lightning_pb.ChannelEdge; -}; - -type LightningGetNodeInfo = { - readonly methodName: string; - readonly service: typeof Lightning; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof lightning_pb.NodeInfoRequest; - readonly responseType: typeof lightning_pb.NodeInfo; -}; - -type LightningQueryRoutes = { - readonly methodName: string; - readonly service: typeof Lightning; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof lightning_pb.QueryRoutesRequest; - readonly responseType: typeof lightning_pb.QueryRoutesResponse; -}; - -type LightningGetNetworkInfo = { - readonly methodName: string; - readonly service: typeof Lightning; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof lightning_pb.NetworkInfoRequest; - readonly responseType: typeof lightning_pb.NetworkInfo; -}; - -type LightningStopDaemon = { - readonly methodName: string; - readonly service: typeof Lightning; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof lightning_pb.StopRequest; - readonly responseType: typeof lightning_pb.StopResponse; -}; - -type LightningSubscribeChannelGraph = { - readonly methodName: string; - readonly service: typeof Lightning; - readonly requestStream: false; - readonly responseStream: true; - readonly requestType: typeof lightning_pb.GraphTopologySubscription; - readonly responseType: typeof lightning_pb.GraphTopologyUpdate; -}; - -type LightningDebugLevel = { - readonly methodName: string; - readonly service: typeof Lightning; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof lightning_pb.DebugLevelRequest; - readonly responseType: typeof lightning_pb.DebugLevelResponse; -}; - -type LightningFeeReport = { - readonly methodName: string; - readonly service: typeof Lightning; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof lightning_pb.FeeReportRequest; - readonly responseType: typeof lightning_pb.FeeReportResponse; -}; - -type LightningUpdateChannelPolicy = { - readonly methodName: string; - readonly service: typeof Lightning; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof lightning_pb.PolicyUpdateRequest; - readonly responseType: typeof lightning_pb.PolicyUpdateResponse; -}; - -type LightningForwardingHistory = { - readonly methodName: string; - readonly service: typeof Lightning; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof lightning_pb.ForwardingHistoryRequest; - readonly responseType: typeof lightning_pb.ForwardingHistoryResponse; -}; - -type LightningExportChannelBackup = { - readonly methodName: string; - readonly service: typeof Lightning; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof lightning_pb.ExportChannelBackupRequest; - readonly responseType: typeof lightning_pb.ChannelBackup; -}; - -type LightningExportAllChannelBackups = { - readonly methodName: string; - readonly service: typeof Lightning; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof lightning_pb.ChanBackupExportRequest; - readonly responseType: typeof lightning_pb.ChanBackupSnapshot; -}; - -type LightningVerifyChanBackup = { - readonly methodName: string; - readonly service: typeof Lightning; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof lightning_pb.ChanBackupSnapshot; - readonly responseType: typeof lightning_pb.VerifyChanBackupResponse; -}; - -type LightningRestoreChannelBackups = { - readonly methodName: string; - readonly service: typeof Lightning; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof lightning_pb.RestoreChanBackupRequest; - readonly responseType: typeof lightning_pb.RestoreBackupResponse; -}; - -type LightningSubscribeChannelBackups = { - readonly methodName: string; - readonly service: typeof Lightning; - readonly requestStream: false; - readonly responseStream: true; - readonly requestType: typeof lightning_pb.ChannelBackupSubscription; - readonly responseType: typeof lightning_pb.ChanBackupSnapshot; -}; - -type LightningBakeMacaroon = { - readonly methodName: string; - readonly service: typeof Lightning; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof lightning_pb.BakeMacaroonRequest; - readonly responseType: typeof lightning_pb.BakeMacaroonResponse; -}; - -type LightningListMacaroonIDs = { - readonly methodName: string; - readonly service: typeof Lightning; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof lightning_pb.ListMacaroonIDsRequest; - readonly responseType: typeof lightning_pb.ListMacaroonIDsResponse; -}; - -type LightningDeleteMacaroonID = { - readonly methodName: string; - readonly service: typeof Lightning; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof lightning_pb.DeleteMacaroonIDRequest; - readonly responseType: typeof lightning_pb.DeleteMacaroonIDResponse; -}; - -type LightningListPermissions = { - readonly methodName: string; - readonly service: typeof Lightning; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof lightning_pb.ListPermissionsRequest; - readonly responseType: typeof lightning_pb.ListPermissionsResponse; -}; - -type LightningCheckMacaroonPermissions = { - readonly methodName: string; - readonly service: typeof Lightning; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof lightning_pb.CheckMacPermRequest; - readonly responseType: typeof lightning_pb.CheckMacPermResponse; -}; - -type LightningRegisterRPCMiddleware = { - readonly methodName: string; - readonly service: typeof Lightning; - readonly requestStream: true; - readonly responseStream: true; - readonly requestType: typeof lightning_pb.RPCMiddlewareResponse; - readonly responseType: typeof lightning_pb.RPCMiddlewareRequest; -}; - -type LightningSendCustomMessage = { - readonly methodName: string; - readonly service: typeof Lightning; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof lightning_pb.SendCustomMessageRequest; - readonly responseType: typeof lightning_pb.SendCustomMessageResponse; -}; - -type LightningSubscribeCustomMessages = { - readonly methodName: string; - readonly service: typeof Lightning; - readonly requestStream: false; - readonly responseStream: true; - readonly requestType: typeof lightning_pb.SubscribeCustomMessagesRequest; - readonly responseType: typeof lightning_pb.CustomMessage; -}; - -export class Lightning { - static readonly serviceName: string; - static readonly WalletBalance: LightningWalletBalance; - static readonly ChannelBalance: LightningChannelBalance; - static readonly GetTransactions: LightningGetTransactions; - static readonly EstimateFee: LightningEstimateFee; - static readonly SendCoins: LightningSendCoins; - static readonly ListUnspent: LightningListUnspent; - static readonly SubscribeTransactions: LightningSubscribeTransactions; - static readonly SendMany: LightningSendMany; - static readonly NewAddress: LightningNewAddress; - static readonly SignMessage: LightningSignMessage; - static readonly VerifyMessage: LightningVerifyMessage; - static readonly ConnectPeer: LightningConnectPeer; - static readonly DisconnectPeer: LightningDisconnectPeer; - static readonly ListPeers: LightningListPeers; - static readonly SubscribePeerEvents: LightningSubscribePeerEvents; - static readonly GetInfo: LightningGetInfo; - static readonly GetRecoveryInfo: LightningGetRecoveryInfo; - static readonly PendingChannels: LightningPendingChannels; - static readonly ListChannels: LightningListChannels; - static readonly SubscribeChannelEvents: LightningSubscribeChannelEvents; - static readonly ClosedChannels: LightningClosedChannels; - static readonly OpenChannelSync: LightningOpenChannelSync; - static readonly OpenChannel: LightningOpenChannel; - static readonly BatchOpenChannel: LightningBatchOpenChannel; - static readonly FundingStateStep: LightningFundingStateStep; - static readonly ChannelAcceptor: LightningChannelAcceptor; - static readonly CloseChannel: LightningCloseChannel; - static readonly AbandonChannel: LightningAbandonChannel; - static readonly SendPayment: LightningSendPayment; - static readonly SendPaymentSync: LightningSendPaymentSync; - static readonly SendToRoute: LightningSendToRoute; - static readonly SendToRouteSync: LightningSendToRouteSync; - static readonly AddInvoice: LightningAddInvoice; - static readonly ListInvoices: LightningListInvoices; - static readonly LookupInvoice: LightningLookupInvoice; - static readonly SubscribeInvoices: LightningSubscribeInvoices; - static readonly DecodePayReq: LightningDecodePayReq; - static readonly ListPayments: LightningListPayments; - static readonly DeletePayment: LightningDeletePayment; - static readonly DeleteAllPayments: LightningDeleteAllPayments; - static readonly DescribeGraph: LightningDescribeGraph; - static readonly GetNodeMetrics: LightningGetNodeMetrics; - static readonly GetChanInfo: LightningGetChanInfo; - static readonly GetNodeInfo: LightningGetNodeInfo; - static readonly QueryRoutes: LightningQueryRoutes; - static readonly GetNetworkInfo: LightningGetNetworkInfo; - static readonly StopDaemon: LightningStopDaemon; - static readonly SubscribeChannelGraph: LightningSubscribeChannelGraph; - static readonly DebugLevel: LightningDebugLevel; - static readonly FeeReport: LightningFeeReport; - static readonly UpdateChannelPolicy: LightningUpdateChannelPolicy; - static readonly ForwardingHistory: LightningForwardingHistory; - static readonly ExportChannelBackup: LightningExportChannelBackup; - static readonly ExportAllChannelBackups: LightningExportAllChannelBackups; - static readonly VerifyChanBackup: LightningVerifyChanBackup; - static readonly RestoreChannelBackups: LightningRestoreChannelBackups; - static readonly SubscribeChannelBackups: LightningSubscribeChannelBackups; - static readonly BakeMacaroon: LightningBakeMacaroon; - static readonly ListMacaroonIDs: LightningListMacaroonIDs; - static readonly DeleteMacaroonID: LightningDeleteMacaroonID; - static readonly ListPermissions: LightningListPermissions; - static readonly CheckMacaroonPermissions: LightningCheckMacaroonPermissions; - static readonly RegisterRPCMiddleware: LightningRegisterRPCMiddleware; - static readonly SendCustomMessage: LightningSendCustomMessage; - static readonly SubscribeCustomMessages: LightningSubscribeCustomMessages; -} - -export type ServiceError = { message: string, code: number; metadata: grpc.Metadata } -export type Status = { details: string, code: number; metadata: grpc.Metadata } - -interface UnaryResponse { - cancel(): void; -} -interface ResponseStream { - cancel(): void; - on(type: 'data', handler: (message: T) => void): ResponseStream; - on(type: 'end', handler: (status?: Status) => void): ResponseStream; - on(type: 'status', handler: (status: Status) => void): ResponseStream; -} -interface RequestStream { - write(message: T): RequestStream; - end(): void; - cancel(): void; - on(type: 'end', handler: (status?: Status) => void): RequestStream; - on(type: 'status', handler: (status: Status) => void): RequestStream; -} -interface BidirectionalStream { - write(message: ReqT): BidirectionalStream; - end(): void; - cancel(): void; - on(type: 'data', handler: (message: ResT) => void): BidirectionalStream; - on(type: 'end', handler: (status?: Status) => void): BidirectionalStream; - on(type: 'status', handler: (status: Status) => void): BidirectionalStream; -} - -export class LightningClient { - readonly serviceHost: string; - - constructor(serviceHost: string, options?: grpc.RpcOptions); - walletBalance( - requestMessage: lightning_pb.WalletBalanceRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: lightning_pb.WalletBalanceResponse|null) => void - ): UnaryResponse; - walletBalance( - requestMessage: lightning_pb.WalletBalanceRequest, - callback: (error: ServiceError|null, responseMessage: lightning_pb.WalletBalanceResponse|null) => void - ): UnaryResponse; - channelBalance( - requestMessage: lightning_pb.ChannelBalanceRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: lightning_pb.ChannelBalanceResponse|null) => void - ): UnaryResponse; - channelBalance( - requestMessage: lightning_pb.ChannelBalanceRequest, - callback: (error: ServiceError|null, responseMessage: lightning_pb.ChannelBalanceResponse|null) => void - ): UnaryResponse; - getTransactions( - requestMessage: lightning_pb.GetTransactionsRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: lightning_pb.TransactionDetails|null) => void - ): UnaryResponse; - getTransactions( - requestMessage: lightning_pb.GetTransactionsRequest, - callback: (error: ServiceError|null, responseMessage: lightning_pb.TransactionDetails|null) => void - ): UnaryResponse; - estimateFee( - requestMessage: lightning_pb.EstimateFeeRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: lightning_pb.EstimateFeeResponse|null) => void - ): UnaryResponse; - estimateFee( - requestMessage: lightning_pb.EstimateFeeRequest, - callback: (error: ServiceError|null, responseMessage: lightning_pb.EstimateFeeResponse|null) => void - ): UnaryResponse; - sendCoins( - requestMessage: lightning_pb.SendCoinsRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: lightning_pb.SendCoinsResponse|null) => void - ): UnaryResponse; - sendCoins( - requestMessage: lightning_pb.SendCoinsRequest, - callback: (error: ServiceError|null, responseMessage: lightning_pb.SendCoinsResponse|null) => void - ): UnaryResponse; - listUnspent( - requestMessage: lightning_pb.ListUnspentRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: lightning_pb.ListUnspentResponse|null) => void - ): UnaryResponse; - listUnspent( - requestMessage: lightning_pb.ListUnspentRequest, - callback: (error: ServiceError|null, responseMessage: lightning_pb.ListUnspentResponse|null) => void - ): UnaryResponse; - subscribeTransactions(requestMessage: lightning_pb.GetTransactionsRequest, metadata?: grpc.Metadata): ResponseStream; - sendMany( - requestMessage: lightning_pb.SendManyRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: lightning_pb.SendManyResponse|null) => void - ): UnaryResponse; - sendMany( - requestMessage: lightning_pb.SendManyRequest, - callback: (error: ServiceError|null, responseMessage: lightning_pb.SendManyResponse|null) => void - ): UnaryResponse; - newAddress( - requestMessage: lightning_pb.NewAddressRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: lightning_pb.NewAddressResponse|null) => void - ): UnaryResponse; - newAddress( - requestMessage: lightning_pb.NewAddressRequest, - callback: (error: ServiceError|null, responseMessage: lightning_pb.NewAddressResponse|null) => void - ): UnaryResponse; - signMessage( - requestMessage: lightning_pb.SignMessageRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: lightning_pb.SignMessageResponse|null) => void - ): UnaryResponse; - signMessage( - requestMessage: lightning_pb.SignMessageRequest, - callback: (error: ServiceError|null, responseMessage: lightning_pb.SignMessageResponse|null) => void - ): UnaryResponse; - verifyMessage( - requestMessage: lightning_pb.VerifyMessageRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: lightning_pb.VerifyMessageResponse|null) => void - ): UnaryResponse; - verifyMessage( - requestMessage: lightning_pb.VerifyMessageRequest, - callback: (error: ServiceError|null, responseMessage: lightning_pb.VerifyMessageResponse|null) => void - ): UnaryResponse; - connectPeer( - requestMessage: lightning_pb.ConnectPeerRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: lightning_pb.ConnectPeerResponse|null) => void - ): UnaryResponse; - connectPeer( - requestMessage: lightning_pb.ConnectPeerRequest, - callback: (error: ServiceError|null, responseMessage: lightning_pb.ConnectPeerResponse|null) => void - ): UnaryResponse; - disconnectPeer( - requestMessage: lightning_pb.DisconnectPeerRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: lightning_pb.DisconnectPeerResponse|null) => void - ): UnaryResponse; - disconnectPeer( - requestMessage: lightning_pb.DisconnectPeerRequest, - callback: (error: ServiceError|null, responseMessage: lightning_pb.DisconnectPeerResponse|null) => void - ): UnaryResponse; - listPeers( - requestMessage: lightning_pb.ListPeersRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: lightning_pb.ListPeersResponse|null) => void - ): UnaryResponse; - listPeers( - requestMessage: lightning_pb.ListPeersRequest, - callback: (error: ServiceError|null, responseMessage: lightning_pb.ListPeersResponse|null) => void - ): UnaryResponse; - subscribePeerEvents(requestMessage: lightning_pb.PeerEventSubscription, metadata?: grpc.Metadata): ResponseStream; - getInfo( - requestMessage: lightning_pb.GetInfoRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: lightning_pb.GetInfoResponse|null) => void - ): UnaryResponse; - getInfo( - requestMessage: lightning_pb.GetInfoRequest, - callback: (error: ServiceError|null, responseMessage: lightning_pb.GetInfoResponse|null) => void - ): UnaryResponse; - getRecoveryInfo( - requestMessage: lightning_pb.GetRecoveryInfoRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: lightning_pb.GetRecoveryInfoResponse|null) => void - ): UnaryResponse; - getRecoveryInfo( - requestMessage: lightning_pb.GetRecoveryInfoRequest, - callback: (error: ServiceError|null, responseMessage: lightning_pb.GetRecoveryInfoResponse|null) => void - ): UnaryResponse; - pendingChannels( - requestMessage: lightning_pb.PendingChannelsRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: lightning_pb.PendingChannelsResponse|null) => void - ): UnaryResponse; - pendingChannels( - requestMessage: lightning_pb.PendingChannelsRequest, - callback: (error: ServiceError|null, responseMessage: lightning_pb.PendingChannelsResponse|null) => void - ): UnaryResponse; - listChannels( - requestMessage: lightning_pb.ListChannelsRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: lightning_pb.ListChannelsResponse|null) => void - ): UnaryResponse; - listChannels( - requestMessage: lightning_pb.ListChannelsRequest, - callback: (error: ServiceError|null, responseMessage: lightning_pb.ListChannelsResponse|null) => void - ): UnaryResponse; - subscribeChannelEvents(requestMessage: lightning_pb.ChannelEventSubscription, metadata?: grpc.Metadata): ResponseStream; - closedChannels( - requestMessage: lightning_pb.ClosedChannelsRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: lightning_pb.ClosedChannelsResponse|null) => void - ): UnaryResponse; - closedChannels( - requestMessage: lightning_pb.ClosedChannelsRequest, - callback: (error: ServiceError|null, responseMessage: lightning_pb.ClosedChannelsResponse|null) => void - ): UnaryResponse; - openChannelSync( - requestMessage: lightning_pb.OpenChannelRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: lightning_pb.ChannelPoint|null) => void - ): UnaryResponse; - openChannelSync( - requestMessage: lightning_pb.OpenChannelRequest, - callback: (error: ServiceError|null, responseMessage: lightning_pb.ChannelPoint|null) => void - ): UnaryResponse; - openChannel(requestMessage: lightning_pb.OpenChannelRequest, metadata?: grpc.Metadata): ResponseStream; - batchOpenChannel( - requestMessage: lightning_pb.BatchOpenChannelRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: lightning_pb.BatchOpenChannelResponse|null) => void - ): UnaryResponse; - batchOpenChannel( - requestMessage: lightning_pb.BatchOpenChannelRequest, - callback: (error: ServiceError|null, responseMessage: lightning_pb.BatchOpenChannelResponse|null) => void - ): UnaryResponse; - fundingStateStep( - requestMessage: lightning_pb.FundingTransitionMsg, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: lightning_pb.FundingStateStepResp|null) => void - ): UnaryResponse; - fundingStateStep( - requestMessage: lightning_pb.FundingTransitionMsg, - callback: (error: ServiceError|null, responseMessage: lightning_pb.FundingStateStepResp|null) => void - ): UnaryResponse; - channelAcceptor(metadata?: grpc.Metadata): BidirectionalStream; - closeChannel(requestMessage: lightning_pb.CloseChannelRequest, metadata?: grpc.Metadata): ResponseStream; - abandonChannel( - requestMessage: lightning_pb.AbandonChannelRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: lightning_pb.AbandonChannelResponse|null) => void - ): UnaryResponse; - abandonChannel( - requestMessage: lightning_pb.AbandonChannelRequest, - callback: (error: ServiceError|null, responseMessage: lightning_pb.AbandonChannelResponse|null) => void - ): UnaryResponse; - sendPayment(metadata?: grpc.Metadata): BidirectionalStream; - sendPaymentSync( - requestMessage: lightning_pb.SendRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: lightning_pb.SendResponse|null) => void - ): UnaryResponse; - sendPaymentSync( - requestMessage: lightning_pb.SendRequest, - callback: (error: ServiceError|null, responseMessage: lightning_pb.SendResponse|null) => void - ): UnaryResponse; - sendToRoute(metadata?: grpc.Metadata): BidirectionalStream; - sendToRouteSync( - requestMessage: lightning_pb.SendToRouteRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: lightning_pb.SendResponse|null) => void - ): UnaryResponse; - sendToRouteSync( - requestMessage: lightning_pb.SendToRouteRequest, - callback: (error: ServiceError|null, responseMessage: lightning_pb.SendResponse|null) => void - ): UnaryResponse; - addInvoice( - requestMessage: lightning_pb.Invoice, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: lightning_pb.AddInvoiceResponse|null) => void - ): UnaryResponse; - addInvoice( - requestMessage: lightning_pb.Invoice, - callback: (error: ServiceError|null, responseMessage: lightning_pb.AddInvoiceResponse|null) => void - ): UnaryResponse; - listInvoices( - requestMessage: lightning_pb.ListInvoiceRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: lightning_pb.ListInvoiceResponse|null) => void - ): UnaryResponse; - listInvoices( - requestMessage: lightning_pb.ListInvoiceRequest, - callback: (error: ServiceError|null, responseMessage: lightning_pb.ListInvoiceResponse|null) => void - ): UnaryResponse; - lookupInvoice( - requestMessage: lightning_pb.PaymentHash, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: lightning_pb.Invoice|null) => void - ): UnaryResponse; - lookupInvoice( - requestMessage: lightning_pb.PaymentHash, - callback: (error: ServiceError|null, responseMessage: lightning_pb.Invoice|null) => void - ): UnaryResponse; - subscribeInvoices(requestMessage: lightning_pb.InvoiceSubscription, metadata?: grpc.Metadata): ResponseStream; - decodePayReq( - requestMessage: lightning_pb.PayReqString, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: lightning_pb.PayReq|null) => void - ): UnaryResponse; - decodePayReq( - requestMessage: lightning_pb.PayReqString, - callback: (error: ServiceError|null, responseMessage: lightning_pb.PayReq|null) => void - ): UnaryResponse; - listPayments( - requestMessage: lightning_pb.ListPaymentsRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: lightning_pb.ListPaymentsResponse|null) => void - ): UnaryResponse; - listPayments( - requestMessage: lightning_pb.ListPaymentsRequest, - callback: (error: ServiceError|null, responseMessage: lightning_pb.ListPaymentsResponse|null) => void - ): UnaryResponse; - deletePayment( - requestMessage: lightning_pb.DeletePaymentRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: lightning_pb.DeletePaymentResponse|null) => void - ): UnaryResponse; - deletePayment( - requestMessage: lightning_pb.DeletePaymentRequest, - callback: (error: ServiceError|null, responseMessage: lightning_pb.DeletePaymentResponse|null) => void - ): UnaryResponse; - deleteAllPayments( - requestMessage: lightning_pb.DeleteAllPaymentsRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: lightning_pb.DeleteAllPaymentsResponse|null) => void - ): UnaryResponse; - deleteAllPayments( - requestMessage: lightning_pb.DeleteAllPaymentsRequest, - callback: (error: ServiceError|null, responseMessage: lightning_pb.DeleteAllPaymentsResponse|null) => void - ): UnaryResponse; - describeGraph( - requestMessage: lightning_pb.ChannelGraphRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: lightning_pb.ChannelGraph|null) => void - ): UnaryResponse; - describeGraph( - requestMessage: lightning_pb.ChannelGraphRequest, - callback: (error: ServiceError|null, responseMessage: lightning_pb.ChannelGraph|null) => void - ): UnaryResponse; - getNodeMetrics( - requestMessage: lightning_pb.NodeMetricsRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: lightning_pb.NodeMetricsResponse|null) => void - ): UnaryResponse; - getNodeMetrics( - requestMessage: lightning_pb.NodeMetricsRequest, - callback: (error: ServiceError|null, responseMessage: lightning_pb.NodeMetricsResponse|null) => void - ): UnaryResponse; - getChanInfo( - requestMessage: lightning_pb.ChanInfoRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: lightning_pb.ChannelEdge|null) => void - ): UnaryResponse; - getChanInfo( - requestMessage: lightning_pb.ChanInfoRequest, - callback: (error: ServiceError|null, responseMessage: lightning_pb.ChannelEdge|null) => void - ): UnaryResponse; - getNodeInfo( - requestMessage: lightning_pb.NodeInfoRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: lightning_pb.NodeInfo|null) => void - ): UnaryResponse; - getNodeInfo( - requestMessage: lightning_pb.NodeInfoRequest, - callback: (error: ServiceError|null, responseMessage: lightning_pb.NodeInfo|null) => void - ): UnaryResponse; - queryRoutes( - requestMessage: lightning_pb.QueryRoutesRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: lightning_pb.QueryRoutesResponse|null) => void - ): UnaryResponse; - queryRoutes( - requestMessage: lightning_pb.QueryRoutesRequest, - callback: (error: ServiceError|null, responseMessage: lightning_pb.QueryRoutesResponse|null) => void - ): UnaryResponse; - getNetworkInfo( - requestMessage: lightning_pb.NetworkInfoRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: lightning_pb.NetworkInfo|null) => void - ): UnaryResponse; - getNetworkInfo( - requestMessage: lightning_pb.NetworkInfoRequest, - callback: (error: ServiceError|null, responseMessage: lightning_pb.NetworkInfo|null) => void - ): UnaryResponse; - stopDaemon( - requestMessage: lightning_pb.StopRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: lightning_pb.StopResponse|null) => void - ): UnaryResponse; - stopDaemon( - requestMessage: lightning_pb.StopRequest, - callback: (error: ServiceError|null, responseMessage: lightning_pb.StopResponse|null) => void - ): UnaryResponse; - subscribeChannelGraph(requestMessage: lightning_pb.GraphTopologySubscription, metadata?: grpc.Metadata): ResponseStream; - debugLevel( - requestMessage: lightning_pb.DebugLevelRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: lightning_pb.DebugLevelResponse|null) => void - ): UnaryResponse; - debugLevel( - requestMessage: lightning_pb.DebugLevelRequest, - callback: (error: ServiceError|null, responseMessage: lightning_pb.DebugLevelResponse|null) => void - ): UnaryResponse; - feeReport( - requestMessage: lightning_pb.FeeReportRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: lightning_pb.FeeReportResponse|null) => void - ): UnaryResponse; - feeReport( - requestMessage: lightning_pb.FeeReportRequest, - callback: (error: ServiceError|null, responseMessage: lightning_pb.FeeReportResponse|null) => void - ): UnaryResponse; - updateChannelPolicy( - requestMessage: lightning_pb.PolicyUpdateRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: lightning_pb.PolicyUpdateResponse|null) => void - ): UnaryResponse; - updateChannelPolicy( - requestMessage: lightning_pb.PolicyUpdateRequest, - callback: (error: ServiceError|null, responseMessage: lightning_pb.PolicyUpdateResponse|null) => void - ): UnaryResponse; - forwardingHistory( - requestMessage: lightning_pb.ForwardingHistoryRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: lightning_pb.ForwardingHistoryResponse|null) => void - ): UnaryResponse; - forwardingHistory( - requestMessage: lightning_pb.ForwardingHistoryRequest, - callback: (error: ServiceError|null, responseMessage: lightning_pb.ForwardingHistoryResponse|null) => void - ): UnaryResponse; - exportChannelBackup( - requestMessage: lightning_pb.ExportChannelBackupRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: lightning_pb.ChannelBackup|null) => void - ): UnaryResponse; - exportChannelBackup( - requestMessage: lightning_pb.ExportChannelBackupRequest, - callback: (error: ServiceError|null, responseMessage: lightning_pb.ChannelBackup|null) => void - ): UnaryResponse; - exportAllChannelBackups( - requestMessage: lightning_pb.ChanBackupExportRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: lightning_pb.ChanBackupSnapshot|null) => void - ): UnaryResponse; - exportAllChannelBackups( - requestMessage: lightning_pb.ChanBackupExportRequest, - callback: (error: ServiceError|null, responseMessage: lightning_pb.ChanBackupSnapshot|null) => void - ): UnaryResponse; - verifyChanBackup( - requestMessage: lightning_pb.ChanBackupSnapshot, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: lightning_pb.VerifyChanBackupResponse|null) => void - ): UnaryResponse; - verifyChanBackup( - requestMessage: lightning_pb.ChanBackupSnapshot, - callback: (error: ServiceError|null, responseMessage: lightning_pb.VerifyChanBackupResponse|null) => void - ): UnaryResponse; - restoreChannelBackups( - requestMessage: lightning_pb.RestoreChanBackupRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: lightning_pb.RestoreBackupResponse|null) => void - ): UnaryResponse; - restoreChannelBackups( - requestMessage: lightning_pb.RestoreChanBackupRequest, - callback: (error: ServiceError|null, responseMessage: lightning_pb.RestoreBackupResponse|null) => void - ): UnaryResponse; - subscribeChannelBackups(requestMessage: lightning_pb.ChannelBackupSubscription, metadata?: grpc.Metadata): ResponseStream; - bakeMacaroon( - requestMessage: lightning_pb.BakeMacaroonRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: lightning_pb.BakeMacaroonResponse|null) => void - ): UnaryResponse; - bakeMacaroon( - requestMessage: lightning_pb.BakeMacaroonRequest, - callback: (error: ServiceError|null, responseMessage: lightning_pb.BakeMacaroonResponse|null) => void - ): UnaryResponse; - listMacaroonIDs( - requestMessage: lightning_pb.ListMacaroonIDsRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: lightning_pb.ListMacaroonIDsResponse|null) => void - ): UnaryResponse; - listMacaroonIDs( - requestMessage: lightning_pb.ListMacaroonIDsRequest, - callback: (error: ServiceError|null, responseMessage: lightning_pb.ListMacaroonIDsResponse|null) => void - ): UnaryResponse; - deleteMacaroonID( - requestMessage: lightning_pb.DeleteMacaroonIDRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: lightning_pb.DeleteMacaroonIDResponse|null) => void - ): UnaryResponse; - deleteMacaroonID( - requestMessage: lightning_pb.DeleteMacaroonIDRequest, - callback: (error: ServiceError|null, responseMessage: lightning_pb.DeleteMacaroonIDResponse|null) => void - ): UnaryResponse; - listPermissions( - requestMessage: lightning_pb.ListPermissionsRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: lightning_pb.ListPermissionsResponse|null) => void - ): UnaryResponse; - listPermissions( - requestMessage: lightning_pb.ListPermissionsRequest, - callback: (error: ServiceError|null, responseMessage: lightning_pb.ListPermissionsResponse|null) => void - ): UnaryResponse; - checkMacaroonPermissions( - requestMessage: lightning_pb.CheckMacPermRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: lightning_pb.CheckMacPermResponse|null) => void - ): UnaryResponse; - checkMacaroonPermissions( - requestMessage: lightning_pb.CheckMacPermRequest, - callback: (error: ServiceError|null, responseMessage: lightning_pb.CheckMacPermResponse|null) => void - ): UnaryResponse; - registerRPCMiddleware(metadata?: grpc.Metadata): BidirectionalStream; - sendCustomMessage( - requestMessage: lightning_pb.SendCustomMessageRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: lightning_pb.SendCustomMessageResponse|null) => void - ): UnaryResponse; - sendCustomMessage( - requestMessage: lightning_pb.SendCustomMessageRequest, - callback: (error: ServiceError|null, responseMessage: lightning_pb.SendCustomMessageResponse|null) => void - ): UnaryResponse; - subscribeCustomMessages(requestMessage: lightning_pb.SubscribeCustomMessagesRequest, metadata?: grpc.Metadata): ResponseStream; -} - diff --git a/lib/types/generated/lightning_pb_service.js b/lib/types/generated/lightning_pb_service.js deleted file mode 100644 index e82ddf7..0000000 --- a/lib/types/generated/lightning_pb_service.js +++ /dev/null @@ -1,2749 +0,0 @@ -// package: lnrpc -// file: lightning.proto - -var lightning_pb = require("./lightning_pb"); -var grpc = require("@improbable-eng/grpc-web").grpc; - -var Lightning = (function () { - function Lightning() {} - Lightning.serviceName = "lnrpc.Lightning"; - return Lightning; -}()); - -Lightning.WalletBalance = { - methodName: "WalletBalance", - service: Lightning, - requestStream: false, - responseStream: false, - requestType: lightning_pb.WalletBalanceRequest, - responseType: lightning_pb.WalletBalanceResponse -}; - -Lightning.ChannelBalance = { - methodName: "ChannelBalance", - service: Lightning, - requestStream: false, - responseStream: false, - requestType: lightning_pb.ChannelBalanceRequest, - responseType: lightning_pb.ChannelBalanceResponse -}; - -Lightning.GetTransactions = { - methodName: "GetTransactions", - service: Lightning, - requestStream: false, - responseStream: false, - requestType: lightning_pb.GetTransactionsRequest, - responseType: lightning_pb.TransactionDetails -}; - -Lightning.EstimateFee = { - methodName: "EstimateFee", - service: Lightning, - requestStream: false, - responseStream: false, - requestType: lightning_pb.EstimateFeeRequest, - responseType: lightning_pb.EstimateFeeResponse -}; - -Lightning.SendCoins = { - methodName: "SendCoins", - service: Lightning, - requestStream: false, - responseStream: false, - requestType: lightning_pb.SendCoinsRequest, - responseType: lightning_pb.SendCoinsResponse -}; - -Lightning.ListUnspent = { - methodName: "ListUnspent", - service: Lightning, - requestStream: false, - responseStream: false, - requestType: lightning_pb.ListUnspentRequest, - responseType: lightning_pb.ListUnspentResponse -}; - -Lightning.SubscribeTransactions = { - methodName: "SubscribeTransactions", - service: Lightning, - requestStream: false, - responseStream: true, - requestType: lightning_pb.GetTransactionsRequest, - responseType: lightning_pb.Transaction -}; - -Lightning.SendMany = { - methodName: "SendMany", - service: Lightning, - requestStream: false, - responseStream: false, - requestType: lightning_pb.SendManyRequest, - responseType: lightning_pb.SendManyResponse -}; - -Lightning.NewAddress = { - methodName: "NewAddress", - service: Lightning, - requestStream: false, - responseStream: false, - requestType: lightning_pb.NewAddressRequest, - responseType: lightning_pb.NewAddressResponse -}; - -Lightning.SignMessage = { - methodName: "SignMessage", - service: Lightning, - requestStream: false, - responseStream: false, - requestType: lightning_pb.SignMessageRequest, - responseType: lightning_pb.SignMessageResponse -}; - -Lightning.VerifyMessage = { - methodName: "VerifyMessage", - service: Lightning, - requestStream: false, - responseStream: false, - requestType: lightning_pb.VerifyMessageRequest, - responseType: lightning_pb.VerifyMessageResponse -}; - -Lightning.ConnectPeer = { - methodName: "ConnectPeer", - service: Lightning, - requestStream: false, - responseStream: false, - requestType: lightning_pb.ConnectPeerRequest, - responseType: lightning_pb.ConnectPeerResponse -}; - -Lightning.DisconnectPeer = { - methodName: "DisconnectPeer", - service: Lightning, - requestStream: false, - responseStream: false, - requestType: lightning_pb.DisconnectPeerRequest, - responseType: lightning_pb.DisconnectPeerResponse -}; - -Lightning.ListPeers = { - methodName: "ListPeers", - service: Lightning, - requestStream: false, - responseStream: false, - requestType: lightning_pb.ListPeersRequest, - responseType: lightning_pb.ListPeersResponse -}; - -Lightning.SubscribePeerEvents = { - methodName: "SubscribePeerEvents", - service: Lightning, - requestStream: false, - responseStream: true, - requestType: lightning_pb.PeerEventSubscription, - responseType: lightning_pb.PeerEvent -}; - -Lightning.GetInfo = { - methodName: "GetInfo", - service: Lightning, - requestStream: false, - responseStream: false, - requestType: lightning_pb.GetInfoRequest, - responseType: lightning_pb.GetInfoResponse -}; - -Lightning.GetRecoveryInfo = { - methodName: "GetRecoveryInfo", - service: Lightning, - requestStream: false, - responseStream: false, - requestType: lightning_pb.GetRecoveryInfoRequest, - responseType: lightning_pb.GetRecoveryInfoResponse -}; - -Lightning.PendingChannels = { - methodName: "PendingChannels", - service: Lightning, - requestStream: false, - responseStream: false, - requestType: lightning_pb.PendingChannelsRequest, - responseType: lightning_pb.PendingChannelsResponse -}; - -Lightning.ListChannels = { - methodName: "ListChannels", - service: Lightning, - requestStream: false, - responseStream: false, - requestType: lightning_pb.ListChannelsRequest, - responseType: lightning_pb.ListChannelsResponse -}; - -Lightning.SubscribeChannelEvents = { - methodName: "SubscribeChannelEvents", - service: Lightning, - requestStream: false, - responseStream: true, - requestType: lightning_pb.ChannelEventSubscription, - responseType: lightning_pb.ChannelEventUpdate -}; - -Lightning.ClosedChannels = { - methodName: "ClosedChannels", - service: Lightning, - requestStream: false, - responseStream: false, - requestType: lightning_pb.ClosedChannelsRequest, - responseType: lightning_pb.ClosedChannelsResponse -}; - -Lightning.OpenChannelSync = { - methodName: "OpenChannelSync", - service: Lightning, - requestStream: false, - responseStream: false, - requestType: lightning_pb.OpenChannelRequest, - responseType: lightning_pb.ChannelPoint -}; - -Lightning.OpenChannel = { - methodName: "OpenChannel", - service: Lightning, - requestStream: false, - responseStream: true, - requestType: lightning_pb.OpenChannelRequest, - responseType: lightning_pb.OpenStatusUpdate -}; - -Lightning.BatchOpenChannel = { - methodName: "BatchOpenChannel", - service: Lightning, - requestStream: false, - responseStream: false, - requestType: lightning_pb.BatchOpenChannelRequest, - responseType: lightning_pb.BatchOpenChannelResponse -}; - -Lightning.FundingStateStep = { - methodName: "FundingStateStep", - service: Lightning, - requestStream: false, - responseStream: false, - requestType: lightning_pb.FundingTransitionMsg, - responseType: lightning_pb.FundingStateStepResp -}; - -Lightning.ChannelAcceptor = { - methodName: "ChannelAcceptor", - service: Lightning, - requestStream: true, - responseStream: true, - requestType: lightning_pb.ChannelAcceptResponse, - responseType: lightning_pb.ChannelAcceptRequest -}; - -Lightning.CloseChannel = { - methodName: "CloseChannel", - service: Lightning, - requestStream: false, - responseStream: true, - requestType: lightning_pb.CloseChannelRequest, - responseType: lightning_pb.CloseStatusUpdate -}; - -Lightning.AbandonChannel = { - methodName: "AbandonChannel", - service: Lightning, - requestStream: false, - responseStream: false, - requestType: lightning_pb.AbandonChannelRequest, - responseType: lightning_pb.AbandonChannelResponse -}; - -Lightning.SendPayment = { - methodName: "SendPayment", - service: Lightning, - requestStream: true, - responseStream: true, - requestType: lightning_pb.SendRequest, - responseType: lightning_pb.SendResponse -}; - -Lightning.SendPaymentSync = { - methodName: "SendPaymentSync", - service: Lightning, - requestStream: false, - responseStream: false, - requestType: lightning_pb.SendRequest, - responseType: lightning_pb.SendResponse -}; - -Lightning.SendToRoute = { - methodName: "SendToRoute", - service: Lightning, - requestStream: true, - responseStream: true, - requestType: lightning_pb.SendToRouteRequest, - responseType: lightning_pb.SendResponse -}; - -Lightning.SendToRouteSync = { - methodName: "SendToRouteSync", - service: Lightning, - requestStream: false, - responseStream: false, - requestType: lightning_pb.SendToRouteRequest, - responseType: lightning_pb.SendResponse -}; - -Lightning.AddInvoice = { - methodName: "AddInvoice", - service: Lightning, - requestStream: false, - responseStream: false, - requestType: lightning_pb.Invoice, - responseType: lightning_pb.AddInvoiceResponse -}; - -Lightning.ListInvoices = { - methodName: "ListInvoices", - service: Lightning, - requestStream: false, - responseStream: false, - requestType: lightning_pb.ListInvoiceRequest, - responseType: lightning_pb.ListInvoiceResponse -}; - -Lightning.LookupInvoice = { - methodName: "LookupInvoice", - service: Lightning, - requestStream: false, - responseStream: false, - requestType: lightning_pb.PaymentHash, - responseType: lightning_pb.Invoice -}; - -Lightning.SubscribeInvoices = { - methodName: "SubscribeInvoices", - service: Lightning, - requestStream: false, - responseStream: true, - requestType: lightning_pb.InvoiceSubscription, - responseType: lightning_pb.Invoice -}; - -Lightning.DecodePayReq = { - methodName: "DecodePayReq", - service: Lightning, - requestStream: false, - responseStream: false, - requestType: lightning_pb.PayReqString, - responseType: lightning_pb.PayReq -}; - -Lightning.ListPayments = { - methodName: "ListPayments", - service: Lightning, - requestStream: false, - responseStream: false, - requestType: lightning_pb.ListPaymentsRequest, - responseType: lightning_pb.ListPaymentsResponse -}; - -Lightning.DeletePayment = { - methodName: "DeletePayment", - service: Lightning, - requestStream: false, - responseStream: false, - requestType: lightning_pb.DeletePaymentRequest, - responseType: lightning_pb.DeletePaymentResponse -}; - -Lightning.DeleteAllPayments = { - methodName: "DeleteAllPayments", - service: Lightning, - requestStream: false, - responseStream: false, - requestType: lightning_pb.DeleteAllPaymentsRequest, - responseType: lightning_pb.DeleteAllPaymentsResponse -}; - -Lightning.DescribeGraph = { - methodName: "DescribeGraph", - service: Lightning, - requestStream: false, - responseStream: false, - requestType: lightning_pb.ChannelGraphRequest, - responseType: lightning_pb.ChannelGraph -}; - -Lightning.GetNodeMetrics = { - methodName: "GetNodeMetrics", - service: Lightning, - requestStream: false, - responseStream: false, - requestType: lightning_pb.NodeMetricsRequest, - responseType: lightning_pb.NodeMetricsResponse -}; - -Lightning.GetChanInfo = { - methodName: "GetChanInfo", - service: Lightning, - requestStream: false, - responseStream: false, - requestType: lightning_pb.ChanInfoRequest, - responseType: lightning_pb.ChannelEdge -}; - -Lightning.GetNodeInfo = { - methodName: "GetNodeInfo", - service: Lightning, - requestStream: false, - responseStream: false, - requestType: lightning_pb.NodeInfoRequest, - responseType: lightning_pb.NodeInfo -}; - -Lightning.QueryRoutes = { - methodName: "QueryRoutes", - service: Lightning, - requestStream: false, - responseStream: false, - requestType: lightning_pb.QueryRoutesRequest, - responseType: lightning_pb.QueryRoutesResponse -}; - -Lightning.GetNetworkInfo = { - methodName: "GetNetworkInfo", - service: Lightning, - requestStream: false, - responseStream: false, - requestType: lightning_pb.NetworkInfoRequest, - responseType: lightning_pb.NetworkInfo -}; - -Lightning.StopDaemon = { - methodName: "StopDaemon", - service: Lightning, - requestStream: false, - responseStream: false, - requestType: lightning_pb.StopRequest, - responseType: lightning_pb.StopResponse -}; - -Lightning.SubscribeChannelGraph = { - methodName: "SubscribeChannelGraph", - service: Lightning, - requestStream: false, - responseStream: true, - requestType: lightning_pb.GraphTopologySubscription, - responseType: lightning_pb.GraphTopologyUpdate -}; - -Lightning.DebugLevel = { - methodName: "DebugLevel", - service: Lightning, - requestStream: false, - responseStream: false, - requestType: lightning_pb.DebugLevelRequest, - responseType: lightning_pb.DebugLevelResponse -}; - -Lightning.FeeReport = { - methodName: "FeeReport", - service: Lightning, - requestStream: false, - responseStream: false, - requestType: lightning_pb.FeeReportRequest, - responseType: lightning_pb.FeeReportResponse -}; - -Lightning.UpdateChannelPolicy = { - methodName: "UpdateChannelPolicy", - service: Lightning, - requestStream: false, - responseStream: false, - requestType: lightning_pb.PolicyUpdateRequest, - responseType: lightning_pb.PolicyUpdateResponse -}; - -Lightning.ForwardingHistory = { - methodName: "ForwardingHistory", - service: Lightning, - requestStream: false, - responseStream: false, - requestType: lightning_pb.ForwardingHistoryRequest, - responseType: lightning_pb.ForwardingHistoryResponse -}; - -Lightning.ExportChannelBackup = { - methodName: "ExportChannelBackup", - service: Lightning, - requestStream: false, - responseStream: false, - requestType: lightning_pb.ExportChannelBackupRequest, - responseType: lightning_pb.ChannelBackup -}; - -Lightning.ExportAllChannelBackups = { - methodName: "ExportAllChannelBackups", - service: Lightning, - requestStream: false, - responseStream: false, - requestType: lightning_pb.ChanBackupExportRequest, - responseType: lightning_pb.ChanBackupSnapshot -}; - -Lightning.VerifyChanBackup = { - methodName: "VerifyChanBackup", - service: Lightning, - requestStream: false, - responseStream: false, - requestType: lightning_pb.ChanBackupSnapshot, - responseType: lightning_pb.VerifyChanBackupResponse -}; - -Lightning.RestoreChannelBackups = { - methodName: "RestoreChannelBackups", - service: Lightning, - requestStream: false, - responseStream: false, - requestType: lightning_pb.RestoreChanBackupRequest, - responseType: lightning_pb.RestoreBackupResponse -}; - -Lightning.SubscribeChannelBackups = { - methodName: "SubscribeChannelBackups", - service: Lightning, - requestStream: false, - responseStream: true, - requestType: lightning_pb.ChannelBackupSubscription, - responseType: lightning_pb.ChanBackupSnapshot -}; - -Lightning.BakeMacaroon = { - methodName: "BakeMacaroon", - service: Lightning, - requestStream: false, - responseStream: false, - requestType: lightning_pb.BakeMacaroonRequest, - responseType: lightning_pb.BakeMacaroonResponse -}; - -Lightning.ListMacaroonIDs = { - methodName: "ListMacaroonIDs", - service: Lightning, - requestStream: false, - responseStream: false, - requestType: lightning_pb.ListMacaroonIDsRequest, - responseType: lightning_pb.ListMacaroonIDsResponse -}; - -Lightning.DeleteMacaroonID = { - methodName: "DeleteMacaroonID", - service: Lightning, - requestStream: false, - responseStream: false, - requestType: lightning_pb.DeleteMacaroonIDRequest, - responseType: lightning_pb.DeleteMacaroonIDResponse -}; - -Lightning.ListPermissions = { - methodName: "ListPermissions", - service: Lightning, - requestStream: false, - responseStream: false, - requestType: lightning_pb.ListPermissionsRequest, - responseType: lightning_pb.ListPermissionsResponse -}; - -Lightning.CheckMacaroonPermissions = { - methodName: "CheckMacaroonPermissions", - service: Lightning, - requestStream: false, - responseStream: false, - requestType: lightning_pb.CheckMacPermRequest, - responseType: lightning_pb.CheckMacPermResponse -}; - -Lightning.RegisterRPCMiddleware = { - methodName: "RegisterRPCMiddleware", - service: Lightning, - requestStream: true, - responseStream: true, - requestType: lightning_pb.RPCMiddlewareResponse, - responseType: lightning_pb.RPCMiddlewareRequest -}; - -Lightning.SendCustomMessage = { - methodName: "SendCustomMessage", - service: Lightning, - requestStream: false, - responseStream: false, - requestType: lightning_pb.SendCustomMessageRequest, - responseType: lightning_pb.SendCustomMessageResponse -}; - -Lightning.SubscribeCustomMessages = { - methodName: "SubscribeCustomMessages", - service: Lightning, - requestStream: false, - responseStream: true, - requestType: lightning_pb.SubscribeCustomMessagesRequest, - responseType: lightning_pb.CustomMessage -}; - -exports.Lightning = Lightning; - -function LightningClient(serviceHost, options) { - this.serviceHost = serviceHost; - this.options = options || {}; -} - -LightningClient.prototype.walletBalance = function walletBalance(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(Lightning.WalletBalance, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -LightningClient.prototype.channelBalance = function channelBalance(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(Lightning.ChannelBalance, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -LightningClient.prototype.getTransactions = function getTransactions(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(Lightning.GetTransactions, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -LightningClient.prototype.estimateFee = function estimateFee(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(Lightning.EstimateFee, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -LightningClient.prototype.sendCoins = function sendCoins(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(Lightning.SendCoins, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -LightningClient.prototype.listUnspent = function listUnspent(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(Lightning.ListUnspent, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -LightningClient.prototype.subscribeTransactions = function subscribeTransactions(requestMessage, metadata) { - var listeners = { - data: [], - end: [], - status: [] - }; - var client = grpc.invoke(Lightning.SubscribeTransactions, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onMessage: function (responseMessage) { - listeners.data.forEach(function (handler) { - handler(responseMessage); - }); - }, - onEnd: function (status, statusMessage, trailers) { - listeners.status.forEach(function (handler) { - handler({ code: status, details: statusMessage, metadata: trailers }); - }); - listeners.end.forEach(function (handler) { - handler({ code: status, details: statusMessage, metadata: trailers }); - }); - listeners = null; - } - }); - return { - on: function (type, handler) { - listeners[type].push(handler); - return this; - }, - cancel: function () { - listeners = null; - client.close(); - } - }; -}; - -LightningClient.prototype.sendMany = function sendMany(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(Lightning.SendMany, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -LightningClient.prototype.newAddress = function newAddress(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(Lightning.NewAddress, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -LightningClient.prototype.signMessage = function signMessage(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(Lightning.SignMessage, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -LightningClient.prototype.verifyMessage = function verifyMessage(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(Lightning.VerifyMessage, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -LightningClient.prototype.connectPeer = function connectPeer(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(Lightning.ConnectPeer, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -LightningClient.prototype.disconnectPeer = function disconnectPeer(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(Lightning.DisconnectPeer, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -LightningClient.prototype.listPeers = function listPeers(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(Lightning.ListPeers, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -LightningClient.prototype.subscribePeerEvents = function subscribePeerEvents(requestMessage, metadata) { - var listeners = { - data: [], - end: [], - status: [] - }; - var client = grpc.invoke(Lightning.SubscribePeerEvents, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onMessage: function (responseMessage) { - listeners.data.forEach(function (handler) { - handler(responseMessage); - }); - }, - onEnd: function (status, statusMessage, trailers) { - listeners.status.forEach(function (handler) { - handler({ code: status, details: statusMessage, metadata: trailers }); - }); - listeners.end.forEach(function (handler) { - handler({ code: status, details: statusMessage, metadata: trailers }); - }); - listeners = null; - } - }); - return { - on: function (type, handler) { - listeners[type].push(handler); - return this; - }, - cancel: function () { - listeners = null; - client.close(); - } - }; -}; - -LightningClient.prototype.getInfo = function getInfo(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(Lightning.GetInfo, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -LightningClient.prototype.getRecoveryInfo = function getRecoveryInfo(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(Lightning.GetRecoveryInfo, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -LightningClient.prototype.pendingChannels = function pendingChannels(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(Lightning.PendingChannels, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -LightningClient.prototype.listChannels = function listChannels(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(Lightning.ListChannels, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -LightningClient.prototype.subscribeChannelEvents = function subscribeChannelEvents(requestMessage, metadata) { - var listeners = { - data: [], - end: [], - status: [] - }; - var client = grpc.invoke(Lightning.SubscribeChannelEvents, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onMessage: function (responseMessage) { - listeners.data.forEach(function (handler) { - handler(responseMessage); - }); - }, - onEnd: function (status, statusMessage, trailers) { - listeners.status.forEach(function (handler) { - handler({ code: status, details: statusMessage, metadata: trailers }); - }); - listeners.end.forEach(function (handler) { - handler({ code: status, details: statusMessage, metadata: trailers }); - }); - listeners = null; - } - }); - return { - on: function (type, handler) { - listeners[type].push(handler); - return this; - }, - cancel: function () { - listeners = null; - client.close(); - } - }; -}; - -LightningClient.prototype.closedChannels = function closedChannels(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(Lightning.ClosedChannels, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -LightningClient.prototype.openChannelSync = function openChannelSync(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(Lightning.OpenChannelSync, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -LightningClient.prototype.openChannel = function openChannel(requestMessage, metadata) { - var listeners = { - data: [], - end: [], - status: [] - }; - var client = grpc.invoke(Lightning.OpenChannel, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onMessage: function (responseMessage) { - listeners.data.forEach(function (handler) { - handler(responseMessage); - }); - }, - onEnd: function (status, statusMessage, trailers) { - listeners.status.forEach(function (handler) { - handler({ code: status, details: statusMessage, metadata: trailers }); - }); - listeners.end.forEach(function (handler) { - handler({ code: status, details: statusMessage, metadata: trailers }); - }); - listeners = null; - } - }); - return { - on: function (type, handler) { - listeners[type].push(handler); - return this; - }, - cancel: function () { - listeners = null; - client.close(); - } - }; -}; - -LightningClient.prototype.batchOpenChannel = function batchOpenChannel(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(Lightning.BatchOpenChannel, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -LightningClient.prototype.fundingStateStep = function fundingStateStep(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(Lightning.FundingStateStep, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -LightningClient.prototype.channelAcceptor = function channelAcceptor(metadata) { - var listeners = { - data: [], - end: [], - status: [] - }; - var client = grpc.client(Lightning.ChannelAcceptor, { - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport - }); - client.onEnd(function (status, statusMessage, trailers) { - listeners.status.forEach(function (handler) { - handler({ code: status, details: statusMessage, metadata: trailers }); - }); - listeners.end.forEach(function (handler) { - handler({ code: status, details: statusMessage, metadata: trailers }); - }); - listeners = null; - }); - client.onMessage(function (message) { - listeners.data.forEach(function (handler) { - handler(message); - }) - }); - client.start(metadata); - return { - on: function (type, handler) { - listeners[type].push(handler); - return this; - }, - write: function (requestMessage) { - client.send(requestMessage); - return this; - }, - end: function () { - client.finishSend(); - }, - cancel: function () { - listeners = null; - client.close(); - } - }; -}; - -LightningClient.prototype.closeChannel = function closeChannel(requestMessage, metadata) { - var listeners = { - data: [], - end: [], - status: [] - }; - var client = grpc.invoke(Lightning.CloseChannel, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onMessage: function (responseMessage) { - listeners.data.forEach(function (handler) { - handler(responseMessage); - }); - }, - onEnd: function (status, statusMessage, trailers) { - listeners.status.forEach(function (handler) { - handler({ code: status, details: statusMessage, metadata: trailers }); - }); - listeners.end.forEach(function (handler) { - handler({ code: status, details: statusMessage, metadata: trailers }); - }); - listeners = null; - } - }); - return { - on: function (type, handler) { - listeners[type].push(handler); - return this; - }, - cancel: function () { - listeners = null; - client.close(); - } - }; -}; - -LightningClient.prototype.abandonChannel = function abandonChannel(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(Lightning.AbandonChannel, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -LightningClient.prototype.sendPayment = function sendPayment(metadata) { - var listeners = { - data: [], - end: [], - status: [] - }; - var client = grpc.client(Lightning.SendPayment, { - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport - }); - client.onEnd(function (status, statusMessage, trailers) { - listeners.status.forEach(function (handler) { - handler({ code: status, details: statusMessage, metadata: trailers }); - }); - listeners.end.forEach(function (handler) { - handler({ code: status, details: statusMessage, metadata: trailers }); - }); - listeners = null; - }); - client.onMessage(function (message) { - listeners.data.forEach(function (handler) { - handler(message); - }) - }); - client.start(metadata); - return { - on: function (type, handler) { - listeners[type].push(handler); - return this; - }, - write: function (requestMessage) { - client.send(requestMessage); - return this; - }, - end: function () { - client.finishSend(); - }, - cancel: function () { - listeners = null; - client.close(); - } - }; -}; - -LightningClient.prototype.sendPaymentSync = function sendPaymentSync(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(Lightning.SendPaymentSync, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -LightningClient.prototype.sendToRoute = function sendToRoute(metadata) { - var listeners = { - data: [], - end: [], - status: [] - }; - var client = grpc.client(Lightning.SendToRoute, { - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport - }); - client.onEnd(function (status, statusMessage, trailers) { - listeners.status.forEach(function (handler) { - handler({ code: status, details: statusMessage, metadata: trailers }); - }); - listeners.end.forEach(function (handler) { - handler({ code: status, details: statusMessage, metadata: trailers }); - }); - listeners = null; - }); - client.onMessage(function (message) { - listeners.data.forEach(function (handler) { - handler(message); - }) - }); - client.start(metadata); - return { - on: function (type, handler) { - listeners[type].push(handler); - return this; - }, - write: function (requestMessage) { - client.send(requestMessage); - return this; - }, - end: function () { - client.finishSend(); - }, - cancel: function () { - listeners = null; - client.close(); - } - }; -}; - -LightningClient.prototype.sendToRouteSync = function sendToRouteSync(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(Lightning.SendToRouteSync, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -LightningClient.prototype.addInvoice = function addInvoice(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(Lightning.AddInvoice, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -LightningClient.prototype.listInvoices = function listInvoices(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(Lightning.ListInvoices, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -LightningClient.prototype.lookupInvoice = function lookupInvoice(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(Lightning.LookupInvoice, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -LightningClient.prototype.subscribeInvoices = function subscribeInvoices(requestMessage, metadata) { - var listeners = { - data: [], - end: [], - status: [] - }; - var client = grpc.invoke(Lightning.SubscribeInvoices, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onMessage: function (responseMessage) { - listeners.data.forEach(function (handler) { - handler(responseMessage); - }); - }, - onEnd: function (status, statusMessage, trailers) { - listeners.status.forEach(function (handler) { - handler({ code: status, details: statusMessage, metadata: trailers }); - }); - listeners.end.forEach(function (handler) { - handler({ code: status, details: statusMessage, metadata: trailers }); - }); - listeners = null; - } - }); - return { - on: function (type, handler) { - listeners[type].push(handler); - return this; - }, - cancel: function () { - listeners = null; - client.close(); - } - }; -}; - -LightningClient.prototype.decodePayReq = function decodePayReq(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(Lightning.DecodePayReq, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -LightningClient.prototype.listPayments = function listPayments(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(Lightning.ListPayments, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -LightningClient.prototype.deletePayment = function deletePayment(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(Lightning.DeletePayment, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -LightningClient.prototype.deleteAllPayments = function deleteAllPayments(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(Lightning.DeleteAllPayments, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -LightningClient.prototype.describeGraph = function describeGraph(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(Lightning.DescribeGraph, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -LightningClient.prototype.getNodeMetrics = function getNodeMetrics(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(Lightning.GetNodeMetrics, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -LightningClient.prototype.getChanInfo = function getChanInfo(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(Lightning.GetChanInfo, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -LightningClient.prototype.getNodeInfo = function getNodeInfo(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(Lightning.GetNodeInfo, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -LightningClient.prototype.queryRoutes = function queryRoutes(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(Lightning.QueryRoutes, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -LightningClient.prototype.getNetworkInfo = function getNetworkInfo(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(Lightning.GetNetworkInfo, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -LightningClient.prototype.stopDaemon = function stopDaemon(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(Lightning.StopDaemon, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -LightningClient.prototype.subscribeChannelGraph = function subscribeChannelGraph(requestMessage, metadata) { - var listeners = { - data: [], - end: [], - status: [] - }; - var client = grpc.invoke(Lightning.SubscribeChannelGraph, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onMessage: function (responseMessage) { - listeners.data.forEach(function (handler) { - handler(responseMessage); - }); - }, - onEnd: function (status, statusMessage, trailers) { - listeners.status.forEach(function (handler) { - handler({ code: status, details: statusMessage, metadata: trailers }); - }); - listeners.end.forEach(function (handler) { - handler({ code: status, details: statusMessage, metadata: trailers }); - }); - listeners = null; - } - }); - return { - on: function (type, handler) { - listeners[type].push(handler); - return this; - }, - cancel: function () { - listeners = null; - client.close(); - } - }; -}; - -LightningClient.prototype.debugLevel = function debugLevel(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(Lightning.DebugLevel, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -LightningClient.prototype.feeReport = function feeReport(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(Lightning.FeeReport, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -LightningClient.prototype.updateChannelPolicy = function updateChannelPolicy(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(Lightning.UpdateChannelPolicy, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -LightningClient.prototype.forwardingHistory = function forwardingHistory(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(Lightning.ForwardingHistory, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -LightningClient.prototype.exportChannelBackup = function exportChannelBackup(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(Lightning.ExportChannelBackup, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -LightningClient.prototype.exportAllChannelBackups = function exportAllChannelBackups(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(Lightning.ExportAllChannelBackups, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -LightningClient.prototype.verifyChanBackup = function verifyChanBackup(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(Lightning.VerifyChanBackup, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -LightningClient.prototype.restoreChannelBackups = function restoreChannelBackups(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(Lightning.RestoreChannelBackups, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -LightningClient.prototype.subscribeChannelBackups = function subscribeChannelBackups(requestMessage, metadata) { - var listeners = { - data: [], - end: [], - status: [] - }; - var client = grpc.invoke(Lightning.SubscribeChannelBackups, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onMessage: function (responseMessage) { - listeners.data.forEach(function (handler) { - handler(responseMessage); - }); - }, - onEnd: function (status, statusMessage, trailers) { - listeners.status.forEach(function (handler) { - handler({ code: status, details: statusMessage, metadata: trailers }); - }); - listeners.end.forEach(function (handler) { - handler({ code: status, details: statusMessage, metadata: trailers }); - }); - listeners = null; - } - }); - return { - on: function (type, handler) { - listeners[type].push(handler); - return this; - }, - cancel: function () { - listeners = null; - client.close(); - } - }; -}; - -LightningClient.prototype.bakeMacaroon = function bakeMacaroon(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(Lightning.BakeMacaroon, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -LightningClient.prototype.listMacaroonIDs = function listMacaroonIDs(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(Lightning.ListMacaroonIDs, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -LightningClient.prototype.deleteMacaroonID = function deleteMacaroonID(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(Lightning.DeleteMacaroonID, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -LightningClient.prototype.listPermissions = function listPermissions(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(Lightning.ListPermissions, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -LightningClient.prototype.checkMacaroonPermissions = function checkMacaroonPermissions(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(Lightning.CheckMacaroonPermissions, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -LightningClient.prototype.registerRPCMiddleware = function registerRPCMiddleware(metadata) { - var listeners = { - data: [], - end: [], - status: [] - }; - var client = grpc.client(Lightning.RegisterRPCMiddleware, { - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport - }); - client.onEnd(function (status, statusMessage, trailers) { - listeners.status.forEach(function (handler) { - handler({ code: status, details: statusMessage, metadata: trailers }); - }); - listeners.end.forEach(function (handler) { - handler({ code: status, details: statusMessage, metadata: trailers }); - }); - listeners = null; - }); - client.onMessage(function (message) { - listeners.data.forEach(function (handler) { - handler(message); - }) - }); - client.start(metadata); - return { - on: function (type, handler) { - listeners[type].push(handler); - return this; - }, - write: function (requestMessage) { - client.send(requestMessage); - return this; - }, - end: function () { - client.finishSend(); - }, - cancel: function () { - listeners = null; - client.close(); - } - }; -}; - -LightningClient.prototype.sendCustomMessage = function sendCustomMessage(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(Lightning.SendCustomMessage, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -LightningClient.prototype.subscribeCustomMessages = function subscribeCustomMessages(requestMessage, metadata) { - var listeners = { - data: [], - end: [], - status: [] - }; - var client = grpc.invoke(Lightning.SubscribeCustomMessages, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onMessage: function (responseMessage) { - listeners.data.forEach(function (handler) { - handler(responseMessage); - }); - }, - onEnd: function (status, statusMessage, trailers) { - listeners.status.forEach(function (handler) { - handler({ code: status, details: statusMessage, metadata: trailers }); - }); - listeners.end.forEach(function (handler) { - handler({ code: status, details: statusMessage, metadata: trailers }); - }); - listeners = null; - } - }); - return { - on: function (type, handler) { - listeners[type].push(handler); - return this; - }, - cancel: function () { - listeners = null; - client.close(); - } - }; -}; - -exports.LightningClient = LightningClient; - diff --git a/lib/types/generated/routerrpc/router_pb.d.ts b/lib/types/generated/routerrpc/router_pb.d.ts deleted file mode 100644 index 8e01140..0000000 --- a/lib/types/generated/routerrpc/router_pb.d.ts +++ /dev/null @@ -1,1142 +0,0 @@ -// package: routerrpc -// file: routerrpc/router.proto - -import * as jspb from "google-protobuf"; -import * as lightning_pb from "../lightning_pb"; - -export class SendPaymentRequest extends jspb.Message { - getDest(): Uint8Array | string; - getDest_asU8(): Uint8Array; - getDest_asB64(): string; - setDest(value: Uint8Array | string): void; - - getAmt(): number; - setAmt(value: number): void; - - getAmtMsat(): number; - setAmtMsat(value: number): void; - - getPaymentHash(): Uint8Array | string; - getPaymentHash_asU8(): Uint8Array; - getPaymentHash_asB64(): string; - setPaymentHash(value: Uint8Array | string): void; - - getFinalCltvDelta(): number; - setFinalCltvDelta(value: number): void; - - getPaymentAddr(): Uint8Array | string; - getPaymentAddr_asU8(): Uint8Array; - getPaymentAddr_asB64(): string; - setPaymentAddr(value: Uint8Array | string): void; - - getPaymentRequest(): string; - setPaymentRequest(value: string): void; - - getTimeoutSeconds(): number; - setTimeoutSeconds(value: number): void; - - getFeeLimitSat(): number; - setFeeLimitSat(value: number): void; - - getFeeLimitMsat(): number; - setFeeLimitMsat(value: number): void; - - getOutgoingChanId(): string; - setOutgoingChanId(value: string): void; - - clearOutgoingChanIdsList(): void; - getOutgoingChanIdsList(): Array; - setOutgoingChanIdsList(value: Array): void; - addOutgoingChanIds(value: number, index?: number): number; - - getLastHopPubkey(): Uint8Array | string; - getLastHopPubkey_asU8(): Uint8Array; - getLastHopPubkey_asB64(): string; - setLastHopPubkey(value: Uint8Array | string): void; - - getCltvLimit(): number; - setCltvLimit(value: number): void; - - clearRouteHintsList(): void; - getRouteHintsList(): Array; - setRouteHintsList(value: Array): void; - addRouteHints(value?: lightning_pb.RouteHint, index?: number): lightning_pb.RouteHint; - - getDestCustomRecordsMap(): jspb.Map; - clearDestCustomRecordsMap(): void; - getAllowSelfPayment(): boolean; - setAllowSelfPayment(value: boolean): void; - - clearDestFeaturesList(): void; - getDestFeaturesList(): Array; - setDestFeaturesList(value: Array): void; - addDestFeatures(value: lightning_pb.FeatureBitMap[keyof lightning_pb.FeatureBitMap], index?: number): lightning_pb.FeatureBitMap[keyof lightning_pb.FeatureBitMap]; - - getMaxParts(): number; - setMaxParts(value: number): void; - - getNoInflightUpdates(): boolean; - setNoInflightUpdates(value: boolean): void; - - getMaxShardSizeMsat(): number; - setMaxShardSizeMsat(value: number): void; - - getAmp(): boolean; - setAmp(value: boolean): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): SendPaymentRequest.AsObject; - static toObject(includeInstance: boolean, msg: SendPaymentRequest): SendPaymentRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: SendPaymentRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): SendPaymentRequest; - static deserializeBinaryFromReader(message: SendPaymentRequest, reader: jspb.BinaryReader): SendPaymentRequest; -} - -export namespace SendPaymentRequest { - export type AsObject = { - dest: Uint8Array | string, - amt: number, - amtMsat: number, - paymentHash: Uint8Array | string, - finalCltvDelta: number, - paymentAddr: Uint8Array | string, - paymentRequest: string, - timeoutSeconds: number, - feeLimitSat: number, - feeLimitMsat: number, - outgoingChanId: string, - outgoingChanIds: Array, - lastHopPubkey: Uint8Array | string, - cltvLimit: number, - routeHints: Array, - destCustomRecords: Array<[number, Uint8Array | string]>, - allowSelfPayment: boolean, - destFeatures: Array, - maxParts: number, - noInflightUpdates: boolean, - maxShardSizeMsat: number, - amp: boolean, - } -} - -export class TrackPaymentRequest extends jspb.Message { - getPaymentHash(): Uint8Array | string; - getPaymentHash_asU8(): Uint8Array; - getPaymentHash_asB64(): string; - setPaymentHash(value: Uint8Array | string): void; - - getNoInflightUpdates(): boolean; - setNoInflightUpdates(value: boolean): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): TrackPaymentRequest.AsObject; - static toObject(includeInstance: boolean, msg: TrackPaymentRequest): TrackPaymentRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: TrackPaymentRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): TrackPaymentRequest; - static deserializeBinaryFromReader(message: TrackPaymentRequest, reader: jspb.BinaryReader): TrackPaymentRequest; -} - -export namespace TrackPaymentRequest { - export type AsObject = { - paymentHash: Uint8Array | string, - noInflightUpdates: boolean, - } -} - -export class RouteFeeRequest extends jspb.Message { - getDest(): Uint8Array | string; - getDest_asU8(): Uint8Array; - getDest_asB64(): string; - setDest(value: Uint8Array | string): void; - - getAmtSat(): number; - setAmtSat(value: number): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): RouteFeeRequest.AsObject; - static toObject(includeInstance: boolean, msg: RouteFeeRequest): RouteFeeRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: RouteFeeRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): RouteFeeRequest; - static deserializeBinaryFromReader(message: RouteFeeRequest, reader: jspb.BinaryReader): RouteFeeRequest; -} - -export namespace RouteFeeRequest { - export type AsObject = { - dest: Uint8Array | string, - amtSat: number, - } -} - -export class RouteFeeResponse extends jspb.Message { - getRoutingFeeMsat(): number; - setRoutingFeeMsat(value: number): void; - - getTimeLockDelay(): number; - setTimeLockDelay(value: number): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): RouteFeeResponse.AsObject; - static toObject(includeInstance: boolean, msg: RouteFeeResponse): RouteFeeResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: RouteFeeResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): RouteFeeResponse; - static deserializeBinaryFromReader(message: RouteFeeResponse, reader: jspb.BinaryReader): RouteFeeResponse; -} - -export namespace RouteFeeResponse { - export type AsObject = { - routingFeeMsat: number, - timeLockDelay: number, - } -} - -export class SendToRouteRequest extends jspb.Message { - getPaymentHash(): Uint8Array | string; - getPaymentHash_asU8(): Uint8Array; - getPaymentHash_asB64(): string; - setPaymentHash(value: Uint8Array | string): void; - - hasRoute(): boolean; - clearRoute(): void; - getRoute(): lightning_pb.Route | undefined; - setRoute(value?: lightning_pb.Route): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): SendToRouteRequest.AsObject; - static toObject(includeInstance: boolean, msg: SendToRouteRequest): SendToRouteRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: SendToRouteRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): SendToRouteRequest; - static deserializeBinaryFromReader(message: SendToRouteRequest, reader: jspb.BinaryReader): SendToRouteRequest; -} - -export namespace SendToRouteRequest { - export type AsObject = { - paymentHash: Uint8Array | string, - route?: lightning_pb.Route.AsObject, - } -} - -export class SendToRouteResponse extends jspb.Message { - getPreimage(): Uint8Array | string; - getPreimage_asU8(): Uint8Array; - getPreimage_asB64(): string; - setPreimage(value: Uint8Array | string): void; - - hasFailure(): boolean; - clearFailure(): void; - getFailure(): lightning_pb.Failure | undefined; - setFailure(value?: lightning_pb.Failure): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): SendToRouteResponse.AsObject; - static toObject(includeInstance: boolean, msg: SendToRouteResponse): SendToRouteResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: SendToRouteResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): SendToRouteResponse; - static deserializeBinaryFromReader(message: SendToRouteResponse, reader: jspb.BinaryReader): SendToRouteResponse; -} - -export namespace SendToRouteResponse { - export type AsObject = { - preimage: Uint8Array | string, - failure?: lightning_pb.Failure.AsObject, - } -} - -export class ResetMissionControlRequest extends jspb.Message { - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ResetMissionControlRequest.AsObject; - static toObject(includeInstance: boolean, msg: ResetMissionControlRequest): ResetMissionControlRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ResetMissionControlRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ResetMissionControlRequest; - static deserializeBinaryFromReader(message: ResetMissionControlRequest, reader: jspb.BinaryReader): ResetMissionControlRequest; -} - -export namespace ResetMissionControlRequest { - export type AsObject = { - } -} - -export class ResetMissionControlResponse extends jspb.Message { - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ResetMissionControlResponse.AsObject; - static toObject(includeInstance: boolean, msg: ResetMissionControlResponse): ResetMissionControlResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ResetMissionControlResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ResetMissionControlResponse; - static deserializeBinaryFromReader(message: ResetMissionControlResponse, reader: jspb.BinaryReader): ResetMissionControlResponse; -} - -export namespace ResetMissionControlResponse { - export type AsObject = { - } -} - -export class QueryMissionControlRequest extends jspb.Message { - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): QueryMissionControlRequest.AsObject; - static toObject(includeInstance: boolean, msg: QueryMissionControlRequest): QueryMissionControlRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: QueryMissionControlRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): QueryMissionControlRequest; - static deserializeBinaryFromReader(message: QueryMissionControlRequest, reader: jspb.BinaryReader): QueryMissionControlRequest; -} - -export namespace QueryMissionControlRequest { - export type AsObject = { - } -} - -export class QueryMissionControlResponse extends jspb.Message { - clearPairsList(): void; - getPairsList(): Array; - setPairsList(value: Array): void; - addPairs(value?: PairHistory, index?: number): PairHistory; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): QueryMissionControlResponse.AsObject; - static toObject(includeInstance: boolean, msg: QueryMissionControlResponse): QueryMissionControlResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: QueryMissionControlResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): QueryMissionControlResponse; - static deserializeBinaryFromReader(message: QueryMissionControlResponse, reader: jspb.BinaryReader): QueryMissionControlResponse; -} - -export namespace QueryMissionControlResponse { - export type AsObject = { - pairs: Array, - } -} - -export class XImportMissionControlRequest extends jspb.Message { - clearPairsList(): void; - getPairsList(): Array; - setPairsList(value: Array): void; - addPairs(value?: PairHistory, index?: number): PairHistory; - - getForce(): boolean; - setForce(value: boolean): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): XImportMissionControlRequest.AsObject; - static toObject(includeInstance: boolean, msg: XImportMissionControlRequest): XImportMissionControlRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: XImportMissionControlRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): XImportMissionControlRequest; - static deserializeBinaryFromReader(message: XImportMissionControlRequest, reader: jspb.BinaryReader): XImportMissionControlRequest; -} - -export namespace XImportMissionControlRequest { - export type AsObject = { - pairs: Array, - force: boolean, - } -} - -export class XImportMissionControlResponse extends jspb.Message { - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): XImportMissionControlResponse.AsObject; - static toObject(includeInstance: boolean, msg: XImportMissionControlResponse): XImportMissionControlResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: XImportMissionControlResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): XImportMissionControlResponse; - static deserializeBinaryFromReader(message: XImportMissionControlResponse, reader: jspb.BinaryReader): XImportMissionControlResponse; -} - -export namespace XImportMissionControlResponse { - export type AsObject = { - } -} - -export class PairHistory extends jspb.Message { - getNodeFrom(): Uint8Array | string; - getNodeFrom_asU8(): Uint8Array; - getNodeFrom_asB64(): string; - setNodeFrom(value: Uint8Array | string): void; - - getNodeTo(): Uint8Array | string; - getNodeTo_asU8(): Uint8Array; - getNodeTo_asB64(): string; - setNodeTo(value: Uint8Array | string): void; - - hasHistory(): boolean; - clearHistory(): void; - getHistory(): PairData | undefined; - setHistory(value?: PairData): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): PairHistory.AsObject; - static toObject(includeInstance: boolean, msg: PairHistory): PairHistory.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: PairHistory, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): PairHistory; - static deserializeBinaryFromReader(message: PairHistory, reader: jspb.BinaryReader): PairHistory; -} - -export namespace PairHistory { - export type AsObject = { - nodeFrom: Uint8Array | string, - nodeTo: Uint8Array | string, - history?: PairData.AsObject, - } -} - -export class PairData extends jspb.Message { - getFailTime(): number; - setFailTime(value: number): void; - - getFailAmtSat(): number; - setFailAmtSat(value: number): void; - - getFailAmtMsat(): number; - setFailAmtMsat(value: number): void; - - getSuccessTime(): number; - setSuccessTime(value: number): void; - - getSuccessAmtSat(): number; - setSuccessAmtSat(value: number): void; - - getSuccessAmtMsat(): number; - setSuccessAmtMsat(value: number): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): PairData.AsObject; - static toObject(includeInstance: boolean, msg: PairData): PairData.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: PairData, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): PairData; - static deserializeBinaryFromReader(message: PairData, reader: jspb.BinaryReader): PairData; -} - -export namespace PairData { - export type AsObject = { - failTime: number, - failAmtSat: number, - failAmtMsat: number, - successTime: number, - successAmtSat: number, - successAmtMsat: number, - } -} - -export class GetMissionControlConfigRequest extends jspb.Message { - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GetMissionControlConfigRequest.AsObject; - static toObject(includeInstance: boolean, msg: GetMissionControlConfigRequest): GetMissionControlConfigRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: GetMissionControlConfigRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GetMissionControlConfigRequest; - static deserializeBinaryFromReader(message: GetMissionControlConfigRequest, reader: jspb.BinaryReader): GetMissionControlConfigRequest; -} - -export namespace GetMissionControlConfigRequest { - export type AsObject = { - } -} - -export class GetMissionControlConfigResponse extends jspb.Message { - hasConfig(): boolean; - clearConfig(): void; - getConfig(): MissionControlConfig | undefined; - setConfig(value?: MissionControlConfig): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GetMissionControlConfigResponse.AsObject; - static toObject(includeInstance: boolean, msg: GetMissionControlConfigResponse): GetMissionControlConfigResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: GetMissionControlConfigResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GetMissionControlConfigResponse; - static deserializeBinaryFromReader(message: GetMissionControlConfigResponse, reader: jspb.BinaryReader): GetMissionControlConfigResponse; -} - -export namespace GetMissionControlConfigResponse { - export type AsObject = { - config?: MissionControlConfig.AsObject, - } -} - -export class SetMissionControlConfigRequest extends jspb.Message { - hasConfig(): boolean; - clearConfig(): void; - getConfig(): MissionControlConfig | undefined; - setConfig(value?: MissionControlConfig): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): SetMissionControlConfigRequest.AsObject; - static toObject(includeInstance: boolean, msg: SetMissionControlConfigRequest): SetMissionControlConfigRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: SetMissionControlConfigRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): SetMissionControlConfigRequest; - static deserializeBinaryFromReader(message: SetMissionControlConfigRequest, reader: jspb.BinaryReader): SetMissionControlConfigRequest; -} - -export namespace SetMissionControlConfigRequest { - export type AsObject = { - config?: MissionControlConfig.AsObject, - } -} - -export class SetMissionControlConfigResponse extends jspb.Message { - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): SetMissionControlConfigResponse.AsObject; - static toObject(includeInstance: boolean, msg: SetMissionControlConfigResponse): SetMissionControlConfigResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: SetMissionControlConfigResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): SetMissionControlConfigResponse; - static deserializeBinaryFromReader(message: SetMissionControlConfigResponse, reader: jspb.BinaryReader): SetMissionControlConfigResponse; -} - -export namespace SetMissionControlConfigResponse { - export type AsObject = { - } -} - -export class MissionControlConfig extends jspb.Message { - getHalfLifeSeconds(): number; - setHalfLifeSeconds(value: number): void; - - getHopProbability(): number; - setHopProbability(value: number): void; - - getWeight(): number; - setWeight(value: number): void; - - getMaximumPaymentResults(): number; - setMaximumPaymentResults(value: number): void; - - getMinimumFailureRelaxInterval(): number; - setMinimumFailureRelaxInterval(value: number): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): MissionControlConfig.AsObject; - static toObject(includeInstance: boolean, msg: MissionControlConfig): MissionControlConfig.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: MissionControlConfig, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): MissionControlConfig; - static deserializeBinaryFromReader(message: MissionControlConfig, reader: jspb.BinaryReader): MissionControlConfig; -} - -export namespace MissionControlConfig { - export type AsObject = { - halfLifeSeconds: number, - hopProbability: number, - weight: number, - maximumPaymentResults: number, - minimumFailureRelaxInterval: number, - } -} - -export class QueryProbabilityRequest extends jspb.Message { - getFromNode(): Uint8Array | string; - getFromNode_asU8(): Uint8Array; - getFromNode_asB64(): string; - setFromNode(value: Uint8Array | string): void; - - getToNode(): Uint8Array | string; - getToNode_asU8(): Uint8Array; - getToNode_asB64(): string; - setToNode(value: Uint8Array | string): void; - - getAmtMsat(): number; - setAmtMsat(value: number): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): QueryProbabilityRequest.AsObject; - static toObject(includeInstance: boolean, msg: QueryProbabilityRequest): QueryProbabilityRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: QueryProbabilityRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): QueryProbabilityRequest; - static deserializeBinaryFromReader(message: QueryProbabilityRequest, reader: jspb.BinaryReader): QueryProbabilityRequest; -} - -export namespace QueryProbabilityRequest { - export type AsObject = { - fromNode: Uint8Array | string, - toNode: Uint8Array | string, - amtMsat: number, - } -} - -export class QueryProbabilityResponse extends jspb.Message { - getProbability(): number; - setProbability(value: number): void; - - hasHistory(): boolean; - clearHistory(): void; - getHistory(): PairData | undefined; - setHistory(value?: PairData): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): QueryProbabilityResponse.AsObject; - static toObject(includeInstance: boolean, msg: QueryProbabilityResponse): QueryProbabilityResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: QueryProbabilityResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): QueryProbabilityResponse; - static deserializeBinaryFromReader(message: QueryProbabilityResponse, reader: jspb.BinaryReader): QueryProbabilityResponse; -} - -export namespace QueryProbabilityResponse { - export type AsObject = { - probability: number, - history?: PairData.AsObject, - } -} - -export class BuildRouteRequest extends jspb.Message { - getAmtMsat(): number; - setAmtMsat(value: number): void; - - getFinalCltvDelta(): number; - setFinalCltvDelta(value: number): void; - - getOutgoingChanId(): string; - setOutgoingChanId(value: string): void; - - clearHopPubkeysList(): void; - getHopPubkeysList(): Array; - getHopPubkeysList_asU8(): Array; - getHopPubkeysList_asB64(): Array; - setHopPubkeysList(value: Array): void; - addHopPubkeys(value: Uint8Array | string, index?: number): Uint8Array | string; - - getPaymentAddr(): Uint8Array | string; - getPaymentAddr_asU8(): Uint8Array; - getPaymentAddr_asB64(): string; - setPaymentAddr(value: Uint8Array | string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): BuildRouteRequest.AsObject; - static toObject(includeInstance: boolean, msg: BuildRouteRequest): BuildRouteRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: BuildRouteRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): BuildRouteRequest; - static deserializeBinaryFromReader(message: BuildRouteRequest, reader: jspb.BinaryReader): BuildRouteRequest; -} - -export namespace BuildRouteRequest { - export type AsObject = { - amtMsat: number, - finalCltvDelta: number, - outgoingChanId: string, - hopPubkeys: Array, - paymentAddr: Uint8Array | string, - } -} - -export class BuildRouteResponse extends jspb.Message { - hasRoute(): boolean; - clearRoute(): void; - getRoute(): lightning_pb.Route | undefined; - setRoute(value?: lightning_pb.Route): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): BuildRouteResponse.AsObject; - static toObject(includeInstance: boolean, msg: BuildRouteResponse): BuildRouteResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: BuildRouteResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): BuildRouteResponse; - static deserializeBinaryFromReader(message: BuildRouteResponse, reader: jspb.BinaryReader): BuildRouteResponse; -} - -export namespace BuildRouteResponse { - export type AsObject = { - route?: lightning_pb.Route.AsObject, - } -} - -export class SubscribeHtlcEventsRequest extends jspb.Message { - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): SubscribeHtlcEventsRequest.AsObject; - static toObject(includeInstance: boolean, msg: SubscribeHtlcEventsRequest): SubscribeHtlcEventsRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: SubscribeHtlcEventsRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): SubscribeHtlcEventsRequest; - static deserializeBinaryFromReader(message: SubscribeHtlcEventsRequest, reader: jspb.BinaryReader): SubscribeHtlcEventsRequest; -} - -export namespace SubscribeHtlcEventsRequest { - export type AsObject = { - } -} - -export class HtlcEvent extends jspb.Message { - getIncomingChannelId(): number; - setIncomingChannelId(value: number): void; - - getOutgoingChannelId(): number; - setOutgoingChannelId(value: number): void; - - getIncomingHtlcId(): number; - setIncomingHtlcId(value: number): void; - - getOutgoingHtlcId(): number; - setOutgoingHtlcId(value: number): void; - - getTimestampNs(): number; - setTimestampNs(value: number): void; - - getEventType(): HtlcEvent.EventTypeMap[keyof HtlcEvent.EventTypeMap]; - setEventType(value: HtlcEvent.EventTypeMap[keyof HtlcEvent.EventTypeMap]): void; - - hasForwardEvent(): boolean; - clearForwardEvent(): void; - getForwardEvent(): ForwardEvent | undefined; - setForwardEvent(value?: ForwardEvent): void; - - hasForwardFailEvent(): boolean; - clearForwardFailEvent(): void; - getForwardFailEvent(): ForwardFailEvent | undefined; - setForwardFailEvent(value?: ForwardFailEvent): void; - - hasSettleEvent(): boolean; - clearSettleEvent(): void; - getSettleEvent(): SettleEvent | undefined; - setSettleEvent(value?: SettleEvent): void; - - hasLinkFailEvent(): boolean; - clearLinkFailEvent(): void; - getLinkFailEvent(): LinkFailEvent | undefined; - setLinkFailEvent(value?: LinkFailEvent): void; - - getEventCase(): HtlcEvent.EventCase; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): HtlcEvent.AsObject; - static toObject(includeInstance: boolean, msg: HtlcEvent): HtlcEvent.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: HtlcEvent, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): HtlcEvent; - static deserializeBinaryFromReader(message: HtlcEvent, reader: jspb.BinaryReader): HtlcEvent; -} - -export namespace HtlcEvent { - export type AsObject = { - incomingChannelId: number, - outgoingChannelId: number, - incomingHtlcId: number, - outgoingHtlcId: number, - timestampNs: number, - eventType: HtlcEvent.EventTypeMap[keyof HtlcEvent.EventTypeMap], - forwardEvent?: ForwardEvent.AsObject, - forwardFailEvent?: ForwardFailEvent.AsObject, - settleEvent?: SettleEvent.AsObject, - linkFailEvent?: LinkFailEvent.AsObject, - } - - export interface EventTypeMap { - UNKNOWN: 0; - SEND: 1; - RECEIVE: 2; - FORWARD: 3; - } - - export const EventType: EventTypeMap; - - export enum EventCase { - EVENT_NOT_SET = 0, - FORWARD_EVENT = 7, - FORWARD_FAIL_EVENT = 8, - SETTLE_EVENT = 9, - LINK_FAIL_EVENT = 10, - } -} - -export class HtlcInfo extends jspb.Message { - getIncomingTimelock(): number; - setIncomingTimelock(value: number): void; - - getOutgoingTimelock(): number; - setOutgoingTimelock(value: number): void; - - getIncomingAmtMsat(): number; - setIncomingAmtMsat(value: number): void; - - getOutgoingAmtMsat(): number; - setOutgoingAmtMsat(value: number): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): HtlcInfo.AsObject; - static toObject(includeInstance: boolean, msg: HtlcInfo): HtlcInfo.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: HtlcInfo, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): HtlcInfo; - static deserializeBinaryFromReader(message: HtlcInfo, reader: jspb.BinaryReader): HtlcInfo; -} - -export namespace HtlcInfo { - export type AsObject = { - incomingTimelock: number, - outgoingTimelock: number, - incomingAmtMsat: number, - outgoingAmtMsat: number, - } -} - -export class ForwardEvent extends jspb.Message { - hasInfo(): boolean; - clearInfo(): void; - getInfo(): HtlcInfo | undefined; - setInfo(value?: HtlcInfo): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ForwardEvent.AsObject; - static toObject(includeInstance: boolean, msg: ForwardEvent): ForwardEvent.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ForwardEvent, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ForwardEvent; - static deserializeBinaryFromReader(message: ForwardEvent, reader: jspb.BinaryReader): ForwardEvent; -} - -export namespace ForwardEvent { - export type AsObject = { - info?: HtlcInfo.AsObject, - } -} - -export class ForwardFailEvent extends jspb.Message { - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ForwardFailEvent.AsObject; - static toObject(includeInstance: boolean, msg: ForwardFailEvent): ForwardFailEvent.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ForwardFailEvent, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ForwardFailEvent; - static deserializeBinaryFromReader(message: ForwardFailEvent, reader: jspb.BinaryReader): ForwardFailEvent; -} - -export namespace ForwardFailEvent { - export type AsObject = { - } -} - -export class SettleEvent extends jspb.Message { - getPreimage(): Uint8Array | string; - getPreimage_asU8(): Uint8Array; - getPreimage_asB64(): string; - setPreimage(value: Uint8Array | string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): SettleEvent.AsObject; - static toObject(includeInstance: boolean, msg: SettleEvent): SettleEvent.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: SettleEvent, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): SettleEvent; - static deserializeBinaryFromReader(message: SettleEvent, reader: jspb.BinaryReader): SettleEvent; -} - -export namespace SettleEvent { - export type AsObject = { - preimage: Uint8Array | string, - } -} - -export class LinkFailEvent extends jspb.Message { - hasInfo(): boolean; - clearInfo(): void; - getInfo(): HtlcInfo | undefined; - setInfo(value?: HtlcInfo): void; - - getWireFailure(): lightning_pb.Failure.FailureCodeMap[keyof lightning_pb.Failure.FailureCodeMap]; - setWireFailure(value: lightning_pb.Failure.FailureCodeMap[keyof lightning_pb.Failure.FailureCodeMap]): void; - - getFailureDetail(): FailureDetailMap[keyof FailureDetailMap]; - setFailureDetail(value: FailureDetailMap[keyof FailureDetailMap]): void; - - getFailureString(): string; - setFailureString(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): LinkFailEvent.AsObject; - static toObject(includeInstance: boolean, msg: LinkFailEvent): LinkFailEvent.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: LinkFailEvent, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): LinkFailEvent; - static deserializeBinaryFromReader(message: LinkFailEvent, reader: jspb.BinaryReader): LinkFailEvent; -} - -export namespace LinkFailEvent { - export type AsObject = { - info?: HtlcInfo.AsObject, - wireFailure: lightning_pb.Failure.FailureCodeMap[keyof lightning_pb.Failure.FailureCodeMap], - failureDetail: FailureDetailMap[keyof FailureDetailMap], - failureString: string, - } -} - -export class PaymentStatus extends jspb.Message { - getState(): PaymentStateMap[keyof PaymentStateMap]; - setState(value: PaymentStateMap[keyof PaymentStateMap]): void; - - getPreimage(): Uint8Array | string; - getPreimage_asU8(): Uint8Array; - getPreimage_asB64(): string; - setPreimage(value: Uint8Array | string): void; - - clearHtlcsList(): void; - getHtlcsList(): Array; - setHtlcsList(value: Array): void; - addHtlcs(value?: lightning_pb.HTLCAttempt, index?: number): lightning_pb.HTLCAttempt; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): PaymentStatus.AsObject; - static toObject(includeInstance: boolean, msg: PaymentStatus): PaymentStatus.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: PaymentStatus, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): PaymentStatus; - static deserializeBinaryFromReader(message: PaymentStatus, reader: jspb.BinaryReader): PaymentStatus; -} - -export namespace PaymentStatus { - export type AsObject = { - state: PaymentStateMap[keyof PaymentStateMap], - preimage: Uint8Array | string, - htlcs: Array, - } -} - -export class CircuitKey extends jspb.Message { - getChanId(): number; - setChanId(value: number): void; - - getHtlcId(): number; - setHtlcId(value: number): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): CircuitKey.AsObject; - static toObject(includeInstance: boolean, msg: CircuitKey): CircuitKey.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: CircuitKey, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): CircuitKey; - static deserializeBinaryFromReader(message: CircuitKey, reader: jspb.BinaryReader): CircuitKey; -} - -export namespace CircuitKey { - export type AsObject = { - chanId: number, - htlcId: number, - } -} - -export class ForwardHtlcInterceptRequest extends jspb.Message { - hasIncomingCircuitKey(): boolean; - clearIncomingCircuitKey(): void; - getIncomingCircuitKey(): CircuitKey | undefined; - setIncomingCircuitKey(value?: CircuitKey): void; - - getIncomingAmountMsat(): number; - setIncomingAmountMsat(value: number): void; - - getIncomingExpiry(): number; - setIncomingExpiry(value: number): void; - - getPaymentHash(): Uint8Array | string; - getPaymentHash_asU8(): Uint8Array; - getPaymentHash_asB64(): string; - setPaymentHash(value: Uint8Array | string): void; - - getOutgoingRequestedChanId(): number; - setOutgoingRequestedChanId(value: number): void; - - getOutgoingAmountMsat(): number; - setOutgoingAmountMsat(value: number): void; - - getOutgoingExpiry(): number; - setOutgoingExpiry(value: number): void; - - getCustomRecordsMap(): jspb.Map; - clearCustomRecordsMap(): void; - getOnionBlob(): Uint8Array | string; - getOnionBlob_asU8(): Uint8Array; - getOnionBlob_asB64(): string; - setOnionBlob(value: Uint8Array | string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ForwardHtlcInterceptRequest.AsObject; - static toObject(includeInstance: boolean, msg: ForwardHtlcInterceptRequest): ForwardHtlcInterceptRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ForwardHtlcInterceptRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ForwardHtlcInterceptRequest; - static deserializeBinaryFromReader(message: ForwardHtlcInterceptRequest, reader: jspb.BinaryReader): ForwardHtlcInterceptRequest; -} - -export namespace ForwardHtlcInterceptRequest { - export type AsObject = { - incomingCircuitKey?: CircuitKey.AsObject, - incomingAmountMsat: number, - incomingExpiry: number, - paymentHash: Uint8Array | string, - outgoingRequestedChanId: number, - outgoingAmountMsat: number, - outgoingExpiry: number, - customRecords: Array<[number, Uint8Array | string]>, - onionBlob: Uint8Array | string, - } -} - -export class ForwardHtlcInterceptResponse extends jspb.Message { - hasIncomingCircuitKey(): boolean; - clearIncomingCircuitKey(): void; - getIncomingCircuitKey(): CircuitKey | undefined; - setIncomingCircuitKey(value?: CircuitKey): void; - - getAction(): ResolveHoldForwardActionMap[keyof ResolveHoldForwardActionMap]; - setAction(value: ResolveHoldForwardActionMap[keyof ResolveHoldForwardActionMap]): void; - - getPreimage(): Uint8Array | string; - getPreimage_asU8(): Uint8Array; - getPreimage_asB64(): string; - setPreimage(value: Uint8Array | string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ForwardHtlcInterceptResponse.AsObject; - static toObject(includeInstance: boolean, msg: ForwardHtlcInterceptResponse): ForwardHtlcInterceptResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ForwardHtlcInterceptResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ForwardHtlcInterceptResponse; - static deserializeBinaryFromReader(message: ForwardHtlcInterceptResponse, reader: jspb.BinaryReader): ForwardHtlcInterceptResponse; -} - -export namespace ForwardHtlcInterceptResponse { - export type AsObject = { - incomingCircuitKey?: CircuitKey.AsObject, - action: ResolveHoldForwardActionMap[keyof ResolveHoldForwardActionMap], - preimage: Uint8Array | string, - } -} - -export class UpdateChanStatusRequest extends jspb.Message { - hasChanPoint(): boolean; - clearChanPoint(): void; - getChanPoint(): lightning_pb.ChannelPoint | undefined; - setChanPoint(value?: lightning_pb.ChannelPoint): void; - - getAction(): ChanStatusActionMap[keyof ChanStatusActionMap]; - setAction(value: ChanStatusActionMap[keyof ChanStatusActionMap]): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): UpdateChanStatusRequest.AsObject; - static toObject(includeInstance: boolean, msg: UpdateChanStatusRequest): UpdateChanStatusRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: UpdateChanStatusRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): UpdateChanStatusRequest; - static deserializeBinaryFromReader(message: UpdateChanStatusRequest, reader: jspb.BinaryReader): UpdateChanStatusRequest; -} - -export namespace UpdateChanStatusRequest { - export type AsObject = { - chanPoint?: lightning_pb.ChannelPoint.AsObject, - action: ChanStatusActionMap[keyof ChanStatusActionMap], - } -} - -export class UpdateChanStatusResponse extends jspb.Message { - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): UpdateChanStatusResponse.AsObject; - static toObject(includeInstance: boolean, msg: UpdateChanStatusResponse): UpdateChanStatusResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: UpdateChanStatusResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): UpdateChanStatusResponse; - static deserializeBinaryFromReader(message: UpdateChanStatusResponse, reader: jspb.BinaryReader): UpdateChanStatusResponse; -} - -export namespace UpdateChanStatusResponse { - export type AsObject = { - } -} - -export interface FailureDetailMap { - UNKNOWN: 0; - NO_DETAIL: 1; - ONION_DECODE: 2; - LINK_NOT_ELIGIBLE: 3; - ON_CHAIN_TIMEOUT: 4; - HTLC_EXCEEDS_MAX: 5; - INSUFFICIENT_BALANCE: 6; - INCOMPLETE_FORWARD: 7; - HTLC_ADD_FAILED: 8; - FORWARDS_DISABLED: 9; - INVOICE_CANCELED: 10; - INVOICE_UNDERPAID: 11; - INVOICE_EXPIRY_TOO_SOON: 12; - INVOICE_NOT_OPEN: 13; - MPP_INVOICE_TIMEOUT: 14; - ADDRESS_MISMATCH: 15; - SET_TOTAL_MISMATCH: 16; - SET_TOTAL_TOO_LOW: 17; - SET_OVERPAID: 18; - UNKNOWN_INVOICE: 19; - INVALID_KEYSEND: 20; - MPP_IN_PROGRESS: 21; - CIRCULAR_ROUTE: 22; -} - -export const FailureDetail: FailureDetailMap; - -export interface PaymentStateMap { - IN_FLIGHT: 0; - SUCCEEDED: 1; - FAILED_TIMEOUT: 2; - FAILED_NO_ROUTE: 3; - FAILED_ERROR: 4; - FAILED_INCORRECT_PAYMENT_DETAILS: 5; - FAILED_INSUFFICIENT_BALANCE: 6; -} - -export const PaymentState: PaymentStateMap; - -export interface ResolveHoldForwardActionMap { - SETTLE: 0; - FAIL: 1; - RESUME: 2; -} - -export const ResolveHoldForwardAction: ResolveHoldForwardActionMap; - -export interface ChanStatusActionMap { - ENABLE: 0; - DISABLE: 1; - AUTO: 2; -} - -export const ChanStatusAction: ChanStatusActionMap; - diff --git a/lib/types/generated/routerrpc/router_pb.js b/lib/types/generated/routerrpc/router_pb.js deleted file mode 100644 index 89f97b4..0000000 --- a/lib/types/generated/routerrpc/router_pb.js +++ /dev/null @@ -1,8541 +0,0 @@ -// source: routerrpc/router.proto -/** - * @fileoverview - * @enhanceable - * @suppress {missingRequire} reports error on implicit type usages. - * @suppress {messageConventions} JS Compiler reports an error if a variable or - * field starts with 'MSG_' and isn't a translatable message. - * @public - */ -// GENERATED CODE -- DO NOT EDIT! -/* eslint-disable */ -// @ts-nocheck - -var jspb = require('google-protobuf'); -var goog = jspb; -var global = Function('return this')(); - -var lightning_pb = require('../lightning_pb.js'); -goog.object.extend(proto, lightning_pb); -goog.exportSymbol('proto.routerrpc.BuildRouteRequest', null, global); -goog.exportSymbol('proto.routerrpc.BuildRouteResponse', null, global); -goog.exportSymbol('proto.routerrpc.ChanStatusAction', null, global); -goog.exportSymbol('proto.routerrpc.CircuitKey', null, global); -goog.exportSymbol('proto.routerrpc.FailureDetail', null, global); -goog.exportSymbol('proto.routerrpc.ForwardEvent', null, global); -goog.exportSymbol('proto.routerrpc.ForwardFailEvent', null, global); -goog.exportSymbol('proto.routerrpc.ForwardHtlcInterceptRequest', null, global); -goog.exportSymbol('proto.routerrpc.ForwardHtlcInterceptResponse', null, global); -goog.exportSymbol('proto.routerrpc.GetMissionControlConfigRequest', null, global); -goog.exportSymbol('proto.routerrpc.GetMissionControlConfigResponse', null, global); -goog.exportSymbol('proto.routerrpc.HtlcEvent', null, global); -goog.exportSymbol('proto.routerrpc.HtlcEvent.EventCase', null, global); -goog.exportSymbol('proto.routerrpc.HtlcEvent.EventType', null, global); -goog.exportSymbol('proto.routerrpc.HtlcInfo', null, global); -goog.exportSymbol('proto.routerrpc.LinkFailEvent', null, global); -goog.exportSymbol('proto.routerrpc.MissionControlConfig', null, global); -goog.exportSymbol('proto.routerrpc.PairData', null, global); -goog.exportSymbol('proto.routerrpc.PairHistory', null, global); -goog.exportSymbol('proto.routerrpc.PaymentState', null, global); -goog.exportSymbol('proto.routerrpc.PaymentStatus', null, global); -goog.exportSymbol('proto.routerrpc.QueryMissionControlRequest', null, global); -goog.exportSymbol('proto.routerrpc.QueryMissionControlResponse', null, global); -goog.exportSymbol('proto.routerrpc.QueryProbabilityRequest', null, global); -goog.exportSymbol('proto.routerrpc.QueryProbabilityResponse', null, global); -goog.exportSymbol('proto.routerrpc.ResetMissionControlRequest', null, global); -goog.exportSymbol('proto.routerrpc.ResetMissionControlResponse', null, global); -goog.exportSymbol('proto.routerrpc.ResolveHoldForwardAction', null, global); -goog.exportSymbol('proto.routerrpc.RouteFeeRequest', null, global); -goog.exportSymbol('proto.routerrpc.RouteFeeResponse', null, global); -goog.exportSymbol('proto.routerrpc.SendPaymentRequest', null, global); -goog.exportSymbol('proto.routerrpc.SendToRouteRequest', null, global); -goog.exportSymbol('proto.routerrpc.SendToRouteResponse', null, global); -goog.exportSymbol('proto.routerrpc.SetMissionControlConfigRequest', null, global); -goog.exportSymbol('proto.routerrpc.SetMissionControlConfigResponse', null, global); -goog.exportSymbol('proto.routerrpc.SettleEvent', null, global); -goog.exportSymbol('proto.routerrpc.SubscribeHtlcEventsRequest', null, global); -goog.exportSymbol('proto.routerrpc.TrackPaymentRequest', null, global); -goog.exportSymbol('proto.routerrpc.UpdateChanStatusRequest', null, global); -goog.exportSymbol('proto.routerrpc.UpdateChanStatusResponse', null, global); -goog.exportSymbol('proto.routerrpc.XImportMissionControlRequest', null, global); -goog.exportSymbol('proto.routerrpc.XImportMissionControlResponse', null, global); -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.routerrpc.SendPaymentRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.routerrpc.SendPaymentRequest.repeatedFields_, null); -}; -goog.inherits(proto.routerrpc.SendPaymentRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.routerrpc.SendPaymentRequest.displayName = 'proto.routerrpc.SendPaymentRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.routerrpc.TrackPaymentRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.routerrpc.TrackPaymentRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.routerrpc.TrackPaymentRequest.displayName = 'proto.routerrpc.TrackPaymentRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.routerrpc.RouteFeeRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.routerrpc.RouteFeeRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.routerrpc.RouteFeeRequest.displayName = 'proto.routerrpc.RouteFeeRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.routerrpc.RouteFeeResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.routerrpc.RouteFeeResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.routerrpc.RouteFeeResponse.displayName = 'proto.routerrpc.RouteFeeResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.routerrpc.SendToRouteRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.routerrpc.SendToRouteRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.routerrpc.SendToRouteRequest.displayName = 'proto.routerrpc.SendToRouteRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.routerrpc.SendToRouteResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.routerrpc.SendToRouteResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.routerrpc.SendToRouteResponse.displayName = 'proto.routerrpc.SendToRouteResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.routerrpc.ResetMissionControlRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.routerrpc.ResetMissionControlRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.routerrpc.ResetMissionControlRequest.displayName = 'proto.routerrpc.ResetMissionControlRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.routerrpc.ResetMissionControlResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.routerrpc.ResetMissionControlResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.routerrpc.ResetMissionControlResponse.displayName = 'proto.routerrpc.ResetMissionControlResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.routerrpc.QueryMissionControlRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.routerrpc.QueryMissionControlRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.routerrpc.QueryMissionControlRequest.displayName = 'proto.routerrpc.QueryMissionControlRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.routerrpc.QueryMissionControlResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.routerrpc.QueryMissionControlResponse.repeatedFields_, null); -}; -goog.inherits(proto.routerrpc.QueryMissionControlResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.routerrpc.QueryMissionControlResponse.displayName = 'proto.routerrpc.QueryMissionControlResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.routerrpc.XImportMissionControlRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.routerrpc.XImportMissionControlRequest.repeatedFields_, null); -}; -goog.inherits(proto.routerrpc.XImportMissionControlRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.routerrpc.XImportMissionControlRequest.displayName = 'proto.routerrpc.XImportMissionControlRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.routerrpc.XImportMissionControlResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.routerrpc.XImportMissionControlResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.routerrpc.XImportMissionControlResponse.displayName = 'proto.routerrpc.XImportMissionControlResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.routerrpc.PairHistory = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.routerrpc.PairHistory, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.routerrpc.PairHistory.displayName = 'proto.routerrpc.PairHistory'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.routerrpc.PairData = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.routerrpc.PairData, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.routerrpc.PairData.displayName = 'proto.routerrpc.PairData'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.routerrpc.GetMissionControlConfigRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.routerrpc.GetMissionControlConfigRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.routerrpc.GetMissionControlConfigRequest.displayName = 'proto.routerrpc.GetMissionControlConfigRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.routerrpc.GetMissionControlConfigResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.routerrpc.GetMissionControlConfigResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.routerrpc.GetMissionControlConfigResponse.displayName = 'proto.routerrpc.GetMissionControlConfigResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.routerrpc.SetMissionControlConfigRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.routerrpc.SetMissionControlConfigRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.routerrpc.SetMissionControlConfigRequest.displayName = 'proto.routerrpc.SetMissionControlConfigRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.routerrpc.SetMissionControlConfigResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.routerrpc.SetMissionControlConfigResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.routerrpc.SetMissionControlConfigResponse.displayName = 'proto.routerrpc.SetMissionControlConfigResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.routerrpc.MissionControlConfig = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.routerrpc.MissionControlConfig, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.routerrpc.MissionControlConfig.displayName = 'proto.routerrpc.MissionControlConfig'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.routerrpc.QueryProbabilityRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.routerrpc.QueryProbabilityRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.routerrpc.QueryProbabilityRequest.displayName = 'proto.routerrpc.QueryProbabilityRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.routerrpc.QueryProbabilityResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.routerrpc.QueryProbabilityResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.routerrpc.QueryProbabilityResponse.displayName = 'proto.routerrpc.QueryProbabilityResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.routerrpc.BuildRouteRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.routerrpc.BuildRouteRequest.repeatedFields_, null); -}; -goog.inherits(proto.routerrpc.BuildRouteRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.routerrpc.BuildRouteRequest.displayName = 'proto.routerrpc.BuildRouteRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.routerrpc.BuildRouteResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.routerrpc.BuildRouteResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.routerrpc.BuildRouteResponse.displayName = 'proto.routerrpc.BuildRouteResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.routerrpc.SubscribeHtlcEventsRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.routerrpc.SubscribeHtlcEventsRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.routerrpc.SubscribeHtlcEventsRequest.displayName = 'proto.routerrpc.SubscribeHtlcEventsRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.routerrpc.HtlcEvent = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.routerrpc.HtlcEvent.oneofGroups_); -}; -goog.inherits(proto.routerrpc.HtlcEvent, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.routerrpc.HtlcEvent.displayName = 'proto.routerrpc.HtlcEvent'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.routerrpc.HtlcInfo = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.routerrpc.HtlcInfo, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.routerrpc.HtlcInfo.displayName = 'proto.routerrpc.HtlcInfo'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.routerrpc.ForwardEvent = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.routerrpc.ForwardEvent, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.routerrpc.ForwardEvent.displayName = 'proto.routerrpc.ForwardEvent'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.routerrpc.ForwardFailEvent = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.routerrpc.ForwardFailEvent, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.routerrpc.ForwardFailEvent.displayName = 'proto.routerrpc.ForwardFailEvent'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.routerrpc.SettleEvent = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.routerrpc.SettleEvent, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.routerrpc.SettleEvent.displayName = 'proto.routerrpc.SettleEvent'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.routerrpc.LinkFailEvent = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.routerrpc.LinkFailEvent, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.routerrpc.LinkFailEvent.displayName = 'proto.routerrpc.LinkFailEvent'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.routerrpc.PaymentStatus = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.routerrpc.PaymentStatus.repeatedFields_, null); -}; -goog.inherits(proto.routerrpc.PaymentStatus, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.routerrpc.PaymentStatus.displayName = 'proto.routerrpc.PaymentStatus'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.routerrpc.CircuitKey = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.routerrpc.CircuitKey, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.routerrpc.CircuitKey.displayName = 'proto.routerrpc.CircuitKey'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.routerrpc.ForwardHtlcInterceptRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.routerrpc.ForwardHtlcInterceptRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.routerrpc.ForwardHtlcInterceptRequest.displayName = 'proto.routerrpc.ForwardHtlcInterceptRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.routerrpc.ForwardHtlcInterceptResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.routerrpc.ForwardHtlcInterceptResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.routerrpc.ForwardHtlcInterceptResponse.displayName = 'proto.routerrpc.ForwardHtlcInterceptResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.routerrpc.UpdateChanStatusRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.routerrpc.UpdateChanStatusRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.routerrpc.UpdateChanStatusRequest.displayName = 'proto.routerrpc.UpdateChanStatusRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.routerrpc.UpdateChanStatusResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.routerrpc.UpdateChanStatusResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.routerrpc.UpdateChanStatusResponse.displayName = 'proto.routerrpc.UpdateChanStatusResponse'; -} - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.routerrpc.SendPaymentRequest.repeatedFields_ = [19,10,16]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.routerrpc.SendPaymentRequest.prototype.toObject = function(opt_includeInstance) { - return proto.routerrpc.SendPaymentRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.routerrpc.SendPaymentRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.routerrpc.SendPaymentRequest.toObject = function(includeInstance, msg) { - var f, obj = { - dest: msg.getDest_asB64(), - amt: jspb.Message.getFieldWithDefault(msg, 2, 0), - amtMsat: jspb.Message.getFieldWithDefault(msg, 12, 0), - paymentHash: msg.getPaymentHash_asB64(), - finalCltvDelta: jspb.Message.getFieldWithDefault(msg, 4, 0), - paymentAddr: msg.getPaymentAddr_asB64(), - paymentRequest: jspb.Message.getFieldWithDefault(msg, 5, ""), - timeoutSeconds: jspb.Message.getFieldWithDefault(msg, 6, 0), - feeLimitSat: jspb.Message.getFieldWithDefault(msg, 7, 0), - feeLimitMsat: jspb.Message.getFieldWithDefault(msg, 13, 0), - outgoingChanId: jspb.Message.getFieldWithDefault(msg, 8, "0"), - outgoingChanIdsList: (f = jspb.Message.getRepeatedField(msg, 19)) == null ? undefined : f, - lastHopPubkey: msg.getLastHopPubkey_asB64(), - cltvLimit: jspb.Message.getFieldWithDefault(msg, 9, 0), - routeHintsList: jspb.Message.toObjectList(msg.getRouteHintsList(), - lightning_pb.RouteHint.toObject, includeInstance), - destCustomRecordsMap: (f = msg.getDestCustomRecordsMap()) ? f.toObject(includeInstance, undefined) : [], - allowSelfPayment: jspb.Message.getBooleanFieldWithDefault(msg, 15, false), - destFeaturesList: (f = jspb.Message.getRepeatedField(msg, 16)) == null ? undefined : f, - maxParts: jspb.Message.getFieldWithDefault(msg, 17, 0), - noInflightUpdates: jspb.Message.getBooleanFieldWithDefault(msg, 18, false), - maxShardSizeMsat: jspb.Message.getFieldWithDefault(msg, 21, 0), - amp: jspb.Message.getBooleanFieldWithDefault(msg, 22, false) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.routerrpc.SendPaymentRequest} - */ -proto.routerrpc.SendPaymentRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.routerrpc.SendPaymentRequest; - return proto.routerrpc.SendPaymentRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.routerrpc.SendPaymentRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.routerrpc.SendPaymentRequest} - */ -proto.routerrpc.SendPaymentRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setDest(value); - break; - case 2: - var value = /** @type {number} */ (reader.readInt64()); - msg.setAmt(value); - break; - case 12: - var value = /** @type {number} */ (reader.readInt64()); - msg.setAmtMsat(value); - break; - case 3: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setPaymentHash(value); - break; - case 4: - var value = /** @type {number} */ (reader.readInt32()); - msg.setFinalCltvDelta(value); - break; - case 20: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setPaymentAddr(value); - break; - case 5: - var value = /** @type {string} */ (reader.readString()); - msg.setPaymentRequest(value); - break; - case 6: - var value = /** @type {number} */ (reader.readInt32()); - msg.setTimeoutSeconds(value); - break; - case 7: - var value = /** @type {number} */ (reader.readInt64()); - msg.setFeeLimitSat(value); - break; - case 13: - var value = /** @type {number} */ (reader.readInt64()); - msg.setFeeLimitMsat(value); - break; - case 8: - var value = /** @type {string} */ (reader.readUint64String()); - msg.setOutgoingChanId(value); - break; - case 19: - var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedUint64() : [reader.readUint64()]); - for (var i = 0; i < values.length; i++) { - msg.addOutgoingChanIds(values[i]); - } - break; - case 14: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setLastHopPubkey(value); - break; - case 9: - var value = /** @type {number} */ (reader.readInt32()); - msg.setCltvLimit(value); - break; - case 10: - var value = new lightning_pb.RouteHint; - reader.readMessage(value,lightning_pb.RouteHint.deserializeBinaryFromReader); - msg.addRouteHints(value); - break; - case 11: - var value = msg.getDestCustomRecordsMap(); - reader.readMessage(value, function(message, reader) { - jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readUint64, jspb.BinaryReader.prototype.readBytes, null, 0, ""); - }); - break; - case 15: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setAllowSelfPayment(value); - break; - case 16: - var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedEnum() : [reader.readEnum()]); - for (var i = 0; i < values.length; i++) { - msg.addDestFeatures(values[i]); - } - break; - case 17: - var value = /** @type {number} */ (reader.readUint32()); - msg.setMaxParts(value); - break; - case 18: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setNoInflightUpdates(value); - break; - case 21: - var value = /** @type {number} */ (reader.readUint64()); - msg.setMaxShardSizeMsat(value); - break; - case 22: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setAmp(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.routerrpc.SendPaymentRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.routerrpc.SendPaymentRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.routerrpc.SendPaymentRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.routerrpc.SendPaymentRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getDest_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getAmt(); - if (f !== 0) { - writer.writeInt64( - 2, - f - ); - } - f = message.getAmtMsat(); - if (f !== 0) { - writer.writeInt64( - 12, - f - ); - } - f = message.getPaymentHash_asU8(); - if (f.length > 0) { - writer.writeBytes( - 3, - f - ); - } - f = message.getFinalCltvDelta(); - if (f !== 0) { - writer.writeInt32( - 4, - f - ); - } - f = message.getPaymentAddr_asU8(); - if (f.length > 0) { - writer.writeBytes( - 20, - f - ); - } - f = message.getPaymentRequest(); - if (f.length > 0) { - writer.writeString( - 5, - f - ); - } - f = message.getTimeoutSeconds(); - if (f !== 0) { - writer.writeInt32( - 6, - f - ); - } - f = message.getFeeLimitSat(); - if (f !== 0) { - writer.writeInt64( - 7, - f - ); - } - f = message.getFeeLimitMsat(); - if (f !== 0) { - writer.writeInt64( - 13, - f - ); - } - f = message.getOutgoingChanId(); - if (parseInt(f, 10) !== 0) { - writer.writeUint64String( - 8, - f - ); - } - f = message.getOutgoingChanIdsList(); - if (f.length > 0) { - writer.writePackedUint64( - 19, - f - ); - } - f = message.getLastHopPubkey_asU8(); - if (f.length > 0) { - writer.writeBytes( - 14, - f - ); - } - f = message.getCltvLimit(); - if (f !== 0) { - writer.writeInt32( - 9, - f - ); - } - f = message.getRouteHintsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 10, - f, - lightning_pb.RouteHint.serializeBinaryToWriter - ); - } - f = message.getDestCustomRecordsMap(true); - if (f && f.getLength() > 0) { - f.serializeBinary(11, writer, jspb.BinaryWriter.prototype.writeUint64, jspb.BinaryWriter.prototype.writeBytes); - } - f = message.getAllowSelfPayment(); - if (f) { - writer.writeBool( - 15, - f - ); - } - f = message.getDestFeaturesList(); - if (f.length > 0) { - writer.writePackedEnum( - 16, - f - ); - } - f = message.getMaxParts(); - if (f !== 0) { - writer.writeUint32( - 17, - f - ); - } - f = message.getNoInflightUpdates(); - if (f) { - writer.writeBool( - 18, - f - ); - } - f = message.getMaxShardSizeMsat(); - if (f !== 0) { - writer.writeUint64( - 21, - f - ); - } - f = message.getAmp(); - if (f) { - writer.writeBool( - 22, - f - ); - } -}; - - -/** - * optional bytes dest = 1; - * @return {!(string|Uint8Array)} - */ -proto.routerrpc.SendPaymentRequest.prototype.getDest = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes dest = 1; - * This is a type-conversion wrapper around `getDest()` - * @return {string} - */ -proto.routerrpc.SendPaymentRequest.prototype.getDest_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getDest())); -}; - - -/** - * optional bytes dest = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getDest()` - * @return {!Uint8Array} - */ -proto.routerrpc.SendPaymentRequest.prototype.getDest_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getDest())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.routerrpc.SendPaymentRequest} returns this - */ -proto.routerrpc.SendPaymentRequest.prototype.setDest = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional int64 amt = 2; - * @return {number} - */ -proto.routerrpc.SendPaymentRequest.prototype.getAmt = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.routerrpc.SendPaymentRequest} returns this - */ -proto.routerrpc.SendPaymentRequest.prototype.setAmt = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * optional int64 amt_msat = 12; - * @return {number} - */ -proto.routerrpc.SendPaymentRequest.prototype.getAmtMsat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 12, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.routerrpc.SendPaymentRequest} returns this - */ -proto.routerrpc.SendPaymentRequest.prototype.setAmtMsat = function(value) { - return jspb.Message.setProto3IntField(this, 12, value); -}; - - -/** - * optional bytes payment_hash = 3; - * @return {!(string|Uint8Array)} - */ -proto.routerrpc.SendPaymentRequest.prototype.getPaymentHash = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * optional bytes payment_hash = 3; - * This is a type-conversion wrapper around `getPaymentHash()` - * @return {string} - */ -proto.routerrpc.SendPaymentRequest.prototype.getPaymentHash_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getPaymentHash())); -}; - - -/** - * optional bytes payment_hash = 3; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getPaymentHash()` - * @return {!Uint8Array} - */ -proto.routerrpc.SendPaymentRequest.prototype.getPaymentHash_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getPaymentHash())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.routerrpc.SendPaymentRequest} returns this - */ -proto.routerrpc.SendPaymentRequest.prototype.setPaymentHash = function(value) { - return jspb.Message.setProto3BytesField(this, 3, value); -}; - - -/** - * optional int32 final_cltv_delta = 4; - * @return {number} - */ -proto.routerrpc.SendPaymentRequest.prototype.getFinalCltvDelta = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.routerrpc.SendPaymentRequest} returns this - */ -proto.routerrpc.SendPaymentRequest.prototype.setFinalCltvDelta = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); -}; - - -/** - * optional bytes payment_addr = 20; - * @return {!(string|Uint8Array)} - */ -proto.routerrpc.SendPaymentRequest.prototype.getPaymentAddr = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 20, "")); -}; - - -/** - * optional bytes payment_addr = 20; - * This is a type-conversion wrapper around `getPaymentAddr()` - * @return {string} - */ -proto.routerrpc.SendPaymentRequest.prototype.getPaymentAddr_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getPaymentAddr())); -}; - - -/** - * optional bytes payment_addr = 20; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getPaymentAddr()` - * @return {!Uint8Array} - */ -proto.routerrpc.SendPaymentRequest.prototype.getPaymentAddr_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getPaymentAddr())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.routerrpc.SendPaymentRequest} returns this - */ -proto.routerrpc.SendPaymentRequest.prototype.setPaymentAddr = function(value) { - return jspb.Message.setProto3BytesField(this, 20, value); -}; - - -/** - * optional string payment_request = 5; - * @return {string} - */ -proto.routerrpc.SendPaymentRequest.prototype.getPaymentRequest = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); -}; - - -/** - * @param {string} value - * @return {!proto.routerrpc.SendPaymentRequest} returns this - */ -proto.routerrpc.SendPaymentRequest.prototype.setPaymentRequest = function(value) { - return jspb.Message.setProto3StringField(this, 5, value); -}; - - -/** - * optional int32 timeout_seconds = 6; - * @return {number} - */ -proto.routerrpc.SendPaymentRequest.prototype.getTimeoutSeconds = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.routerrpc.SendPaymentRequest} returns this - */ -proto.routerrpc.SendPaymentRequest.prototype.setTimeoutSeconds = function(value) { - return jspb.Message.setProto3IntField(this, 6, value); -}; - - -/** - * optional int64 fee_limit_sat = 7; - * @return {number} - */ -proto.routerrpc.SendPaymentRequest.prototype.getFeeLimitSat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.routerrpc.SendPaymentRequest} returns this - */ -proto.routerrpc.SendPaymentRequest.prototype.setFeeLimitSat = function(value) { - return jspb.Message.setProto3IntField(this, 7, value); -}; - - -/** - * optional int64 fee_limit_msat = 13; - * @return {number} - */ -proto.routerrpc.SendPaymentRequest.prototype.getFeeLimitMsat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 13, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.routerrpc.SendPaymentRequest} returns this - */ -proto.routerrpc.SendPaymentRequest.prototype.setFeeLimitMsat = function(value) { - return jspb.Message.setProto3IntField(this, 13, value); -}; - - -/** - * optional uint64 outgoing_chan_id = 8; - * @return {string} - */ -proto.routerrpc.SendPaymentRequest.prototype.getOutgoingChanId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, "0")); -}; - - -/** - * @param {string} value - * @return {!proto.routerrpc.SendPaymentRequest} returns this - */ -proto.routerrpc.SendPaymentRequest.prototype.setOutgoingChanId = function(value) { - return jspb.Message.setProto3StringIntField(this, 8, value); -}; - - -/** - * repeated uint64 outgoing_chan_ids = 19; - * @return {!Array} - */ -proto.routerrpc.SendPaymentRequest.prototype.getOutgoingChanIdsList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 19)); -}; - - -/** - * @param {!Array} value - * @return {!proto.routerrpc.SendPaymentRequest} returns this - */ -proto.routerrpc.SendPaymentRequest.prototype.setOutgoingChanIdsList = function(value) { - return jspb.Message.setField(this, 19, value || []); -}; - - -/** - * @param {number} value - * @param {number=} opt_index - * @return {!proto.routerrpc.SendPaymentRequest} returns this - */ -proto.routerrpc.SendPaymentRequest.prototype.addOutgoingChanIds = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 19, value, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.routerrpc.SendPaymentRequest} returns this - */ -proto.routerrpc.SendPaymentRequest.prototype.clearOutgoingChanIdsList = function() { - return this.setOutgoingChanIdsList([]); -}; - - -/** - * optional bytes last_hop_pubkey = 14; - * @return {!(string|Uint8Array)} - */ -proto.routerrpc.SendPaymentRequest.prototype.getLastHopPubkey = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 14, "")); -}; - - -/** - * optional bytes last_hop_pubkey = 14; - * This is a type-conversion wrapper around `getLastHopPubkey()` - * @return {string} - */ -proto.routerrpc.SendPaymentRequest.prototype.getLastHopPubkey_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getLastHopPubkey())); -}; - - -/** - * optional bytes last_hop_pubkey = 14; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getLastHopPubkey()` - * @return {!Uint8Array} - */ -proto.routerrpc.SendPaymentRequest.prototype.getLastHopPubkey_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getLastHopPubkey())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.routerrpc.SendPaymentRequest} returns this - */ -proto.routerrpc.SendPaymentRequest.prototype.setLastHopPubkey = function(value) { - return jspb.Message.setProto3BytesField(this, 14, value); -}; - - -/** - * optional int32 cltv_limit = 9; - * @return {number} - */ -proto.routerrpc.SendPaymentRequest.prototype.getCltvLimit = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.routerrpc.SendPaymentRequest} returns this - */ -proto.routerrpc.SendPaymentRequest.prototype.setCltvLimit = function(value) { - return jspb.Message.setProto3IntField(this, 9, value); -}; - - -/** - * repeated lnrpc.RouteHint route_hints = 10; - * @return {!Array} - */ -proto.routerrpc.SendPaymentRequest.prototype.getRouteHintsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, lightning_pb.RouteHint, 10)); -}; - - -/** - * @param {!Array} value - * @return {!proto.routerrpc.SendPaymentRequest} returns this -*/ -proto.routerrpc.SendPaymentRequest.prototype.setRouteHintsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 10, value); -}; - - -/** - * @param {!proto.lnrpc.RouteHint=} opt_value - * @param {number=} opt_index - * @return {!proto.lnrpc.RouteHint} - */ -proto.routerrpc.SendPaymentRequest.prototype.addRouteHints = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 10, opt_value, proto.lnrpc.RouteHint, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.routerrpc.SendPaymentRequest} returns this - */ -proto.routerrpc.SendPaymentRequest.prototype.clearRouteHintsList = function() { - return this.setRouteHintsList([]); -}; - - -/** - * map dest_custom_records = 11; - * @param {boolean=} opt_noLazyCreate Do not create the map if - * empty, instead returning `undefined` - * @return {!jspb.Map} - */ -proto.routerrpc.SendPaymentRequest.prototype.getDestCustomRecordsMap = function(opt_noLazyCreate) { - return /** @type {!jspb.Map} */ ( - jspb.Message.getMapField(this, 11, opt_noLazyCreate, - null)); -}; - - -/** - * Clears values from the map. The map will be non-null. - * @return {!proto.routerrpc.SendPaymentRequest} returns this - */ -proto.routerrpc.SendPaymentRequest.prototype.clearDestCustomRecordsMap = function() { - this.getDestCustomRecordsMap().clear(); - return this;}; - - -/** - * optional bool allow_self_payment = 15; - * @return {boolean} - */ -proto.routerrpc.SendPaymentRequest.prototype.getAllowSelfPayment = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 15, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.routerrpc.SendPaymentRequest} returns this - */ -proto.routerrpc.SendPaymentRequest.prototype.setAllowSelfPayment = function(value) { - return jspb.Message.setProto3BooleanField(this, 15, value); -}; - - -/** - * repeated lnrpc.FeatureBit dest_features = 16; - * @return {!Array} - */ -proto.routerrpc.SendPaymentRequest.prototype.getDestFeaturesList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 16)); -}; - - -/** - * @param {!Array} value - * @return {!proto.routerrpc.SendPaymentRequest} returns this - */ -proto.routerrpc.SendPaymentRequest.prototype.setDestFeaturesList = function(value) { - return jspb.Message.setField(this, 16, value || []); -}; - - -/** - * @param {!proto.lnrpc.FeatureBit} value - * @param {number=} opt_index - * @return {!proto.routerrpc.SendPaymentRequest} returns this - */ -proto.routerrpc.SendPaymentRequest.prototype.addDestFeatures = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 16, value, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.routerrpc.SendPaymentRequest} returns this - */ -proto.routerrpc.SendPaymentRequest.prototype.clearDestFeaturesList = function() { - return this.setDestFeaturesList([]); -}; - - -/** - * optional uint32 max_parts = 17; - * @return {number} - */ -proto.routerrpc.SendPaymentRequest.prototype.getMaxParts = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 17, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.routerrpc.SendPaymentRequest} returns this - */ -proto.routerrpc.SendPaymentRequest.prototype.setMaxParts = function(value) { - return jspb.Message.setProto3IntField(this, 17, value); -}; - - -/** - * optional bool no_inflight_updates = 18; - * @return {boolean} - */ -proto.routerrpc.SendPaymentRequest.prototype.getNoInflightUpdates = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 18, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.routerrpc.SendPaymentRequest} returns this - */ -proto.routerrpc.SendPaymentRequest.prototype.setNoInflightUpdates = function(value) { - return jspb.Message.setProto3BooleanField(this, 18, value); -}; - - -/** - * optional uint64 max_shard_size_msat = 21; - * @return {number} - */ -proto.routerrpc.SendPaymentRequest.prototype.getMaxShardSizeMsat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 21, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.routerrpc.SendPaymentRequest} returns this - */ -proto.routerrpc.SendPaymentRequest.prototype.setMaxShardSizeMsat = function(value) { - return jspb.Message.setProto3IntField(this, 21, value); -}; - - -/** - * optional bool amp = 22; - * @return {boolean} - */ -proto.routerrpc.SendPaymentRequest.prototype.getAmp = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 22, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.routerrpc.SendPaymentRequest} returns this - */ -proto.routerrpc.SendPaymentRequest.prototype.setAmp = function(value) { - return jspb.Message.setProto3BooleanField(this, 22, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.routerrpc.TrackPaymentRequest.prototype.toObject = function(opt_includeInstance) { - return proto.routerrpc.TrackPaymentRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.routerrpc.TrackPaymentRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.routerrpc.TrackPaymentRequest.toObject = function(includeInstance, msg) { - var f, obj = { - paymentHash: msg.getPaymentHash_asB64(), - noInflightUpdates: jspb.Message.getBooleanFieldWithDefault(msg, 2, false) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.routerrpc.TrackPaymentRequest} - */ -proto.routerrpc.TrackPaymentRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.routerrpc.TrackPaymentRequest; - return proto.routerrpc.TrackPaymentRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.routerrpc.TrackPaymentRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.routerrpc.TrackPaymentRequest} - */ -proto.routerrpc.TrackPaymentRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setPaymentHash(value); - break; - case 2: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setNoInflightUpdates(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.routerrpc.TrackPaymentRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.routerrpc.TrackPaymentRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.routerrpc.TrackPaymentRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.routerrpc.TrackPaymentRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getPaymentHash_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getNoInflightUpdates(); - if (f) { - writer.writeBool( - 2, - f - ); - } -}; - - -/** - * optional bytes payment_hash = 1; - * @return {!(string|Uint8Array)} - */ -proto.routerrpc.TrackPaymentRequest.prototype.getPaymentHash = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes payment_hash = 1; - * This is a type-conversion wrapper around `getPaymentHash()` - * @return {string} - */ -proto.routerrpc.TrackPaymentRequest.prototype.getPaymentHash_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getPaymentHash())); -}; - - -/** - * optional bytes payment_hash = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getPaymentHash()` - * @return {!Uint8Array} - */ -proto.routerrpc.TrackPaymentRequest.prototype.getPaymentHash_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getPaymentHash())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.routerrpc.TrackPaymentRequest} returns this - */ -proto.routerrpc.TrackPaymentRequest.prototype.setPaymentHash = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional bool no_inflight_updates = 2; - * @return {boolean} - */ -proto.routerrpc.TrackPaymentRequest.prototype.getNoInflightUpdates = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.routerrpc.TrackPaymentRequest} returns this - */ -proto.routerrpc.TrackPaymentRequest.prototype.setNoInflightUpdates = function(value) { - return jspb.Message.setProto3BooleanField(this, 2, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.routerrpc.RouteFeeRequest.prototype.toObject = function(opt_includeInstance) { - return proto.routerrpc.RouteFeeRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.routerrpc.RouteFeeRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.routerrpc.RouteFeeRequest.toObject = function(includeInstance, msg) { - var f, obj = { - dest: msg.getDest_asB64(), - amtSat: jspb.Message.getFieldWithDefault(msg, 2, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.routerrpc.RouteFeeRequest} - */ -proto.routerrpc.RouteFeeRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.routerrpc.RouteFeeRequest; - return proto.routerrpc.RouteFeeRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.routerrpc.RouteFeeRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.routerrpc.RouteFeeRequest} - */ -proto.routerrpc.RouteFeeRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setDest(value); - break; - case 2: - var value = /** @type {number} */ (reader.readInt64()); - msg.setAmtSat(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.routerrpc.RouteFeeRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.routerrpc.RouteFeeRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.routerrpc.RouteFeeRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.routerrpc.RouteFeeRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getDest_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getAmtSat(); - if (f !== 0) { - writer.writeInt64( - 2, - f - ); - } -}; - - -/** - * optional bytes dest = 1; - * @return {!(string|Uint8Array)} - */ -proto.routerrpc.RouteFeeRequest.prototype.getDest = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes dest = 1; - * This is a type-conversion wrapper around `getDest()` - * @return {string} - */ -proto.routerrpc.RouteFeeRequest.prototype.getDest_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getDest())); -}; - - -/** - * optional bytes dest = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getDest()` - * @return {!Uint8Array} - */ -proto.routerrpc.RouteFeeRequest.prototype.getDest_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getDest())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.routerrpc.RouteFeeRequest} returns this - */ -proto.routerrpc.RouteFeeRequest.prototype.setDest = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional int64 amt_sat = 2; - * @return {number} - */ -proto.routerrpc.RouteFeeRequest.prototype.getAmtSat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.routerrpc.RouteFeeRequest} returns this - */ -proto.routerrpc.RouteFeeRequest.prototype.setAmtSat = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.routerrpc.RouteFeeResponse.prototype.toObject = function(opt_includeInstance) { - return proto.routerrpc.RouteFeeResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.routerrpc.RouteFeeResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.routerrpc.RouteFeeResponse.toObject = function(includeInstance, msg) { - var f, obj = { - routingFeeMsat: jspb.Message.getFieldWithDefault(msg, 1, 0), - timeLockDelay: jspb.Message.getFieldWithDefault(msg, 2, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.routerrpc.RouteFeeResponse} - */ -proto.routerrpc.RouteFeeResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.routerrpc.RouteFeeResponse; - return proto.routerrpc.RouteFeeResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.routerrpc.RouteFeeResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.routerrpc.RouteFeeResponse} - */ -proto.routerrpc.RouteFeeResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readInt64()); - msg.setRoutingFeeMsat(value); - break; - case 2: - var value = /** @type {number} */ (reader.readInt64()); - msg.setTimeLockDelay(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.routerrpc.RouteFeeResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.routerrpc.RouteFeeResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.routerrpc.RouteFeeResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.routerrpc.RouteFeeResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getRoutingFeeMsat(); - if (f !== 0) { - writer.writeInt64( - 1, - f - ); - } - f = message.getTimeLockDelay(); - if (f !== 0) { - writer.writeInt64( - 2, - f - ); - } -}; - - -/** - * optional int64 routing_fee_msat = 1; - * @return {number} - */ -proto.routerrpc.RouteFeeResponse.prototype.getRoutingFeeMsat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.routerrpc.RouteFeeResponse} returns this - */ -proto.routerrpc.RouteFeeResponse.prototype.setRoutingFeeMsat = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); -}; - - -/** - * optional int64 time_lock_delay = 2; - * @return {number} - */ -proto.routerrpc.RouteFeeResponse.prototype.getTimeLockDelay = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.routerrpc.RouteFeeResponse} returns this - */ -proto.routerrpc.RouteFeeResponse.prototype.setTimeLockDelay = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.routerrpc.SendToRouteRequest.prototype.toObject = function(opt_includeInstance) { - return proto.routerrpc.SendToRouteRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.routerrpc.SendToRouteRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.routerrpc.SendToRouteRequest.toObject = function(includeInstance, msg) { - var f, obj = { - paymentHash: msg.getPaymentHash_asB64(), - route: (f = msg.getRoute()) && lightning_pb.Route.toObject(includeInstance, f) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.routerrpc.SendToRouteRequest} - */ -proto.routerrpc.SendToRouteRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.routerrpc.SendToRouteRequest; - return proto.routerrpc.SendToRouteRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.routerrpc.SendToRouteRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.routerrpc.SendToRouteRequest} - */ -proto.routerrpc.SendToRouteRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setPaymentHash(value); - break; - case 2: - var value = new lightning_pb.Route; - reader.readMessage(value,lightning_pb.Route.deserializeBinaryFromReader); - msg.setRoute(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.routerrpc.SendToRouteRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.routerrpc.SendToRouteRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.routerrpc.SendToRouteRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.routerrpc.SendToRouteRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getPaymentHash_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getRoute(); - if (f != null) { - writer.writeMessage( - 2, - f, - lightning_pb.Route.serializeBinaryToWriter - ); - } -}; - - -/** - * optional bytes payment_hash = 1; - * @return {!(string|Uint8Array)} - */ -proto.routerrpc.SendToRouteRequest.prototype.getPaymentHash = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes payment_hash = 1; - * This is a type-conversion wrapper around `getPaymentHash()` - * @return {string} - */ -proto.routerrpc.SendToRouteRequest.prototype.getPaymentHash_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getPaymentHash())); -}; - - -/** - * optional bytes payment_hash = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getPaymentHash()` - * @return {!Uint8Array} - */ -proto.routerrpc.SendToRouteRequest.prototype.getPaymentHash_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getPaymentHash())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.routerrpc.SendToRouteRequest} returns this - */ -proto.routerrpc.SendToRouteRequest.prototype.setPaymentHash = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional lnrpc.Route route = 2; - * @return {?proto.lnrpc.Route} - */ -proto.routerrpc.SendToRouteRequest.prototype.getRoute = function() { - return /** @type{?proto.lnrpc.Route} */ ( - jspb.Message.getWrapperField(this, lightning_pb.Route, 2)); -}; - - -/** - * @param {?proto.lnrpc.Route|undefined} value - * @return {!proto.routerrpc.SendToRouteRequest} returns this -*/ -proto.routerrpc.SendToRouteRequest.prototype.setRoute = function(value) { - return jspb.Message.setWrapperField(this, 2, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.routerrpc.SendToRouteRequest} returns this - */ -proto.routerrpc.SendToRouteRequest.prototype.clearRoute = function() { - return this.setRoute(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.routerrpc.SendToRouteRequest.prototype.hasRoute = function() { - return jspb.Message.getField(this, 2) != null; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.routerrpc.SendToRouteResponse.prototype.toObject = function(opt_includeInstance) { - return proto.routerrpc.SendToRouteResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.routerrpc.SendToRouteResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.routerrpc.SendToRouteResponse.toObject = function(includeInstance, msg) { - var f, obj = { - preimage: msg.getPreimage_asB64(), - failure: (f = msg.getFailure()) && lightning_pb.Failure.toObject(includeInstance, f) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.routerrpc.SendToRouteResponse} - */ -proto.routerrpc.SendToRouteResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.routerrpc.SendToRouteResponse; - return proto.routerrpc.SendToRouteResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.routerrpc.SendToRouteResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.routerrpc.SendToRouteResponse} - */ -proto.routerrpc.SendToRouteResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setPreimage(value); - break; - case 2: - var value = new lightning_pb.Failure; - reader.readMessage(value,lightning_pb.Failure.deserializeBinaryFromReader); - msg.setFailure(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.routerrpc.SendToRouteResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.routerrpc.SendToRouteResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.routerrpc.SendToRouteResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.routerrpc.SendToRouteResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getPreimage_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getFailure(); - if (f != null) { - writer.writeMessage( - 2, - f, - lightning_pb.Failure.serializeBinaryToWriter - ); - } -}; - - -/** - * optional bytes preimage = 1; - * @return {!(string|Uint8Array)} - */ -proto.routerrpc.SendToRouteResponse.prototype.getPreimage = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes preimage = 1; - * This is a type-conversion wrapper around `getPreimage()` - * @return {string} - */ -proto.routerrpc.SendToRouteResponse.prototype.getPreimage_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getPreimage())); -}; - - -/** - * optional bytes preimage = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getPreimage()` - * @return {!Uint8Array} - */ -proto.routerrpc.SendToRouteResponse.prototype.getPreimage_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getPreimage())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.routerrpc.SendToRouteResponse} returns this - */ -proto.routerrpc.SendToRouteResponse.prototype.setPreimage = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional lnrpc.Failure failure = 2; - * @return {?proto.lnrpc.Failure} - */ -proto.routerrpc.SendToRouteResponse.prototype.getFailure = function() { - return /** @type{?proto.lnrpc.Failure} */ ( - jspb.Message.getWrapperField(this, lightning_pb.Failure, 2)); -}; - - -/** - * @param {?proto.lnrpc.Failure|undefined} value - * @return {!proto.routerrpc.SendToRouteResponse} returns this -*/ -proto.routerrpc.SendToRouteResponse.prototype.setFailure = function(value) { - return jspb.Message.setWrapperField(this, 2, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.routerrpc.SendToRouteResponse} returns this - */ -proto.routerrpc.SendToRouteResponse.prototype.clearFailure = function() { - return this.setFailure(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.routerrpc.SendToRouteResponse.prototype.hasFailure = function() { - return jspb.Message.getField(this, 2) != null; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.routerrpc.ResetMissionControlRequest.prototype.toObject = function(opt_includeInstance) { - return proto.routerrpc.ResetMissionControlRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.routerrpc.ResetMissionControlRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.routerrpc.ResetMissionControlRequest.toObject = function(includeInstance, msg) { - var f, obj = { - - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.routerrpc.ResetMissionControlRequest} - */ -proto.routerrpc.ResetMissionControlRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.routerrpc.ResetMissionControlRequest; - return proto.routerrpc.ResetMissionControlRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.routerrpc.ResetMissionControlRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.routerrpc.ResetMissionControlRequest} - */ -proto.routerrpc.ResetMissionControlRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.routerrpc.ResetMissionControlRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.routerrpc.ResetMissionControlRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.routerrpc.ResetMissionControlRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.routerrpc.ResetMissionControlRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.routerrpc.ResetMissionControlResponse.prototype.toObject = function(opt_includeInstance) { - return proto.routerrpc.ResetMissionControlResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.routerrpc.ResetMissionControlResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.routerrpc.ResetMissionControlResponse.toObject = function(includeInstance, msg) { - var f, obj = { - - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.routerrpc.ResetMissionControlResponse} - */ -proto.routerrpc.ResetMissionControlResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.routerrpc.ResetMissionControlResponse; - return proto.routerrpc.ResetMissionControlResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.routerrpc.ResetMissionControlResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.routerrpc.ResetMissionControlResponse} - */ -proto.routerrpc.ResetMissionControlResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.routerrpc.ResetMissionControlResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.routerrpc.ResetMissionControlResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.routerrpc.ResetMissionControlResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.routerrpc.ResetMissionControlResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.routerrpc.QueryMissionControlRequest.prototype.toObject = function(opt_includeInstance) { - return proto.routerrpc.QueryMissionControlRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.routerrpc.QueryMissionControlRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.routerrpc.QueryMissionControlRequest.toObject = function(includeInstance, msg) { - var f, obj = { - - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.routerrpc.QueryMissionControlRequest} - */ -proto.routerrpc.QueryMissionControlRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.routerrpc.QueryMissionControlRequest; - return proto.routerrpc.QueryMissionControlRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.routerrpc.QueryMissionControlRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.routerrpc.QueryMissionControlRequest} - */ -proto.routerrpc.QueryMissionControlRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.routerrpc.QueryMissionControlRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.routerrpc.QueryMissionControlRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.routerrpc.QueryMissionControlRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.routerrpc.QueryMissionControlRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.routerrpc.QueryMissionControlResponse.repeatedFields_ = [2]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.routerrpc.QueryMissionControlResponse.prototype.toObject = function(opt_includeInstance) { - return proto.routerrpc.QueryMissionControlResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.routerrpc.QueryMissionControlResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.routerrpc.QueryMissionControlResponse.toObject = function(includeInstance, msg) { - var f, obj = { - pairsList: jspb.Message.toObjectList(msg.getPairsList(), - proto.routerrpc.PairHistory.toObject, includeInstance) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.routerrpc.QueryMissionControlResponse} - */ -proto.routerrpc.QueryMissionControlResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.routerrpc.QueryMissionControlResponse; - return proto.routerrpc.QueryMissionControlResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.routerrpc.QueryMissionControlResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.routerrpc.QueryMissionControlResponse} - */ -proto.routerrpc.QueryMissionControlResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 2: - var value = new proto.routerrpc.PairHistory; - reader.readMessage(value,proto.routerrpc.PairHistory.deserializeBinaryFromReader); - msg.addPairs(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.routerrpc.QueryMissionControlResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.routerrpc.QueryMissionControlResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.routerrpc.QueryMissionControlResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.routerrpc.QueryMissionControlResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getPairsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 2, - f, - proto.routerrpc.PairHistory.serializeBinaryToWriter - ); - } -}; - - -/** - * repeated PairHistory pairs = 2; - * @return {!Array} - */ -proto.routerrpc.QueryMissionControlResponse.prototype.getPairsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.routerrpc.PairHistory, 2)); -}; - - -/** - * @param {!Array} value - * @return {!proto.routerrpc.QueryMissionControlResponse} returns this -*/ -proto.routerrpc.QueryMissionControlResponse.prototype.setPairsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 2, value); -}; - - -/** - * @param {!proto.routerrpc.PairHistory=} opt_value - * @param {number=} opt_index - * @return {!proto.routerrpc.PairHistory} - */ -proto.routerrpc.QueryMissionControlResponse.prototype.addPairs = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.routerrpc.PairHistory, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.routerrpc.QueryMissionControlResponse} returns this - */ -proto.routerrpc.QueryMissionControlResponse.prototype.clearPairsList = function() { - return this.setPairsList([]); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.routerrpc.XImportMissionControlRequest.repeatedFields_ = [1]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.routerrpc.XImportMissionControlRequest.prototype.toObject = function(opt_includeInstance) { - return proto.routerrpc.XImportMissionControlRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.routerrpc.XImportMissionControlRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.routerrpc.XImportMissionControlRequest.toObject = function(includeInstance, msg) { - var f, obj = { - pairsList: jspb.Message.toObjectList(msg.getPairsList(), - proto.routerrpc.PairHistory.toObject, includeInstance), - force: jspb.Message.getBooleanFieldWithDefault(msg, 2, false) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.routerrpc.XImportMissionControlRequest} - */ -proto.routerrpc.XImportMissionControlRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.routerrpc.XImportMissionControlRequest; - return proto.routerrpc.XImportMissionControlRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.routerrpc.XImportMissionControlRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.routerrpc.XImportMissionControlRequest} - */ -proto.routerrpc.XImportMissionControlRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.routerrpc.PairHistory; - reader.readMessage(value,proto.routerrpc.PairHistory.deserializeBinaryFromReader); - msg.addPairs(value); - break; - case 2: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setForce(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.routerrpc.XImportMissionControlRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.routerrpc.XImportMissionControlRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.routerrpc.XImportMissionControlRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.routerrpc.XImportMissionControlRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getPairsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 1, - f, - proto.routerrpc.PairHistory.serializeBinaryToWriter - ); - } - f = message.getForce(); - if (f) { - writer.writeBool( - 2, - f - ); - } -}; - - -/** - * repeated PairHistory pairs = 1; - * @return {!Array} - */ -proto.routerrpc.XImportMissionControlRequest.prototype.getPairsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.routerrpc.PairHistory, 1)); -}; - - -/** - * @param {!Array} value - * @return {!proto.routerrpc.XImportMissionControlRequest} returns this -*/ -proto.routerrpc.XImportMissionControlRequest.prototype.setPairsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); -}; - - -/** - * @param {!proto.routerrpc.PairHistory=} opt_value - * @param {number=} opt_index - * @return {!proto.routerrpc.PairHistory} - */ -proto.routerrpc.XImportMissionControlRequest.prototype.addPairs = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.routerrpc.PairHistory, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.routerrpc.XImportMissionControlRequest} returns this - */ -proto.routerrpc.XImportMissionControlRequest.prototype.clearPairsList = function() { - return this.setPairsList([]); -}; - - -/** - * optional bool force = 2; - * @return {boolean} - */ -proto.routerrpc.XImportMissionControlRequest.prototype.getForce = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.routerrpc.XImportMissionControlRequest} returns this - */ -proto.routerrpc.XImportMissionControlRequest.prototype.setForce = function(value) { - return jspb.Message.setProto3BooleanField(this, 2, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.routerrpc.XImportMissionControlResponse.prototype.toObject = function(opt_includeInstance) { - return proto.routerrpc.XImportMissionControlResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.routerrpc.XImportMissionControlResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.routerrpc.XImportMissionControlResponse.toObject = function(includeInstance, msg) { - var f, obj = { - - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.routerrpc.XImportMissionControlResponse} - */ -proto.routerrpc.XImportMissionControlResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.routerrpc.XImportMissionControlResponse; - return proto.routerrpc.XImportMissionControlResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.routerrpc.XImportMissionControlResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.routerrpc.XImportMissionControlResponse} - */ -proto.routerrpc.XImportMissionControlResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.routerrpc.XImportMissionControlResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.routerrpc.XImportMissionControlResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.routerrpc.XImportMissionControlResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.routerrpc.XImportMissionControlResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.routerrpc.PairHistory.prototype.toObject = function(opt_includeInstance) { - return proto.routerrpc.PairHistory.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.routerrpc.PairHistory} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.routerrpc.PairHistory.toObject = function(includeInstance, msg) { - var f, obj = { - nodeFrom: msg.getNodeFrom_asB64(), - nodeTo: msg.getNodeTo_asB64(), - history: (f = msg.getHistory()) && proto.routerrpc.PairData.toObject(includeInstance, f) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.routerrpc.PairHistory} - */ -proto.routerrpc.PairHistory.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.routerrpc.PairHistory; - return proto.routerrpc.PairHistory.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.routerrpc.PairHistory} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.routerrpc.PairHistory} - */ -proto.routerrpc.PairHistory.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setNodeFrom(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setNodeTo(value); - break; - case 7: - var value = new proto.routerrpc.PairData; - reader.readMessage(value,proto.routerrpc.PairData.deserializeBinaryFromReader); - msg.setHistory(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.routerrpc.PairHistory.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.routerrpc.PairHistory.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.routerrpc.PairHistory} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.routerrpc.PairHistory.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getNodeFrom_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getNodeTo_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } - f = message.getHistory(); - if (f != null) { - writer.writeMessage( - 7, - f, - proto.routerrpc.PairData.serializeBinaryToWriter - ); - } -}; - - -/** - * optional bytes node_from = 1; - * @return {!(string|Uint8Array)} - */ -proto.routerrpc.PairHistory.prototype.getNodeFrom = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes node_from = 1; - * This is a type-conversion wrapper around `getNodeFrom()` - * @return {string} - */ -proto.routerrpc.PairHistory.prototype.getNodeFrom_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getNodeFrom())); -}; - - -/** - * optional bytes node_from = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getNodeFrom()` - * @return {!Uint8Array} - */ -proto.routerrpc.PairHistory.prototype.getNodeFrom_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getNodeFrom())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.routerrpc.PairHistory} returns this - */ -proto.routerrpc.PairHistory.prototype.setNodeFrom = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional bytes node_to = 2; - * @return {!(string|Uint8Array)} - */ -proto.routerrpc.PairHistory.prototype.getNodeTo = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes node_to = 2; - * This is a type-conversion wrapper around `getNodeTo()` - * @return {string} - */ -proto.routerrpc.PairHistory.prototype.getNodeTo_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getNodeTo())); -}; - - -/** - * optional bytes node_to = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getNodeTo()` - * @return {!Uint8Array} - */ -proto.routerrpc.PairHistory.prototype.getNodeTo_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getNodeTo())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.routerrpc.PairHistory} returns this - */ -proto.routerrpc.PairHistory.prototype.setNodeTo = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); -}; - - -/** - * optional PairData history = 7; - * @return {?proto.routerrpc.PairData} - */ -proto.routerrpc.PairHistory.prototype.getHistory = function() { - return /** @type{?proto.routerrpc.PairData} */ ( - jspb.Message.getWrapperField(this, proto.routerrpc.PairData, 7)); -}; - - -/** - * @param {?proto.routerrpc.PairData|undefined} value - * @return {!proto.routerrpc.PairHistory} returns this -*/ -proto.routerrpc.PairHistory.prototype.setHistory = function(value) { - return jspb.Message.setWrapperField(this, 7, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.routerrpc.PairHistory} returns this - */ -proto.routerrpc.PairHistory.prototype.clearHistory = function() { - return this.setHistory(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.routerrpc.PairHistory.prototype.hasHistory = function() { - return jspb.Message.getField(this, 7) != null; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.routerrpc.PairData.prototype.toObject = function(opt_includeInstance) { - return proto.routerrpc.PairData.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.routerrpc.PairData} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.routerrpc.PairData.toObject = function(includeInstance, msg) { - var f, obj = { - failTime: jspb.Message.getFieldWithDefault(msg, 1, 0), - failAmtSat: jspb.Message.getFieldWithDefault(msg, 2, 0), - failAmtMsat: jspb.Message.getFieldWithDefault(msg, 4, 0), - successTime: jspb.Message.getFieldWithDefault(msg, 5, 0), - successAmtSat: jspb.Message.getFieldWithDefault(msg, 6, 0), - successAmtMsat: jspb.Message.getFieldWithDefault(msg, 7, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.routerrpc.PairData} - */ -proto.routerrpc.PairData.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.routerrpc.PairData; - return proto.routerrpc.PairData.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.routerrpc.PairData} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.routerrpc.PairData} - */ -proto.routerrpc.PairData.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readInt64()); - msg.setFailTime(value); - break; - case 2: - var value = /** @type {number} */ (reader.readInt64()); - msg.setFailAmtSat(value); - break; - case 4: - var value = /** @type {number} */ (reader.readInt64()); - msg.setFailAmtMsat(value); - break; - case 5: - var value = /** @type {number} */ (reader.readInt64()); - msg.setSuccessTime(value); - break; - case 6: - var value = /** @type {number} */ (reader.readInt64()); - msg.setSuccessAmtSat(value); - break; - case 7: - var value = /** @type {number} */ (reader.readInt64()); - msg.setSuccessAmtMsat(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.routerrpc.PairData.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.routerrpc.PairData.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.routerrpc.PairData} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.routerrpc.PairData.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getFailTime(); - if (f !== 0) { - writer.writeInt64( - 1, - f - ); - } - f = message.getFailAmtSat(); - if (f !== 0) { - writer.writeInt64( - 2, - f - ); - } - f = message.getFailAmtMsat(); - if (f !== 0) { - writer.writeInt64( - 4, - f - ); - } - f = message.getSuccessTime(); - if (f !== 0) { - writer.writeInt64( - 5, - f - ); - } - f = message.getSuccessAmtSat(); - if (f !== 0) { - writer.writeInt64( - 6, - f - ); - } - f = message.getSuccessAmtMsat(); - if (f !== 0) { - writer.writeInt64( - 7, - f - ); - } -}; - - -/** - * optional int64 fail_time = 1; - * @return {number} - */ -proto.routerrpc.PairData.prototype.getFailTime = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.routerrpc.PairData} returns this - */ -proto.routerrpc.PairData.prototype.setFailTime = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); -}; - - -/** - * optional int64 fail_amt_sat = 2; - * @return {number} - */ -proto.routerrpc.PairData.prototype.getFailAmtSat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.routerrpc.PairData} returns this - */ -proto.routerrpc.PairData.prototype.setFailAmtSat = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * optional int64 fail_amt_msat = 4; - * @return {number} - */ -proto.routerrpc.PairData.prototype.getFailAmtMsat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.routerrpc.PairData} returns this - */ -proto.routerrpc.PairData.prototype.setFailAmtMsat = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); -}; - - -/** - * optional int64 success_time = 5; - * @return {number} - */ -proto.routerrpc.PairData.prototype.getSuccessTime = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.routerrpc.PairData} returns this - */ -proto.routerrpc.PairData.prototype.setSuccessTime = function(value) { - return jspb.Message.setProto3IntField(this, 5, value); -}; - - -/** - * optional int64 success_amt_sat = 6; - * @return {number} - */ -proto.routerrpc.PairData.prototype.getSuccessAmtSat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.routerrpc.PairData} returns this - */ -proto.routerrpc.PairData.prototype.setSuccessAmtSat = function(value) { - return jspb.Message.setProto3IntField(this, 6, value); -}; - - -/** - * optional int64 success_amt_msat = 7; - * @return {number} - */ -proto.routerrpc.PairData.prototype.getSuccessAmtMsat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.routerrpc.PairData} returns this - */ -proto.routerrpc.PairData.prototype.setSuccessAmtMsat = function(value) { - return jspb.Message.setProto3IntField(this, 7, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.routerrpc.GetMissionControlConfigRequest.prototype.toObject = function(opt_includeInstance) { - return proto.routerrpc.GetMissionControlConfigRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.routerrpc.GetMissionControlConfigRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.routerrpc.GetMissionControlConfigRequest.toObject = function(includeInstance, msg) { - var f, obj = { - - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.routerrpc.GetMissionControlConfigRequest} - */ -proto.routerrpc.GetMissionControlConfigRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.routerrpc.GetMissionControlConfigRequest; - return proto.routerrpc.GetMissionControlConfigRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.routerrpc.GetMissionControlConfigRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.routerrpc.GetMissionControlConfigRequest} - */ -proto.routerrpc.GetMissionControlConfigRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.routerrpc.GetMissionControlConfigRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.routerrpc.GetMissionControlConfigRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.routerrpc.GetMissionControlConfigRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.routerrpc.GetMissionControlConfigRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.routerrpc.GetMissionControlConfigResponse.prototype.toObject = function(opt_includeInstance) { - return proto.routerrpc.GetMissionControlConfigResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.routerrpc.GetMissionControlConfigResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.routerrpc.GetMissionControlConfigResponse.toObject = function(includeInstance, msg) { - var f, obj = { - config: (f = msg.getConfig()) && proto.routerrpc.MissionControlConfig.toObject(includeInstance, f) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.routerrpc.GetMissionControlConfigResponse} - */ -proto.routerrpc.GetMissionControlConfigResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.routerrpc.GetMissionControlConfigResponse; - return proto.routerrpc.GetMissionControlConfigResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.routerrpc.GetMissionControlConfigResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.routerrpc.GetMissionControlConfigResponse} - */ -proto.routerrpc.GetMissionControlConfigResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.routerrpc.MissionControlConfig; - reader.readMessage(value,proto.routerrpc.MissionControlConfig.deserializeBinaryFromReader); - msg.setConfig(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.routerrpc.GetMissionControlConfigResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.routerrpc.GetMissionControlConfigResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.routerrpc.GetMissionControlConfigResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.routerrpc.GetMissionControlConfigResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getConfig(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.routerrpc.MissionControlConfig.serializeBinaryToWriter - ); - } -}; - - -/** - * optional MissionControlConfig config = 1; - * @return {?proto.routerrpc.MissionControlConfig} - */ -proto.routerrpc.GetMissionControlConfigResponse.prototype.getConfig = function() { - return /** @type{?proto.routerrpc.MissionControlConfig} */ ( - jspb.Message.getWrapperField(this, proto.routerrpc.MissionControlConfig, 1)); -}; - - -/** - * @param {?proto.routerrpc.MissionControlConfig|undefined} value - * @return {!proto.routerrpc.GetMissionControlConfigResponse} returns this -*/ -proto.routerrpc.GetMissionControlConfigResponse.prototype.setConfig = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.routerrpc.GetMissionControlConfigResponse} returns this - */ -proto.routerrpc.GetMissionControlConfigResponse.prototype.clearConfig = function() { - return this.setConfig(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.routerrpc.GetMissionControlConfigResponse.prototype.hasConfig = function() { - return jspb.Message.getField(this, 1) != null; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.routerrpc.SetMissionControlConfigRequest.prototype.toObject = function(opt_includeInstance) { - return proto.routerrpc.SetMissionControlConfigRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.routerrpc.SetMissionControlConfigRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.routerrpc.SetMissionControlConfigRequest.toObject = function(includeInstance, msg) { - var f, obj = { - config: (f = msg.getConfig()) && proto.routerrpc.MissionControlConfig.toObject(includeInstance, f) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.routerrpc.SetMissionControlConfigRequest} - */ -proto.routerrpc.SetMissionControlConfigRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.routerrpc.SetMissionControlConfigRequest; - return proto.routerrpc.SetMissionControlConfigRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.routerrpc.SetMissionControlConfigRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.routerrpc.SetMissionControlConfigRequest} - */ -proto.routerrpc.SetMissionControlConfigRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.routerrpc.MissionControlConfig; - reader.readMessage(value,proto.routerrpc.MissionControlConfig.deserializeBinaryFromReader); - msg.setConfig(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.routerrpc.SetMissionControlConfigRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.routerrpc.SetMissionControlConfigRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.routerrpc.SetMissionControlConfigRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.routerrpc.SetMissionControlConfigRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getConfig(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.routerrpc.MissionControlConfig.serializeBinaryToWriter - ); - } -}; - - -/** - * optional MissionControlConfig config = 1; - * @return {?proto.routerrpc.MissionControlConfig} - */ -proto.routerrpc.SetMissionControlConfigRequest.prototype.getConfig = function() { - return /** @type{?proto.routerrpc.MissionControlConfig} */ ( - jspb.Message.getWrapperField(this, proto.routerrpc.MissionControlConfig, 1)); -}; - - -/** - * @param {?proto.routerrpc.MissionControlConfig|undefined} value - * @return {!proto.routerrpc.SetMissionControlConfigRequest} returns this -*/ -proto.routerrpc.SetMissionControlConfigRequest.prototype.setConfig = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.routerrpc.SetMissionControlConfigRequest} returns this - */ -proto.routerrpc.SetMissionControlConfigRequest.prototype.clearConfig = function() { - return this.setConfig(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.routerrpc.SetMissionControlConfigRequest.prototype.hasConfig = function() { - return jspb.Message.getField(this, 1) != null; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.routerrpc.SetMissionControlConfigResponse.prototype.toObject = function(opt_includeInstance) { - return proto.routerrpc.SetMissionControlConfigResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.routerrpc.SetMissionControlConfigResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.routerrpc.SetMissionControlConfigResponse.toObject = function(includeInstance, msg) { - var f, obj = { - - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.routerrpc.SetMissionControlConfigResponse} - */ -proto.routerrpc.SetMissionControlConfigResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.routerrpc.SetMissionControlConfigResponse; - return proto.routerrpc.SetMissionControlConfigResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.routerrpc.SetMissionControlConfigResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.routerrpc.SetMissionControlConfigResponse} - */ -proto.routerrpc.SetMissionControlConfigResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.routerrpc.SetMissionControlConfigResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.routerrpc.SetMissionControlConfigResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.routerrpc.SetMissionControlConfigResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.routerrpc.SetMissionControlConfigResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.routerrpc.MissionControlConfig.prototype.toObject = function(opt_includeInstance) { - return proto.routerrpc.MissionControlConfig.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.routerrpc.MissionControlConfig} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.routerrpc.MissionControlConfig.toObject = function(includeInstance, msg) { - var f, obj = { - halfLifeSeconds: jspb.Message.getFieldWithDefault(msg, 1, 0), - hopProbability: jspb.Message.getFloatingPointFieldWithDefault(msg, 2, 0.0), - weight: jspb.Message.getFloatingPointFieldWithDefault(msg, 3, 0.0), - maximumPaymentResults: jspb.Message.getFieldWithDefault(msg, 4, 0), - minimumFailureRelaxInterval: jspb.Message.getFieldWithDefault(msg, 5, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.routerrpc.MissionControlConfig} - */ -proto.routerrpc.MissionControlConfig.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.routerrpc.MissionControlConfig; - return proto.routerrpc.MissionControlConfig.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.routerrpc.MissionControlConfig} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.routerrpc.MissionControlConfig} - */ -proto.routerrpc.MissionControlConfig.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readUint64()); - msg.setHalfLifeSeconds(value); - break; - case 2: - var value = /** @type {number} */ (reader.readFloat()); - msg.setHopProbability(value); - break; - case 3: - var value = /** @type {number} */ (reader.readFloat()); - msg.setWeight(value); - break; - case 4: - var value = /** @type {number} */ (reader.readUint32()); - msg.setMaximumPaymentResults(value); - break; - case 5: - var value = /** @type {number} */ (reader.readUint64()); - msg.setMinimumFailureRelaxInterval(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.routerrpc.MissionControlConfig.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.routerrpc.MissionControlConfig.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.routerrpc.MissionControlConfig} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.routerrpc.MissionControlConfig.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getHalfLifeSeconds(); - if (f !== 0) { - writer.writeUint64( - 1, - f - ); - } - f = message.getHopProbability(); - if (f !== 0.0) { - writer.writeFloat( - 2, - f - ); - } - f = message.getWeight(); - if (f !== 0.0) { - writer.writeFloat( - 3, - f - ); - } - f = message.getMaximumPaymentResults(); - if (f !== 0) { - writer.writeUint32( - 4, - f - ); - } - f = message.getMinimumFailureRelaxInterval(); - if (f !== 0) { - writer.writeUint64( - 5, - f - ); - } -}; - - -/** - * optional uint64 half_life_seconds = 1; - * @return {number} - */ -proto.routerrpc.MissionControlConfig.prototype.getHalfLifeSeconds = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.routerrpc.MissionControlConfig} returns this - */ -proto.routerrpc.MissionControlConfig.prototype.setHalfLifeSeconds = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); -}; - - -/** - * optional float hop_probability = 2; - * @return {number} - */ -proto.routerrpc.MissionControlConfig.prototype.getHopProbability = function() { - return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 2, 0.0)); -}; - - -/** - * @param {number} value - * @return {!proto.routerrpc.MissionControlConfig} returns this - */ -proto.routerrpc.MissionControlConfig.prototype.setHopProbability = function(value) { - return jspb.Message.setProto3FloatField(this, 2, value); -}; - - -/** - * optional float weight = 3; - * @return {number} - */ -proto.routerrpc.MissionControlConfig.prototype.getWeight = function() { - return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 3, 0.0)); -}; - - -/** - * @param {number} value - * @return {!proto.routerrpc.MissionControlConfig} returns this - */ -proto.routerrpc.MissionControlConfig.prototype.setWeight = function(value) { - return jspb.Message.setProto3FloatField(this, 3, value); -}; - - -/** - * optional uint32 maximum_payment_results = 4; - * @return {number} - */ -proto.routerrpc.MissionControlConfig.prototype.getMaximumPaymentResults = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.routerrpc.MissionControlConfig} returns this - */ -proto.routerrpc.MissionControlConfig.prototype.setMaximumPaymentResults = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); -}; - - -/** - * optional uint64 minimum_failure_relax_interval = 5; - * @return {number} - */ -proto.routerrpc.MissionControlConfig.prototype.getMinimumFailureRelaxInterval = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.routerrpc.MissionControlConfig} returns this - */ -proto.routerrpc.MissionControlConfig.prototype.setMinimumFailureRelaxInterval = function(value) { - return jspb.Message.setProto3IntField(this, 5, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.routerrpc.QueryProbabilityRequest.prototype.toObject = function(opt_includeInstance) { - return proto.routerrpc.QueryProbabilityRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.routerrpc.QueryProbabilityRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.routerrpc.QueryProbabilityRequest.toObject = function(includeInstance, msg) { - var f, obj = { - fromNode: msg.getFromNode_asB64(), - toNode: msg.getToNode_asB64(), - amtMsat: jspb.Message.getFieldWithDefault(msg, 3, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.routerrpc.QueryProbabilityRequest} - */ -proto.routerrpc.QueryProbabilityRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.routerrpc.QueryProbabilityRequest; - return proto.routerrpc.QueryProbabilityRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.routerrpc.QueryProbabilityRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.routerrpc.QueryProbabilityRequest} - */ -proto.routerrpc.QueryProbabilityRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setFromNode(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setToNode(value); - break; - case 3: - var value = /** @type {number} */ (reader.readInt64()); - msg.setAmtMsat(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.routerrpc.QueryProbabilityRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.routerrpc.QueryProbabilityRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.routerrpc.QueryProbabilityRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.routerrpc.QueryProbabilityRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getFromNode_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getToNode_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } - f = message.getAmtMsat(); - if (f !== 0) { - writer.writeInt64( - 3, - f - ); - } -}; - - -/** - * optional bytes from_node = 1; - * @return {!(string|Uint8Array)} - */ -proto.routerrpc.QueryProbabilityRequest.prototype.getFromNode = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes from_node = 1; - * This is a type-conversion wrapper around `getFromNode()` - * @return {string} - */ -proto.routerrpc.QueryProbabilityRequest.prototype.getFromNode_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getFromNode())); -}; - - -/** - * optional bytes from_node = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getFromNode()` - * @return {!Uint8Array} - */ -proto.routerrpc.QueryProbabilityRequest.prototype.getFromNode_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getFromNode())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.routerrpc.QueryProbabilityRequest} returns this - */ -proto.routerrpc.QueryProbabilityRequest.prototype.setFromNode = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional bytes to_node = 2; - * @return {!(string|Uint8Array)} - */ -proto.routerrpc.QueryProbabilityRequest.prototype.getToNode = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes to_node = 2; - * This is a type-conversion wrapper around `getToNode()` - * @return {string} - */ -proto.routerrpc.QueryProbabilityRequest.prototype.getToNode_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getToNode())); -}; - - -/** - * optional bytes to_node = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getToNode()` - * @return {!Uint8Array} - */ -proto.routerrpc.QueryProbabilityRequest.prototype.getToNode_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getToNode())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.routerrpc.QueryProbabilityRequest} returns this - */ -proto.routerrpc.QueryProbabilityRequest.prototype.setToNode = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); -}; - - -/** - * optional int64 amt_msat = 3; - * @return {number} - */ -proto.routerrpc.QueryProbabilityRequest.prototype.getAmtMsat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.routerrpc.QueryProbabilityRequest} returns this - */ -proto.routerrpc.QueryProbabilityRequest.prototype.setAmtMsat = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.routerrpc.QueryProbabilityResponse.prototype.toObject = function(opt_includeInstance) { - return proto.routerrpc.QueryProbabilityResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.routerrpc.QueryProbabilityResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.routerrpc.QueryProbabilityResponse.toObject = function(includeInstance, msg) { - var f, obj = { - probability: jspb.Message.getFloatingPointFieldWithDefault(msg, 1, 0.0), - history: (f = msg.getHistory()) && proto.routerrpc.PairData.toObject(includeInstance, f) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.routerrpc.QueryProbabilityResponse} - */ -proto.routerrpc.QueryProbabilityResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.routerrpc.QueryProbabilityResponse; - return proto.routerrpc.QueryProbabilityResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.routerrpc.QueryProbabilityResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.routerrpc.QueryProbabilityResponse} - */ -proto.routerrpc.QueryProbabilityResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readDouble()); - msg.setProbability(value); - break; - case 2: - var value = new proto.routerrpc.PairData; - reader.readMessage(value,proto.routerrpc.PairData.deserializeBinaryFromReader); - msg.setHistory(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.routerrpc.QueryProbabilityResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.routerrpc.QueryProbabilityResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.routerrpc.QueryProbabilityResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.routerrpc.QueryProbabilityResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getProbability(); - if (f !== 0.0) { - writer.writeDouble( - 1, - f - ); - } - f = message.getHistory(); - if (f != null) { - writer.writeMessage( - 2, - f, - proto.routerrpc.PairData.serializeBinaryToWriter - ); - } -}; - - -/** - * optional double probability = 1; - * @return {number} - */ -proto.routerrpc.QueryProbabilityResponse.prototype.getProbability = function() { - return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 1, 0.0)); -}; - - -/** - * @param {number} value - * @return {!proto.routerrpc.QueryProbabilityResponse} returns this - */ -proto.routerrpc.QueryProbabilityResponse.prototype.setProbability = function(value) { - return jspb.Message.setProto3FloatField(this, 1, value); -}; - - -/** - * optional PairData history = 2; - * @return {?proto.routerrpc.PairData} - */ -proto.routerrpc.QueryProbabilityResponse.prototype.getHistory = function() { - return /** @type{?proto.routerrpc.PairData} */ ( - jspb.Message.getWrapperField(this, proto.routerrpc.PairData, 2)); -}; - - -/** - * @param {?proto.routerrpc.PairData|undefined} value - * @return {!proto.routerrpc.QueryProbabilityResponse} returns this -*/ -proto.routerrpc.QueryProbabilityResponse.prototype.setHistory = function(value) { - return jspb.Message.setWrapperField(this, 2, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.routerrpc.QueryProbabilityResponse} returns this - */ -proto.routerrpc.QueryProbabilityResponse.prototype.clearHistory = function() { - return this.setHistory(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.routerrpc.QueryProbabilityResponse.prototype.hasHistory = function() { - return jspb.Message.getField(this, 2) != null; -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.routerrpc.BuildRouteRequest.repeatedFields_ = [4]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.routerrpc.BuildRouteRequest.prototype.toObject = function(opt_includeInstance) { - return proto.routerrpc.BuildRouteRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.routerrpc.BuildRouteRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.routerrpc.BuildRouteRequest.toObject = function(includeInstance, msg) { - var f, obj = { - amtMsat: jspb.Message.getFieldWithDefault(msg, 1, 0), - finalCltvDelta: jspb.Message.getFieldWithDefault(msg, 2, 0), - outgoingChanId: jspb.Message.getFieldWithDefault(msg, 3, "0"), - hopPubkeysList: msg.getHopPubkeysList_asB64(), - paymentAddr: msg.getPaymentAddr_asB64() - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.routerrpc.BuildRouteRequest} - */ -proto.routerrpc.BuildRouteRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.routerrpc.BuildRouteRequest; - return proto.routerrpc.BuildRouteRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.routerrpc.BuildRouteRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.routerrpc.BuildRouteRequest} - */ -proto.routerrpc.BuildRouteRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readInt64()); - msg.setAmtMsat(value); - break; - case 2: - var value = /** @type {number} */ (reader.readInt32()); - msg.setFinalCltvDelta(value); - break; - case 3: - var value = /** @type {string} */ (reader.readUint64String()); - msg.setOutgoingChanId(value); - break; - case 4: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.addHopPubkeys(value); - break; - case 5: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setPaymentAddr(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.routerrpc.BuildRouteRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.routerrpc.BuildRouteRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.routerrpc.BuildRouteRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.routerrpc.BuildRouteRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getAmtMsat(); - if (f !== 0) { - writer.writeInt64( - 1, - f - ); - } - f = message.getFinalCltvDelta(); - if (f !== 0) { - writer.writeInt32( - 2, - f - ); - } - f = message.getOutgoingChanId(); - if (parseInt(f, 10) !== 0) { - writer.writeUint64String( - 3, - f - ); - } - f = message.getHopPubkeysList_asU8(); - if (f.length > 0) { - writer.writeRepeatedBytes( - 4, - f - ); - } - f = message.getPaymentAddr_asU8(); - if (f.length > 0) { - writer.writeBytes( - 5, - f - ); - } -}; - - -/** - * optional int64 amt_msat = 1; - * @return {number} - */ -proto.routerrpc.BuildRouteRequest.prototype.getAmtMsat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.routerrpc.BuildRouteRequest} returns this - */ -proto.routerrpc.BuildRouteRequest.prototype.setAmtMsat = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); -}; - - -/** - * optional int32 final_cltv_delta = 2; - * @return {number} - */ -proto.routerrpc.BuildRouteRequest.prototype.getFinalCltvDelta = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.routerrpc.BuildRouteRequest} returns this - */ -proto.routerrpc.BuildRouteRequest.prototype.setFinalCltvDelta = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * optional uint64 outgoing_chan_id = 3; - * @return {string} - */ -proto.routerrpc.BuildRouteRequest.prototype.getOutgoingChanId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "0")); -}; - - -/** - * @param {string} value - * @return {!proto.routerrpc.BuildRouteRequest} returns this - */ -proto.routerrpc.BuildRouteRequest.prototype.setOutgoingChanId = function(value) { - return jspb.Message.setProto3StringIntField(this, 3, value); -}; - - -/** - * repeated bytes hop_pubkeys = 4; - * @return {!(Array|Array)} - */ -proto.routerrpc.BuildRouteRequest.prototype.getHopPubkeysList = function() { - return /** @type {!(Array|Array)} */ (jspb.Message.getRepeatedField(this, 4)); -}; - - -/** - * repeated bytes hop_pubkeys = 4; - * This is a type-conversion wrapper around `getHopPubkeysList()` - * @return {!Array} - */ -proto.routerrpc.BuildRouteRequest.prototype.getHopPubkeysList_asB64 = function() { - return /** @type {!Array} */ (jspb.Message.bytesListAsB64( - this.getHopPubkeysList())); -}; - - -/** - * repeated bytes hop_pubkeys = 4; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getHopPubkeysList()` - * @return {!Array} - */ -proto.routerrpc.BuildRouteRequest.prototype.getHopPubkeysList_asU8 = function() { - return /** @type {!Array} */ (jspb.Message.bytesListAsU8( - this.getHopPubkeysList())); -}; - - -/** - * @param {!(Array|Array)} value - * @return {!proto.routerrpc.BuildRouteRequest} returns this - */ -proto.routerrpc.BuildRouteRequest.prototype.setHopPubkeysList = function(value) { - return jspb.Message.setField(this, 4, value || []); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @param {number=} opt_index - * @return {!proto.routerrpc.BuildRouteRequest} returns this - */ -proto.routerrpc.BuildRouteRequest.prototype.addHopPubkeys = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 4, value, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.routerrpc.BuildRouteRequest} returns this - */ -proto.routerrpc.BuildRouteRequest.prototype.clearHopPubkeysList = function() { - return this.setHopPubkeysList([]); -}; - - -/** - * optional bytes payment_addr = 5; - * @return {!(string|Uint8Array)} - */ -proto.routerrpc.BuildRouteRequest.prototype.getPaymentAddr = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 5, "")); -}; - - -/** - * optional bytes payment_addr = 5; - * This is a type-conversion wrapper around `getPaymentAddr()` - * @return {string} - */ -proto.routerrpc.BuildRouteRequest.prototype.getPaymentAddr_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getPaymentAddr())); -}; - - -/** - * optional bytes payment_addr = 5; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getPaymentAddr()` - * @return {!Uint8Array} - */ -proto.routerrpc.BuildRouteRequest.prototype.getPaymentAddr_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getPaymentAddr())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.routerrpc.BuildRouteRequest} returns this - */ -proto.routerrpc.BuildRouteRequest.prototype.setPaymentAddr = function(value) { - return jspb.Message.setProto3BytesField(this, 5, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.routerrpc.BuildRouteResponse.prototype.toObject = function(opt_includeInstance) { - return proto.routerrpc.BuildRouteResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.routerrpc.BuildRouteResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.routerrpc.BuildRouteResponse.toObject = function(includeInstance, msg) { - var f, obj = { - route: (f = msg.getRoute()) && lightning_pb.Route.toObject(includeInstance, f) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.routerrpc.BuildRouteResponse} - */ -proto.routerrpc.BuildRouteResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.routerrpc.BuildRouteResponse; - return proto.routerrpc.BuildRouteResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.routerrpc.BuildRouteResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.routerrpc.BuildRouteResponse} - */ -proto.routerrpc.BuildRouteResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new lightning_pb.Route; - reader.readMessage(value,lightning_pb.Route.deserializeBinaryFromReader); - msg.setRoute(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.routerrpc.BuildRouteResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.routerrpc.BuildRouteResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.routerrpc.BuildRouteResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.routerrpc.BuildRouteResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getRoute(); - if (f != null) { - writer.writeMessage( - 1, - f, - lightning_pb.Route.serializeBinaryToWriter - ); - } -}; - - -/** - * optional lnrpc.Route route = 1; - * @return {?proto.lnrpc.Route} - */ -proto.routerrpc.BuildRouteResponse.prototype.getRoute = function() { - return /** @type{?proto.lnrpc.Route} */ ( - jspb.Message.getWrapperField(this, lightning_pb.Route, 1)); -}; - - -/** - * @param {?proto.lnrpc.Route|undefined} value - * @return {!proto.routerrpc.BuildRouteResponse} returns this -*/ -proto.routerrpc.BuildRouteResponse.prototype.setRoute = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.routerrpc.BuildRouteResponse} returns this - */ -proto.routerrpc.BuildRouteResponse.prototype.clearRoute = function() { - return this.setRoute(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.routerrpc.BuildRouteResponse.prototype.hasRoute = function() { - return jspb.Message.getField(this, 1) != null; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.routerrpc.SubscribeHtlcEventsRequest.prototype.toObject = function(opt_includeInstance) { - return proto.routerrpc.SubscribeHtlcEventsRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.routerrpc.SubscribeHtlcEventsRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.routerrpc.SubscribeHtlcEventsRequest.toObject = function(includeInstance, msg) { - var f, obj = { - - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.routerrpc.SubscribeHtlcEventsRequest} - */ -proto.routerrpc.SubscribeHtlcEventsRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.routerrpc.SubscribeHtlcEventsRequest; - return proto.routerrpc.SubscribeHtlcEventsRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.routerrpc.SubscribeHtlcEventsRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.routerrpc.SubscribeHtlcEventsRequest} - */ -proto.routerrpc.SubscribeHtlcEventsRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.routerrpc.SubscribeHtlcEventsRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.routerrpc.SubscribeHtlcEventsRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.routerrpc.SubscribeHtlcEventsRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.routerrpc.SubscribeHtlcEventsRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; -}; - - - -/** - * Oneof group definitions for this message. Each group defines the field - * numbers belonging to that group. When of these fields' value is set, all - * other fields in the group are cleared. During deserialization, if multiple - * fields are encountered for a group, only the last value seen will be kept. - * @private {!Array>} - * @const - */ -proto.routerrpc.HtlcEvent.oneofGroups_ = [[7,8,9,10]]; - -/** - * @enum {number} - */ -proto.routerrpc.HtlcEvent.EventCase = { - EVENT_NOT_SET: 0, - FORWARD_EVENT: 7, - FORWARD_FAIL_EVENT: 8, - SETTLE_EVENT: 9, - LINK_FAIL_EVENT: 10 -}; - -/** - * @return {proto.routerrpc.HtlcEvent.EventCase} - */ -proto.routerrpc.HtlcEvent.prototype.getEventCase = function() { - return /** @type {proto.routerrpc.HtlcEvent.EventCase} */(jspb.Message.computeOneofCase(this, proto.routerrpc.HtlcEvent.oneofGroups_[0])); -}; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.routerrpc.HtlcEvent.prototype.toObject = function(opt_includeInstance) { - return proto.routerrpc.HtlcEvent.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.routerrpc.HtlcEvent} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.routerrpc.HtlcEvent.toObject = function(includeInstance, msg) { - var f, obj = { - incomingChannelId: jspb.Message.getFieldWithDefault(msg, 1, 0), - outgoingChannelId: jspb.Message.getFieldWithDefault(msg, 2, 0), - incomingHtlcId: jspb.Message.getFieldWithDefault(msg, 3, 0), - outgoingHtlcId: jspb.Message.getFieldWithDefault(msg, 4, 0), - timestampNs: jspb.Message.getFieldWithDefault(msg, 5, 0), - eventType: jspb.Message.getFieldWithDefault(msg, 6, 0), - forwardEvent: (f = msg.getForwardEvent()) && proto.routerrpc.ForwardEvent.toObject(includeInstance, f), - forwardFailEvent: (f = msg.getForwardFailEvent()) && proto.routerrpc.ForwardFailEvent.toObject(includeInstance, f), - settleEvent: (f = msg.getSettleEvent()) && proto.routerrpc.SettleEvent.toObject(includeInstance, f), - linkFailEvent: (f = msg.getLinkFailEvent()) && proto.routerrpc.LinkFailEvent.toObject(includeInstance, f) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.routerrpc.HtlcEvent} - */ -proto.routerrpc.HtlcEvent.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.routerrpc.HtlcEvent; - return proto.routerrpc.HtlcEvent.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.routerrpc.HtlcEvent} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.routerrpc.HtlcEvent} - */ -proto.routerrpc.HtlcEvent.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readUint64()); - msg.setIncomingChannelId(value); - break; - case 2: - var value = /** @type {number} */ (reader.readUint64()); - msg.setOutgoingChannelId(value); - break; - case 3: - var value = /** @type {number} */ (reader.readUint64()); - msg.setIncomingHtlcId(value); - break; - case 4: - var value = /** @type {number} */ (reader.readUint64()); - msg.setOutgoingHtlcId(value); - break; - case 5: - var value = /** @type {number} */ (reader.readUint64()); - msg.setTimestampNs(value); - break; - case 6: - var value = /** @type {!proto.routerrpc.HtlcEvent.EventType} */ (reader.readEnum()); - msg.setEventType(value); - break; - case 7: - var value = new proto.routerrpc.ForwardEvent; - reader.readMessage(value,proto.routerrpc.ForwardEvent.deserializeBinaryFromReader); - msg.setForwardEvent(value); - break; - case 8: - var value = new proto.routerrpc.ForwardFailEvent; - reader.readMessage(value,proto.routerrpc.ForwardFailEvent.deserializeBinaryFromReader); - msg.setForwardFailEvent(value); - break; - case 9: - var value = new proto.routerrpc.SettleEvent; - reader.readMessage(value,proto.routerrpc.SettleEvent.deserializeBinaryFromReader); - msg.setSettleEvent(value); - break; - case 10: - var value = new proto.routerrpc.LinkFailEvent; - reader.readMessage(value,proto.routerrpc.LinkFailEvent.deserializeBinaryFromReader); - msg.setLinkFailEvent(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.routerrpc.HtlcEvent.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.routerrpc.HtlcEvent.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.routerrpc.HtlcEvent} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.routerrpc.HtlcEvent.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getIncomingChannelId(); - if (f !== 0) { - writer.writeUint64( - 1, - f - ); - } - f = message.getOutgoingChannelId(); - if (f !== 0) { - writer.writeUint64( - 2, - f - ); - } - f = message.getIncomingHtlcId(); - if (f !== 0) { - writer.writeUint64( - 3, - f - ); - } - f = message.getOutgoingHtlcId(); - if (f !== 0) { - writer.writeUint64( - 4, - f - ); - } - f = message.getTimestampNs(); - if (f !== 0) { - writer.writeUint64( - 5, - f - ); - } - f = message.getEventType(); - if (f !== 0.0) { - writer.writeEnum( - 6, - f - ); - } - f = message.getForwardEvent(); - if (f != null) { - writer.writeMessage( - 7, - f, - proto.routerrpc.ForwardEvent.serializeBinaryToWriter - ); - } - f = message.getForwardFailEvent(); - if (f != null) { - writer.writeMessage( - 8, - f, - proto.routerrpc.ForwardFailEvent.serializeBinaryToWriter - ); - } - f = message.getSettleEvent(); - if (f != null) { - writer.writeMessage( - 9, - f, - proto.routerrpc.SettleEvent.serializeBinaryToWriter - ); - } - f = message.getLinkFailEvent(); - if (f != null) { - writer.writeMessage( - 10, - f, - proto.routerrpc.LinkFailEvent.serializeBinaryToWriter - ); - } -}; - - -/** - * @enum {number} - */ -proto.routerrpc.HtlcEvent.EventType = { - UNKNOWN: 0, - SEND: 1, - RECEIVE: 2, - FORWARD: 3 -}; - -/** - * optional uint64 incoming_channel_id = 1; - * @return {number} - */ -proto.routerrpc.HtlcEvent.prototype.getIncomingChannelId = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.routerrpc.HtlcEvent} returns this - */ -proto.routerrpc.HtlcEvent.prototype.setIncomingChannelId = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); -}; - - -/** - * optional uint64 outgoing_channel_id = 2; - * @return {number} - */ -proto.routerrpc.HtlcEvent.prototype.getOutgoingChannelId = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.routerrpc.HtlcEvent} returns this - */ -proto.routerrpc.HtlcEvent.prototype.setOutgoingChannelId = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * optional uint64 incoming_htlc_id = 3; - * @return {number} - */ -proto.routerrpc.HtlcEvent.prototype.getIncomingHtlcId = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.routerrpc.HtlcEvent} returns this - */ -proto.routerrpc.HtlcEvent.prototype.setIncomingHtlcId = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - -/** - * optional uint64 outgoing_htlc_id = 4; - * @return {number} - */ -proto.routerrpc.HtlcEvent.prototype.getOutgoingHtlcId = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.routerrpc.HtlcEvent} returns this - */ -proto.routerrpc.HtlcEvent.prototype.setOutgoingHtlcId = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); -}; - - -/** - * optional uint64 timestamp_ns = 5; - * @return {number} - */ -proto.routerrpc.HtlcEvent.prototype.getTimestampNs = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.routerrpc.HtlcEvent} returns this - */ -proto.routerrpc.HtlcEvent.prototype.setTimestampNs = function(value) { - return jspb.Message.setProto3IntField(this, 5, value); -}; - - -/** - * optional EventType event_type = 6; - * @return {!proto.routerrpc.HtlcEvent.EventType} - */ -proto.routerrpc.HtlcEvent.prototype.getEventType = function() { - return /** @type {!proto.routerrpc.HtlcEvent.EventType} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); -}; - - -/** - * @param {!proto.routerrpc.HtlcEvent.EventType} value - * @return {!proto.routerrpc.HtlcEvent} returns this - */ -proto.routerrpc.HtlcEvent.prototype.setEventType = function(value) { - return jspb.Message.setProto3EnumField(this, 6, value); -}; - - -/** - * optional ForwardEvent forward_event = 7; - * @return {?proto.routerrpc.ForwardEvent} - */ -proto.routerrpc.HtlcEvent.prototype.getForwardEvent = function() { - return /** @type{?proto.routerrpc.ForwardEvent} */ ( - jspb.Message.getWrapperField(this, proto.routerrpc.ForwardEvent, 7)); -}; - - -/** - * @param {?proto.routerrpc.ForwardEvent|undefined} value - * @return {!proto.routerrpc.HtlcEvent} returns this -*/ -proto.routerrpc.HtlcEvent.prototype.setForwardEvent = function(value) { - return jspb.Message.setOneofWrapperField(this, 7, proto.routerrpc.HtlcEvent.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.routerrpc.HtlcEvent} returns this - */ -proto.routerrpc.HtlcEvent.prototype.clearForwardEvent = function() { - return this.setForwardEvent(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.routerrpc.HtlcEvent.prototype.hasForwardEvent = function() { - return jspb.Message.getField(this, 7) != null; -}; - - -/** - * optional ForwardFailEvent forward_fail_event = 8; - * @return {?proto.routerrpc.ForwardFailEvent} - */ -proto.routerrpc.HtlcEvent.prototype.getForwardFailEvent = function() { - return /** @type{?proto.routerrpc.ForwardFailEvent} */ ( - jspb.Message.getWrapperField(this, proto.routerrpc.ForwardFailEvent, 8)); -}; - - -/** - * @param {?proto.routerrpc.ForwardFailEvent|undefined} value - * @return {!proto.routerrpc.HtlcEvent} returns this -*/ -proto.routerrpc.HtlcEvent.prototype.setForwardFailEvent = function(value) { - return jspb.Message.setOneofWrapperField(this, 8, proto.routerrpc.HtlcEvent.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.routerrpc.HtlcEvent} returns this - */ -proto.routerrpc.HtlcEvent.prototype.clearForwardFailEvent = function() { - return this.setForwardFailEvent(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.routerrpc.HtlcEvent.prototype.hasForwardFailEvent = function() { - return jspb.Message.getField(this, 8) != null; -}; - - -/** - * optional SettleEvent settle_event = 9; - * @return {?proto.routerrpc.SettleEvent} - */ -proto.routerrpc.HtlcEvent.prototype.getSettleEvent = function() { - return /** @type{?proto.routerrpc.SettleEvent} */ ( - jspb.Message.getWrapperField(this, proto.routerrpc.SettleEvent, 9)); -}; - - -/** - * @param {?proto.routerrpc.SettleEvent|undefined} value - * @return {!proto.routerrpc.HtlcEvent} returns this -*/ -proto.routerrpc.HtlcEvent.prototype.setSettleEvent = function(value) { - return jspb.Message.setOneofWrapperField(this, 9, proto.routerrpc.HtlcEvent.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.routerrpc.HtlcEvent} returns this - */ -proto.routerrpc.HtlcEvent.prototype.clearSettleEvent = function() { - return this.setSettleEvent(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.routerrpc.HtlcEvent.prototype.hasSettleEvent = function() { - return jspb.Message.getField(this, 9) != null; -}; - - -/** - * optional LinkFailEvent link_fail_event = 10; - * @return {?proto.routerrpc.LinkFailEvent} - */ -proto.routerrpc.HtlcEvent.prototype.getLinkFailEvent = function() { - return /** @type{?proto.routerrpc.LinkFailEvent} */ ( - jspb.Message.getWrapperField(this, proto.routerrpc.LinkFailEvent, 10)); -}; - - -/** - * @param {?proto.routerrpc.LinkFailEvent|undefined} value - * @return {!proto.routerrpc.HtlcEvent} returns this -*/ -proto.routerrpc.HtlcEvent.prototype.setLinkFailEvent = function(value) { - return jspb.Message.setOneofWrapperField(this, 10, proto.routerrpc.HtlcEvent.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.routerrpc.HtlcEvent} returns this - */ -proto.routerrpc.HtlcEvent.prototype.clearLinkFailEvent = function() { - return this.setLinkFailEvent(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.routerrpc.HtlcEvent.prototype.hasLinkFailEvent = function() { - return jspb.Message.getField(this, 10) != null; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.routerrpc.HtlcInfo.prototype.toObject = function(opt_includeInstance) { - return proto.routerrpc.HtlcInfo.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.routerrpc.HtlcInfo} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.routerrpc.HtlcInfo.toObject = function(includeInstance, msg) { - var f, obj = { - incomingTimelock: jspb.Message.getFieldWithDefault(msg, 1, 0), - outgoingTimelock: jspb.Message.getFieldWithDefault(msg, 2, 0), - incomingAmtMsat: jspb.Message.getFieldWithDefault(msg, 3, 0), - outgoingAmtMsat: jspb.Message.getFieldWithDefault(msg, 4, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.routerrpc.HtlcInfo} - */ -proto.routerrpc.HtlcInfo.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.routerrpc.HtlcInfo; - return proto.routerrpc.HtlcInfo.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.routerrpc.HtlcInfo} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.routerrpc.HtlcInfo} - */ -proto.routerrpc.HtlcInfo.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readUint32()); - msg.setIncomingTimelock(value); - break; - case 2: - var value = /** @type {number} */ (reader.readUint32()); - msg.setOutgoingTimelock(value); - break; - case 3: - var value = /** @type {number} */ (reader.readUint64()); - msg.setIncomingAmtMsat(value); - break; - case 4: - var value = /** @type {number} */ (reader.readUint64()); - msg.setOutgoingAmtMsat(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.routerrpc.HtlcInfo.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.routerrpc.HtlcInfo.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.routerrpc.HtlcInfo} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.routerrpc.HtlcInfo.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getIncomingTimelock(); - if (f !== 0) { - writer.writeUint32( - 1, - f - ); - } - f = message.getOutgoingTimelock(); - if (f !== 0) { - writer.writeUint32( - 2, - f - ); - } - f = message.getIncomingAmtMsat(); - if (f !== 0) { - writer.writeUint64( - 3, - f - ); - } - f = message.getOutgoingAmtMsat(); - if (f !== 0) { - writer.writeUint64( - 4, - f - ); - } -}; - - -/** - * optional uint32 incoming_timelock = 1; - * @return {number} - */ -proto.routerrpc.HtlcInfo.prototype.getIncomingTimelock = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.routerrpc.HtlcInfo} returns this - */ -proto.routerrpc.HtlcInfo.prototype.setIncomingTimelock = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); -}; - - -/** - * optional uint32 outgoing_timelock = 2; - * @return {number} - */ -proto.routerrpc.HtlcInfo.prototype.getOutgoingTimelock = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.routerrpc.HtlcInfo} returns this - */ -proto.routerrpc.HtlcInfo.prototype.setOutgoingTimelock = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * optional uint64 incoming_amt_msat = 3; - * @return {number} - */ -proto.routerrpc.HtlcInfo.prototype.getIncomingAmtMsat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.routerrpc.HtlcInfo} returns this - */ -proto.routerrpc.HtlcInfo.prototype.setIncomingAmtMsat = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - -/** - * optional uint64 outgoing_amt_msat = 4; - * @return {number} - */ -proto.routerrpc.HtlcInfo.prototype.getOutgoingAmtMsat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.routerrpc.HtlcInfo} returns this - */ -proto.routerrpc.HtlcInfo.prototype.setOutgoingAmtMsat = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.routerrpc.ForwardEvent.prototype.toObject = function(opt_includeInstance) { - return proto.routerrpc.ForwardEvent.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.routerrpc.ForwardEvent} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.routerrpc.ForwardEvent.toObject = function(includeInstance, msg) { - var f, obj = { - info: (f = msg.getInfo()) && proto.routerrpc.HtlcInfo.toObject(includeInstance, f) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.routerrpc.ForwardEvent} - */ -proto.routerrpc.ForwardEvent.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.routerrpc.ForwardEvent; - return proto.routerrpc.ForwardEvent.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.routerrpc.ForwardEvent} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.routerrpc.ForwardEvent} - */ -proto.routerrpc.ForwardEvent.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.routerrpc.HtlcInfo; - reader.readMessage(value,proto.routerrpc.HtlcInfo.deserializeBinaryFromReader); - msg.setInfo(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.routerrpc.ForwardEvent.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.routerrpc.ForwardEvent.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.routerrpc.ForwardEvent} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.routerrpc.ForwardEvent.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getInfo(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.routerrpc.HtlcInfo.serializeBinaryToWriter - ); - } -}; - - -/** - * optional HtlcInfo info = 1; - * @return {?proto.routerrpc.HtlcInfo} - */ -proto.routerrpc.ForwardEvent.prototype.getInfo = function() { - return /** @type{?proto.routerrpc.HtlcInfo} */ ( - jspb.Message.getWrapperField(this, proto.routerrpc.HtlcInfo, 1)); -}; - - -/** - * @param {?proto.routerrpc.HtlcInfo|undefined} value - * @return {!proto.routerrpc.ForwardEvent} returns this -*/ -proto.routerrpc.ForwardEvent.prototype.setInfo = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.routerrpc.ForwardEvent} returns this - */ -proto.routerrpc.ForwardEvent.prototype.clearInfo = function() { - return this.setInfo(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.routerrpc.ForwardEvent.prototype.hasInfo = function() { - return jspb.Message.getField(this, 1) != null; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.routerrpc.ForwardFailEvent.prototype.toObject = function(opt_includeInstance) { - return proto.routerrpc.ForwardFailEvent.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.routerrpc.ForwardFailEvent} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.routerrpc.ForwardFailEvent.toObject = function(includeInstance, msg) { - var f, obj = { - - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.routerrpc.ForwardFailEvent} - */ -proto.routerrpc.ForwardFailEvent.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.routerrpc.ForwardFailEvent; - return proto.routerrpc.ForwardFailEvent.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.routerrpc.ForwardFailEvent} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.routerrpc.ForwardFailEvent} - */ -proto.routerrpc.ForwardFailEvent.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.routerrpc.ForwardFailEvent.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.routerrpc.ForwardFailEvent.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.routerrpc.ForwardFailEvent} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.routerrpc.ForwardFailEvent.serializeBinaryToWriter = function(message, writer) { - var f = undefined; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.routerrpc.SettleEvent.prototype.toObject = function(opt_includeInstance) { - return proto.routerrpc.SettleEvent.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.routerrpc.SettleEvent} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.routerrpc.SettleEvent.toObject = function(includeInstance, msg) { - var f, obj = { - preimage: msg.getPreimage_asB64() - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.routerrpc.SettleEvent} - */ -proto.routerrpc.SettleEvent.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.routerrpc.SettleEvent; - return proto.routerrpc.SettleEvent.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.routerrpc.SettleEvent} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.routerrpc.SettleEvent} - */ -proto.routerrpc.SettleEvent.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setPreimage(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.routerrpc.SettleEvent.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.routerrpc.SettleEvent.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.routerrpc.SettleEvent} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.routerrpc.SettleEvent.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getPreimage_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } -}; - - -/** - * optional bytes preimage = 1; - * @return {!(string|Uint8Array)} - */ -proto.routerrpc.SettleEvent.prototype.getPreimage = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes preimage = 1; - * This is a type-conversion wrapper around `getPreimage()` - * @return {string} - */ -proto.routerrpc.SettleEvent.prototype.getPreimage_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getPreimage())); -}; - - -/** - * optional bytes preimage = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getPreimage()` - * @return {!Uint8Array} - */ -proto.routerrpc.SettleEvent.prototype.getPreimage_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getPreimage())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.routerrpc.SettleEvent} returns this - */ -proto.routerrpc.SettleEvent.prototype.setPreimage = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.routerrpc.LinkFailEvent.prototype.toObject = function(opt_includeInstance) { - return proto.routerrpc.LinkFailEvent.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.routerrpc.LinkFailEvent} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.routerrpc.LinkFailEvent.toObject = function(includeInstance, msg) { - var f, obj = { - info: (f = msg.getInfo()) && proto.routerrpc.HtlcInfo.toObject(includeInstance, f), - wireFailure: jspb.Message.getFieldWithDefault(msg, 2, 0), - failureDetail: jspb.Message.getFieldWithDefault(msg, 3, 0), - failureString: jspb.Message.getFieldWithDefault(msg, 4, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.routerrpc.LinkFailEvent} - */ -proto.routerrpc.LinkFailEvent.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.routerrpc.LinkFailEvent; - return proto.routerrpc.LinkFailEvent.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.routerrpc.LinkFailEvent} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.routerrpc.LinkFailEvent} - */ -proto.routerrpc.LinkFailEvent.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.routerrpc.HtlcInfo; - reader.readMessage(value,proto.routerrpc.HtlcInfo.deserializeBinaryFromReader); - msg.setInfo(value); - break; - case 2: - var value = /** @type {!proto.lnrpc.Failure.FailureCode} */ (reader.readEnum()); - msg.setWireFailure(value); - break; - case 3: - var value = /** @type {!proto.routerrpc.FailureDetail} */ (reader.readEnum()); - msg.setFailureDetail(value); - break; - case 4: - var value = /** @type {string} */ (reader.readString()); - msg.setFailureString(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.routerrpc.LinkFailEvent.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.routerrpc.LinkFailEvent.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.routerrpc.LinkFailEvent} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.routerrpc.LinkFailEvent.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getInfo(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.routerrpc.HtlcInfo.serializeBinaryToWriter - ); - } - f = message.getWireFailure(); - if (f !== 0.0) { - writer.writeEnum( - 2, - f - ); - } - f = message.getFailureDetail(); - if (f !== 0.0) { - writer.writeEnum( - 3, - f - ); - } - f = message.getFailureString(); - if (f.length > 0) { - writer.writeString( - 4, - f - ); - } -}; - - -/** - * optional HtlcInfo info = 1; - * @return {?proto.routerrpc.HtlcInfo} - */ -proto.routerrpc.LinkFailEvent.prototype.getInfo = function() { - return /** @type{?proto.routerrpc.HtlcInfo} */ ( - jspb.Message.getWrapperField(this, proto.routerrpc.HtlcInfo, 1)); -}; - - -/** - * @param {?proto.routerrpc.HtlcInfo|undefined} value - * @return {!proto.routerrpc.LinkFailEvent} returns this -*/ -proto.routerrpc.LinkFailEvent.prototype.setInfo = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.routerrpc.LinkFailEvent} returns this - */ -proto.routerrpc.LinkFailEvent.prototype.clearInfo = function() { - return this.setInfo(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.routerrpc.LinkFailEvent.prototype.hasInfo = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional lnrpc.Failure.FailureCode wire_failure = 2; - * @return {!proto.lnrpc.Failure.FailureCode} - */ -proto.routerrpc.LinkFailEvent.prototype.getWireFailure = function() { - return /** @type {!proto.lnrpc.Failure.FailureCode} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {!proto.lnrpc.Failure.FailureCode} value - * @return {!proto.routerrpc.LinkFailEvent} returns this - */ -proto.routerrpc.LinkFailEvent.prototype.setWireFailure = function(value) { - return jspb.Message.setProto3EnumField(this, 2, value); -}; - - -/** - * optional FailureDetail failure_detail = 3; - * @return {!proto.routerrpc.FailureDetail} - */ -proto.routerrpc.LinkFailEvent.prototype.getFailureDetail = function() { - return /** @type {!proto.routerrpc.FailureDetail} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {!proto.routerrpc.FailureDetail} value - * @return {!proto.routerrpc.LinkFailEvent} returns this - */ -proto.routerrpc.LinkFailEvent.prototype.setFailureDetail = function(value) { - return jspb.Message.setProto3EnumField(this, 3, value); -}; - - -/** - * optional string failure_string = 4; - * @return {string} - */ -proto.routerrpc.LinkFailEvent.prototype.getFailureString = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); -}; - - -/** - * @param {string} value - * @return {!proto.routerrpc.LinkFailEvent} returns this - */ -proto.routerrpc.LinkFailEvent.prototype.setFailureString = function(value) { - return jspb.Message.setProto3StringField(this, 4, value); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.routerrpc.PaymentStatus.repeatedFields_ = [4]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.routerrpc.PaymentStatus.prototype.toObject = function(opt_includeInstance) { - return proto.routerrpc.PaymentStatus.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.routerrpc.PaymentStatus} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.routerrpc.PaymentStatus.toObject = function(includeInstance, msg) { - var f, obj = { - state: jspb.Message.getFieldWithDefault(msg, 1, 0), - preimage: msg.getPreimage_asB64(), - htlcsList: jspb.Message.toObjectList(msg.getHtlcsList(), - lightning_pb.HTLCAttempt.toObject, includeInstance) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.routerrpc.PaymentStatus} - */ -proto.routerrpc.PaymentStatus.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.routerrpc.PaymentStatus; - return proto.routerrpc.PaymentStatus.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.routerrpc.PaymentStatus} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.routerrpc.PaymentStatus} - */ -proto.routerrpc.PaymentStatus.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!proto.routerrpc.PaymentState} */ (reader.readEnum()); - msg.setState(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setPreimage(value); - break; - case 4: - var value = new lightning_pb.HTLCAttempt; - reader.readMessage(value,lightning_pb.HTLCAttempt.deserializeBinaryFromReader); - msg.addHtlcs(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.routerrpc.PaymentStatus.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.routerrpc.PaymentStatus.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.routerrpc.PaymentStatus} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.routerrpc.PaymentStatus.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getState(); - if (f !== 0.0) { - writer.writeEnum( - 1, - f - ); - } - f = message.getPreimage_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } - f = message.getHtlcsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 4, - f, - lightning_pb.HTLCAttempt.serializeBinaryToWriter - ); - } -}; - - -/** - * optional PaymentState state = 1; - * @return {!proto.routerrpc.PaymentState} - */ -proto.routerrpc.PaymentStatus.prototype.getState = function() { - return /** @type {!proto.routerrpc.PaymentState} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {!proto.routerrpc.PaymentState} value - * @return {!proto.routerrpc.PaymentStatus} returns this - */ -proto.routerrpc.PaymentStatus.prototype.setState = function(value) { - return jspb.Message.setProto3EnumField(this, 1, value); -}; - - -/** - * optional bytes preimage = 2; - * @return {!(string|Uint8Array)} - */ -proto.routerrpc.PaymentStatus.prototype.getPreimage = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes preimage = 2; - * This is a type-conversion wrapper around `getPreimage()` - * @return {string} - */ -proto.routerrpc.PaymentStatus.prototype.getPreimage_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getPreimage())); -}; - - -/** - * optional bytes preimage = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getPreimage()` - * @return {!Uint8Array} - */ -proto.routerrpc.PaymentStatus.prototype.getPreimage_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getPreimage())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.routerrpc.PaymentStatus} returns this - */ -proto.routerrpc.PaymentStatus.prototype.setPreimage = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); -}; - - -/** - * repeated lnrpc.HTLCAttempt htlcs = 4; - * @return {!Array} - */ -proto.routerrpc.PaymentStatus.prototype.getHtlcsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, lightning_pb.HTLCAttempt, 4)); -}; - - -/** - * @param {!Array} value - * @return {!proto.routerrpc.PaymentStatus} returns this -*/ -proto.routerrpc.PaymentStatus.prototype.setHtlcsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 4, value); -}; - - -/** - * @param {!proto.lnrpc.HTLCAttempt=} opt_value - * @param {number=} opt_index - * @return {!proto.lnrpc.HTLCAttempt} - */ -proto.routerrpc.PaymentStatus.prototype.addHtlcs = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 4, opt_value, proto.lnrpc.HTLCAttempt, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.routerrpc.PaymentStatus} returns this - */ -proto.routerrpc.PaymentStatus.prototype.clearHtlcsList = function() { - return this.setHtlcsList([]); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.routerrpc.CircuitKey.prototype.toObject = function(opt_includeInstance) { - return proto.routerrpc.CircuitKey.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.routerrpc.CircuitKey} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.routerrpc.CircuitKey.toObject = function(includeInstance, msg) { - var f, obj = { - chanId: jspb.Message.getFieldWithDefault(msg, 1, 0), - htlcId: jspb.Message.getFieldWithDefault(msg, 2, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.routerrpc.CircuitKey} - */ -proto.routerrpc.CircuitKey.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.routerrpc.CircuitKey; - return proto.routerrpc.CircuitKey.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.routerrpc.CircuitKey} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.routerrpc.CircuitKey} - */ -proto.routerrpc.CircuitKey.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readUint64()); - msg.setChanId(value); - break; - case 2: - var value = /** @type {number} */ (reader.readUint64()); - msg.setHtlcId(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.routerrpc.CircuitKey.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.routerrpc.CircuitKey.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.routerrpc.CircuitKey} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.routerrpc.CircuitKey.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getChanId(); - if (f !== 0) { - writer.writeUint64( - 1, - f - ); - } - f = message.getHtlcId(); - if (f !== 0) { - writer.writeUint64( - 2, - f - ); - } -}; - - -/** - * optional uint64 chan_id = 1; - * @return {number} - */ -proto.routerrpc.CircuitKey.prototype.getChanId = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.routerrpc.CircuitKey} returns this - */ -proto.routerrpc.CircuitKey.prototype.setChanId = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); -}; - - -/** - * optional uint64 htlc_id = 2; - * @return {number} - */ -proto.routerrpc.CircuitKey.prototype.getHtlcId = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.routerrpc.CircuitKey} returns this - */ -proto.routerrpc.CircuitKey.prototype.setHtlcId = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.routerrpc.ForwardHtlcInterceptRequest.prototype.toObject = function(opt_includeInstance) { - return proto.routerrpc.ForwardHtlcInterceptRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.routerrpc.ForwardHtlcInterceptRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.routerrpc.ForwardHtlcInterceptRequest.toObject = function(includeInstance, msg) { - var f, obj = { - incomingCircuitKey: (f = msg.getIncomingCircuitKey()) && proto.routerrpc.CircuitKey.toObject(includeInstance, f), - incomingAmountMsat: jspb.Message.getFieldWithDefault(msg, 5, 0), - incomingExpiry: jspb.Message.getFieldWithDefault(msg, 6, 0), - paymentHash: msg.getPaymentHash_asB64(), - outgoingRequestedChanId: jspb.Message.getFieldWithDefault(msg, 7, 0), - outgoingAmountMsat: jspb.Message.getFieldWithDefault(msg, 3, 0), - outgoingExpiry: jspb.Message.getFieldWithDefault(msg, 4, 0), - customRecordsMap: (f = msg.getCustomRecordsMap()) ? f.toObject(includeInstance, undefined) : [], - onionBlob: msg.getOnionBlob_asB64() - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.routerrpc.ForwardHtlcInterceptRequest} - */ -proto.routerrpc.ForwardHtlcInterceptRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.routerrpc.ForwardHtlcInterceptRequest; - return proto.routerrpc.ForwardHtlcInterceptRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.routerrpc.ForwardHtlcInterceptRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.routerrpc.ForwardHtlcInterceptRequest} - */ -proto.routerrpc.ForwardHtlcInterceptRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.routerrpc.CircuitKey; - reader.readMessage(value,proto.routerrpc.CircuitKey.deserializeBinaryFromReader); - msg.setIncomingCircuitKey(value); - break; - case 5: - var value = /** @type {number} */ (reader.readUint64()); - msg.setIncomingAmountMsat(value); - break; - case 6: - var value = /** @type {number} */ (reader.readUint32()); - msg.setIncomingExpiry(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setPaymentHash(value); - break; - case 7: - var value = /** @type {number} */ (reader.readUint64()); - msg.setOutgoingRequestedChanId(value); - break; - case 3: - var value = /** @type {number} */ (reader.readUint64()); - msg.setOutgoingAmountMsat(value); - break; - case 4: - var value = /** @type {number} */ (reader.readUint32()); - msg.setOutgoingExpiry(value); - break; - case 8: - var value = msg.getCustomRecordsMap(); - reader.readMessage(value, function(message, reader) { - jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readUint64, jspb.BinaryReader.prototype.readBytes, null, 0, ""); - }); - break; - case 9: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setOnionBlob(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.routerrpc.ForwardHtlcInterceptRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.routerrpc.ForwardHtlcInterceptRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.routerrpc.ForwardHtlcInterceptRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.routerrpc.ForwardHtlcInterceptRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getIncomingCircuitKey(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.routerrpc.CircuitKey.serializeBinaryToWriter - ); - } - f = message.getIncomingAmountMsat(); - if (f !== 0) { - writer.writeUint64( - 5, - f - ); - } - f = message.getIncomingExpiry(); - if (f !== 0) { - writer.writeUint32( - 6, - f - ); - } - f = message.getPaymentHash_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } - f = message.getOutgoingRequestedChanId(); - if (f !== 0) { - writer.writeUint64( - 7, - f - ); - } - f = message.getOutgoingAmountMsat(); - if (f !== 0) { - writer.writeUint64( - 3, - f - ); - } - f = message.getOutgoingExpiry(); - if (f !== 0) { - writer.writeUint32( - 4, - f - ); - } - f = message.getCustomRecordsMap(true); - if (f && f.getLength() > 0) { - f.serializeBinary(8, writer, jspb.BinaryWriter.prototype.writeUint64, jspb.BinaryWriter.prototype.writeBytes); - } - f = message.getOnionBlob_asU8(); - if (f.length > 0) { - writer.writeBytes( - 9, - f - ); - } -}; - - -/** - * optional CircuitKey incoming_circuit_key = 1; - * @return {?proto.routerrpc.CircuitKey} - */ -proto.routerrpc.ForwardHtlcInterceptRequest.prototype.getIncomingCircuitKey = function() { - return /** @type{?proto.routerrpc.CircuitKey} */ ( - jspb.Message.getWrapperField(this, proto.routerrpc.CircuitKey, 1)); -}; - - -/** - * @param {?proto.routerrpc.CircuitKey|undefined} value - * @return {!proto.routerrpc.ForwardHtlcInterceptRequest} returns this -*/ -proto.routerrpc.ForwardHtlcInterceptRequest.prototype.setIncomingCircuitKey = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.routerrpc.ForwardHtlcInterceptRequest} returns this - */ -proto.routerrpc.ForwardHtlcInterceptRequest.prototype.clearIncomingCircuitKey = function() { - return this.setIncomingCircuitKey(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.routerrpc.ForwardHtlcInterceptRequest.prototype.hasIncomingCircuitKey = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional uint64 incoming_amount_msat = 5; - * @return {number} - */ -proto.routerrpc.ForwardHtlcInterceptRequest.prototype.getIncomingAmountMsat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.routerrpc.ForwardHtlcInterceptRequest} returns this - */ -proto.routerrpc.ForwardHtlcInterceptRequest.prototype.setIncomingAmountMsat = function(value) { - return jspb.Message.setProto3IntField(this, 5, value); -}; - - -/** - * optional uint32 incoming_expiry = 6; - * @return {number} - */ -proto.routerrpc.ForwardHtlcInterceptRequest.prototype.getIncomingExpiry = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.routerrpc.ForwardHtlcInterceptRequest} returns this - */ -proto.routerrpc.ForwardHtlcInterceptRequest.prototype.setIncomingExpiry = function(value) { - return jspb.Message.setProto3IntField(this, 6, value); -}; - - -/** - * optional bytes payment_hash = 2; - * @return {!(string|Uint8Array)} - */ -proto.routerrpc.ForwardHtlcInterceptRequest.prototype.getPaymentHash = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes payment_hash = 2; - * This is a type-conversion wrapper around `getPaymentHash()` - * @return {string} - */ -proto.routerrpc.ForwardHtlcInterceptRequest.prototype.getPaymentHash_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getPaymentHash())); -}; - - -/** - * optional bytes payment_hash = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getPaymentHash()` - * @return {!Uint8Array} - */ -proto.routerrpc.ForwardHtlcInterceptRequest.prototype.getPaymentHash_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getPaymentHash())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.routerrpc.ForwardHtlcInterceptRequest} returns this - */ -proto.routerrpc.ForwardHtlcInterceptRequest.prototype.setPaymentHash = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); -}; - - -/** - * optional uint64 outgoing_requested_chan_id = 7; - * @return {number} - */ -proto.routerrpc.ForwardHtlcInterceptRequest.prototype.getOutgoingRequestedChanId = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.routerrpc.ForwardHtlcInterceptRequest} returns this - */ -proto.routerrpc.ForwardHtlcInterceptRequest.prototype.setOutgoingRequestedChanId = function(value) { - return jspb.Message.setProto3IntField(this, 7, value); -}; - - -/** - * optional uint64 outgoing_amount_msat = 3; - * @return {number} - */ -proto.routerrpc.ForwardHtlcInterceptRequest.prototype.getOutgoingAmountMsat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.routerrpc.ForwardHtlcInterceptRequest} returns this - */ -proto.routerrpc.ForwardHtlcInterceptRequest.prototype.setOutgoingAmountMsat = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - -/** - * optional uint32 outgoing_expiry = 4; - * @return {number} - */ -proto.routerrpc.ForwardHtlcInterceptRequest.prototype.getOutgoingExpiry = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.routerrpc.ForwardHtlcInterceptRequest} returns this - */ -proto.routerrpc.ForwardHtlcInterceptRequest.prototype.setOutgoingExpiry = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); -}; - - -/** - * map custom_records = 8; - * @param {boolean=} opt_noLazyCreate Do not create the map if - * empty, instead returning `undefined` - * @return {!jspb.Map} - */ -proto.routerrpc.ForwardHtlcInterceptRequest.prototype.getCustomRecordsMap = function(opt_noLazyCreate) { - return /** @type {!jspb.Map} */ ( - jspb.Message.getMapField(this, 8, opt_noLazyCreate, - null)); -}; - - -/** - * Clears values from the map. The map will be non-null. - * @return {!proto.routerrpc.ForwardHtlcInterceptRequest} returns this - */ -proto.routerrpc.ForwardHtlcInterceptRequest.prototype.clearCustomRecordsMap = function() { - this.getCustomRecordsMap().clear(); - return this;}; - - -/** - * optional bytes onion_blob = 9; - * @return {!(string|Uint8Array)} - */ -proto.routerrpc.ForwardHtlcInterceptRequest.prototype.getOnionBlob = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 9, "")); -}; - - -/** - * optional bytes onion_blob = 9; - * This is a type-conversion wrapper around `getOnionBlob()` - * @return {string} - */ -proto.routerrpc.ForwardHtlcInterceptRequest.prototype.getOnionBlob_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getOnionBlob())); -}; - - -/** - * optional bytes onion_blob = 9; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getOnionBlob()` - * @return {!Uint8Array} - */ -proto.routerrpc.ForwardHtlcInterceptRequest.prototype.getOnionBlob_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getOnionBlob())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.routerrpc.ForwardHtlcInterceptRequest} returns this - */ -proto.routerrpc.ForwardHtlcInterceptRequest.prototype.setOnionBlob = function(value) { - return jspb.Message.setProto3BytesField(this, 9, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.routerrpc.ForwardHtlcInterceptResponse.prototype.toObject = function(opt_includeInstance) { - return proto.routerrpc.ForwardHtlcInterceptResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.routerrpc.ForwardHtlcInterceptResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.routerrpc.ForwardHtlcInterceptResponse.toObject = function(includeInstance, msg) { - var f, obj = { - incomingCircuitKey: (f = msg.getIncomingCircuitKey()) && proto.routerrpc.CircuitKey.toObject(includeInstance, f), - action: jspb.Message.getFieldWithDefault(msg, 2, 0), - preimage: msg.getPreimage_asB64() - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.routerrpc.ForwardHtlcInterceptResponse} - */ -proto.routerrpc.ForwardHtlcInterceptResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.routerrpc.ForwardHtlcInterceptResponse; - return proto.routerrpc.ForwardHtlcInterceptResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.routerrpc.ForwardHtlcInterceptResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.routerrpc.ForwardHtlcInterceptResponse} - */ -proto.routerrpc.ForwardHtlcInterceptResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.routerrpc.CircuitKey; - reader.readMessage(value,proto.routerrpc.CircuitKey.deserializeBinaryFromReader); - msg.setIncomingCircuitKey(value); - break; - case 2: - var value = /** @type {!proto.routerrpc.ResolveHoldForwardAction} */ (reader.readEnum()); - msg.setAction(value); - break; - case 3: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setPreimage(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.routerrpc.ForwardHtlcInterceptResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.routerrpc.ForwardHtlcInterceptResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.routerrpc.ForwardHtlcInterceptResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.routerrpc.ForwardHtlcInterceptResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getIncomingCircuitKey(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.routerrpc.CircuitKey.serializeBinaryToWriter - ); - } - f = message.getAction(); - if (f !== 0.0) { - writer.writeEnum( - 2, - f - ); - } - f = message.getPreimage_asU8(); - if (f.length > 0) { - writer.writeBytes( - 3, - f - ); - } -}; - - -/** - * optional CircuitKey incoming_circuit_key = 1; - * @return {?proto.routerrpc.CircuitKey} - */ -proto.routerrpc.ForwardHtlcInterceptResponse.prototype.getIncomingCircuitKey = function() { - return /** @type{?proto.routerrpc.CircuitKey} */ ( - jspb.Message.getWrapperField(this, proto.routerrpc.CircuitKey, 1)); -}; - - -/** - * @param {?proto.routerrpc.CircuitKey|undefined} value - * @return {!proto.routerrpc.ForwardHtlcInterceptResponse} returns this -*/ -proto.routerrpc.ForwardHtlcInterceptResponse.prototype.setIncomingCircuitKey = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.routerrpc.ForwardHtlcInterceptResponse} returns this - */ -proto.routerrpc.ForwardHtlcInterceptResponse.prototype.clearIncomingCircuitKey = function() { - return this.setIncomingCircuitKey(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.routerrpc.ForwardHtlcInterceptResponse.prototype.hasIncomingCircuitKey = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional ResolveHoldForwardAction action = 2; - * @return {!proto.routerrpc.ResolveHoldForwardAction} - */ -proto.routerrpc.ForwardHtlcInterceptResponse.prototype.getAction = function() { - return /** @type {!proto.routerrpc.ResolveHoldForwardAction} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {!proto.routerrpc.ResolveHoldForwardAction} value - * @return {!proto.routerrpc.ForwardHtlcInterceptResponse} returns this - */ -proto.routerrpc.ForwardHtlcInterceptResponse.prototype.setAction = function(value) { - return jspb.Message.setProto3EnumField(this, 2, value); -}; - - -/** - * optional bytes preimage = 3; - * @return {!(string|Uint8Array)} - */ -proto.routerrpc.ForwardHtlcInterceptResponse.prototype.getPreimage = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * optional bytes preimage = 3; - * This is a type-conversion wrapper around `getPreimage()` - * @return {string} - */ -proto.routerrpc.ForwardHtlcInterceptResponse.prototype.getPreimage_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getPreimage())); -}; - - -/** - * optional bytes preimage = 3; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getPreimage()` - * @return {!Uint8Array} - */ -proto.routerrpc.ForwardHtlcInterceptResponse.prototype.getPreimage_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getPreimage())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.routerrpc.ForwardHtlcInterceptResponse} returns this - */ -proto.routerrpc.ForwardHtlcInterceptResponse.prototype.setPreimage = function(value) { - return jspb.Message.setProto3BytesField(this, 3, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.routerrpc.UpdateChanStatusRequest.prototype.toObject = function(opt_includeInstance) { - return proto.routerrpc.UpdateChanStatusRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.routerrpc.UpdateChanStatusRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.routerrpc.UpdateChanStatusRequest.toObject = function(includeInstance, msg) { - var f, obj = { - chanPoint: (f = msg.getChanPoint()) && lightning_pb.ChannelPoint.toObject(includeInstance, f), - action: jspb.Message.getFieldWithDefault(msg, 2, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.routerrpc.UpdateChanStatusRequest} - */ -proto.routerrpc.UpdateChanStatusRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.routerrpc.UpdateChanStatusRequest; - return proto.routerrpc.UpdateChanStatusRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.routerrpc.UpdateChanStatusRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.routerrpc.UpdateChanStatusRequest} - */ -proto.routerrpc.UpdateChanStatusRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new lightning_pb.ChannelPoint; - reader.readMessage(value,lightning_pb.ChannelPoint.deserializeBinaryFromReader); - msg.setChanPoint(value); - break; - case 2: - var value = /** @type {!proto.routerrpc.ChanStatusAction} */ (reader.readEnum()); - msg.setAction(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.routerrpc.UpdateChanStatusRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.routerrpc.UpdateChanStatusRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.routerrpc.UpdateChanStatusRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.routerrpc.UpdateChanStatusRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getChanPoint(); - if (f != null) { - writer.writeMessage( - 1, - f, - lightning_pb.ChannelPoint.serializeBinaryToWriter - ); - } - f = message.getAction(); - if (f !== 0.0) { - writer.writeEnum( - 2, - f - ); - } -}; - - -/** - * optional lnrpc.ChannelPoint chan_point = 1; - * @return {?proto.lnrpc.ChannelPoint} - */ -proto.routerrpc.UpdateChanStatusRequest.prototype.getChanPoint = function() { - return /** @type{?proto.lnrpc.ChannelPoint} */ ( - jspb.Message.getWrapperField(this, lightning_pb.ChannelPoint, 1)); -}; - - -/** - * @param {?proto.lnrpc.ChannelPoint|undefined} value - * @return {!proto.routerrpc.UpdateChanStatusRequest} returns this -*/ -proto.routerrpc.UpdateChanStatusRequest.prototype.setChanPoint = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.routerrpc.UpdateChanStatusRequest} returns this - */ -proto.routerrpc.UpdateChanStatusRequest.prototype.clearChanPoint = function() { - return this.setChanPoint(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.routerrpc.UpdateChanStatusRequest.prototype.hasChanPoint = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional ChanStatusAction action = 2; - * @return {!proto.routerrpc.ChanStatusAction} - */ -proto.routerrpc.UpdateChanStatusRequest.prototype.getAction = function() { - return /** @type {!proto.routerrpc.ChanStatusAction} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {!proto.routerrpc.ChanStatusAction} value - * @return {!proto.routerrpc.UpdateChanStatusRequest} returns this - */ -proto.routerrpc.UpdateChanStatusRequest.prototype.setAction = function(value) { - return jspb.Message.setProto3EnumField(this, 2, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.routerrpc.UpdateChanStatusResponse.prototype.toObject = function(opt_includeInstance) { - return proto.routerrpc.UpdateChanStatusResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.routerrpc.UpdateChanStatusResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.routerrpc.UpdateChanStatusResponse.toObject = function(includeInstance, msg) { - var f, obj = { - - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.routerrpc.UpdateChanStatusResponse} - */ -proto.routerrpc.UpdateChanStatusResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.routerrpc.UpdateChanStatusResponse; - return proto.routerrpc.UpdateChanStatusResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.routerrpc.UpdateChanStatusResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.routerrpc.UpdateChanStatusResponse} - */ -proto.routerrpc.UpdateChanStatusResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.routerrpc.UpdateChanStatusResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.routerrpc.UpdateChanStatusResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.routerrpc.UpdateChanStatusResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.routerrpc.UpdateChanStatusResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; -}; - - -/** - * @enum {number} - */ -proto.routerrpc.FailureDetail = { - UNKNOWN: 0, - NO_DETAIL: 1, - ONION_DECODE: 2, - LINK_NOT_ELIGIBLE: 3, - ON_CHAIN_TIMEOUT: 4, - HTLC_EXCEEDS_MAX: 5, - INSUFFICIENT_BALANCE: 6, - INCOMPLETE_FORWARD: 7, - HTLC_ADD_FAILED: 8, - FORWARDS_DISABLED: 9, - INVOICE_CANCELED: 10, - INVOICE_UNDERPAID: 11, - INVOICE_EXPIRY_TOO_SOON: 12, - INVOICE_NOT_OPEN: 13, - MPP_INVOICE_TIMEOUT: 14, - ADDRESS_MISMATCH: 15, - SET_TOTAL_MISMATCH: 16, - SET_TOTAL_TOO_LOW: 17, - SET_OVERPAID: 18, - UNKNOWN_INVOICE: 19, - INVALID_KEYSEND: 20, - MPP_IN_PROGRESS: 21, - CIRCULAR_ROUTE: 22 -}; - -/** - * @enum {number} - */ -proto.routerrpc.PaymentState = { - IN_FLIGHT: 0, - SUCCEEDED: 1, - FAILED_TIMEOUT: 2, - FAILED_NO_ROUTE: 3, - FAILED_ERROR: 4, - FAILED_INCORRECT_PAYMENT_DETAILS: 5, - FAILED_INSUFFICIENT_BALANCE: 6 -}; - -/** - * @enum {number} - */ -proto.routerrpc.ResolveHoldForwardAction = { - SETTLE: 0, - FAIL: 1, - RESUME: 2 -}; - -/** - * @enum {number} - */ -proto.routerrpc.ChanStatusAction = { - ENABLE: 0, - DISABLE: 1, - AUTO: 2 -}; - -goog.object.extend(exports, proto.routerrpc); diff --git a/lib/types/generated/routerrpc/router_pb_service.d.ts b/lib/types/generated/routerrpc/router_pb_service.d.ts deleted file mode 100644 index 60e3608..0000000 --- a/lib/types/generated/routerrpc/router_pb_service.d.ts +++ /dev/null @@ -1,320 +0,0 @@ -// package: routerrpc -// file: routerrpc/router.proto - -import * as routerrpc_router_pb from "../routerrpc/router_pb"; -import * as lightning_pb from "../lightning_pb"; -import {grpc} from "@improbable-eng/grpc-web"; - -type RouterSendPaymentV2 = { - readonly methodName: string; - readonly service: typeof Router; - readonly requestStream: false; - readonly responseStream: true; - readonly requestType: typeof routerrpc_router_pb.SendPaymentRequest; - readonly responseType: typeof lightning_pb.Payment; -}; - -type RouterTrackPaymentV2 = { - readonly methodName: string; - readonly service: typeof Router; - readonly requestStream: false; - readonly responseStream: true; - readonly requestType: typeof routerrpc_router_pb.TrackPaymentRequest; - readonly responseType: typeof lightning_pb.Payment; -}; - -type RouterEstimateRouteFee = { - readonly methodName: string; - readonly service: typeof Router; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof routerrpc_router_pb.RouteFeeRequest; - readonly responseType: typeof routerrpc_router_pb.RouteFeeResponse; -}; - -type RouterSendToRoute = { - readonly methodName: string; - readonly service: typeof Router; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof routerrpc_router_pb.SendToRouteRequest; - readonly responseType: typeof routerrpc_router_pb.SendToRouteResponse; -}; - -type RouterSendToRouteV2 = { - readonly methodName: string; - readonly service: typeof Router; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof routerrpc_router_pb.SendToRouteRequest; - readonly responseType: typeof lightning_pb.HTLCAttempt; -}; - -type RouterResetMissionControl = { - readonly methodName: string; - readonly service: typeof Router; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof routerrpc_router_pb.ResetMissionControlRequest; - readonly responseType: typeof routerrpc_router_pb.ResetMissionControlResponse; -}; - -type RouterQueryMissionControl = { - readonly methodName: string; - readonly service: typeof Router; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof routerrpc_router_pb.QueryMissionControlRequest; - readonly responseType: typeof routerrpc_router_pb.QueryMissionControlResponse; -}; - -type RouterXImportMissionControl = { - readonly methodName: string; - readonly service: typeof Router; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof routerrpc_router_pb.XImportMissionControlRequest; - readonly responseType: typeof routerrpc_router_pb.XImportMissionControlResponse; -}; - -type RouterGetMissionControlConfig = { - readonly methodName: string; - readonly service: typeof Router; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof routerrpc_router_pb.GetMissionControlConfigRequest; - readonly responseType: typeof routerrpc_router_pb.GetMissionControlConfigResponse; -}; - -type RouterSetMissionControlConfig = { - readonly methodName: string; - readonly service: typeof Router; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof routerrpc_router_pb.SetMissionControlConfigRequest; - readonly responseType: typeof routerrpc_router_pb.SetMissionControlConfigResponse; -}; - -type RouterQueryProbability = { - readonly methodName: string; - readonly service: typeof Router; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof routerrpc_router_pb.QueryProbabilityRequest; - readonly responseType: typeof routerrpc_router_pb.QueryProbabilityResponse; -}; - -type RouterBuildRoute = { - readonly methodName: string; - readonly service: typeof Router; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof routerrpc_router_pb.BuildRouteRequest; - readonly responseType: typeof routerrpc_router_pb.BuildRouteResponse; -}; - -type RouterSubscribeHtlcEvents = { - readonly methodName: string; - readonly service: typeof Router; - readonly requestStream: false; - readonly responseStream: true; - readonly requestType: typeof routerrpc_router_pb.SubscribeHtlcEventsRequest; - readonly responseType: typeof routerrpc_router_pb.HtlcEvent; -}; - -type RouterSendPayment = { - readonly methodName: string; - readonly service: typeof Router; - readonly requestStream: false; - readonly responseStream: true; - readonly requestType: typeof routerrpc_router_pb.SendPaymentRequest; - readonly responseType: typeof routerrpc_router_pb.PaymentStatus; -}; - -type RouterTrackPayment = { - readonly methodName: string; - readonly service: typeof Router; - readonly requestStream: false; - readonly responseStream: true; - readonly requestType: typeof routerrpc_router_pb.TrackPaymentRequest; - readonly responseType: typeof routerrpc_router_pb.PaymentStatus; -}; - -type RouterHtlcInterceptor = { - readonly methodName: string; - readonly service: typeof Router; - readonly requestStream: true; - readonly responseStream: true; - readonly requestType: typeof routerrpc_router_pb.ForwardHtlcInterceptResponse; - readonly responseType: typeof routerrpc_router_pb.ForwardHtlcInterceptRequest; -}; - -type RouterUpdateChanStatus = { - readonly methodName: string; - readonly service: typeof Router; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof routerrpc_router_pb.UpdateChanStatusRequest; - readonly responseType: typeof routerrpc_router_pb.UpdateChanStatusResponse; -}; - -export class Router { - static readonly serviceName: string; - static readonly SendPaymentV2: RouterSendPaymentV2; - static readonly TrackPaymentV2: RouterTrackPaymentV2; - static readonly EstimateRouteFee: RouterEstimateRouteFee; - static readonly SendToRoute: RouterSendToRoute; - static readonly SendToRouteV2: RouterSendToRouteV2; - static readonly ResetMissionControl: RouterResetMissionControl; - static readonly QueryMissionControl: RouterQueryMissionControl; - static readonly XImportMissionControl: RouterXImportMissionControl; - static readonly GetMissionControlConfig: RouterGetMissionControlConfig; - static readonly SetMissionControlConfig: RouterSetMissionControlConfig; - static readonly QueryProbability: RouterQueryProbability; - static readonly BuildRoute: RouterBuildRoute; - static readonly SubscribeHtlcEvents: RouterSubscribeHtlcEvents; - static readonly SendPayment: RouterSendPayment; - static readonly TrackPayment: RouterTrackPayment; - static readonly HtlcInterceptor: RouterHtlcInterceptor; - static readonly UpdateChanStatus: RouterUpdateChanStatus; -} - -export type ServiceError = { message: string, code: number; metadata: grpc.Metadata } -export type Status = { details: string, code: number; metadata: grpc.Metadata } - -interface UnaryResponse { - cancel(): void; -} -interface ResponseStream { - cancel(): void; - on(type: 'data', handler: (message: T) => void): ResponseStream; - on(type: 'end', handler: (status?: Status) => void): ResponseStream; - on(type: 'status', handler: (status: Status) => void): ResponseStream; -} -interface RequestStream { - write(message: T): RequestStream; - end(): void; - cancel(): void; - on(type: 'end', handler: (status?: Status) => void): RequestStream; - on(type: 'status', handler: (status: Status) => void): RequestStream; -} -interface BidirectionalStream { - write(message: ReqT): BidirectionalStream; - end(): void; - cancel(): void; - on(type: 'data', handler: (message: ResT) => void): BidirectionalStream; - on(type: 'end', handler: (status?: Status) => void): BidirectionalStream; - on(type: 'status', handler: (status: Status) => void): BidirectionalStream; -} - -export class RouterClient { - readonly serviceHost: string; - - constructor(serviceHost: string, options?: grpc.RpcOptions); - sendPaymentV2(requestMessage: routerrpc_router_pb.SendPaymentRequest, metadata?: grpc.Metadata): ResponseStream; - trackPaymentV2(requestMessage: routerrpc_router_pb.TrackPaymentRequest, metadata?: grpc.Metadata): ResponseStream; - estimateRouteFee( - requestMessage: routerrpc_router_pb.RouteFeeRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: routerrpc_router_pb.RouteFeeResponse|null) => void - ): UnaryResponse; - estimateRouteFee( - requestMessage: routerrpc_router_pb.RouteFeeRequest, - callback: (error: ServiceError|null, responseMessage: routerrpc_router_pb.RouteFeeResponse|null) => void - ): UnaryResponse; - sendToRoute( - requestMessage: routerrpc_router_pb.SendToRouteRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: routerrpc_router_pb.SendToRouteResponse|null) => void - ): UnaryResponse; - sendToRoute( - requestMessage: routerrpc_router_pb.SendToRouteRequest, - callback: (error: ServiceError|null, responseMessage: routerrpc_router_pb.SendToRouteResponse|null) => void - ): UnaryResponse; - sendToRouteV2( - requestMessage: routerrpc_router_pb.SendToRouteRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: lightning_pb.HTLCAttempt|null) => void - ): UnaryResponse; - sendToRouteV2( - requestMessage: routerrpc_router_pb.SendToRouteRequest, - callback: (error: ServiceError|null, responseMessage: lightning_pb.HTLCAttempt|null) => void - ): UnaryResponse; - resetMissionControl( - requestMessage: routerrpc_router_pb.ResetMissionControlRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: routerrpc_router_pb.ResetMissionControlResponse|null) => void - ): UnaryResponse; - resetMissionControl( - requestMessage: routerrpc_router_pb.ResetMissionControlRequest, - callback: (error: ServiceError|null, responseMessage: routerrpc_router_pb.ResetMissionControlResponse|null) => void - ): UnaryResponse; - queryMissionControl( - requestMessage: routerrpc_router_pb.QueryMissionControlRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: routerrpc_router_pb.QueryMissionControlResponse|null) => void - ): UnaryResponse; - queryMissionControl( - requestMessage: routerrpc_router_pb.QueryMissionControlRequest, - callback: (error: ServiceError|null, responseMessage: routerrpc_router_pb.QueryMissionControlResponse|null) => void - ): UnaryResponse; - xImportMissionControl( - requestMessage: routerrpc_router_pb.XImportMissionControlRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: routerrpc_router_pb.XImportMissionControlResponse|null) => void - ): UnaryResponse; - xImportMissionControl( - requestMessage: routerrpc_router_pb.XImportMissionControlRequest, - callback: (error: ServiceError|null, responseMessage: routerrpc_router_pb.XImportMissionControlResponse|null) => void - ): UnaryResponse; - getMissionControlConfig( - requestMessage: routerrpc_router_pb.GetMissionControlConfigRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: routerrpc_router_pb.GetMissionControlConfigResponse|null) => void - ): UnaryResponse; - getMissionControlConfig( - requestMessage: routerrpc_router_pb.GetMissionControlConfigRequest, - callback: (error: ServiceError|null, responseMessage: routerrpc_router_pb.GetMissionControlConfigResponse|null) => void - ): UnaryResponse; - setMissionControlConfig( - requestMessage: routerrpc_router_pb.SetMissionControlConfigRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: routerrpc_router_pb.SetMissionControlConfigResponse|null) => void - ): UnaryResponse; - setMissionControlConfig( - requestMessage: routerrpc_router_pb.SetMissionControlConfigRequest, - callback: (error: ServiceError|null, responseMessage: routerrpc_router_pb.SetMissionControlConfigResponse|null) => void - ): UnaryResponse; - queryProbability( - requestMessage: routerrpc_router_pb.QueryProbabilityRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: routerrpc_router_pb.QueryProbabilityResponse|null) => void - ): UnaryResponse; - queryProbability( - requestMessage: routerrpc_router_pb.QueryProbabilityRequest, - callback: (error: ServiceError|null, responseMessage: routerrpc_router_pb.QueryProbabilityResponse|null) => void - ): UnaryResponse; - buildRoute( - requestMessage: routerrpc_router_pb.BuildRouteRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: routerrpc_router_pb.BuildRouteResponse|null) => void - ): UnaryResponse; - buildRoute( - requestMessage: routerrpc_router_pb.BuildRouteRequest, - callback: (error: ServiceError|null, responseMessage: routerrpc_router_pb.BuildRouteResponse|null) => void - ): UnaryResponse; - subscribeHtlcEvents(requestMessage: routerrpc_router_pb.SubscribeHtlcEventsRequest, metadata?: grpc.Metadata): ResponseStream; - sendPayment(requestMessage: routerrpc_router_pb.SendPaymentRequest, metadata?: grpc.Metadata): ResponseStream; - trackPayment(requestMessage: routerrpc_router_pb.TrackPaymentRequest, metadata?: grpc.Metadata): ResponseStream; - htlcInterceptor(metadata?: grpc.Metadata): BidirectionalStream; - updateChanStatus( - requestMessage: routerrpc_router_pb.UpdateChanStatusRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: routerrpc_router_pb.UpdateChanStatusResponse|null) => void - ): UnaryResponse; - updateChanStatus( - requestMessage: routerrpc_router_pb.UpdateChanStatusRequest, - callback: (error: ServiceError|null, responseMessage: routerrpc_router_pb.UpdateChanStatusResponse|null) => void - ): UnaryResponse; -} - diff --git a/lib/types/generated/routerrpc/router_pb_service.js b/lib/types/generated/routerrpc/router_pb_service.js deleted file mode 100644 index 8997481..0000000 --- a/lib/types/generated/routerrpc/router_pb_service.js +++ /dev/null @@ -1,756 +0,0 @@ -// package: routerrpc -// file: routerrpc/router.proto - -var routerrpc_router_pb = require("../routerrpc/router_pb"); -var lightning_pb = require("../lightning_pb"); -var grpc = require("@improbable-eng/grpc-web").grpc; - -var Router = (function () { - function Router() {} - Router.serviceName = "routerrpc.Router"; - return Router; -}()); - -Router.SendPaymentV2 = { - methodName: "SendPaymentV2", - service: Router, - requestStream: false, - responseStream: true, - requestType: routerrpc_router_pb.SendPaymentRequest, - responseType: lightning_pb.Payment -}; - -Router.TrackPaymentV2 = { - methodName: "TrackPaymentV2", - service: Router, - requestStream: false, - responseStream: true, - requestType: routerrpc_router_pb.TrackPaymentRequest, - responseType: lightning_pb.Payment -}; - -Router.EstimateRouteFee = { - methodName: "EstimateRouteFee", - service: Router, - requestStream: false, - responseStream: false, - requestType: routerrpc_router_pb.RouteFeeRequest, - responseType: routerrpc_router_pb.RouteFeeResponse -}; - -Router.SendToRoute = { - methodName: "SendToRoute", - service: Router, - requestStream: false, - responseStream: false, - requestType: routerrpc_router_pb.SendToRouteRequest, - responseType: routerrpc_router_pb.SendToRouteResponse -}; - -Router.SendToRouteV2 = { - methodName: "SendToRouteV2", - service: Router, - requestStream: false, - responseStream: false, - requestType: routerrpc_router_pb.SendToRouteRequest, - responseType: lightning_pb.HTLCAttempt -}; - -Router.ResetMissionControl = { - methodName: "ResetMissionControl", - service: Router, - requestStream: false, - responseStream: false, - requestType: routerrpc_router_pb.ResetMissionControlRequest, - responseType: routerrpc_router_pb.ResetMissionControlResponse -}; - -Router.QueryMissionControl = { - methodName: "QueryMissionControl", - service: Router, - requestStream: false, - responseStream: false, - requestType: routerrpc_router_pb.QueryMissionControlRequest, - responseType: routerrpc_router_pb.QueryMissionControlResponse -}; - -Router.XImportMissionControl = { - methodName: "XImportMissionControl", - service: Router, - requestStream: false, - responseStream: false, - requestType: routerrpc_router_pb.XImportMissionControlRequest, - responseType: routerrpc_router_pb.XImportMissionControlResponse -}; - -Router.GetMissionControlConfig = { - methodName: "GetMissionControlConfig", - service: Router, - requestStream: false, - responseStream: false, - requestType: routerrpc_router_pb.GetMissionControlConfigRequest, - responseType: routerrpc_router_pb.GetMissionControlConfigResponse -}; - -Router.SetMissionControlConfig = { - methodName: "SetMissionControlConfig", - service: Router, - requestStream: false, - responseStream: false, - requestType: routerrpc_router_pb.SetMissionControlConfigRequest, - responseType: routerrpc_router_pb.SetMissionControlConfigResponse -}; - -Router.QueryProbability = { - methodName: "QueryProbability", - service: Router, - requestStream: false, - responseStream: false, - requestType: routerrpc_router_pb.QueryProbabilityRequest, - responseType: routerrpc_router_pb.QueryProbabilityResponse -}; - -Router.BuildRoute = { - methodName: "BuildRoute", - service: Router, - requestStream: false, - responseStream: false, - requestType: routerrpc_router_pb.BuildRouteRequest, - responseType: routerrpc_router_pb.BuildRouteResponse -}; - -Router.SubscribeHtlcEvents = { - methodName: "SubscribeHtlcEvents", - service: Router, - requestStream: false, - responseStream: true, - requestType: routerrpc_router_pb.SubscribeHtlcEventsRequest, - responseType: routerrpc_router_pb.HtlcEvent -}; - -Router.SendPayment = { - methodName: "SendPayment", - service: Router, - requestStream: false, - responseStream: true, - requestType: routerrpc_router_pb.SendPaymentRequest, - responseType: routerrpc_router_pb.PaymentStatus -}; - -Router.TrackPayment = { - methodName: "TrackPayment", - service: Router, - requestStream: false, - responseStream: true, - requestType: routerrpc_router_pb.TrackPaymentRequest, - responseType: routerrpc_router_pb.PaymentStatus -}; - -Router.HtlcInterceptor = { - methodName: "HtlcInterceptor", - service: Router, - requestStream: true, - responseStream: true, - requestType: routerrpc_router_pb.ForwardHtlcInterceptResponse, - responseType: routerrpc_router_pb.ForwardHtlcInterceptRequest -}; - -Router.UpdateChanStatus = { - methodName: "UpdateChanStatus", - service: Router, - requestStream: false, - responseStream: false, - requestType: routerrpc_router_pb.UpdateChanStatusRequest, - responseType: routerrpc_router_pb.UpdateChanStatusResponse -}; - -exports.Router = Router; - -function RouterClient(serviceHost, options) { - this.serviceHost = serviceHost; - this.options = options || {}; -} - -RouterClient.prototype.sendPaymentV2 = function sendPaymentV2(requestMessage, metadata) { - var listeners = { - data: [], - end: [], - status: [] - }; - var client = grpc.invoke(Router.SendPaymentV2, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onMessage: function (responseMessage) { - listeners.data.forEach(function (handler) { - handler(responseMessage); - }); - }, - onEnd: function (status, statusMessage, trailers) { - listeners.status.forEach(function (handler) { - handler({ code: status, details: statusMessage, metadata: trailers }); - }); - listeners.end.forEach(function (handler) { - handler({ code: status, details: statusMessage, metadata: trailers }); - }); - listeners = null; - } - }); - return { - on: function (type, handler) { - listeners[type].push(handler); - return this; - }, - cancel: function () { - listeners = null; - client.close(); - } - }; -}; - -RouterClient.prototype.trackPaymentV2 = function trackPaymentV2(requestMessage, metadata) { - var listeners = { - data: [], - end: [], - status: [] - }; - var client = grpc.invoke(Router.TrackPaymentV2, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onMessage: function (responseMessage) { - listeners.data.forEach(function (handler) { - handler(responseMessage); - }); - }, - onEnd: function (status, statusMessage, trailers) { - listeners.status.forEach(function (handler) { - handler({ code: status, details: statusMessage, metadata: trailers }); - }); - listeners.end.forEach(function (handler) { - handler({ code: status, details: statusMessage, metadata: trailers }); - }); - listeners = null; - } - }); - return { - on: function (type, handler) { - listeners[type].push(handler); - return this; - }, - cancel: function () { - listeners = null; - client.close(); - } - }; -}; - -RouterClient.prototype.estimateRouteFee = function estimateRouteFee(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(Router.EstimateRouteFee, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -RouterClient.prototype.sendToRoute = function sendToRoute(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(Router.SendToRoute, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -RouterClient.prototype.sendToRouteV2 = function sendToRouteV2(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(Router.SendToRouteV2, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -RouterClient.prototype.resetMissionControl = function resetMissionControl(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(Router.ResetMissionControl, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -RouterClient.prototype.queryMissionControl = function queryMissionControl(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(Router.QueryMissionControl, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -RouterClient.prototype.xImportMissionControl = function xImportMissionControl(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(Router.XImportMissionControl, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -RouterClient.prototype.getMissionControlConfig = function getMissionControlConfig(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(Router.GetMissionControlConfig, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -RouterClient.prototype.setMissionControlConfig = function setMissionControlConfig(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(Router.SetMissionControlConfig, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -RouterClient.prototype.queryProbability = function queryProbability(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(Router.QueryProbability, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -RouterClient.prototype.buildRoute = function buildRoute(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(Router.BuildRoute, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -RouterClient.prototype.subscribeHtlcEvents = function subscribeHtlcEvents(requestMessage, metadata) { - var listeners = { - data: [], - end: [], - status: [] - }; - var client = grpc.invoke(Router.SubscribeHtlcEvents, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onMessage: function (responseMessage) { - listeners.data.forEach(function (handler) { - handler(responseMessage); - }); - }, - onEnd: function (status, statusMessage, trailers) { - listeners.status.forEach(function (handler) { - handler({ code: status, details: statusMessage, metadata: trailers }); - }); - listeners.end.forEach(function (handler) { - handler({ code: status, details: statusMessage, metadata: trailers }); - }); - listeners = null; - } - }); - return { - on: function (type, handler) { - listeners[type].push(handler); - return this; - }, - cancel: function () { - listeners = null; - client.close(); - } - }; -}; - -RouterClient.prototype.sendPayment = function sendPayment(requestMessage, metadata) { - var listeners = { - data: [], - end: [], - status: [] - }; - var client = grpc.invoke(Router.SendPayment, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onMessage: function (responseMessage) { - listeners.data.forEach(function (handler) { - handler(responseMessage); - }); - }, - onEnd: function (status, statusMessage, trailers) { - listeners.status.forEach(function (handler) { - handler({ code: status, details: statusMessage, metadata: trailers }); - }); - listeners.end.forEach(function (handler) { - handler({ code: status, details: statusMessage, metadata: trailers }); - }); - listeners = null; - } - }); - return { - on: function (type, handler) { - listeners[type].push(handler); - return this; - }, - cancel: function () { - listeners = null; - client.close(); - } - }; -}; - -RouterClient.prototype.trackPayment = function trackPayment(requestMessage, metadata) { - var listeners = { - data: [], - end: [], - status: [] - }; - var client = grpc.invoke(Router.TrackPayment, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onMessage: function (responseMessage) { - listeners.data.forEach(function (handler) { - handler(responseMessage); - }); - }, - onEnd: function (status, statusMessage, trailers) { - listeners.status.forEach(function (handler) { - handler({ code: status, details: statusMessage, metadata: trailers }); - }); - listeners.end.forEach(function (handler) { - handler({ code: status, details: statusMessage, metadata: trailers }); - }); - listeners = null; - } - }); - return { - on: function (type, handler) { - listeners[type].push(handler); - return this; - }, - cancel: function () { - listeners = null; - client.close(); - } - }; -}; - -RouterClient.prototype.htlcInterceptor = function htlcInterceptor(metadata) { - var listeners = { - data: [], - end: [], - status: [] - }; - var client = grpc.client(Router.HtlcInterceptor, { - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport - }); - client.onEnd(function (status, statusMessage, trailers) { - listeners.status.forEach(function (handler) { - handler({ code: status, details: statusMessage, metadata: trailers }); - }); - listeners.end.forEach(function (handler) { - handler({ code: status, details: statusMessage, metadata: trailers }); - }); - listeners = null; - }); - client.onMessage(function (message) { - listeners.data.forEach(function (handler) { - handler(message); - }) - }); - client.start(metadata); - return { - on: function (type, handler) { - listeners[type].push(handler); - return this; - }, - write: function (requestMessage) { - client.send(requestMessage); - return this; - }, - end: function () { - client.finishSend(); - }, - cancel: function () { - listeners = null; - client.close(); - } - }; -}; - -RouterClient.prototype.updateChanStatus = function updateChanStatus(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(Router.UpdateChanStatus, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -exports.RouterClient = RouterClient; - diff --git a/lib/types/generated/signrpc/signer_pb.d.ts b/lib/types/generated/signrpc/signer_pb.d.ts deleted file mode 100644 index 2a4a278..0000000 --- a/lib/types/generated/signrpc/signer_pb.d.ts +++ /dev/null @@ -1,409 +0,0 @@ -// package: signrpc -// file: signrpc/signer.proto - -import * as jspb from "google-protobuf"; - -export class KeyLocator extends jspb.Message { - getKeyFamily(): number; - setKeyFamily(value: number): void; - - getKeyIndex(): number; - setKeyIndex(value: number): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): KeyLocator.AsObject; - static toObject(includeInstance: boolean, msg: KeyLocator): KeyLocator.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: KeyLocator, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): KeyLocator; - static deserializeBinaryFromReader(message: KeyLocator, reader: jspb.BinaryReader): KeyLocator; -} - -export namespace KeyLocator { - export type AsObject = { - keyFamily: number, - keyIndex: number, - } -} - -export class KeyDescriptor extends jspb.Message { - getRawKeyBytes(): Uint8Array | string; - getRawKeyBytes_asU8(): Uint8Array; - getRawKeyBytes_asB64(): string; - setRawKeyBytes(value: Uint8Array | string): void; - - hasKeyLoc(): boolean; - clearKeyLoc(): void; - getKeyLoc(): KeyLocator | undefined; - setKeyLoc(value?: KeyLocator): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): KeyDescriptor.AsObject; - static toObject(includeInstance: boolean, msg: KeyDescriptor): KeyDescriptor.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: KeyDescriptor, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): KeyDescriptor; - static deserializeBinaryFromReader(message: KeyDescriptor, reader: jspb.BinaryReader): KeyDescriptor; -} - -export namespace KeyDescriptor { - export type AsObject = { - rawKeyBytes: Uint8Array | string, - keyLoc?: KeyLocator.AsObject, - } -} - -export class TxOut extends jspb.Message { - getValue(): number; - setValue(value: number): void; - - getPkScript(): Uint8Array | string; - getPkScript_asU8(): Uint8Array; - getPkScript_asB64(): string; - setPkScript(value: Uint8Array | string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): TxOut.AsObject; - static toObject(includeInstance: boolean, msg: TxOut): TxOut.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: TxOut, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): TxOut; - static deserializeBinaryFromReader(message: TxOut, reader: jspb.BinaryReader): TxOut; -} - -export namespace TxOut { - export type AsObject = { - value: number, - pkScript: Uint8Array | string, - } -} - -export class SignDescriptor extends jspb.Message { - hasKeyDesc(): boolean; - clearKeyDesc(): void; - getKeyDesc(): KeyDescriptor | undefined; - setKeyDesc(value?: KeyDescriptor): void; - - getSingleTweak(): Uint8Array | string; - getSingleTweak_asU8(): Uint8Array; - getSingleTweak_asB64(): string; - setSingleTweak(value: Uint8Array | string): void; - - getDoubleTweak(): Uint8Array | string; - getDoubleTweak_asU8(): Uint8Array; - getDoubleTweak_asB64(): string; - setDoubleTweak(value: Uint8Array | string): void; - - getWitnessScript(): Uint8Array | string; - getWitnessScript_asU8(): Uint8Array; - getWitnessScript_asB64(): string; - setWitnessScript(value: Uint8Array | string): void; - - hasOutput(): boolean; - clearOutput(): void; - getOutput(): TxOut | undefined; - setOutput(value?: TxOut): void; - - getSighash(): number; - setSighash(value: number): void; - - getInputIndex(): number; - setInputIndex(value: number): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): SignDescriptor.AsObject; - static toObject(includeInstance: boolean, msg: SignDescriptor): SignDescriptor.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: SignDescriptor, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): SignDescriptor; - static deserializeBinaryFromReader(message: SignDescriptor, reader: jspb.BinaryReader): SignDescriptor; -} - -export namespace SignDescriptor { - export type AsObject = { - keyDesc?: KeyDescriptor.AsObject, - singleTweak: Uint8Array | string, - doubleTweak: Uint8Array | string, - witnessScript: Uint8Array | string, - output?: TxOut.AsObject, - sighash: number, - inputIndex: number, - } -} - -export class SignReq extends jspb.Message { - getRawTxBytes(): Uint8Array | string; - getRawTxBytes_asU8(): Uint8Array; - getRawTxBytes_asB64(): string; - setRawTxBytes(value: Uint8Array | string): void; - - clearSignDescsList(): void; - getSignDescsList(): Array; - setSignDescsList(value: Array): void; - addSignDescs(value?: SignDescriptor, index?: number): SignDescriptor; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): SignReq.AsObject; - static toObject(includeInstance: boolean, msg: SignReq): SignReq.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: SignReq, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): SignReq; - static deserializeBinaryFromReader(message: SignReq, reader: jspb.BinaryReader): SignReq; -} - -export namespace SignReq { - export type AsObject = { - rawTxBytes: Uint8Array | string, - signDescs: Array, - } -} - -export class SignResp extends jspb.Message { - clearRawSigsList(): void; - getRawSigsList(): Array; - getRawSigsList_asU8(): Array; - getRawSigsList_asB64(): Array; - setRawSigsList(value: Array): void; - addRawSigs(value: Uint8Array | string, index?: number): Uint8Array | string; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): SignResp.AsObject; - static toObject(includeInstance: boolean, msg: SignResp): SignResp.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: SignResp, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): SignResp; - static deserializeBinaryFromReader(message: SignResp, reader: jspb.BinaryReader): SignResp; -} - -export namespace SignResp { - export type AsObject = { - rawSigs: Array, - } -} - -export class InputScript extends jspb.Message { - clearWitnessList(): void; - getWitnessList(): Array; - getWitnessList_asU8(): Array; - getWitnessList_asB64(): Array; - setWitnessList(value: Array): void; - addWitness(value: Uint8Array | string, index?: number): Uint8Array | string; - - getSigScript(): Uint8Array | string; - getSigScript_asU8(): Uint8Array; - getSigScript_asB64(): string; - setSigScript(value: Uint8Array | string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): InputScript.AsObject; - static toObject(includeInstance: boolean, msg: InputScript): InputScript.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: InputScript, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): InputScript; - static deserializeBinaryFromReader(message: InputScript, reader: jspb.BinaryReader): InputScript; -} - -export namespace InputScript { - export type AsObject = { - witness: Array, - sigScript: Uint8Array | string, - } -} - -export class InputScriptResp extends jspb.Message { - clearInputScriptsList(): void; - getInputScriptsList(): Array; - setInputScriptsList(value: Array): void; - addInputScripts(value?: InputScript, index?: number): InputScript; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): InputScriptResp.AsObject; - static toObject(includeInstance: boolean, msg: InputScriptResp): InputScriptResp.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: InputScriptResp, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): InputScriptResp; - static deserializeBinaryFromReader(message: InputScriptResp, reader: jspb.BinaryReader): InputScriptResp; -} - -export namespace InputScriptResp { - export type AsObject = { - inputScripts: Array, - } -} - -export class SignMessageReq extends jspb.Message { - getMsg(): Uint8Array | string; - getMsg_asU8(): Uint8Array; - getMsg_asB64(): string; - setMsg(value: Uint8Array | string): void; - - hasKeyLoc(): boolean; - clearKeyLoc(): void; - getKeyLoc(): KeyLocator | undefined; - setKeyLoc(value?: KeyLocator): void; - - getDoubleHash(): boolean; - setDoubleHash(value: boolean): void; - - getCompactSig(): boolean; - setCompactSig(value: boolean): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): SignMessageReq.AsObject; - static toObject(includeInstance: boolean, msg: SignMessageReq): SignMessageReq.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: SignMessageReq, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): SignMessageReq; - static deserializeBinaryFromReader(message: SignMessageReq, reader: jspb.BinaryReader): SignMessageReq; -} - -export namespace SignMessageReq { - export type AsObject = { - msg: Uint8Array | string, - keyLoc?: KeyLocator.AsObject, - doubleHash: boolean, - compactSig: boolean, - } -} - -export class SignMessageResp extends jspb.Message { - getSignature(): Uint8Array | string; - getSignature_asU8(): Uint8Array; - getSignature_asB64(): string; - setSignature(value: Uint8Array | string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): SignMessageResp.AsObject; - static toObject(includeInstance: boolean, msg: SignMessageResp): SignMessageResp.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: SignMessageResp, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): SignMessageResp; - static deserializeBinaryFromReader(message: SignMessageResp, reader: jspb.BinaryReader): SignMessageResp; -} - -export namespace SignMessageResp { - export type AsObject = { - signature: Uint8Array | string, - } -} - -export class VerifyMessageReq extends jspb.Message { - getMsg(): Uint8Array | string; - getMsg_asU8(): Uint8Array; - getMsg_asB64(): string; - setMsg(value: Uint8Array | string): void; - - getSignature(): Uint8Array | string; - getSignature_asU8(): Uint8Array; - getSignature_asB64(): string; - setSignature(value: Uint8Array | string): void; - - getPubkey(): Uint8Array | string; - getPubkey_asU8(): Uint8Array; - getPubkey_asB64(): string; - setPubkey(value: Uint8Array | string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): VerifyMessageReq.AsObject; - static toObject(includeInstance: boolean, msg: VerifyMessageReq): VerifyMessageReq.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: VerifyMessageReq, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): VerifyMessageReq; - static deserializeBinaryFromReader(message: VerifyMessageReq, reader: jspb.BinaryReader): VerifyMessageReq; -} - -export namespace VerifyMessageReq { - export type AsObject = { - msg: Uint8Array | string, - signature: Uint8Array | string, - pubkey: Uint8Array | string, - } -} - -export class VerifyMessageResp extends jspb.Message { - getValid(): boolean; - setValid(value: boolean): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): VerifyMessageResp.AsObject; - static toObject(includeInstance: boolean, msg: VerifyMessageResp): VerifyMessageResp.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: VerifyMessageResp, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): VerifyMessageResp; - static deserializeBinaryFromReader(message: VerifyMessageResp, reader: jspb.BinaryReader): VerifyMessageResp; -} - -export namespace VerifyMessageResp { - export type AsObject = { - valid: boolean, - } -} - -export class SharedKeyRequest extends jspb.Message { - getEphemeralPubkey(): Uint8Array | string; - getEphemeralPubkey_asU8(): Uint8Array; - getEphemeralPubkey_asB64(): string; - setEphemeralPubkey(value: Uint8Array | string): void; - - hasKeyLoc(): boolean; - clearKeyLoc(): void; - getKeyLoc(): KeyLocator | undefined; - setKeyLoc(value?: KeyLocator): void; - - hasKeyDesc(): boolean; - clearKeyDesc(): void; - getKeyDesc(): KeyDescriptor | undefined; - setKeyDesc(value?: KeyDescriptor): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): SharedKeyRequest.AsObject; - static toObject(includeInstance: boolean, msg: SharedKeyRequest): SharedKeyRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: SharedKeyRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): SharedKeyRequest; - static deserializeBinaryFromReader(message: SharedKeyRequest, reader: jspb.BinaryReader): SharedKeyRequest; -} - -export namespace SharedKeyRequest { - export type AsObject = { - ephemeralPubkey: Uint8Array | string, - keyLoc?: KeyLocator.AsObject, - keyDesc?: KeyDescriptor.AsObject, - } -} - -export class SharedKeyResponse extends jspb.Message { - getSharedKey(): Uint8Array | string; - getSharedKey_asU8(): Uint8Array; - getSharedKey_asB64(): string; - setSharedKey(value: Uint8Array | string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): SharedKeyResponse.AsObject; - static toObject(includeInstance: boolean, msg: SharedKeyResponse): SharedKeyResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: SharedKeyResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): SharedKeyResponse; - static deserializeBinaryFromReader(message: SharedKeyResponse, reader: jspb.BinaryReader): SharedKeyResponse; -} - -export namespace SharedKeyResponse { - export type AsObject = { - sharedKey: Uint8Array | string, - } -} - diff --git a/lib/types/generated/signrpc/signer_pb.js b/lib/types/generated/signrpc/signer_pb.js deleted file mode 100644 index 9c8e54a..0000000 --- a/lib/types/generated/signrpc/signer_pb.js +++ /dev/null @@ -1,3308 +0,0 @@ -// source: signrpc/signer.proto -/** - * @fileoverview - * @enhanceable - * @suppress {missingRequire} reports error on implicit type usages. - * @suppress {messageConventions} JS Compiler reports an error if a variable or - * field starts with 'MSG_' and isn't a translatable message. - * @public - */ -// GENERATED CODE -- DO NOT EDIT! -/* eslint-disable */ -// @ts-nocheck - -var jspb = require('google-protobuf'); -var goog = jspb; -var global = Function('return this')(); - -goog.exportSymbol('proto.signrpc.InputScript', null, global); -goog.exportSymbol('proto.signrpc.InputScriptResp', null, global); -goog.exportSymbol('proto.signrpc.KeyDescriptor', null, global); -goog.exportSymbol('proto.signrpc.KeyLocator', null, global); -goog.exportSymbol('proto.signrpc.SharedKeyRequest', null, global); -goog.exportSymbol('proto.signrpc.SharedKeyResponse', null, global); -goog.exportSymbol('proto.signrpc.SignDescriptor', null, global); -goog.exportSymbol('proto.signrpc.SignMessageReq', null, global); -goog.exportSymbol('proto.signrpc.SignMessageResp', null, global); -goog.exportSymbol('proto.signrpc.SignReq', null, global); -goog.exportSymbol('proto.signrpc.SignResp', null, global); -goog.exportSymbol('proto.signrpc.TxOut', null, global); -goog.exportSymbol('proto.signrpc.VerifyMessageReq', null, global); -goog.exportSymbol('proto.signrpc.VerifyMessageResp', null, global); -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.signrpc.KeyLocator = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.signrpc.KeyLocator, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.signrpc.KeyLocator.displayName = 'proto.signrpc.KeyLocator'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.signrpc.KeyDescriptor = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.signrpc.KeyDescriptor, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.signrpc.KeyDescriptor.displayName = 'proto.signrpc.KeyDescriptor'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.signrpc.TxOut = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.signrpc.TxOut, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.signrpc.TxOut.displayName = 'proto.signrpc.TxOut'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.signrpc.SignDescriptor = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.signrpc.SignDescriptor, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.signrpc.SignDescriptor.displayName = 'proto.signrpc.SignDescriptor'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.signrpc.SignReq = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.signrpc.SignReq.repeatedFields_, null); -}; -goog.inherits(proto.signrpc.SignReq, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.signrpc.SignReq.displayName = 'proto.signrpc.SignReq'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.signrpc.SignResp = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.signrpc.SignResp.repeatedFields_, null); -}; -goog.inherits(proto.signrpc.SignResp, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.signrpc.SignResp.displayName = 'proto.signrpc.SignResp'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.signrpc.InputScript = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.signrpc.InputScript.repeatedFields_, null); -}; -goog.inherits(proto.signrpc.InputScript, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.signrpc.InputScript.displayName = 'proto.signrpc.InputScript'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.signrpc.InputScriptResp = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.signrpc.InputScriptResp.repeatedFields_, null); -}; -goog.inherits(proto.signrpc.InputScriptResp, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.signrpc.InputScriptResp.displayName = 'proto.signrpc.InputScriptResp'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.signrpc.SignMessageReq = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.signrpc.SignMessageReq, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.signrpc.SignMessageReq.displayName = 'proto.signrpc.SignMessageReq'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.signrpc.SignMessageResp = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.signrpc.SignMessageResp, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.signrpc.SignMessageResp.displayName = 'proto.signrpc.SignMessageResp'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.signrpc.VerifyMessageReq = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.signrpc.VerifyMessageReq, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.signrpc.VerifyMessageReq.displayName = 'proto.signrpc.VerifyMessageReq'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.signrpc.VerifyMessageResp = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.signrpc.VerifyMessageResp, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.signrpc.VerifyMessageResp.displayName = 'proto.signrpc.VerifyMessageResp'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.signrpc.SharedKeyRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.signrpc.SharedKeyRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.signrpc.SharedKeyRequest.displayName = 'proto.signrpc.SharedKeyRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.signrpc.SharedKeyResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.signrpc.SharedKeyResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.signrpc.SharedKeyResponse.displayName = 'proto.signrpc.SharedKeyResponse'; -} - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.signrpc.KeyLocator.prototype.toObject = function(opt_includeInstance) { - return proto.signrpc.KeyLocator.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.signrpc.KeyLocator} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.signrpc.KeyLocator.toObject = function(includeInstance, msg) { - var f, obj = { - keyFamily: jspb.Message.getFieldWithDefault(msg, 1, 0), - keyIndex: jspb.Message.getFieldWithDefault(msg, 2, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.signrpc.KeyLocator} - */ -proto.signrpc.KeyLocator.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.signrpc.KeyLocator; - return proto.signrpc.KeyLocator.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.signrpc.KeyLocator} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.signrpc.KeyLocator} - */ -proto.signrpc.KeyLocator.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readInt32()); - msg.setKeyFamily(value); - break; - case 2: - var value = /** @type {number} */ (reader.readInt32()); - msg.setKeyIndex(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.signrpc.KeyLocator.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.signrpc.KeyLocator.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.signrpc.KeyLocator} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.signrpc.KeyLocator.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getKeyFamily(); - if (f !== 0) { - writer.writeInt32( - 1, - f - ); - } - f = message.getKeyIndex(); - if (f !== 0) { - writer.writeInt32( - 2, - f - ); - } -}; - - -/** - * optional int32 key_family = 1; - * @return {number} - */ -proto.signrpc.KeyLocator.prototype.getKeyFamily = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.signrpc.KeyLocator} returns this - */ -proto.signrpc.KeyLocator.prototype.setKeyFamily = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); -}; - - -/** - * optional int32 key_index = 2; - * @return {number} - */ -proto.signrpc.KeyLocator.prototype.getKeyIndex = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.signrpc.KeyLocator} returns this - */ -proto.signrpc.KeyLocator.prototype.setKeyIndex = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.signrpc.KeyDescriptor.prototype.toObject = function(opt_includeInstance) { - return proto.signrpc.KeyDescriptor.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.signrpc.KeyDescriptor} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.signrpc.KeyDescriptor.toObject = function(includeInstance, msg) { - var f, obj = { - rawKeyBytes: msg.getRawKeyBytes_asB64(), - keyLoc: (f = msg.getKeyLoc()) && proto.signrpc.KeyLocator.toObject(includeInstance, f) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.signrpc.KeyDescriptor} - */ -proto.signrpc.KeyDescriptor.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.signrpc.KeyDescriptor; - return proto.signrpc.KeyDescriptor.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.signrpc.KeyDescriptor} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.signrpc.KeyDescriptor} - */ -proto.signrpc.KeyDescriptor.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setRawKeyBytes(value); - break; - case 2: - var value = new proto.signrpc.KeyLocator; - reader.readMessage(value,proto.signrpc.KeyLocator.deserializeBinaryFromReader); - msg.setKeyLoc(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.signrpc.KeyDescriptor.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.signrpc.KeyDescriptor.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.signrpc.KeyDescriptor} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.signrpc.KeyDescriptor.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getRawKeyBytes_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getKeyLoc(); - if (f != null) { - writer.writeMessage( - 2, - f, - proto.signrpc.KeyLocator.serializeBinaryToWriter - ); - } -}; - - -/** - * optional bytes raw_key_bytes = 1; - * @return {!(string|Uint8Array)} - */ -proto.signrpc.KeyDescriptor.prototype.getRawKeyBytes = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes raw_key_bytes = 1; - * This is a type-conversion wrapper around `getRawKeyBytes()` - * @return {string} - */ -proto.signrpc.KeyDescriptor.prototype.getRawKeyBytes_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getRawKeyBytes())); -}; - - -/** - * optional bytes raw_key_bytes = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getRawKeyBytes()` - * @return {!Uint8Array} - */ -proto.signrpc.KeyDescriptor.prototype.getRawKeyBytes_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getRawKeyBytes())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.signrpc.KeyDescriptor} returns this - */ -proto.signrpc.KeyDescriptor.prototype.setRawKeyBytes = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional KeyLocator key_loc = 2; - * @return {?proto.signrpc.KeyLocator} - */ -proto.signrpc.KeyDescriptor.prototype.getKeyLoc = function() { - return /** @type{?proto.signrpc.KeyLocator} */ ( - jspb.Message.getWrapperField(this, proto.signrpc.KeyLocator, 2)); -}; - - -/** - * @param {?proto.signrpc.KeyLocator|undefined} value - * @return {!proto.signrpc.KeyDescriptor} returns this -*/ -proto.signrpc.KeyDescriptor.prototype.setKeyLoc = function(value) { - return jspb.Message.setWrapperField(this, 2, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.signrpc.KeyDescriptor} returns this - */ -proto.signrpc.KeyDescriptor.prototype.clearKeyLoc = function() { - return this.setKeyLoc(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.signrpc.KeyDescriptor.prototype.hasKeyLoc = function() { - return jspb.Message.getField(this, 2) != null; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.signrpc.TxOut.prototype.toObject = function(opt_includeInstance) { - return proto.signrpc.TxOut.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.signrpc.TxOut} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.signrpc.TxOut.toObject = function(includeInstance, msg) { - var f, obj = { - value: jspb.Message.getFieldWithDefault(msg, 1, 0), - pkScript: msg.getPkScript_asB64() - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.signrpc.TxOut} - */ -proto.signrpc.TxOut.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.signrpc.TxOut; - return proto.signrpc.TxOut.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.signrpc.TxOut} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.signrpc.TxOut} - */ -proto.signrpc.TxOut.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readInt64()); - msg.setValue(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setPkScript(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.signrpc.TxOut.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.signrpc.TxOut.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.signrpc.TxOut} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.signrpc.TxOut.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getValue(); - if (f !== 0) { - writer.writeInt64( - 1, - f - ); - } - f = message.getPkScript_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } -}; - - -/** - * optional int64 value = 1; - * @return {number} - */ -proto.signrpc.TxOut.prototype.getValue = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.signrpc.TxOut} returns this - */ -proto.signrpc.TxOut.prototype.setValue = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); -}; - - -/** - * optional bytes pk_script = 2; - * @return {!(string|Uint8Array)} - */ -proto.signrpc.TxOut.prototype.getPkScript = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes pk_script = 2; - * This is a type-conversion wrapper around `getPkScript()` - * @return {string} - */ -proto.signrpc.TxOut.prototype.getPkScript_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getPkScript())); -}; - - -/** - * optional bytes pk_script = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getPkScript()` - * @return {!Uint8Array} - */ -proto.signrpc.TxOut.prototype.getPkScript_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getPkScript())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.signrpc.TxOut} returns this - */ -proto.signrpc.TxOut.prototype.setPkScript = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.signrpc.SignDescriptor.prototype.toObject = function(opt_includeInstance) { - return proto.signrpc.SignDescriptor.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.signrpc.SignDescriptor} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.signrpc.SignDescriptor.toObject = function(includeInstance, msg) { - var f, obj = { - keyDesc: (f = msg.getKeyDesc()) && proto.signrpc.KeyDescriptor.toObject(includeInstance, f), - singleTweak: msg.getSingleTweak_asB64(), - doubleTweak: msg.getDoubleTweak_asB64(), - witnessScript: msg.getWitnessScript_asB64(), - output: (f = msg.getOutput()) && proto.signrpc.TxOut.toObject(includeInstance, f), - sighash: jspb.Message.getFieldWithDefault(msg, 7, 0), - inputIndex: jspb.Message.getFieldWithDefault(msg, 8, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.signrpc.SignDescriptor} - */ -proto.signrpc.SignDescriptor.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.signrpc.SignDescriptor; - return proto.signrpc.SignDescriptor.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.signrpc.SignDescriptor} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.signrpc.SignDescriptor} - */ -proto.signrpc.SignDescriptor.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.signrpc.KeyDescriptor; - reader.readMessage(value,proto.signrpc.KeyDescriptor.deserializeBinaryFromReader); - msg.setKeyDesc(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setSingleTweak(value); - break; - case 3: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setDoubleTweak(value); - break; - case 4: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setWitnessScript(value); - break; - case 5: - var value = new proto.signrpc.TxOut; - reader.readMessage(value,proto.signrpc.TxOut.deserializeBinaryFromReader); - msg.setOutput(value); - break; - case 7: - var value = /** @type {number} */ (reader.readUint32()); - msg.setSighash(value); - break; - case 8: - var value = /** @type {number} */ (reader.readInt32()); - msg.setInputIndex(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.signrpc.SignDescriptor.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.signrpc.SignDescriptor.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.signrpc.SignDescriptor} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.signrpc.SignDescriptor.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getKeyDesc(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.signrpc.KeyDescriptor.serializeBinaryToWriter - ); - } - f = message.getSingleTweak_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } - f = message.getDoubleTweak_asU8(); - if (f.length > 0) { - writer.writeBytes( - 3, - f - ); - } - f = message.getWitnessScript_asU8(); - if (f.length > 0) { - writer.writeBytes( - 4, - f - ); - } - f = message.getOutput(); - if (f != null) { - writer.writeMessage( - 5, - f, - proto.signrpc.TxOut.serializeBinaryToWriter - ); - } - f = message.getSighash(); - if (f !== 0) { - writer.writeUint32( - 7, - f - ); - } - f = message.getInputIndex(); - if (f !== 0) { - writer.writeInt32( - 8, - f - ); - } -}; - - -/** - * optional KeyDescriptor key_desc = 1; - * @return {?proto.signrpc.KeyDescriptor} - */ -proto.signrpc.SignDescriptor.prototype.getKeyDesc = function() { - return /** @type{?proto.signrpc.KeyDescriptor} */ ( - jspb.Message.getWrapperField(this, proto.signrpc.KeyDescriptor, 1)); -}; - - -/** - * @param {?proto.signrpc.KeyDescriptor|undefined} value - * @return {!proto.signrpc.SignDescriptor} returns this -*/ -proto.signrpc.SignDescriptor.prototype.setKeyDesc = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.signrpc.SignDescriptor} returns this - */ -proto.signrpc.SignDescriptor.prototype.clearKeyDesc = function() { - return this.setKeyDesc(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.signrpc.SignDescriptor.prototype.hasKeyDesc = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional bytes single_tweak = 2; - * @return {!(string|Uint8Array)} - */ -proto.signrpc.SignDescriptor.prototype.getSingleTweak = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes single_tweak = 2; - * This is a type-conversion wrapper around `getSingleTweak()` - * @return {string} - */ -proto.signrpc.SignDescriptor.prototype.getSingleTweak_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getSingleTweak())); -}; - - -/** - * optional bytes single_tweak = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getSingleTweak()` - * @return {!Uint8Array} - */ -proto.signrpc.SignDescriptor.prototype.getSingleTweak_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getSingleTweak())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.signrpc.SignDescriptor} returns this - */ -proto.signrpc.SignDescriptor.prototype.setSingleTweak = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); -}; - - -/** - * optional bytes double_tweak = 3; - * @return {!(string|Uint8Array)} - */ -proto.signrpc.SignDescriptor.prototype.getDoubleTweak = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * optional bytes double_tweak = 3; - * This is a type-conversion wrapper around `getDoubleTweak()` - * @return {string} - */ -proto.signrpc.SignDescriptor.prototype.getDoubleTweak_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getDoubleTweak())); -}; - - -/** - * optional bytes double_tweak = 3; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getDoubleTweak()` - * @return {!Uint8Array} - */ -proto.signrpc.SignDescriptor.prototype.getDoubleTweak_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getDoubleTweak())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.signrpc.SignDescriptor} returns this - */ -proto.signrpc.SignDescriptor.prototype.setDoubleTweak = function(value) { - return jspb.Message.setProto3BytesField(this, 3, value); -}; - - -/** - * optional bytes witness_script = 4; - * @return {!(string|Uint8Array)} - */ -proto.signrpc.SignDescriptor.prototype.getWitnessScript = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 4, "")); -}; - - -/** - * optional bytes witness_script = 4; - * This is a type-conversion wrapper around `getWitnessScript()` - * @return {string} - */ -proto.signrpc.SignDescriptor.prototype.getWitnessScript_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getWitnessScript())); -}; - - -/** - * optional bytes witness_script = 4; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getWitnessScript()` - * @return {!Uint8Array} - */ -proto.signrpc.SignDescriptor.prototype.getWitnessScript_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getWitnessScript())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.signrpc.SignDescriptor} returns this - */ -proto.signrpc.SignDescriptor.prototype.setWitnessScript = function(value) { - return jspb.Message.setProto3BytesField(this, 4, value); -}; - - -/** - * optional TxOut output = 5; - * @return {?proto.signrpc.TxOut} - */ -proto.signrpc.SignDescriptor.prototype.getOutput = function() { - return /** @type{?proto.signrpc.TxOut} */ ( - jspb.Message.getWrapperField(this, proto.signrpc.TxOut, 5)); -}; - - -/** - * @param {?proto.signrpc.TxOut|undefined} value - * @return {!proto.signrpc.SignDescriptor} returns this -*/ -proto.signrpc.SignDescriptor.prototype.setOutput = function(value) { - return jspb.Message.setWrapperField(this, 5, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.signrpc.SignDescriptor} returns this - */ -proto.signrpc.SignDescriptor.prototype.clearOutput = function() { - return this.setOutput(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.signrpc.SignDescriptor.prototype.hasOutput = function() { - return jspb.Message.getField(this, 5) != null; -}; - - -/** - * optional uint32 sighash = 7; - * @return {number} - */ -proto.signrpc.SignDescriptor.prototype.getSighash = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.signrpc.SignDescriptor} returns this - */ -proto.signrpc.SignDescriptor.prototype.setSighash = function(value) { - return jspb.Message.setProto3IntField(this, 7, value); -}; - - -/** - * optional int32 input_index = 8; - * @return {number} - */ -proto.signrpc.SignDescriptor.prototype.getInputIndex = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.signrpc.SignDescriptor} returns this - */ -proto.signrpc.SignDescriptor.prototype.setInputIndex = function(value) { - return jspb.Message.setProto3IntField(this, 8, value); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.signrpc.SignReq.repeatedFields_ = [2]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.signrpc.SignReq.prototype.toObject = function(opt_includeInstance) { - return proto.signrpc.SignReq.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.signrpc.SignReq} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.signrpc.SignReq.toObject = function(includeInstance, msg) { - var f, obj = { - rawTxBytes: msg.getRawTxBytes_asB64(), - signDescsList: jspb.Message.toObjectList(msg.getSignDescsList(), - proto.signrpc.SignDescriptor.toObject, includeInstance) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.signrpc.SignReq} - */ -proto.signrpc.SignReq.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.signrpc.SignReq; - return proto.signrpc.SignReq.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.signrpc.SignReq} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.signrpc.SignReq} - */ -proto.signrpc.SignReq.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setRawTxBytes(value); - break; - case 2: - var value = new proto.signrpc.SignDescriptor; - reader.readMessage(value,proto.signrpc.SignDescriptor.deserializeBinaryFromReader); - msg.addSignDescs(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.signrpc.SignReq.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.signrpc.SignReq.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.signrpc.SignReq} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.signrpc.SignReq.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getRawTxBytes_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getSignDescsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 2, - f, - proto.signrpc.SignDescriptor.serializeBinaryToWriter - ); - } -}; - - -/** - * optional bytes raw_tx_bytes = 1; - * @return {!(string|Uint8Array)} - */ -proto.signrpc.SignReq.prototype.getRawTxBytes = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes raw_tx_bytes = 1; - * This is a type-conversion wrapper around `getRawTxBytes()` - * @return {string} - */ -proto.signrpc.SignReq.prototype.getRawTxBytes_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getRawTxBytes())); -}; - - -/** - * optional bytes raw_tx_bytes = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getRawTxBytes()` - * @return {!Uint8Array} - */ -proto.signrpc.SignReq.prototype.getRawTxBytes_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getRawTxBytes())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.signrpc.SignReq} returns this - */ -proto.signrpc.SignReq.prototype.setRawTxBytes = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * repeated SignDescriptor sign_descs = 2; - * @return {!Array} - */ -proto.signrpc.SignReq.prototype.getSignDescsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.signrpc.SignDescriptor, 2)); -}; - - -/** - * @param {!Array} value - * @return {!proto.signrpc.SignReq} returns this -*/ -proto.signrpc.SignReq.prototype.setSignDescsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 2, value); -}; - - -/** - * @param {!proto.signrpc.SignDescriptor=} opt_value - * @param {number=} opt_index - * @return {!proto.signrpc.SignDescriptor} - */ -proto.signrpc.SignReq.prototype.addSignDescs = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.signrpc.SignDescriptor, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.signrpc.SignReq} returns this - */ -proto.signrpc.SignReq.prototype.clearSignDescsList = function() { - return this.setSignDescsList([]); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.signrpc.SignResp.repeatedFields_ = [1]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.signrpc.SignResp.prototype.toObject = function(opt_includeInstance) { - return proto.signrpc.SignResp.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.signrpc.SignResp} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.signrpc.SignResp.toObject = function(includeInstance, msg) { - var f, obj = { - rawSigsList: msg.getRawSigsList_asB64() - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.signrpc.SignResp} - */ -proto.signrpc.SignResp.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.signrpc.SignResp; - return proto.signrpc.SignResp.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.signrpc.SignResp} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.signrpc.SignResp} - */ -proto.signrpc.SignResp.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.addRawSigs(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.signrpc.SignResp.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.signrpc.SignResp.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.signrpc.SignResp} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.signrpc.SignResp.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getRawSigsList_asU8(); - if (f.length > 0) { - writer.writeRepeatedBytes( - 1, - f - ); - } -}; - - -/** - * repeated bytes raw_sigs = 1; - * @return {!(Array|Array)} - */ -proto.signrpc.SignResp.prototype.getRawSigsList = function() { - return /** @type {!(Array|Array)} */ (jspb.Message.getRepeatedField(this, 1)); -}; - - -/** - * repeated bytes raw_sigs = 1; - * This is a type-conversion wrapper around `getRawSigsList()` - * @return {!Array} - */ -proto.signrpc.SignResp.prototype.getRawSigsList_asB64 = function() { - return /** @type {!Array} */ (jspb.Message.bytesListAsB64( - this.getRawSigsList())); -}; - - -/** - * repeated bytes raw_sigs = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getRawSigsList()` - * @return {!Array} - */ -proto.signrpc.SignResp.prototype.getRawSigsList_asU8 = function() { - return /** @type {!Array} */ (jspb.Message.bytesListAsU8( - this.getRawSigsList())); -}; - - -/** - * @param {!(Array|Array)} value - * @return {!proto.signrpc.SignResp} returns this - */ -proto.signrpc.SignResp.prototype.setRawSigsList = function(value) { - return jspb.Message.setField(this, 1, value || []); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @param {number=} opt_index - * @return {!proto.signrpc.SignResp} returns this - */ -proto.signrpc.SignResp.prototype.addRawSigs = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 1, value, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.signrpc.SignResp} returns this - */ -proto.signrpc.SignResp.prototype.clearRawSigsList = function() { - return this.setRawSigsList([]); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.signrpc.InputScript.repeatedFields_ = [1]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.signrpc.InputScript.prototype.toObject = function(opt_includeInstance) { - return proto.signrpc.InputScript.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.signrpc.InputScript} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.signrpc.InputScript.toObject = function(includeInstance, msg) { - var f, obj = { - witnessList: msg.getWitnessList_asB64(), - sigScript: msg.getSigScript_asB64() - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.signrpc.InputScript} - */ -proto.signrpc.InputScript.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.signrpc.InputScript; - return proto.signrpc.InputScript.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.signrpc.InputScript} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.signrpc.InputScript} - */ -proto.signrpc.InputScript.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.addWitness(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setSigScript(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.signrpc.InputScript.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.signrpc.InputScript.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.signrpc.InputScript} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.signrpc.InputScript.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getWitnessList_asU8(); - if (f.length > 0) { - writer.writeRepeatedBytes( - 1, - f - ); - } - f = message.getSigScript_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } -}; - - -/** - * repeated bytes witness = 1; - * @return {!(Array|Array)} - */ -proto.signrpc.InputScript.prototype.getWitnessList = function() { - return /** @type {!(Array|Array)} */ (jspb.Message.getRepeatedField(this, 1)); -}; - - -/** - * repeated bytes witness = 1; - * This is a type-conversion wrapper around `getWitnessList()` - * @return {!Array} - */ -proto.signrpc.InputScript.prototype.getWitnessList_asB64 = function() { - return /** @type {!Array} */ (jspb.Message.bytesListAsB64( - this.getWitnessList())); -}; - - -/** - * repeated bytes witness = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getWitnessList()` - * @return {!Array} - */ -proto.signrpc.InputScript.prototype.getWitnessList_asU8 = function() { - return /** @type {!Array} */ (jspb.Message.bytesListAsU8( - this.getWitnessList())); -}; - - -/** - * @param {!(Array|Array)} value - * @return {!proto.signrpc.InputScript} returns this - */ -proto.signrpc.InputScript.prototype.setWitnessList = function(value) { - return jspb.Message.setField(this, 1, value || []); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @param {number=} opt_index - * @return {!proto.signrpc.InputScript} returns this - */ -proto.signrpc.InputScript.prototype.addWitness = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 1, value, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.signrpc.InputScript} returns this - */ -proto.signrpc.InputScript.prototype.clearWitnessList = function() { - return this.setWitnessList([]); -}; - - -/** - * optional bytes sig_script = 2; - * @return {!(string|Uint8Array)} - */ -proto.signrpc.InputScript.prototype.getSigScript = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes sig_script = 2; - * This is a type-conversion wrapper around `getSigScript()` - * @return {string} - */ -proto.signrpc.InputScript.prototype.getSigScript_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getSigScript())); -}; - - -/** - * optional bytes sig_script = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getSigScript()` - * @return {!Uint8Array} - */ -proto.signrpc.InputScript.prototype.getSigScript_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getSigScript())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.signrpc.InputScript} returns this - */ -proto.signrpc.InputScript.prototype.setSigScript = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.signrpc.InputScriptResp.repeatedFields_ = [1]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.signrpc.InputScriptResp.prototype.toObject = function(opt_includeInstance) { - return proto.signrpc.InputScriptResp.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.signrpc.InputScriptResp} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.signrpc.InputScriptResp.toObject = function(includeInstance, msg) { - var f, obj = { - inputScriptsList: jspb.Message.toObjectList(msg.getInputScriptsList(), - proto.signrpc.InputScript.toObject, includeInstance) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.signrpc.InputScriptResp} - */ -proto.signrpc.InputScriptResp.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.signrpc.InputScriptResp; - return proto.signrpc.InputScriptResp.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.signrpc.InputScriptResp} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.signrpc.InputScriptResp} - */ -proto.signrpc.InputScriptResp.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.signrpc.InputScript; - reader.readMessage(value,proto.signrpc.InputScript.deserializeBinaryFromReader); - msg.addInputScripts(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.signrpc.InputScriptResp.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.signrpc.InputScriptResp.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.signrpc.InputScriptResp} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.signrpc.InputScriptResp.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getInputScriptsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 1, - f, - proto.signrpc.InputScript.serializeBinaryToWriter - ); - } -}; - - -/** - * repeated InputScript input_scripts = 1; - * @return {!Array} - */ -proto.signrpc.InputScriptResp.prototype.getInputScriptsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.signrpc.InputScript, 1)); -}; - - -/** - * @param {!Array} value - * @return {!proto.signrpc.InputScriptResp} returns this -*/ -proto.signrpc.InputScriptResp.prototype.setInputScriptsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); -}; - - -/** - * @param {!proto.signrpc.InputScript=} opt_value - * @param {number=} opt_index - * @return {!proto.signrpc.InputScript} - */ -proto.signrpc.InputScriptResp.prototype.addInputScripts = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.signrpc.InputScript, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.signrpc.InputScriptResp} returns this - */ -proto.signrpc.InputScriptResp.prototype.clearInputScriptsList = function() { - return this.setInputScriptsList([]); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.signrpc.SignMessageReq.prototype.toObject = function(opt_includeInstance) { - return proto.signrpc.SignMessageReq.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.signrpc.SignMessageReq} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.signrpc.SignMessageReq.toObject = function(includeInstance, msg) { - var f, obj = { - msg: msg.getMsg_asB64(), - keyLoc: (f = msg.getKeyLoc()) && proto.signrpc.KeyLocator.toObject(includeInstance, f), - doubleHash: jspb.Message.getBooleanFieldWithDefault(msg, 3, false), - compactSig: jspb.Message.getBooleanFieldWithDefault(msg, 4, false) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.signrpc.SignMessageReq} - */ -proto.signrpc.SignMessageReq.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.signrpc.SignMessageReq; - return proto.signrpc.SignMessageReq.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.signrpc.SignMessageReq} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.signrpc.SignMessageReq} - */ -proto.signrpc.SignMessageReq.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setMsg(value); - break; - case 2: - var value = new proto.signrpc.KeyLocator; - reader.readMessage(value,proto.signrpc.KeyLocator.deserializeBinaryFromReader); - msg.setKeyLoc(value); - break; - case 3: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setDoubleHash(value); - break; - case 4: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setCompactSig(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.signrpc.SignMessageReq.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.signrpc.SignMessageReq.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.signrpc.SignMessageReq} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.signrpc.SignMessageReq.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getMsg_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getKeyLoc(); - if (f != null) { - writer.writeMessage( - 2, - f, - proto.signrpc.KeyLocator.serializeBinaryToWriter - ); - } - f = message.getDoubleHash(); - if (f) { - writer.writeBool( - 3, - f - ); - } - f = message.getCompactSig(); - if (f) { - writer.writeBool( - 4, - f - ); - } -}; - - -/** - * optional bytes msg = 1; - * @return {!(string|Uint8Array)} - */ -proto.signrpc.SignMessageReq.prototype.getMsg = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes msg = 1; - * This is a type-conversion wrapper around `getMsg()` - * @return {string} - */ -proto.signrpc.SignMessageReq.prototype.getMsg_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getMsg())); -}; - - -/** - * optional bytes msg = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getMsg()` - * @return {!Uint8Array} - */ -proto.signrpc.SignMessageReq.prototype.getMsg_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getMsg())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.signrpc.SignMessageReq} returns this - */ -proto.signrpc.SignMessageReq.prototype.setMsg = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional KeyLocator key_loc = 2; - * @return {?proto.signrpc.KeyLocator} - */ -proto.signrpc.SignMessageReq.prototype.getKeyLoc = function() { - return /** @type{?proto.signrpc.KeyLocator} */ ( - jspb.Message.getWrapperField(this, proto.signrpc.KeyLocator, 2)); -}; - - -/** - * @param {?proto.signrpc.KeyLocator|undefined} value - * @return {!proto.signrpc.SignMessageReq} returns this -*/ -proto.signrpc.SignMessageReq.prototype.setKeyLoc = function(value) { - return jspb.Message.setWrapperField(this, 2, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.signrpc.SignMessageReq} returns this - */ -proto.signrpc.SignMessageReq.prototype.clearKeyLoc = function() { - return this.setKeyLoc(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.signrpc.SignMessageReq.prototype.hasKeyLoc = function() { - return jspb.Message.getField(this, 2) != null; -}; - - -/** - * optional bool double_hash = 3; - * @return {boolean} - */ -proto.signrpc.SignMessageReq.prototype.getDoubleHash = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.signrpc.SignMessageReq} returns this - */ -proto.signrpc.SignMessageReq.prototype.setDoubleHash = function(value) { - return jspb.Message.setProto3BooleanField(this, 3, value); -}; - - -/** - * optional bool compact_sig = 4; - * @return {boolean} - */ -proto.signrpc.SignMessageReq.prototype.getCompactSig = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 4, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.signrpc.SignMessageReq} returns this - */ -proto.signrpc.SignMessageReq.prototype.setCompactSig = function(value) { - return jspb.Message.setProto3BooleanField(this, 4, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.signrpc.SignMessageResp.prototype.toObject = function(opt_includeInstance) { - return proto.signrpc.SignMessageResp.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.signrpc.SignMessageResp} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.signrpc.SignMessageResp.toObject = function(includeInstance, msg) { - var f, obj = { - signature: msg.getSignature_asB64() - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.signrpc.SignMessageResp} - */ -proto.signrpc.SignMessageResp.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.signrpc.SignMessageResp; - return proto.signrpc.SignMessageResp.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.signrpc.SignMessageResp} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.signrpc.SignMessageResp} - */ -proto.signrpc.SignMessageResp.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setSignature(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.signrpc.SignMessageResp.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.signrpc.SignMessageResp.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.signrpc.SignMessageResp} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.signrpc.SignMessageResp.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getSignature_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } -}; - - -/** - * optional bytes signature = 1; - * @return {!(string|Uint8Array)} - */ -proto.signrpc.SignMessageResp.prototype.getSignature = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes signature = 1; - * This is a type-conversion wrapper around `getSignature()` - * @return {string} - */ -proto.signrpc.SignMessageResp.prototype.getSignature_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getSignature())); -}; - - -/** - * optional bytes signature = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getSignature()` - * @return {!Uint8Array} - */ -proto.signrpc.SignMessageResp.prototype.getSignature_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getSignature())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.signrpc.SignMessageResp} returns this - */ -proto.signrpc.SignMessageResp.prototype.setSignature = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.signrpc.VerifyMessageReq.prototype.toObject = function(opt_includeInstance) { - return proto.signrpc.VerifyMessageReq.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.signrpc.VerifyMessageReq} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.signrpc.VerifyMessageReq.toObject = function(includeInstance, msg) { - var f, obj = { - msg: msg.getMsg_asB64(), - signature: msg.getSignature_asB64(), - pubkey: msg.getPubkey_asB64() - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.signrpc.VerifyMessageReq} - */ -proto.signrpc.VerifyMessageReq.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.signrpc.VerifyMessageReq; - return proto.signrpc.VerifyMessageReq.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.signrpc.VerifyMessageReq} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.signrpc.VerifyMessageReq} - */ -proto.signrpc.VerifyMessageReq.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setMsg(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setSignature(value); - break; - case 3: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setPubkey(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.signrpc.VerifyMessageReq.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.signrpc.VerifyMessageReq.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.signrpc.VerifyMessageReq} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.signrpc.VerifyMessageReq.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getMsg_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getSignature_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } - f = message.getPubkey_asU8(); - if (f.length > 0) { - writer.writeBytes( - 3, - f - ); - } -}; - - -/** - * optional bytes msg = 1; - * @return {!(string|Uint8Array)} - */ -proto.signrpc.VerifyMessageReq.prototype.getMsg = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes msg = 1; - * This is a type-conversion wrapper around `getMsg()` - * @return {string} - */ -proto.signrpc.VerifyMessageReq.prototype.getMsg_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getMsg())); -}; - - -/** - * optional bytes msg = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getMsg()` - * @return {!Uint8Array} - */ -proto.signrpc.VerifyMessageReq.prototype.getMsg_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getMsg())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.signrpc.VerifyMessageReq} returns this - */ -proto.signrpc.VerifyMessageReq.prototype.setMsg = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional bytes signature = 2; - * @return {!(string|Uint8Array)} - */ -proto.signrpc.VerifyMessageReq.prototype.getSignature = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes signature = 2; - * This is a type-conversion wrapper around `getSignature()` - * @return {string} - */ -proto.signrpc.VerifyMessageReq.prototype.getSignature_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getSignature())); -}; - - -/** - * optional bytes signature = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getSignature()` - * @return {!Uint8Array} - */ -proto.signrpc.VerifyMessageReq.prototype.getSignature_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getSignature())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.signrpc.VerifyMessageReq} returns this - */ -proto.signrpc.VerifyMessageReq.prototype.setSignature = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); -}; - - -/** - * optional bytes pubkey = 3; - * @return {!(string|Uint8Array)} - */ -proto.signrpc.VerifyMessageReq.prototype.getPubkey = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * optional bytes pubkey = 3; - * This is a type-conversion wrapper around `getPubkey()` - * @return {string} - */ -proto.signrpc.VerifyMessageReq.prototype.getPubkey_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getPubkey())); -}; - - -/** - * optional bytes pubkey = 3; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getPubkey()` - * @return {!Uint8Array} - */ -proto.signrpc.VerifyMessageReq.prototype.getPubkey_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getPubkey())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.signrpc.VerifyMessageReq} returns this - */ -proto.signrpc.VerifyMessageReq.prototype.setPubkey = function(value) { - return jspb.Message.setProto3BytesField(this, 3, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.signrpc.VerifyMessageResp.prototype.toObject = function(opt_includeInstance) { - return proto.signrpc.VerifyMessageResp.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.signrpc.VerifyMessageResp} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.signrpc.VerifyMessageResp.toObject = function(includeInstance, msg) { - var f, obj = { - valid: jspb.Message.getBooleanFieldWithDefault(msg, 1, false) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.signrpc.VerifyMessageResp} - */ -proto.signrpc.VerifyMessageResp.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.signrpc.VerifyMessageResp; - return proto.signrpc.VerifyMessageResp.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.signrpc.VerifyMessageResp} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.signrpc.VerifyMessageResp} - */ -proto.signrpc.VerifyMessageResp.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setValid(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.signrpc.VerifyMessageResp.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.signrpc.VerifyMessageResp.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.signrpc.VerifyMessageResp} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.signrpc.VerifyMessageResp.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getValid(); - if (f) { - writer.writeBool( - 1, - f - ); - } -}; - - -/** - * optional bool valid = 1; - * @return {boolean} - */ -proto.signrpc.VerifyMessageResp.prototype.getValid = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.signrpc.VerifyMessageResp} returns this - */ -proto.signrpc.VerifyMessageResp.prototype.setValid = function(value) { - return jspb.Message.setProto3BooleanField(this, 1, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.signrpc.SharedKeyRequest.prototype.toObject = function(opt_includeInstance) { - return proto.signrpc.SharedKeyRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.signrpc.SharedKeyRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.signrpc.SharedKeyRequest.toObject = function(includeInstance, msg) { - var f, obj = { - ephemeralPubkey: msg.getEphemeralPubkey_asB64(), - keyLoc: (f = msg.getKeyLoc()) && proto.signrpc.KeyLocator.toObject(includeInstance, f), - keyDesc: (f = msg.getKeyDesc()) && proto.signrpc.KeyDescriptor.toObject(includeInstance, f) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.signrpc.SharedKeyRequest} - */ -proto.signrpc.SharedKeyRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.signrpc.SharedKeyRequest; - return proto.signrpc.SharedKeyRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.signrpc.SharedKeyRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.signrpc.SharedKeyRequest} - */ -proto.signrpc.SharedKeyRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setEphemeralPubkey(value); - break; - case 2: - var value = new proto.signrpc.KeyLocator; - reader.readMessage(value,proto.signrpc.KeyLocator.deserializeBinaryFromReader); - msg.setKeyLoc(value); - break; - case 3: - var value = new proto.signrpc.KeyDescriptor; - reader.readMessage(value,proto.signrpc.KeyDescriptor.deserializeBinaryFromReader); - msg.setKeyDesc(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.signrpc.SharedKeyRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.signrpc.SharedKeyRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.signrpc.SharedKeyRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.signrpc.SharedKeyRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getEphemeralPubkey_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getKeyLoc(); - if (f != null) { - writer.writeMessage( - 2, - f, - proto.signrpc.KeyLocator.serializeBinaryToWriter - ); - } - f = message.getKeyDesc(); - if (f != null) { - writer.writeMessage( - 3, - f, - proto.signrpc.KeyDescriptor.serializeBinaryToWriter - ); - } -}; - - -/** - * optional bytes ephemeral_pubkey = 1; - * @return {!(string|Uint8Array)} - */ -proto.signrpc.SharedKeyRequest.prototype.getEphemeralPubkey = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes ephemeral_pubkey = 1; - * This is a type-conversion wrapper around `getEphemeralPubkey()` - * @return {string} - */ -proto.signrpc.SharedKeyRequest.prototype.getEphemeralPubkey_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getEphemeralPubkey())); -}; - - -/** - * optional bytes ephemeral_pubkey = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getEphemeralPubkey()` - * @return {!Uint8Array} - */ -proto.signrpc.SharedKeyRequest.prototype.getEphemeralPubkey_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getEphemeralPubkey())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.signrpc.SharedKeyRequest} returns this - */ -proto.signrpc.SharedKeyRequest.prototype.setEphemeralPubkey = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional KeyLocator key_loc = 2; - * @return {?proto.signrpc.KeyLocator} - */ -proto.signrpc.SharedKeyRequest.prototype.getKeyLoc = function() { - return /** @type{?proto.signrpc.KeyLocator} */ ( - jspb.Message.getWrapperField(this, proto.signrpc.KeyLocator, 2)); -}; - - -/** - * @param {?proto.signrpc.KeyLocator|undefined} value - * @return {!proto.signrpc.SharedKeyRequest} returns this -*/ -proto.signrpc.SharedKeyRequest.prototype.setKeyLoc = function(value) { - return jspb.Message.setWrapperField(this, 2, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.signrpc.SharedKeyRequest} returns this - */ -proto.signrpc.SharedKeyRequest.prototype.clearKeyLoc = function() { - return this.setKeyLoc(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.signrpc.SharedKeyRequest.prototype.hasKeyLoc = function() { - return jspb.Message.getField(this, 2) != null; -}; - - -/** - * optional KeyDescriptor key_desc = 3; - * @return {?proto.signrpc.KeyDescriptor} - */ -proto.signrpc.SharedKeyRequest.prototype.getKeyDesc = function() { - return /** @type{?proto.signrpc.KeyDescriptor} */ ( - jspb.Message.getWrapperField(this, proto.signrpc.KeyDescriptor, 3)); -}; - - -/** - * @param {?proto.signrpc.KeyDescriptor|undefined} value - * @return {!proto.signrpc.SharedKeyRequest} returns this -*/ -proto.signrpc.SharedKeyRequest.prototype.setKeyDesc = function(value) { - return jspb.Message.setWrapperField(this, 3, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.signrpc.SharedKeyRequest} returns this - */ -proto.signrpc.SharedKeyRequest.prototype.clearKeyDesc = function() { - return this.setKeyDesc(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.signrpc.SharedKeyRequest.prototype.hasKeyDesc = function() { - return jspb.Message.getField(this, 3) != null; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.signrpc.SharedKeyResponse.prototype.toObject = function(opt_includeInstance) { - return proto.signrpc.SharedKeyResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.signrpc.SharedKeyResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.signrpc.SharedKeyResponse.toObject = function(includeInstance, msg) { - var f, obj = { - sharedKey: msg.getSharedKey_asB64() - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.signrpc.SharedKeyResponse} - */ -proto.signrpc.SharedKeyResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.signrpc.SharedKeyResponse; - return proto.signrpc.SharedKeyResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.signrpc.SharedKeyResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.signrpc.SharedKeyResponse} - */ -proto.signrpc.SharedKeyResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setSharedKey(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.signrpc.SharedKeyResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.signrpc.SharedKeyResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.signrpc.SharedKeyResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.signrpc.SharedKeyResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getSharedKey_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } -}; - - -/** - * optional bytes shared_key = 1; - * @return {!(string|Uint8Array)} - */ -proto.signrpc.SharedKeyResponse.prototype.getSharedKey = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes shared_key = 1; - * This is a type-conversion wrapper around `getSharedKey()` - * @return {string} - */ -proto.signrpc.SharedKeyResponse.prototype.getSharedKey_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getSharedKey())); -}; - - -/** - * optional bytes shared_key = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getSharedKey()` - * @return {!Uint8Array} - */ -proto.signrpc.SharedKeyResponse.prototype.getSharedKey_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getSharedKey())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.signrpc.SharedKeyResponse} returns this - */ -proto.signrpc.SharedKeyResponse.prototype.setSharedKey = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -goog.object.extend(exports, proto.signrpc); diff --git a/lib/types/generated/signrpc/signer_pb_service.d.ts b/lib/types/generated/signrpc/signer_pb_service.d.ts deleted file mode 100644 index e6df3ed..0000000 --- a/lib/types/generated/signrpc/signer_pb_service.d.ts +++ /dev/null @@ -1,139 +0,0 @@ -// package: signrpc -// file: signrpc/signer.proto - -import * as signrpc_signer_pb from "../signrpc/signer_pb"; -import {grpc} from "@improbable-eng/grpc-web"; - -type SignerSignOutputRaw = { - readonly methodName: string; - readonly service: typeof Signer; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof signrpc_signer_pb.SignReq; - readonly responseType: typeof signrpc_signer_pb.SignResp; -}; - -type SignerComputeInputScript = { - readonly methodName: string; - readonly service: typeof Signer; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof signrpc_signer_pb.SignReq; - readonly responseType: typeof signrpc_signer_pb.InputScriptResp; -}; - -type SignerSignMessage = { - readonly methodName: string; - readonly service: typeof Signer; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof signrpc_signer_pb.SignMessageReq; - readonly responseType: typeof signrpc_signer_pb.SignMessageResp; -}; - -type SignerVerifyMessage = { - readonly methodName: string; - readonly service: typeof Signer; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof signrpc_signer_pb.VerifyMessageReq; - readonly responseType: typeof signrpc_signer_pb.VerifyMessageResp; -}; - -type SignerDeriveSharedKey = { - readonly methodName: string; - readonly service: typeof Signer; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof signrpc_signer_pb.SharedKeyRequest; - readonly responseType: typeof signrpc_signer_pb.SharedKeyResponse; -}; - -export class Signer { - static readonly serviceName: string; - static readonly SignOutputRaw: SignerSignOutputRaw; - static readonly ComputeInputScript: SignerComputeInputScript; - static readonly SignMessage: SignerSignMessage; - static readonly VerifyMessage: SignerVerifyMessage; - static readonly DeriveSharedKey: SignerDeriveSharedKey; -} - -export type ServiceError = { message: string, code: number; metadata: grpc.Metadata } -export type Status = { details: string, code: number; metadata: grpc.Metadata } - -interface UnaryResponse { - cancel(): void; -} -interface ResponseStream { - cancel(): void; - on(type: 'data', handler: (message: T) => void): ResponseStream; - on(type: 'end', handler: (status?: Status) => void): ResponseStream; - on(type: 'status', handler: (status: Status) => void): ResponseStream; -} -interface RequestStream { - write(message: T): RequestStream; - end(): void; - cancel(): void; - on(type: 'end', handler: (status?: Status) => void): RequestStream; - on(type: 'status', handler: (status: Status) => void): RequestStream; -} -interface BidirectionalStream { - write(message: ReqT): BidirectionalStream; - end(): void; - cancel(): void; - on(type: 'data', handler: (message: ResT) => void): BidirectionalStream; - on(type: 'end', handler: (status?: Status) => void): BidirectionalStream; - on(type: 'status', handler: (status: Status) => void): BidirectionalStream; -} - -export class SignerClient { - readonly serviceHost: string; - - constructor(serviceHost: string, options?: grpc.RpcOptions); - signOutputRaw( - requestMessage: signrpc_signer_pb.SignReq, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: signrpc_signer_pb.SignResp|null) => void - ): UnaryResponse; - signOutputRaw( - requestMessage: signrpc_signer_pb.SignReq, - callback: (error: ServiceError|null, responseMessage: signrpc_signer_pb.SignResp|null) => void - ): UnaryResponse; - computeInputScript( - requestMessage: signrpc_signer_pb.SignReq, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: signrpc_signer_pb.InputScriptResp|null) => void - ): UnaryResponse; - computeInputScript( - requestMessage: signrpc_signer_pb.SignReq, - callback: (error: ServiceError|null, responseMessage: signrpc_signer_pb.InputScriptResp|null) => void - ): UnaryResponse; - signMessage( - requestMessage: signrpc_signer_pb.SignMessageReq, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: signrpc_signer_pb.SignMessageResp|null) => void - ): UnaryResponse; - signMessage( - requestMessage: signrpc_signer_pb.SignMessageReq, - callback: (error: ServiceError|null, responseMessage: signrpc_signer_pb.SignMessageResp|null) => void - ): UnaryResponse; - verifyMessage( - requestMessage: signrpc_signer_pb.VerifyMessageReq, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: signrpc_signer_pb.VerifyMessageResp|null) => void - ): UnaryResponse; - verifyMessage( - requestMessage: signrpc_signer_pb.VerifyMessageReq, - callback: (error: ServiceError|null, responseMessage: signrpc_signer_pb.VerifyMessageResp|null) => void - ): UnaryResponse; - deriveSharedKey( - requestMessage: signrpc_signer_pb.SharedKeyRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: signrpc_signer_pb.SharedKeyResponse|null) => void - ): UnaryResponse; - deriveSharedKey( - requestMessage: signrpc_signer_pb.SharedKeyRequest, - callback: (error: ServiceError|null, responseMessage: signrpc_signer_pb.SharedKeyResponse|null) => void - ): UnaryResponse; -} - diff --git a/lib/types/generated/signrpc/signer_pb_service.js b/lib/types/generated/signrpc/signer_pb_service.js deleted file mode 100644 index 8547c24..0000000 --- a/lib/types/generated/signrpc/signer_pb_service.js +++ /dev/null @@ -1,221 +0,0 @@ -// package: signrpc -// file: signrpc/signer.proto - -var signrpc_signer_pb = require("../signrpc/signer_pb"); -var grpc = require("@improbable-eng/grpc-web").grpc; - -var Signer = (function () { - function Signer() {} - Signer.serviceName = "signrpc.Signer"; - return Signer; -}()); - -Signer.SignOutputRaw = { - methodName: "SignOutputRaw", - service: Signer, - requestStream: false, - responseStream: false, - requestType: signrpc_signer_pb.SignReq, - responseType: signrpc_signer_pb.SignResp -}; - -Signer.ComputeInputScript = { - methodName: "ComputeInputScript", - service: Signer, - requestStream: false, - responseStream: false, - requestType: signrpc_signer_pb.SignReq, - responseType: signrpc_signer_pb.InputScriptResp -}; - -Signer.SignMessage = { - methodName: "SignMessage", - service: Signer, - requestStream: false, - responseStream: false, - requestType: signrpc_signer_pb.SignMessageReq, - responseType: signrpc_signer_pb.SignMessageResp -}; - -Signer.VerifyMessage = { - methodName: "VerifyMessage", - service: Signer, - requestStream: false, - responseStream: false, - requestType: signrpc_signer_pb.VerifyMessageReq, - responseType: signrpc_signer_pb.VerifyMessageResp -}; - -Signer.DeriveSharedKey = { - methodName: "DeriveSharedKey", - service: Signer, - requestStream: false, - responseStream: false, - requestType: signrpc_signer_pb.SharedKeyRequest, - responseType: signrpc_signer_pb.SharedKeyResponse -}; - -exports.Signer = Signer; - -function SignerClient(serviceHost, options) { - this.serviceHost = serviceHost; - this.options = options || {}; -} - -SignerClient.prototype.signOutputRaw = function signOutputRaw(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(Signer.SignOutputRaw, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -SignerClient.prototype.computeInputScript = function computeInputScript(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(Signer.ComputeInputScript, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -SignerClient.prototype.signMessage = function signMessage(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(Signer.SignMessage, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -SignerClient.prototype.verifyMessage = function verifyMessage(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(Signer.VerifyMessage, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -SignerClient.prototype.deriveSharedKey = function deriveSharedKey(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(Signer.DeriveSharedKey, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -exports.SignerClient = SignerClient; - diff --git a/lib/types/generated/swapserverrpc/common_pb.d.ts b/lib/types/generated/swapserverrpc/common_pb.d.ts deleted file mode 100644 index 8f0621e..0000000 --- a/lib/types/generated/swapserverrpc/common_pb.d.ts +++ /dev/null @@ -1,63 +0,0 @@ -// package: looprpc -// file: swapserverrpc/common.proto - -import * as jspb from "google-protobuf"; - -export class HopHint extends jspb.Message { - getNodeId(): string; - setNodeId(value: string): void; - - getChanId(): number; - setChanId(value: number): void; - - getFeeBaseMsat(): number; - setFeeBaseMsat(value: number): void; - - getFeeProportionalMillionths(): number; - setFeeProportionalMillionths(value: number): void; - - getCltvExpiryDelta(): number; - setCltvExpiryDelta(value: number): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): HopHint.AsObject; - static toObject(includeInstance: boolean, msg: HopHint): HopHint.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: HopHint, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): HopHint; - static deserializeBinaryFromReader(message: HopHint, reader: jspb.BinaryReader): HopHint; -} - -export namespace HopHint { - export type AsObject = { - nodeId: string, - chanId: number, - feeBaseMsat: number, - feeProportionalMillionths: number, - cltvExpiryDelta: number, - } -} - -export class RouteHint extends jspb.Message { - clearHopHintsList(): void; - getHopHintsList(): Array; - setHopHintsList(value: Array): void; - addHopHints(value?: HopHint, index?: number): HopHint; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): RouteHint.AsObject; - static toObject(includeInstance: boolean, msg: RouteHint): RouteHint.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: RouteHint, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): RouteHint; - static deserializeBinaryFromReader(message: RouteHint, reader: jspb.BinaryReader): RouteHint; -} - -export namespace RouteHint { - export type AsObject = { - hopHints: Array, - } -} - diff --git a/lib/types/generated/swapserverrpc/common_pb.js b/lib/types/generated/swapserverrpc/common_pb.js deleted file mode 100644 index 43489a0..0000000 --- a/lib/types/generated/swapserverrpc/common_pb.js +++ /dev/null @@ -1,472 +0,0 @@ -// source: swapserverrpc/common.proto -/** - * @fileoverview - * @enhanceable - * @suppress {missingRequire} reports error on implicit type usages. - * @suppress {messageConventions} JS Compiler reports an error if a variable or - * field starts with 'MSG_' and isn't a translatable message. - * @public - */ -// GENERATED CODE -- DO NOT EDIT! -/* eslint-disable */ -// @ts-nocheck - -var jspb = require('google-protobuf'); -var goog = jspb; -var global = Function('return this')(); - -goog.exportSymbol('proto.looprpc.HopHint', null, global); -goog.exportSymbol('proto.looprpc.RouteHint', null, global); -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.looprpc.HopHint = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.looprpc.HopHint, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.looprpc.HopHint.displayName = 'proto.looprpc.HopHint'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.looprpc.RouteHint = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.looprpc.RouteHint.repeatedFields_, null); -}; -goog.inherits(proto.looprpc.RouteHint, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.looprpc.RouteHint.displayName = 'proto.looprpc.RouteHint'; -} - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.looprpc.HopHint.prototype.toObject = function(opt_includeInstance) { - return proto.looprpc.HopHint.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.looprpc.HopHint} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.looprpc.HopHint.toObject = function(includeInstance, msg) { - var f, obj = { - nodeId: jspb.Message.getFieldWithDefault(msg, 1, ""), - chanId: jspb.Message.getFieldWithDefault(msg, 2, 0), - feeBaseMsat: jspb.Message.getFieldWithDefault(msg, 3, 0), - feeProportionalMillionths: jspb.Message.getFieldWithDefault(msg, 4, 0), - cltvExpiryDelta: jspb.Message.getFieldWithDefault(msg, 5, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.looprpc.HopHint} - */ -proto.looprpc.HopHint.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.looprpc.HopHint; - return proto.looprpc.HopHint.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.looprpc.HopHint} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.looprpc.HopHint} - */ -proto.looprpc.HopHint.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setNodeId(value); - break; - case 2: - var value = /** @type {number} */ (reader.readUint64()); - msg.setChanId(value); - break; - case 3: - var value = /** @type {number} */ (reader.readUint32()); - msg.setFeeBaseMsat(value); - break; - case 4: - var value = /** @type {number} */ (reader.readUint32()); - msg.setFeeProportionalMillionths(value); - break; - case 5: - var value = /** @type {number} */ (reader.readUint32()); - msg.setCltvExpiryDelta(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.looprpc.HopHint.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.looprpc.HopHint.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.looprpc.HopHint} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.looprpc.HopHint.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getNodeId(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getChanId(); - if (f !== 0) { - writer.writeUint64( - 2, - f - ); - } - f = message.getFeeBaseMsat(); - if (f !== 0) { - writer.writeUint32( - 3, - f - ); - } - f = message.getFeeProportionalMillionths(); - if (f !== 0) { - writer.writeUint32( - 4, - f - ); - } - f = message.getCltvExpiryDelta(); - if (f !== 0) { - writer.writeUint32( - 5, - f - ); - } -}; - - -/** - * optional string node_id = 1; - * @return {string} - */ -proto.looprpc.HopHint.prototype.getNodeId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.looprpc.HopHint} returns this - */ -proto.looprpc.HopHint.prototype.setNodeId = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional uint64 chan_id = 2; - * @return {number} - */ -proto.looprpc.HopHint.prototype.getChanId = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.looprpc.HopHint} returns this - */ -proto.looprpc.HopHint.prototype.setChanId = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * optional uint32 fee_base_msat = 3; - * @return {number} - */ -proto.looprpc.HopHint.prototype.getFeeBaseMsat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.looprpc.HopHint} returns this - */ -proto.looprpc.HopHint.prototype.setFeeBaseMsat = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - -/** - * optional uint32 fee_proportional_millionths = 4; - * @return {number} - */ -proto.looprpc.HopHint.prototype.getFeeProportionalMillionths = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.looprpc.HopHint} returns this - */ -proto.looprpc.HopHint.prototype.setFeeProportionalMillionths = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); -}; - - -/** - * optional uint32 cltv_expiry_delta = 5; - * @return {number} - */ -proto.looprpc.HopHint.prototype.getCltvExpiryDelta = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.looprpc.HopHint} returns this - */ -proto.looprpc.HopHint.prototype.setCltvExpiryDelta = function(value) { - return jspb.Message.setProto3IntField(this, 5, value); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.looprpc.RouteHint.repeatedFields_ = [1]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.looprpc.RouteHint.prototype.toObject = function(opt_includeInstance) { - return proto.looprpc.RouteHint.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.looprpc.RouteHint} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.looprpc.RouteHint.toObject = function(includeInstance, msg) { - var f, obj = { - hopHintsList: jspb.Message.toObjectList(msg.getHopHintsList(), - proto.looprpc.HopHint.toObject, includeInstance) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.looprpc.RouteHint} - */ -proto.looprpc.RouteHint.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.looprpc.RouteHint; - return proto.looprpc.RouteHint.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.looprpc.RouteHint} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.looprpc.RouteHint} - */ -proto.looprpc.RouteHint.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.looprpc.HopHint; - reader.readMessage(value,proto.looprpc.HopHint.deserializeBinaryFromReader); - msg.addHopHints(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.looprpc.RouteHint.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.looprpc.RouteHint.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.looprpc.RouteHint} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.looprpc.RouteHint.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getHopHintsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 1, - f, - proto.looprpc.HopHint.serializeBinaryToWriter - ); - } -}; - - -/** - * repeated HopHint hop_hints = 1; - * @return {!Array} - */ -proto.looprpc.RouteHint.prototype.getHopHintsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.looprpc.HopHint, 1)); -}; - - -/** - * @param {!Array} value - * @return {!proto.looprpc.RouteHint} returns this -*/ -proto.looprpc.RouteHint.prototype.setHopHintsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); -}; - - -/** - * @param {!proto.looprpc.HopHint=} opt_value - * @param {number=} opt_index - * @return {!proto.looprpc.HopHint} - */ -proto.looprpc.RouteHint.prototype.addHopHints = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.looprpc.HopHint, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.looprpc.RouteHint} returns this - */ -proto.looprpc.RouteHint.prototype.clearHopHintsList = function() { - return this.setHopHintsList([]); -}; - - -goog.object.extend(exports, proto.looprpc); diff --git a/lib/types/generated/swapserverrpc/common_pb_service.d.ts b/lib/types/generated/swapserverrpc/common_pb_service.d.ts deleted file mode 100644 index 9e98ba7..0000000 --- a/lib/types/generated/swapserverrpc/common_pb_service.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -// package: looprpc -// file: swapserverrpc/common.proto - diff --git a/lib/types/generated/swapserverrpc/common_pb_service.js b/lib/types/generated/swapserverrpc/common_pb_service.js deleted file mode 100644 index 9e98ba7..0000000 --- a/lib/types/generated/swapserverrpc/common_pb_service.js +++ /dev/null @@ -1,3 +0,0 @@ -// package: looprpc -// file: swapserverrpc/common.proto - diff --git a/lib/types/generated/trader_pb.d.ts b/lib/types/generated/trader_pb.d.ts deleted file mode 100644 index 8474882..0000000 --- a/lib/types/generated/trader_pb.d.ts +++ /dev/null @@ -1,2059 +0,0 @@ -// package: poolrpc -// file: trader.proto - -import * as jspb from "google-protobuf"; -import * as auctioneerrpc_auctioneer_pb from "./auctioneerrpc/auctioneer_pb"; - -export class InitAccountRequest extends jspb.Message { - getAccountValue(): number; - setAccountValue(value: number): void; - - hasAbsoluteHeight(): boolean; - clearAbsoluteHeight(): void; - getAbsoluteHeight(): number; - setAbsoluteHeight(value: number): void; - - hasRelativeHeight(): boolean; - clearRelativeHeight(): void; - getRelativeHeight(): number; - setRelativeHeight(value: number): void; - - hasConfTarget(): boolean; - clearConfTarget(): void; - getConfTarget(): number; - setConfTarget(value: number): void; - - hasFeeRateSatPerKw(): boolean; - clearFeeRateSatPerKw(): void; - getFeeRateSatPerKw(): number; - setFeeRateSatPerKw(value: number): void; - - getInitiator(): string; - setInitiator(value: string): void; - - getAccountExpiryCase(): InitAccountRequest.AccountExpiryCase; - getFeesCase(): InitAccountRequest.FeesCase; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): InitAccountRequest.AsObject; - static toObject(includeInstance: boolean, msg: InitAccountRequest): InitAccountRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: InitAccountRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): InitAccountRequest; - static deserializeBinaryFromReader(message: InitAccountRequest, reader: jspb.BinaryReader): InitAccountRequest; -} - -export namespace InitAccountRequest { - export type AsObject = { - accountValue: number, - absoluteHeight: number, - relativeHeight: number, - confTarget: number, - feeRateSatPerKw: number, - initiator: string, - } - - export enum AccountExpiryCase { - ACCOUNT_EXPIRY_NOT_SET = 0, - ABSOLUTE_HEIGHT = 2, - RELATIVE_HEIGHT = 3, - } - - export enum FeesCase { - FEES_NOT_SET = 0, - CONF_TARGET = 4, - FEE_RATE_SAT_PER_KW = 6, - } -} - -export class QuoteAccountRequest extends jspb.Message { - getAccountValue(): number; - setAccountValue(value: number): void; - - hasConfTarget(): boolean; - clearConfTarget(): void; - getConfTarget(): number; - setConfTarget(value: number): void; - - getFeesCase(): QuoteAccountRequest.FeesCase; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): QuoteAccountRequest.AsObject; - static toObject(includeInstance: boolean, msg: QuoteAccountRequest): QuoteAccountRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: QuoteAccountRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): QuoteAccountRequest; - static deserializeBinaryFromReader(message: QuoteAccountRequest, reader: jspb.BinaryReader): QuoteAccountRequest; -} - -export namespace QuoteAccountRequest { - export type AsObject = { - accountValue: number, - confTarget: number, - } - - export enum FeesCase { - FEES_NOT_SET = 0, - CONF_TARGET = 2, - } -} - -export class QuoteAccountResponse extends jspb.Message { - getMinerFeeRateSatPerKw(): number; - setMinerFeeRateSatPerKw(value: number): void; - - getMinerFeeTotal(): number; - setMinerFeeTotal(value: number): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): QuoteAccountResponse.AsObject; - static toObject(includeInstance: boolean, msg: QuoteAccountResponse): QuoteAccountResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: QuoteAccountResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): QuoteAccountResponse; - static deserializeBinaryFromReader(message: QuoteAccountResponse, reader: jspb.BinaryReader): QuoteAccountResponse; -} - -export namespace QuoteAccountResponse { - export type AsObject = { - minerFeeRateSatPerKw: number, - minerFeeTotal: number, - } -} - -export class ListAccountsRequest extends jspb.Message { - getActiveOnly(): boolean; - setActiveOnly(value: boolean): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ListAccountsRequest.AsObject; - static toObject(includeInstance: boolean, msg: ListAccountsRequest): ListAccountsRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ListAccountsRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ListAccountsRequest; - static deserializeBinaryFromReader(message: ListAccountsRequest, reader: jspb.BinaryReader): ListAccountsRequest; -} - -export namespace ListAccountsRequest { - export type AsObject = { - activeOnly: boolean, - } -} - -export class ListAccountsResponse extends jspb.Message { - clearAccountsList(): void; - getAccountsList(): Array; - setAccountsList(value: Array): void; - addAccounts(value?: Account, index?: number): Account; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ListAccountsResponse.AsObject; - static toObject(includeInstance: boolean, msg: ListAccountsResponse): ListAccountsResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ListAccountsResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ListAccountsResponse; - static deserializeBinaryFromReader(message: ListAccountsResponse, reader: jspb.BinaryReader): ListAccountsResponse; -} - -export namespace ListAccountsResponse { - export type AsObject = { - accounts: Array, - } -} - -export class Output extends jspb.Message { - getValueSat(): number; - setValueSat(value: number): void; - - getAddress(): string; - setAddress(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Output.AsObject; - static toObject(includeInstance: boolean, msg: Output): Output.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: Output, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Output; - static deserializeBinaryFromReader(message: Output, reader: jspb.BinaryReader): Output; -} - -export namespace Output { - export type AsObject = { - valueSat: number, - address: string, - } -} - -export class OutputWithFee extends jspb.Message { - getAddress(): string; - setAddress(value: string): void; - - hasConfTarget(): boolean; - clearConfTarget(): void; - getConfTarget(): number; - setConfTarget(value: number): void; - - hasFeeRateSatPerKw(): boolean; - clearFeeRateSatPerKw(): void; - getFeeRateSatPerKw(): number; - setFeeRateSatPerKw(value: number): void; - - getFeesCase(): OutputWithFee.FeesCase; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): OutputWithFee.AsObject; - static toObject(includeInstance: boolean, msg: OutputWithFee): OutputWithFee.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: OutputWithFee, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): OutputWithFee; - static deserializeBinaryFromReader(message: OutputWithFee, reader: jspb.BinaryReader): OutputWithFee; -} - -export namespace OutputWithFee { - export type AsObject = { - address: string, - confTarget: number, - feeRateSatPerKw: number, - } - - export enum FeesCase { - FEES_NOT_SET = 0, - CONF_TARGET = 2, - FEE_RATE_SAT_PER_KW = 3, - } -} - -export class OutputsWithImplicitFee extends jspb.Message { - clearOutputsList(): void; - getOutputsList(): Array; - setOutputsList(value: Array): void; - addOutputs(value?: Output, index?: number): Output; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): OutputsWithImplicitFee.AsObject; - static toObject(includeInstance: boolean, msg: OutputsWithImplicitFee): OutputsWithImplicitFee.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: OutputsWithImplicitFee, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): OutputsWithImplicitFee; - static deserializeBinaryFromReader(message: OutputsWithImplicitFee, reader: jspb.BinaryReader): OutputsWithImplicitFee; -} - -export namespace OutputsWithImplicitFee { - export type AsObject = { - outputs: Array, - } -} - -export class CloseAccountRequest extends jspb.Message { - getTraderKey(): Uint8Array | string; - getTraderKey_asU8(): Uint8Array; - getTraderKey_asB64(): string; - setTraderKey(value: Uint8Array | string): void; - - hasOutputWithFee(): boolean; - clearOutputWithFee(): void; - getOutputWithFee(): OutputWithFee | undefined; - setOutputWithFee(value?: OutputWithFee): void; - - hasOutputs(): boolean; - clearOutputs(): void; - getOutputs(): OutputsWithImplicitFee | undefined; - setOutputs(value?: OutputsWithImplicitFee): void; - - getFundsDestinationCase(): CloseAccountRequest.FundsDestinationCase; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): CloseAccountRequest.AsObject; - static toObject(includeInstance: boolean, msg: CloseAccountRequest): CloseAccountRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: CloseAccountRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): CloseAccountRequest; - static deserializeBinaryFromReader(message: CloseAccountRequest, reader: jspb.BinaryReader): CloseAccountRequest; -} - -export namespace CloseAccountRequest { - export type AsObject = { - traderKey: Uint8Array | string, - outputWithFee?: OutputWithFee.AsObject, - outputs?: OutputsWithImplicitFee.AsObject, - } - - export enum FundsDestinationCase { - FUNDS_DESTINATION_NOT_SET = 0, - OUTPUT_WITH_FEE = 2, - OUTPUTS = 3, - } -} - -export class CloseAccountResponse extends jspb.Message { - getCloseTxid(): Uint8Array | string; - getCloseTxid_asU8(): Uint8Array; - getCloseTxid_asB64(): string; - setCloseTxid(value: Uint8Array | string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): CloseAccountResponse.AsObject; - static toObject(includeInstance: boolean, msg: CloseAccountResponse): CloseAccountResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: CloseAccountResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): CloseAccountResponse; - static deserializeBinaryFromReader(message: CloseAccountResponse, reader: jspb.BinaryReader): CloseAccountResponse; -} - -export namespace CloseAccountResponse { - export type AsObject = { - closeTxid: Uint8Array | string, - } -} - -export class WithdrawAccountRequest extends jspb.Message { - getTraderKey(): Uint8Array | string; - getTraderKey_asU8(): Uint8Array; - getTraderKey_asB64(): string; - setTraderKey(value: Uint8Array | string): void; - - clearOutputsList(): void; - getOutputsList(): Array; - setOutputsList(value: Array): void; - addOutputs(value?: Output, index?: number): Output; - - getFeeRateSatPerKw(): number; - setFeeRateSatPerKw(value: number): void; - - hasAbsoluteExpiry(): boolean; - clearAbsoluteExpiry(): void; - getAbsoluteExpiry(): number; - setAbsoluteExpiry(value: number): void; - - hasRelativeExpiry(): boolean; - clearRelativeExpiry(): void; - getRelativeExpiry(): number; - setRelativeExpiry(value: number): void; - - getAccountExpiryCase(): WithdrawAccountRequest.AccountExpiryCase; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): WithdrawAccountRequest.AsObject; - static toObject(includeInstance: boolean, msg: WithdrawAccountRequest): WithdrawAccountRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: WithdrawAccountRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): WithdrawAccountRequest; - static deserializeBinaryFromReader(message: WithdrawAccountRequest, reader: jspb.BinaryReader): WithdrawAccountRequest; -} - -export namespace WithdrawAccountRequest { - export type AsObject = { - traderKey: Uint8Array | string, - outputs: Array, - feeRateSatPerKw: number, - absoluteExpiry: number, - relativeExpiry: number, - } - - export enum AccountExpiryCase { - ACCOUNT_EXPIRY_NOT_SET = 0, - ABSOLUTE_EXPIRY = 4, - RELATIVE_EXPIRY = 5, - } -} - -export class WithdrawAccountResponse extends jspb.Message { - hasAccount(): boolean; - clearAccount(): void; - getAccount(): Account | undefined; - setAccount(value?: Account): void; - - getWithdrawTxid(): Uint8Array | string; - getWithdrawTxid_asU8(): Uint8Array; - getWithdrawTxid_asB64(): string; - setWithdrawTxid(value: Uint8Array | string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): WithdrawAccountResponse.AsObject; - static toObject(includeInstance: boolean, msg: WithdrawAccountResponse): WithdrawAccountResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: WithdrawAccountResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): WithdrawAccountResponse; - static deserializeBinaryFromReader(message: WithdrawAccountResponse, reader: jspb.BinaryReader): WithdrawAccountResponse; -} - -export namespace WithdrawAccountResponse { - export type AsObject = { - account?: Account.AsObject, - withdrawTxid: Uint8Array | string, - } -} - -export class DepositAccountRequest extends jspb.Message { - getTraderKey(): Uint8Array | string; - getTraderKey_asU8(): Uint8Array; - getTraderKey_asB64(): string; - setTraderKey(value: Uint8Array | string): void; - - getAmountSat(): number; - setAmountSat(value: number): void; - - getFeeRateSatPerKw(): number; - setFeeRateSatPerKw(value: number): void; - - hasAbsoluteExpiry(): boolean; - clearAbsoluteExpiry(): void; - getAbsoluteExpiry(): number; - setAbsoluteExpiry(value: number): void; - - hasRelativeExpiry(): boolean; - clearRelativeExpiry(): void; - getRelativeExpiry(): number; - setRelativeExpiry(value: number): void; - - getAccountExpiryCase(): DepositAccountRequest.AccountExpiryCase; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): DepositAccountRequest.AsObject; - static toObject(includeInstance: boolean, msg: DepositAccountRequest): DepositAccountRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: DepositAccountRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): DepositAccountRequest; - static deserializeBinaryFromReader(message: DepositAccountRequest, reader: jspb.BinaryReader): DepositAccountRequest; -} - -export namespace DepositAccountRequest { - export type AsObject = { - traderKey: Uint8Array | string, - amountSat: number, - feeRateSatPerKw: number, - absoluteExpiry: number, - relativeExpiry: number, - } - - export enum AccountExpiryCase { - ACCOUNT_EXPIRY_NOT_SET = 0, - ABSOLUTE_EXPIRY = 4, - RELATIVE_EXPIRY = 5, - } -} - -export class DepositAccountResponse extends jspb.Message { - hasAccount(): boolean; - clearAccount(): void; - getAccount(): Account | undefined; - setAccount(value?: Account): void; - - getDepositTxid(): Uint8Array | string; - getDepositTxid_asU8(): Uint8Array; - getDepositTxid_asB64(): string; - setDepositTxid(value: Uint8Array | string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): DepositAccountResponse.AsObject; - static toObject(includeInstance: boolean, msg: DepositAccountResponse): DepositAccountResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: DepositAccountResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): DepositAccountResponse; - static deserializeBinaryFromReader(message: DepositAccountResponse, reader: jspb.BinaryReader): DepositAccountResponse; -} - -export namespace DepositAccountResponse { - export type AsObject = { - account?: Account.AsObject, - depositTxid: Uint8Array | string, - } -} - -export class RenewAccountRequest extends jspb.Message { - getAccountKey(): Uint8Array | string; - getAccountKey_asU8(): Uint8Array; - getAccountKey_asB64(): string; - setAccountKey(value: Uint8Array | string): void; - - hasAbsoluteExpiry(): boolean; - clearAbsoluteExpiry(): void; - getAbsoluteExpiry(): number; - setAbsoluteExpiry(value: number): void; - - hasRelativeExpiry(): boolean; - clearRelativeExpiry(): void; - getRelativeExpiry(): number; - setRelativeExpiry(value: number): void; - - getFeeRateSatPerKw(): number; - setFeeRateSatPerKw(value: number): void; - - getAccountExpiryCase(): RenewAccountRequest.AccountExpiryCase; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): RenewAccountRequest.AsObject; - static toObject(includeInstance: boolean, msg: RenewAccountRequest): RenewAccountRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: RenewAccountRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): RenewAccountRequest; - static deserializeBinaryFromReader(message: RenewAccountRequest, reader: jspb.BinaryReader): RenewAccountRequest; -} - -export namespace RenewAccountRequest { - export type AsObject = { - accountKey: Uint8Array | string, - absoluteExpiry: number, - relativeExpiry: number, - feeRateSatPerKw: number, - } - - export enum AccountExpiryCase { - ACCOUNT_EXPIRY_NOT_SET = 0, - ABSOLUTE_EXPIRY = 2, - RELATIVE_EXPIRY = 3, - } -} - -export class RenewAccountResponse extends jspb.Message { - hasAccount(): boolean; - clearAccount(): void; - getAccount(): Account | undefined; - setAccount(value?: Account): void; - - getRenewalTxid(): Uint8Array | string; - getRenewalTxid_asU8(): Uint8Array; - getRenewalTxid_asB64(): string; - setRenewalTxid(value: Uint8Array | string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): RenewAccountResponse.AsObject; - static toObject(includeInstance: boolean, msg: RenewAccountResponse): RenewAccountResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: RenewAccountResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): RenewAccountResponse; - static deserializeBinaryFromReader(message: RenewAccountResponse, reader: jspb.BinaryReader): RenewAccountResponse; -} - -export namespace RenewAccountResponse { - export type AsObject = { - account?: Account.AsObject, - renewalTxid: Uint8Array | string, - } -} - -export class BumpAccountFeeRequest extends jspb.Message { - getTraderKey(): Uint8Array | string; - getTraderKey_asU8(): Uint8Array; - getTraderKey_asB64(): string; - setTraderKey(value: Uint8Array | string): void; - - getFeeRateSatPerKw(): number; - setFeeRateSatPerKw(value: number): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): BumpAccountFeeRequest.AsObject; - static toObject(includeInstance: boolean, msg: BumpAccountFeeRequest): BumpAccountFeeRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: BumpAccountFeeRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): BumpAccountFeeRequest; - static deserializeBinaryFromReader(message: BumpAccountFeeRequest, reader: jspb.BinaryReader): BumpAccountFeeRequest; -} - -export namespace BumpAccountFeeRequest { - export type AsObject = { - traderKey: Uint8Array | string, - feeRateSatPerKw: number, - } -} - -export class BumpAccountFeeResponse extends jspb.Message { - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): BumpAccountFeeResponse.AsObject; - static toObject(includeInstance: boolean, msg: BumpAccountFeeResponse): BumpAccountFeeResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: BumpAccountFeeResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): BumpAccountFeeResponse; - static deserializeBinaryFromReader(message: BumpAccountFeeResponse, reader: jspb.BinaryReader): BumpAccountFeeResponse; -} - -export namespace BumpAccountFeeResponse { - export type AsObject = { - } -} - -export class Account extends jspb.Message { - getTraderKey(): Uint8Array | string; - getTraderKey_asU8(): Uint8Array; - getTraderKey_asB64(): string; - setTraderKey(value: Uint8Array | string): void; - - hasOutpoint(): boolean; - clearOutpoint(): void; - getOutpoint(): auctioneerrpc_auctioneer_pb.OutPoint | undefined; - setOutpoint(value?: auctioneerrpc_auctioneer_pb.OutPoint): void; - - getValue(): number; - setValue(value: number): void; - - getAvailableBalance(): number; - setAvailableBalance(value: number): void; - - getExpirationHeight(): number; - setExpirationHeight(value: number): void; - - getState(): AccountStateMap[keyof AccountStateMap]; - setState(value: AccountStateMap[keyof AccountStateMap]): void; - - getLatestTxid(): Uint8Array | string; - getLatestTxid_asU8(): Uint8Array; - getLatestTxid_asB64(): string; - setLatestTxid(value: Uint8Array | string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Account.AsObject; - static toObject(includeInstance: boolean, msg: Account): Account.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: Account, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Account; - static deserializeBinaryFromReader(message: Account, reader: jspb.BinaryReader): Account; -} - -export namespace Account { - export type AsObject = { - traderKey: Uint8Array | string, - outpoint?: auctioneerrpc_auctioneer_pb.OutPoint.AsObject, - value: number, - availableBalance: number, - expirationHeight: number, - state: AccountStateMap[keyof AccountStateMap], - latestTxid: Uint8Array | string, - } -} - -export class SubmitOrderRequest extends jspb.Message { - hasAsk(): boolean; - clearAsk(): void; - getAsk(): Ask | undefined; - setAsk(value?: Ask): void; - - hasBid(): boolean; - clearBid(): void; - getBid(): Bid | undefined; - setBid(value?: Bid): void; - - getInitiator(): string; - setInitiator(value: string): void; - - getDetailsCase(): SubmitOrderRequest.DetailsCase; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): SubmitOrderRequest.AsObject; - static toObject(includeInstance: boolean, msg: SubmitOrderRequest): SubmitOrderRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: SubmitOrderRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): SubmitOrderRequest; - static deserializeBinaryFromReader(message: SubmitOrderRequest, reader: jspb.BinaryReader): SubmitOrderRequest; -} - -export namespace SubmitOrderRequest { - export type AsObject = { - ask?: Ask.AsObject, - bid?: Bid.AsObject, - initiator: string, - } - - export enum DetailsCase { - DETAILS_NOT_SET = 0, - ASK = 1, - BID = 2, - } -} - -export class SubmitOrderResponse extends jspb.Message { - hasInvalidOrder(): boolean; - clearInvalidOrder(): void; - getInvalidOrder(): auctioneerrpc_auctioneer_pb.InvalidOrder | undefined; - setInvalidOrder(value?: auctioneerrpc_auctioneer_pb.InvalidOrder): void; - - hasAcceptedOrderNonce(): boolean; - clearAcceptedOrderNonce(): void; - getAcceptedOrderNonce(): Uint8Array | string; - getAcceptedOrderNonce_asU8(): Uint8Array; - getAcceptedOrderNonce_asB64(): string; - setAcceptedOrderNonce(value: Uint8Array | string): void; - - getUpdatedSidecarTicket(): string; - setUpdatedSidecarTicket(value: string): void; - - getDetailsCase(): SubmitOrderResponse.DetailsCase; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): SubmitOrderResponse.AsObject; - static toObject(includeInstance: boolean, msg: SubmitOrderResponse): SubmitOrderResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: SubmitOrderResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): SubmitOrderResponse; - static deserializeBinaryFromReader(message: SubmitOrderResponse, reader: jspb.BinaryReader): SubmitOrderResponse; -} - -export namespace SubmitOrderResponse { - export type AsObject = { - invalidOrder?: auctioneerrpc_auctioneer_pb.InvalidOrder.AsObject, - acceptedOrderNonce: Uint8Array | string, - updatedSidecarTicket: string, - } - - export enum DetailsCase { - DETAILS_NOT_SET = 0, - INVALID_ORDER = 1, - ACCEPTED_ORDER_NONCE = 2, - } -} - -export class ListOrdersRequest extends jspb.Message { - getVerbose(): boolean; - setVerbose(value: boolean): void; - - getActiveOnly(): boolean; - setActiveOnly(value: boolean): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ListOrdersRequest.AsObject; - static toObject(includeInstance: boolean, msg: ListOrdersRequest): ListOrdersRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ListOrdersRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ListOrdersRequest; - static deserializeBinaryFromReader(message: ListOrdersRequest, reader: jspb.BinaryReader): ListOrdersRequest; -} - -export namespace ListOrdersRequest { - export type AsObject = { - verbose: boolean, - activeOnly: boolean, - } -} - -export class ListOrdersResponse extends jspb.Message { - clearAsksList(): void; - getAsksList(): Array; - setAsksList(value: Array): void; - addAsks(value?: Ask, index?: number): Ask; - - clearBidsList(): void; - getBidsList(): Array; - setBidsList(value: Array): void; - addBids(value?: Bid, index?: number): Bid; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ListOrdersResponse.AsObject; - static toObject(includeInstance: boolean, msg: ListOrdersResponse): ListOrdersResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ListOrdersResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ListOrdersResponse; - static deserializeBinaryFromReader(message: ListOrdersResponse, reader: jspb.BinaryReader): ListOrdersResponse; -} - -export namespace ListOrdersResponse { - export type AsObject = { - asks: Array, - bids: Array, - } -} - -export class CancelOrderRequest extends jspb.Message { - getOrderNonce(): Uint8Array | string; - getOrderNonce_asU8(): Uint8Array; - getOrderNonce_asB64(): string; - setOrderNonce(value: Uint8Array | string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): CancelOrderRequest.AsObject; - static toObject(includeInstance: boolean, msg: CancelOrderRequest): CancelOrderRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: CancelOrderRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): CancelOrderRequest; - static deserializeBinaryFromReader(message: CancelOrderRequest, reader: jspb.BinaryReader): CancelOrderRequest; -} - -export namespace CancelOrderRequest { - export type AsObject = { - orderNonce: Uint8Array | string, - } -} - -export class CancelOrderResponse extends jspb.Message { - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): CancelOrderResponse.AsObject; - static toObject(includeInstance: boolean, msg: CancelOrderResponse): CancelOrderResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: CancelOrderResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): CancelOrderResponse; - static deserializeBinaryFromReader(message: CancelOrderResponse, reader: jspb.BinaryReader): CancelOrderResponse; -} - -export namespace CancelOrderResponse { - export type AsObject = { - } -} - -export class Order extends jspb.Message { - getTraderKey(): Uint8Array | string; - getTraderKey_asU8(): Uint8Array; - getTraderKey_asB64(): string; - setTraderKey(value: Uint8Array | string): void; - - getRateFixed(): number; - setRateFixed(value: number): void; - - getAmt(): number; - setAmt(value: number): void; - - getMaxBatchFeeRateSatPerKw(): number; - setMaxBatchFeeRateSatPerKw(value: number): void; - - getOrderNonce(): Uint8Array | string; - getOrderNonce_asU8(): Uint8Array; - getOrderNonce_asB64(): string; - setOrderNonce(value: Uint8Array | string): void; - - getState(): auctioneerrpc_auctioneer_pb.OrderStateMap[keyof auctioneerrpc_auctioneer_pb.OrderStateMap]; - setState(value: auctioneerrpc_auctioneer_pb.OrderStateMap[keyof auctioneerrpc_auctioneer_pb.OrderStateMap]): void; - - getUnits(): number; - setUnits(value: number): void; - - getUnitsUnfulfilled(): number; - setUnitsUnfulfilled(value: number): void; - - getReservedValueSat(): number; - setReservedValueSat(value: number): void; - - getCreationTimestampNs(): number; - setCreationTimestampNs(value: number): void; - - clearEventsList(): void; - getEventsList(): Array; - setEventsList(value: Array): void; - addEvents(value?: OrderEvent, index?: number): OrderEvent; - - getMinUnitsMatch(): number; - setMinUnitsMatch(value: number): void; - - getChannelType(): auctioneerrpc_auctioneer_pb.OrderChannelTypeMap[keyof auctioneerrpc_auctioneer_pb.OrderChannelTypeMap]; - setChannelType(value: auctioneerrpc_auctioneer_pb.OrderChannelTypeMap[keyof auctioneerrpc_auctioneer_pb.OrderChannelTypeMap]): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Order.AsObject; - static toObject(includeInstance: boolean, msg: Order): Order.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: Order, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Order; - static deserializeBinaryFromReader(message: Order, reader: jspb.BinaryReader): Order; -} - -export namespace Order { - export type AsObject = { - traderKey: Uint8Array | string, - rateFixed: number, - amt: number, - maxBatchFeeRateSatPerKw: number, - orderNonce: Uint8Array | string, - state: auctioneerrpc_auctioneer_pb.OrderStateMap[keyof auctioneerrpc_auctioneer_pb.OrderStateMap], - units: number, - unitsUnfulfilled: number, - reservedValueSat: number, - creationTimestampNs: number, - events: Array, - minUnitsMatch: number, - channelType: auctioneerrpc_auctioneer_pb.OrderChannelTypeMap[keyof auctioneerrpc_auctioneer_pb.OrderChannelTypeMap], - } -} - -export class Bid extends jspb.Message { - hasDetails(): boolean; - clearDetails(): void; - getDetails(): Order | undefined; - setDetails(value?: Order): void; - - getLeaseDurationBlocks(): number; - setLeaseDurationBlocks(value: number): void; - - getVersion(): number; - setVersion(value: number): void; - - getMinNodeTier(): auctioneerrpc_auctioneer_pb.NodeTierMap[keyof auctioneerrpc_auctioneer_pb.NodeTierMap]; - setMinNodeTier(value: auctioneerrpc_auctioneer_pb.NodeTierMap[keyof auctioneerrpc_auctioneer_pb.NodeTierMap]): void; - - getSelfChanBalance(): number; - setSelfChanBalance(value: number): void; - - getSidecarTicket(): string; - setSidecarTicket(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Bid.AsObject; - static toObject(includeInstance: boolean, msg: Bid): Bid.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: Bid, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Bid; - static deserializeBinaryFromReader(message: Bid, reader: jspb.BinaryReader): Bid; -} - -export namespace Bid { - export type AsObject = { - details?: Order.AsObject, - leaseDurationBlocks: number, - version: number, - minNodeTier: auctioneerrpc_auctioneer_pb.NodeTierMap[keyof auctioneerrpc_auctioneer_pb.NodeTierMap], - selfChanBalance: number, - sidecarTicket: string, - } -} - -export class Ask extends jspb.Message { - hasDetails(): boolean; - clearDetails(): void; - getDetails(): Order | undefined; - setDetails(value?: Order): void; - - getLeaseDurationBlocks(): number; - setLeaseDurationBlocks(value: number): void; - - getVersion(): number; - setVersion(value: number): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Ask.AsObject; - static toObject(includeInstance: boolean, msg: Ask): Ask.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: Ask, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Ask; - static deserializeBinaryFromReader(message: Ask, reader: jspb.BinaryReader): Ask; -} - -export namespace Ask { - export type AsObject = { - details?: Order.AsObject, - leaseDurationBlocks: number, - version: number, - } -} - -export class QuoteOrderRequest extends jspb.Message { - getAmt(): number; - setAmt(value: number): void; - - getRateFixed(): number; - setRateFixed(value: number): void; - - getLeaseDurationBlocks(): number; - setLeaseDurationBlocks(value: number): void; - - getMaxBatchFeeRateSatPerKw(): number; - setMaxBatchFeeRateSatPerKw(value: number): void; - - getMinUnitsMatch(): number; - setMinUnitsMatch(value: number): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): QuoteOrderRequest.AsObject; - static toObject(includeInstance: boolean, msg: QuoteOrderRequest): QuoteOrderRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: QuoteOrderRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): QuoteOrderRequest; - static deserializeBinaryFromReader(message: QuoteOrderRequest, reader: jspb.BinaryReader): QuoteOrderRequest; -} - -export namespace QuoteOrderRequest { - export type AsObject = { - amt: number, - rateFixed: number, - leaseDurationBlocks: number, - maxBatchFeeRateSatPerKw: number, - minUnitsMatch: number, - } -} - -export class QuoteOrderResponse extends jspb.Message { - getTotalPremiumSat(): number; - setTotalPremiumSat(value: number): void; - - getRatePerBlock(): number; - setRatePerBlock(value: number): void; - - getRatePercent(): number; - setRatePercent(value: number): void; - - getTotalExecutionFeeSat(): number; - setTotalExecutionFeeSat(value: number): void; - - getWorstCaseChainFeeSat(): number; - setWorstCaseChainFeeSat(value: number): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): QuoteOrderResponse.AsObject; - static toObject(includeInstance: boolean, msg: QuoteOrderResponse): QuoteOrderResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: QuoteOrderResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): QuoteOrderResponse; - static deserializeBinaryFromReader(message: QuoteOrderResponse, reader: jspb.BinaryReader): QuoteOrderResponse; -} - -export namespace QuoteOrderResponse { - export type AsObject = { - totalPremiumSat: number, - ratePerBlock: number, - ratePercent: number, - totalExecutionFeeSat: number, - worstCaseChainFeeSat: number, - } -} - -export class OrderEvent extends jspb.Message { - getTimestampNs(): number; - setTimestampNs(value: number): void; - - getEventStr(): string; - setEventStr(value: string): void; - - hasStateChange(): boolean; - clearStateChange(): void; - getStateChange(): UpdatedEvent | undefined; - setStateChange(value?: UpdatedEvent): void; - - hasMatched(): boolean; - clearMatched(): void; - getMatched(): MatchEvent | undefined; - setMatched(value?: MatchEvent): void; - - getEventCase(): OrderEvent.EventCase; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): OrderEvent.AsObject; - static toObject(includeInstance: boolean, msg: OrderEvent): OrderEvent.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: OrderEvent, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): OrderEvent; - static deserializeBinaryFromReader(message: OrderEvent, reader: jspb.BinaryReader): OrderEvent; -} - -export namespace OrderEvent { - export type AsObject = { - timestampNs: number, - eventStr: string, - stateChange?: UpdatedEvent.AsObject, - matched?: MatchEvent.AsObject, - } - - export enum EventCase { - EVENT_NOT_SET = 0, - STATE_CHANGE = 3, - MATCHED = 4, - } -} - -export class UpdatedEvent extends jspb.Message { - getPreviousState(): auctioneerrpc_auctioneer_pb.OrderStateMap[keyof auctioneerrpc_auctioneer_pb.OrderStateMap]; - setPreviousState(value: auctioneerrpc_auctioneer_pb.OrderStateMap[keyof auctioneerrpc_auctioneer_pb.OrderStateMap]): void; - - getNewState(): auctioneerrpc_auctioneer_pb.OrderStateMap[keyof auctioneerrpc_auctioneer_pb.OrderStateMap]; - setNewState(value: auctioneerrpc_auctioneer_pb.OrderStateMap[keyof auctioneerrpc_auctioneer_pb.OrderStateMap]): void; - - getUnitsFilled(): number; - setUnitsFilled(value: number): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): UpdatedEvent.AsObject; - static toObject(includeInstance: boolean, msg: UpdatedEvent): UpdatedEvent.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: UpdatedEvent, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): UpdatedEvent; - static deserializeBinaryFromReader(message: UpdatedEvent, reader: jspb.BinaryReader): UpdatedEvent; -} - -export namespace UpdatedEvent { - export type AsObject = { - previousState: auctioneerrpc_auctioneer_pb.OrderStateMap[keyof auctioneerrpc_auctioneer_pb.OrderStateMap], - newState: auctioneerrpc_auctioneer_pb.OrderStateMap[keyof auctioneerrpc_auctioneer_pb.OrderStateMap], - unitsFilled: number, - } -} - -export class MatchEvent extends jspb.Message { - getMatchState(): MatchStateMap[keyof MatchStateMap]; - setMatchState(value: MatchStateMap[keyof MatchStateMap]): void; - - getUnitsFilled(): number; - setUnitsFilled(value: number): void; - - getMatchedOrder(): Uint8Array | string; - getMatchedOrder_asU8(): Uint8Array; - getMatchedOrder_asB64(): string; - setMatchedOrder(value: Uint8Array | string): void; - - getRejectReason(): MatchRejectReasonMap[keyof MatchRejectReasonMap]; - setRejectReason(value: MatchRejectReasonMap[keyof MatchRejectReasonMap]): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): MatchEvent.AsObject; - static toObject(includeInstance: boolean, msg: MatchEvent): MatchEvent.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: MatchEvent, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): MatchEvent; - static deserializeBinaryFromReader(message: MatchEvent, reader: jspb.BinaryReader): MatchEvent; -} - -export namespace MatchEvent { - export type AsObject = { - matchState: MatchStateMap[keyof MatchStateMap], - unitsFilled: number, - matchedOrder: Uint8Array | string, - rejectReason: MatchRejectReasonMap[keyof MatchRejectReasonMap], - } -} - -export class RecoverAccountsRequest extends jspb.Message { - getFullClient(): boolean; - setFullClient(value: boolean): void; - - getAccountTarget(): number; - setAccountTarget(value: number): void; - - getAuctioneerKey(): string; - setAuctioneerKey(value: string): void; - - getHeightHint(): number; - setHeightHint(value: number): void; - - getBitcoinHost(): string; - setBitcoinHost(value: string): void; - - getBitcoinUser(): string; - setBitcoinUser(value: string): void; - - getBitcoinPassword(): string; - setBitcoinPassword(value: string): void; - - getBitcoinHttppostmode(): boolean; - setBitcoinHttppostmode(value: boolean): void; - - getBitcoinUsetls(): boolean; - setBitcoinUsetls(value: boolean): void; - - getBitcoinTlspath(): string; - setBitcoinTlspath(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): RecoverAccountsRequest.AsObject; - static toObject(includeInstance: boolean, msg: RecoverAccountsRequest): RecoverAccountsRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: RecoverAccountsRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): RecoverAccountsRequest; - static deserializeBinaryFromReader(message: RecoverAccountsRequest, reader: jspb.BinaryReader): RecoverAccountsRequest; -} - -export namespace RecoverAccountsRequest { - export type AsObject = { - fullClient: boolean, - accountTarget: number, - auctioneerKey: string, - heightHint: number, - bitcoinHost: string, - bitcoinUser: string, - bitcoinPassword: string, - bitcoinHttppostmode: boolean, - bitcoinUsetls: boolean, - bitcoinTlspath: string, - } -} - -export class RecoverAccountsResponse extends jspb.Message { - getNumRecoveredAccounts(): number; - setNumRecoveredAccounts(value: number): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): RecoverAccountsResponse.AsObject; - static toObject(includeInstance: boolean, msg: RecoverAccountsResponse): RecoverAccountsResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: RecoverAccountsResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): RecoverAccountsResponse; - static deserializeBinaryFromReader(message: RecoverAccountsResponse, reader: jspb.BinaryReader): RecoverAccountsResponse; -} - -export namespace RecoverAccountsResponse { - export type AsObject = { - numRecoveredAccounts: number, - } -} - -export class AuctionFeeRequest extends jspb.Message { - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): AuctionFeeRequest.AsObject; - static toObject(includeInstance: boolean, msg: AuctionFeeRequest): AuctionFeeRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: AuctionFeeRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): AuctionFeeRequest; - static deserializeBinaryFromReader(message: AuctionFeeRequest, reader: jspb.BinaryReader): AuctionFeeRequest; -} - -export namespace AuctionFeeRequest { - export type AsObject = { - } -} - -export class AuctionFeeResponse extends jspb.Message { - hasExecutionFee(): boolean; - clearExecutionFee(): void; - getExecutionFee(): auctioneerrpc_auctioneer_pb.ExecutionFee | undefined; - setExecutionFee(value?: auctioneerrpc_auctioneer_pb.ExecutionFee): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): AuctionFeeResponse.AsObject; - static toObject(includeInstance: boolean, msg: AuctionFeeResponse): AuctionFeeResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: AuctionFeeResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): AuctionFeeResponse; - static deserializeBinaryFromReader(message: AuctionFeeResponse, reader: jspb.BinaryReader): AuctionFeeResponse; -} - -export namespace AuctionFeeResponse { - export type AsObject = { - executionFee?: auctioneerrpc_auctioneer_pb.ExecutionFee.AsObject, - } -} - -export class Lease extends jspb.Message { - hasChannelPoint(): boolean; - clearChannelPoint(): void; - getChannelPoint(): auctioneerrpc_auctioneer_pb.OutPoint | undefined; - setChannelPoint(value?: auctioneerrpc_auctioneer_pb.OutPoint): void; - - getChannelAmtSat(): number; - setChannelAmtSat(value: number): void; - - getChannelDurationBlocks(): number; - setChannelDurationBlocks(value: number): void; - - getChannelLeaseExpiry(): number; - setChannelLeaseExpiry(value: number): void; - - getPremiumSat(): number; - setPremiumSat(value: number): void; - - getExecutionFeeSat(): number; - setExecutionFeeSat(value: number): void; - - getChainFeeSat(): number; - setChainFeeSat(value: number): void; - - getClearingRatePrice(): number; - setClearingRatePrice(value: number): void; - - getOrderFixedRate(): number; - setOrderFixedRate(value: number): void; - - getOrderNonce(): Uint8Array | string; - getOrderNonce_asU8(): Uint8Array; - getOrderNonce_asB64(): string; - setOrderNonce(value: Uint8Array | string): void; - - getMatchedOrderNonce(): Uint8Array | string; - getMatchedOrderNonce_asU8(): Uint8Array; - getMatchedOrderNonce_asB64(): string; - setMatchedOrderNonce(value: Uint8Array | string): void; - - getPurchased(): boolean; - setPurchased(value: boolean): void; - - getChannelRemoteNodeKey(): Uint8Array | string; - getChannelRemoteNodeKey_asU8(): Uint8Array; - getChannelRemoteNodeKey_asB64(): string; - setChannelRemoteNodeKey(value: Uint8Array | string): void; - - getChannelNodeTier(): auctioneerrpc_auctioneer_pb.NodeTierMap[keyof auctioneerrpc_auctioneer_pb.NodeTierMap]; - setChannelNodeTier(value: auctioneerrpc_auctioneer_pb.NodeTierMap[keyof auctioneerrpc_auctioneer_pb.NodeTierMap]): void; - - getSelfChanBalance(): number; - setSelfChanBalance(value: number): void; - - getSidecarChannel(): boolean; - setSidecarChannel(value: boolean): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Lease.AsObject; - static toObject(includeInstance: boolean, msg: Lease): Lease.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: Lease, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Lease; - static deserializeBinaryFromReader(message: Lease, reader: jspb.BinaryReader): Lease; -} - -export namespace Lease { - export type AsObject = { - channelPoint?: auctioneerrpc_auctioneer_pb.OutPoint.AsObject, - channelAmtSat: number, - channelDurationBlocks: number, - channelLeaseExpiry: number, - premiumSat: number, - executionFeeSat: number, - chainFeeSat: number, - clearingRatePrice: number, - orderFixedRate: number, - orderNonce: Uint8Array | string, - matchedOrderNonce: Uint8Array | string, - purchased: boolean, - channelRemoteNodeKey: Uint8Array | string, - channelNodeTier: auctioneerrpc_auctioneer_pb.NodeTierMap[keyof auctioneerrpc_auctioneer_pb.NodeTierMap], - selfChanBalance: number, - sidecarChannel: boolean, - } -} - -export class LeasesRequest extends jspb.Message { - clearBatchIdsList(): void; - getBatchIdsList(): Array; - getBatchIdsList_asU8(): Array; - getBatchIdsList_asB64(): Array; - setBatchIdsList(value: Array): void; - addBatchIds(value: Uint8Array | string, index?: number): Uint8Array | string; - - clearAccountsList(): void; - getAccountsList(): Array; - getAccountsList_asU8(): Array; - getAccountsList_asB64(): Array; - setAccountsList(value: Array): void; - addAccounts(value: Uint8Array | string, index?: number): Uint8Array | string; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): LeasesRequest.AsObject; - static toObject(includeInstance: boolean, msg: LeasesRequest): LeasesRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: LeasesRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): LeasesRequest; - static deserializeBinaryFromReader(message: LeasesRequest, reader: jspb.BinaryReader): LeasesRequest; -} - -export namespace LeasesRequest { - export type AsObject = { - batchIds: Array, - accounts: Array, - } -} - -export class LeasesResponse extends jspb.Message { - clearLeasesList(): void; - getLeasesList(): Array; - setLeasesList(value: Array): void; - addLeases(value?: Lease, index?: number): Lease; - - getTotalAmtEarnedSat(): number; - setTotalAmtEarnedSat(value: number): void; - - getTotalAmtPaidSat(): number; - setTotalAmtPaidSat(value: number): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): LeasesResponse.AsObject; - static toObject(includeInstance: boolean, msg: LeasesResponse): LeasesResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: LeasesResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): LeasesResponse; - static deserializeBinaryFromReader(message: LeasesResponse, reader: jspb.BinaryReader): LeasesResponse; -} - -export namespace LeasesResponse { - export type AsObject = { - leases: Array, - totalAmtEarnedSat: number, - totalAmtPaidSat: number, - } -} - -export class TokensRequest extends jspb.Message { - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): TokensRequest.AsObject; - static toObject(includeInstance: boolean, msg: TokensRequest): TokensRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: TokensRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): TokensRequest; - static deserializeBinaryFromReader(message: TokensRequest, reader: jspb.BinaryReader): TokensRequest; -} - -export namespace TokensRequest { - export type AsObject = { - } -} - -export class TokensResponse extends jspb.Message { - clearTokensList(): void; - getTokensList(): Array; - setTokensList(value: Array): void; - addTokens(value?: LsatToken, index?: number): LsatToken; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): TokensResponse.AsObject; - static toObject(includeInstance: boolean, msg: TokensResponse): TokensResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: TokensResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): TokensResponse; - static deserializeBinaryFromReader(message: TokensResponse, reader: jspb.BinaryReader): TokensResponse; -} - -export namespace TokensResponse { - export type AsObject = { - tokens: Array, - } -} - -export class LsatToken extends jspb.Message { - getBaseMacaroon(): Uint8Array | string; - getBaseMacaroon_asU8(): Uint8Array; - getBaseMacaroon_asB64(): string; - setBaseMacaroon(value: Uint8Array | string): void; - - getPaymentHash(): Uint8Array | string; - getPaymentHash_asU8(): Uint8Array; - getPaymentHash_asB64(): string; - setPaymentHash(value: Uint8Array | string): void; - - getPaymentPreimage(): Uint8Array | string; - getPaymentPreimage_asU8(): Uint8Array; - getPaymentPreimage_asB64(): string; - setPaymentPreimage(value: Uint8Array | string): void; - - getAmountPaidMsat(): number; - setAmountPaidMsat(value: number): void; - - getRoutingFeePaidMsat(): number; - setRoutingFeePaidMsat(value: number): void; - - getTimeCreated(): number; - setTimeCreated(value: number): void; - - getExpired(): boolean; - setExpired(value: boolean): void; - - getStorageName(): string; - setStorageName(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): LsatToken.AsObject; - static toObject(includeInstance: boolean, msg: LsatToken): LsatToken.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: LsatToken, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): LsatToken; - static deserializeBinaryFromReader(message: LsatToken, reader: jspb.BinaryReader): LsatToken; -} - -export namespace LsatToken { - export type AsObject = { - baseMacaroon: Uint8Array | string, - paymentHash: Uint8Array | string, - paymentPreimage: Uint8Array | string, - amountPaidMsat: number, - routingFeePaidMsat: number, - timeCreated: number, - expired: boolean, - storageName: string, - } -} - -export class LeaseDurationRequest extends jspb.Message { - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): LeaseDurationRequest.AsObject; - static toObject(includeInstance: boolean, msg: LeaseDurationRequest): LeaseDurationRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: LeaseDurationRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): LeaseDurationRequest; - static deserializeBinaryFromReader(message: LeaseDurationRequest, reader: jspb.BinaryReader): LeaseDurationRequest; -} - -export namespace LeaseDurationRequest { - export type AsObject = { - } -} - -export class LeaseDurationResponse extends jspb.Message { - getLeaseDurationsMap(): jspb.Map; - clearLeaseDurationsMap(): void; - getLeaseDurationBucketsMap(): jspb.Map; - clearLeaseDurationBucketsMap(): void; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): LeaseDurationResponse.AsObject; - static toObject(includeInstance: boolean, msg: LeaseDurationResponse): LeaseDurationResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: LeaseDurationResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): LeaseDurationResponse; - static deserializeBinaryFromReader(message: LeaseDurationResponse, reader: jspb.BinaryReader): LeaseDurationResponse; -} - -export namespace LeaseDurationResponse { - export type AsObject = { - leaseDurations: Array<[number, boolean]>, - leaseDurationBuckets: Array<[number, auctioneerrpc_auctioneer_pb.DurationBucketState[keyof auctioneerrpc_auctioneer_pb.DurationBucketState]]>, - } -} - -export class NextBatchInfoRequest extends jspb.Message { - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): NextBatchInfoRequest.AsObject; - static toObject(includeInstance: boolean, msg: NextBatchInfoRequest): NextBatchInfoRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: NextBatchInfoRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): NextBatchInfoRequest; - static deserializeBinaryFromReader(message: NextBatchInfoRequest, reader: jspb.BinaryReader): NextBatchInfoRequest; -} - -export namespace NextBatchInfoRequest { - export type AsObject = { - } -} - -export class NextBatchInfoResponse extends jspb.Message { - getConfTarget(): number; - setConfTarget(value: number): void; - - getFeeRateSatPerKw(): number; - setFeeRateSatPerKw(value: number): void; - - getClearTimestamp(): number; - setClearTimestamp(value: number): void; - - getAutoRenewExtensionBlocks(): number; - setAutoRenewExtensionBlocks(value: number): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): NextBatchInfoResponse.AsObject; - static toObject(includeInstance: boolean, msg: NextBatchInfoResponse): NextBatchInfoResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: NextBatchInfoResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): NextBatchInfoResponse; - static deserializeBinaryFromReader(message: NextBatchInfoResponse, reader: jspb.BinaryReader): NextBatchInfoResponse; -} - -export namespace NextBatchInfoResponse { - export type AsObject = { - confTarget: number, - feeRateSatPerKw: number, - clearTimestamp: number, - autoRenewExtensionBlocks: number, - } -} - -export class NodeRatingRequest extends jspb.Message { - clearNodePubkeysList(): void; - getNodePubkeysList(): Array; - getNodePubkeysList_asU8(): Array; - getNodePubkeysList_asB64(): Array; - setNodePubkeysList(value: Array): void; - addNodePubkeys(value: Uint8Array | string, index?: number): Uint8Array | string; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): NodeRatingRequest.AsObject; - static toObject(includeInstance: boolean, msg: NodeRatingRequest): NodeRatingRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: NodeRatingRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): NodeRatingRequest; - static deserializeBinaryFromReader(message: NodeRatingRequest, reader: jspb.BinaryReader): NodeRatingRequest; -} - -export namespace NodeRatingRequest { - export type AsObject = { - nodePubkeys: Array, - } -} - -export class NodeRatingResponse extends jspb.Message { - clearNodeRatingsList(): void; - getNodeRatingsList(): Array; - setNodeRatingsList(value: Array): void; - addNodeRatings(value?: auctioneerrpc_auctioneer_pb.NodeRating, index?: number): auctioneerrpc_auctioneer_pb.NodeRating; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): NodeRatingResponse.AsObject; - static toObject(includeInstance: boolean, msg: NodeRatingResponse): NodeRatingResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: NodeRatingResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): NodeRatingResponse; - static deserializeBinaryFromReader(message: NodeRatingResponse, reader: jspb.BinaryReader): NodeRatingResponse; -} - -export namespace NodeRatingResponse { - export type AsObject = { - nodeRatings: Array, - } -} - -export class GetInfoRequest extends jspb.Message { - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GetInfoRequest.AsObject; - static toObject(includeInstance: boolean, msg: GetInfoRequest): GetInfoRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: GetInfoRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GetInfoRequest; - static deserializeBinaryFromReader(message: GetInfoRequest, reader: jspb.BinaryReader): GetInfoRequest; -} - -export namespace GetInfoRequest { - export type AsObject = { - } -} - -export class GetInfoResponse extends jspb.Message { - getVersion(): string; - setVersion(value: string): void; - - getAccountsTotal(): number; - setAccountsTotal(value: number): void; - - getAccountsActive(): number; - setAccountsActive(value: number): void; - - getAccountsActiveExpired(): number; - setAccountsActiveExpired(value: number): void; - - getAccountsArchived(): number; - setAccountsArchived(value: number): void; - - getOrdersTotal(): number; - setOrdersTotal(value: number): void; - - getOrdersActive(): number; - setOrdersActive(value: number): void; - - getOrdersArchived(): number; - setOrdersArchived(value: number): void; - - getCurrentBlockHeight(): number; - setCurrentBlockHeight(value: number): void; - - getBatchesInvolved(): number; - setBatchesInvolved(value: number): void; - - hasNodeRating(): boolean; - clearNodeRating(): void; - getNodeRating(): auctioneerrpc_auctioneer_pb.NodeRating | undefined; - setNodeRating(value?: auctioneerrpc_auctioneer_pb.NodeRating): void; - - getLsatTokens(): number; - setLsatTokens(value: number): void; - - getSubscribedToAuctioneer(): boolean; - setSubscribedToAuctioneer(value: boolean): void; - - getNewNodesOnly(): boolean; - setNewNodesOnly(value: boolean): void; - - getMarketInfoMap(): jspb.Map; - clearMarketInfoMap(): void; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GetInfoResponse.AsObject; - static toObject(includeInstance: boolean, msg: GetInfoResponse): GetInfoResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: GetInfoResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GetInfoResponse; - static deserializeBinaryFromReader(message: GetInfoResponse, reader: jspb.BinaryReader): GetInfoResponse; -} - -export namespace GetInfoResponse { - export type AsObject = { - version: string, - accountsTotal: number, - accountsActive: number, - accountsActiveExpired: number, - accountsArchived: number, - ordersTotal: number, - ordersActive: number, - ordersArchived: number, - currentBlockHeight: number, - batchesInvolved: number, - nodeRating?: auctioneerrpc_auctioneer_pb.NodeRating.AsObject, - lsatTokens: number, - subscribedToAuctioneer: boolean, - newNodesOnly: boolean, - marketInfo: Array<[number, auctioneerrpc_auctioneer_pb.MarketInfo.AsObject]>, - } -} - -export class StopDaemonRequest extends jspb.Message { - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): StopDaemonRequest.AsObject; - static toObject(includeInstance: boolean, msg: StopDaemonRequest): StopDaemonRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: StopDaemonRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): StopDaemonRequest; - static deserializeBinaryFromReader(message: StopDaemonRequest, reader: jspb.BinaryReader): StopDaemonRequest; -} - -export namespace StopDaemonRequest { - export type AsObject = { - } -} - -export class StopDaemonResponse extends jspb.Message { - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): StopDaemonResponse.AsObject; - static toObject(includeInstance: boolean, msg: StopDaemonResponse): StopDaemonResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: StopDaemonResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): StopDaemonResponse; - static deserializeBinaryFromReader(message: StopDaemonResponse, reader: jspb.BinaryReader): StopDaemonResponse; -} - -export namespace StopDaemonResponse { - export type AsObject = { - } -} - -export class OfferSidecarRequest extends jspb.Message { - getAutoNegotiate(): boolean; - setAutoNegotiate(value: boolean): void; - - hasBid(): boolean; - clearBid(): void; - getBid(): Bid | undefined; - setBid(value?: Bid): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): OfferSidecarRequest.AsObject; - static toObject(includeInstance: boolean, msg: OfferSidecarRequest): OfferSidecarRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: OfferSidecarRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): OfferSidecarRequest; - static deserializeBinaryFromReader(message: OfferSidecarRequest, reader: jspb.BinaryReader): OfferSidecarRequest; -} - -export namespace OfferSidecarRequest { - export type AsObject = { - autoNegotiate: boolean, - bid?: Bid.AsObject, - } -} - -export class SidecarTicket extends jspb.Message { - getTicket(): string; - setTicket(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): SidecarTicket.AsObject; - static toObject(includeInstance: boolean, msg: SidecarTicket): SidecarTicket.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: SidecarTicket, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): SidecarTicket; - static deserializeBinaryFromReader(message: SidecarTicket, reader: jspb.BinaryReader): SidecarTicket; -} - -export namespace SidecarTicket { - export type AsObject = { - ticket: string, - } -} - -export class DecodedSidecarTicket extends jspb.Message { - getId(): Uint8Array | string; - getId_asU8(): Uint8Array; - getId_asB64(): string; - setId(value: Uint8Array | string): void; - - getVersion(): number; - setVersion(value: number): void; - - getState(): string; - setState(value: string): void; - - getOfferCapacity(): number; - setOfferCapacity(value: number): void; - - getOfferPushAmount(): number; - setOfferPushAmount(value: number): void; - - getOfferLeaseDurationBlocks(): number; - setOfferLeaseDurationBlocks(value: number): void; - - getOfferSignPubkey(): Uint8Array | string; - getOfferSignPubkey_asU8(): Uint8Array; - getOfferSignPubkey_asB64(): string; - setOfferSignPubkey(value: Uint8Array | string): void; - - getOfferSignature(): Uint8Array | string; - getOfferSignature_asU8(): Uint8Array; - getOfferSignature_asB64(): string; - setOfferSignature(value: Uint8Array | string): void; - - getOfferAuto(): boolean; - setOfferAuto(value: boolean): void; - - getRecipientNodePubkey(): Uint8Array | string; - getRecipientNodePubkey_asU8(): Uint8Array; - getRecipientNodePubkey_asB64(): string; - setRecipientNodePubkey(value: Uint8Array | string): void; - - getRecipientMultisigPubkey(): Uint8Array | string; - getRecipientMultisigPubkey_asU8(): Uint8Array; - getRecipientMultisigPubkey_asB64(): string; - setRecipientMultisigPubkey(value: Uint8Array | string): void; - - getRecipientMultisigPubkeyIndex(): number; - setRecipientMultisigPubkeyIndex(value: number): void; - - getOrderBidNonce(): Uint8Array | string; - getOrderBidNonce_asU8(): Uint8Array; - getOrderBidNonce_asB64(): string; - setOrderBidNonce(value: Uint8Array | string): void; - - getOrderSignature(): Uint8Array | string; - getOrderSignature_asU8(): Uint8Array; - getOrderSignature_asB64(): string; - setOrderSignature(value: Uint8Array | string): void; - - getExecutionPendingChannelId(): Uint8Array | string; - getExecutionPendingChannelId_asU8(): Uint8Array; - getExecutionPendingChannelId_asB64(): string; - setExecutionPendingChannelId(value: Uint8Array | string): void; - - getEncodedTicket(): string; - setEncodedTicket(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): DecodedSidecarTicket.AsObject; - static toObject(includeInstance: boolean, msg: DecodedSidecarTicket): DecodedSidecarTicket.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: DecodedSidecarTicket, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): DecodedSidecarTicket; - static deserializeBinaryFromReader(message: DecodedSidecarTicket, reader: jspb.BinaryReader): DecodedSidecarTicket; -} - -export namespace DecodedSidecarTicket { - export type AsObject = { - id: Uint8Array | string, - version: number, - state: string, - offerCapacity: number, - offerPushAmount: number, - offerLeaseDurationBlocks: number, - offerSignPubkey: Uint8Array | string, - offerSignature: Uint8Array | string, - offerAuto: boolean, - recipientNodePubkey: Uint8Array | string, - recipientMultisigPubkey: Uint8Array | string, - recipientMultisigPubkeyIndex: number, - orderBidNonce: Uint8Array | string, - orderSignature: Uint8Array | string, - executionPendingChannelId: Uint8Array | string, - encodedTicket: string, - } -} - -export class RegisterSidecarRequest extends jspb.Message { - getTicket(): string; - setTicket(value: string): void; - - getAutoNegotiate(): boolean; - setAutoNegotiate(value: boolean): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): RegisterSidecarRequest.AsObject; - static toObject(includeInstance: boolean, msg: RegisterSidecarRequest): RegisterSidecarRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: RegisterSidecarRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): RegisterSidecarRequest; - static deserializeBinaryFromReader(message: RegisterSidecarRequest, reader: jspb.BinaryReader): RegisterSidecarRequest; -} - -export namespace RegisterSidecarRequest { - export type AsObject = { - ticket: string, - autoNegotiate: boolean, - } -} - -export class ExpectSidecarChannelRequest extends jspb.Message { - getTicket(): string; - setTicket(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ExpectSidecarChannelRequest.AsObject; - static toObject(includeInstance: boolean, msg: ExpectSidecarChannelRequest): ExpectSidecarChannelRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ExpectSidecarChannelRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ExpectSidecarChannelRequest; - static deserializeBinaryFromReader(message: ExpectSidecarChannelRequest, reader: jspb.BinaryReader): ExpectSidecarChannelRequest; -} - -export namespace ExpectSidecarChannelRequest { - export type AsObject = { - ticket: string, - } -} - -export class ExpectSidecarChannelResponse extends jspb.Message { - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ExpectSidecarChannelResponse.AsObject; - static toObject(includeInstance: boolean, msg: ExpectSidecarChannelResponse): ExpectSidecarChannelResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ExpectSidecarChannelResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ExpectSidecarChannelResponse; - static deserializeBinaryFromReader(message: ExpectSidecarChannelResponse, reader: jspb.BinaryReader): ExpectSidecarChannelResponse; -} - -export namespace ExpectSidecarChannelResponse { - export type AsObject = { - } -} - -export class ListSidecarsRequest extends jspb.Message { - getSidecarId(): Uint8Array | string; - getSidecarId_asU8(): Uint8Array; - getSidecarId_asB64(): string; - setSidecarId(value: Uint8Array | string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ListSidecarsRequest.AsObject; - static toObject(includeInstance: boolean, msg: ListSidecarsRequest): ListSidecarsRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ListSidecarsRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ListSidecarsRequest; - static deserializeBinaryFromReader(message: ListSidecarsRequest, reader: jspb.BinaryReader): ListSidecarsRequest; -} - -export namespace ListSidecarsRequest { - export type AsObject = { - sidecarId: Uint8Array | string, - } -} - -export class ListSidecarsResponse extends jspb.Message { - clearTicketsList(): void; - getTicketsList(): Array; - setTicketsList(value: Array): void; - addTickets(value?: DecodedSidecarTicket, index?: number): DecodedSidecarTicket; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ListSidecarsResponse.AsObject; - static toObject(includeInstance: boolean, msg: ListSidecarsResponse): ListSidecarsResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ListSidecarsResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ListSidecarsResponse; - static deserializeBinaryFromReader(message: ListSidecarsResponse, reader: jspb.BinaryReader): ListSidecarsResponse; -} - -export namespace ListSidecarsResponse { - export type AsObject = { - tickets: Array, - } -} - -export class CancelSidecarRequest extends jspb.Message { - getSidecarId(): Uint8Array | string; - getSidecarId_asU8(): Uint8Array; - getSidecarId_asB64(): string; - setSidecarId(value: Uint8Array | string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): CancelSidecarRequest.AsObject; - static toObject(includeInstance: boolean, msg: CancelSidecarRequest): CancelSidecarRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: CancelSidecarRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): CancelSidecarRequest; - static deserializeBinaryFromReader(message: CancelSidecarRequest, reader: jspb.BinaryReader): CancelSidecarRequest; -} - -export namespace CancelSidecarRequest { - export type AsObject = { - sidecarId: Uint8Array | string, - } -} - -export class CancelSidecarResponse extends jspb.Message { - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): CancelSidecarResponse.AsObject; - static toObject(includeInstance: boolean, msg: CancelSidecarResponse): CancelSidecarResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: CancelSidecarResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): CancelSidecarResponse; - static deserializeBinaryFromReader(message: CancelSidecarResponse, reader: jspb.BinaryReader): CancelSidecarResponse; -} - -export namespace CancelSidecarResponse { - export type AsObject = { - } -} - -export interface AccountStateMap { - PENDING_OPEN: 0; - PENDING_UPDATE: 1; - OPEN: 2; - EXPIRED: 3; - PENDING_CLOSED: 4; - CLOSED: 5; - RECOVERY_FAILED: 6; - PENDING_BATCH: 7; -} - -export const AccountState: AccountStateMap; - -export interface MatchStateMap { - PREPARE: 0; - ACCEPTED: 1; - REJECTED: 2; - SIGNED: 3; - FINALIZED: 4; -} - -export const MatchState: MatchStateMap; - -export interface MatchRejectReasonMap { - NONE: 0; - SERVER_MISBEHAVIOR: 1; - BATCH_VERSION_MISMATCH: 2; - PARTIAL_REJECT_COLLATERAL: 3; - PARTIAL_REJECT_DUPLICATE_PEER: 4; - PARTIAL_REJECT_CHANNEL_FUNDING_FAILED: 5; -} - -export const MatchRejectReason: MatchRejectReasonMap; - diff --git a/lib/types/generated/trader_pb.js b/lib/types/generated/trader_pb.js deleted file mode 100644 index 327d78f..0000000 --- a/lib/types/generated/trader_pb.js +++ /dev/null @@ -1,15715 +0,0 @@ -// source: trader.proto -/** - * @fileoverview - * @enhanceable - * @suppress {missingRequire} reports error on implicit type usages. - * @suppress {messageConventions} JS Compiler reports an error if a variable or - * field starts with 'MSG_' and isn't a translatable message. - * @public - */ -// GENERATED CODE -- DO NOT EDIT! -/* eslint-disable */ -// @ts-nocheck - -var jspb = require('google-protobuf'); -var goog = jspb; -var global = Function('return this')(); - -var auctioneerrpc_auctioneer_pb = require('./auctioneerrpc/auctioneer_pb.js'); -goog.object.extend(proto, auctioneerrpc_auctioneer_pb); -goog.exportSymbol('proto.poolrpc.Account', null, global); -goog.exportSymbol('proto.poolrpc.AccountState', null, global); -goog.exportSymbol('proto.poolrpc.Ask', null, global); -goog.exportSymbol('proto.poolrpc.AuctionFeeRequest', null, global); -goog.exportSymbol('proto.poolrpc.AuctionFeeResponse', null, global); -goog.exportSymbol('proto.poolrpc.Bid', null, global); -goog.exportSymbol('proto.poolrpc.BumpAccountFeeRequest', null, global); -goog.exportSymbol('proto.poolrpc.BumpAccountFeeResponse', null, global); -goog.exportSymbol('proto.poolrpc.CancelOrderRequest', null, global); -goog.exportSymbol('proto.poolrpc.CancelOrderResponse', null, global); -goog.exportSymbol('proto.poolrpc.CancelSidecarRequest', null, global); -goog.exportSymbol('proto.poolrpc.CancelSidecarResponse', null, global); -goog.exportSymbol('proto.poolrpc.CloseAccountRequest', null, global); -goog.exportSymbol('proto.poolrpc.CloseAccountRequest.FundsDestinationCase', null, global); -goog.exportSymbol('proto.poolrpc.CloseAccountResponse', null, global); -goog.exportSymbol('proto.poolrpc.DecodedSidecarTicket', null, global); -goog.exportSymbol('proto.poolrpc.DepositAccountRequest', null, global); -goog.exportSymbol('proto.poolrpc.DepositAccountRequest.AccountExpiryCase', null, global); -goog.exportSymbol('proto.poolrpc.DepositAccountResponse', null, global); -goog.exportSymbol('proto.poolrpc.ExpectSidecarChannelRequest', null, global); -goog.exportSymbol('proto.poolrpc.ExpectSidecarChannelResponse', null, global); -goog.exportSymbol('proto.poolrpc.GetInfoRequest', null, global); -goog.exportSymbol('proto.poolrpc.GetInfoResponse', null, global); -goog.exportSymbol('proto.poolrpc.InitAccountRequest', null, global); -goog.exportSymbol('proto.poolrpc.InitAccountRequest.AccountExpiryCase', null, global); -goog.exportSymbol('proto.poolrpc.InitAccountRequest.FeesCase', null, global); -goog.exportSymbol('proto.poolrpc.Lease', null, global); -goog.exportSymbol('proto.poolrpc.LeaseDurationRequest', null, global); -goog.exportSymbol('proto.poolrpc.LeaseDurationResponse', null, global); -goog.exportSymbol('proto.poolrpc.LeasesRequest', null, global); -goog.exportSymbol('proto.poolrpc.LeasesResponse', null, global); -goog.exportSymbol('proto.poolrpc.ListAccountsRequest', null, global); -goog.exportSymbol('proto.poolrpc.ListAccountsResponse', null, global); -goog.exportSymbol('proto.poolrpc.ListOrdersRequest', null, global); -goog.exportSymbol('proto.poolrpc.ListOrdersResponse', null, global); -goog.exportSymbol('proto.poolrpc.ListSidecarsRequest', null, global); -goog.exportSymbol('proto.poolrpc.ListSidecarsResponse', null, global); -goog.exportSymbol('proto.poolrpc.LsatToken', null, global); -goog.exportSymbol('proto.poolrpc.MatchEvent', null, global); -goog.exportSymbol('proto.poolrpc.MatchRejectReason', null, global); -goog.exportSymbol('proto.poolrpc.MatchState', null, global); -goog.exportSymbol('proto.poolrpc.NextBatchInfoRequest', null, global); -goog.exportSymbol('proto.poolrpc.NextBatchInfoResponse', null, global); -goog.exportSymbol('proto.poolrpc.NodeRatingRequest', null, global); -goog.exportSymbol('proto.poolrpc.NodeRatingResponse', null, global); -goog.exportSymbol('proto.poolrpc.OfferSidecarRequest', null, global); -goog.exportSymbol('proto.poolrpc.Order', null, global); -goog.exportSymbol('proto.poolrpc.OrderEvent', null, global); -goog.exportSymbol('proto.poolrpc.OrderEvent.EventCase', null, global); -goog.exportSymbol('proto.poolrpc.Output', null, global); -goog.exportSymbol('proto.poolrpc.OutputWithFee', null, global); -goog.exportSymbol('proto.poolrpc.OutputWithFee.FeesCase', null, global); -goog.exportSymbol('proto.poolrpc.OutputsWithImplicitFee', null, global); -goog.exportSymbol('proto.poolrpc.QuoteAccountRequest', null, global); -goog.exportSymbol('proto.poolrpc.QuoteAccountRequest.FeesCase', null, global); -goog.exportSymbol('proto.poolrpc.QuoteAccountResponse', null, global); -goog.exportSymbol('proto.poolrpc.QuoteOrderRequest', null, global); -goog.exportSymbol('proto.poolrpc.QuoteOrderResponse', null, global); -goog.exportSymbol('proto.poolrpc.RecoverAccountsRequest', null, global); -goog.exportSymbol('proto.poolrpc.RecoverAccountsResponse', null, global); -goog.exportSymbol('proto.poolrpc.RegisterSidecarRequest', null, global); -goog.exportSymbol('proto.poolrpc.RenewAccountRequest', null, global); -goog.exportSymbol('proto.poolrpc.RenewAccountRequest.AccountExpiryCase', null, global); -goog.exportSymbol('proto.poolrpc.RenewAccountResponse', null, global); -goog.exportSymbol('proto.poolrpc.SidecarTicket', null, global); -goog.exportSymbol('proto.poolrpc.StopDaemonRequest', null, global); -goog.exportSymbol('proto.poolrpc.StopDaemonResponse', null, global); -goog.exportSymbol('proto.poolrpc.SubmitOrderRequest', null, global); -goog.exportSymbol('proto.poolrpc.SubmitOrderRequest.DetailsCase', null, global); -goog.exportSymbol('proto.poolrpc.SubmitOrderResponse', null, global); -goog.exportSymbol('proto.poolrpc.SubmitOrderResponse.DetailsCase', null, global); -goog.exportSymbol('proto.poolrpc.TokensRequest', null, global); -goog.exportSymbol('proto.poolrpc.TokensResponse', null, global); -goog.exportSymbol('proto.poolrpc.UpdatedEvent', null, global); -goog.exportSymbol('proto.poolrpc.WithdrawAccountRequest', null, global); -goog.exportSymbol('proto.poolrpc.WithdrawAccountRequest.AccountExpiryCase', null, global); -goog.exportSymbol('proto.poolrpc.WithdrawAccountResponse', null, global); -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.poolrpc.InitAccountRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.poolrpc.InitAccountRequest.oneofGroups_); -}; -goog.inherits(proto.poolrpc.InitAccountRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.poolrpc.InitAccountRequest.displayName = 'proto.poolrpc.InitAccountRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.poolrpc.QuoteAccountRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.poolrpc.QuoteAccountRequest.oneofGroups_); -}; -goog.inherits(proto.poolrpc.QuoteAccountRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.poolrpc.QuoteAccountRequest.displayName = 'proto.poolrpc.QuoteAccountRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.poolrpc.QuoteAccountResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.poolrpc.QuoteAccountResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.poolrpc.QuoteAccountResponse.displayName = 'proto.poolrpc.QuoteAccountResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.poolrpc.ListAccountsRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.poolrpc.ListAccountsRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.poolrpc.ListAccountsRequest.displayName = 'proto.poolrpc.ListAccountsRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.poolrpc.ListAccountsResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.poolrpc.ListAccountsResponse.repeatedFields_, null); -}; -goog.inherits(proto.poolrpc.ListAccountsResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.poolrpc.ListAccountsResponse.displayName = 'proto.poolrpc.ListAccountsResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.poolrpc.Output = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.poolrpc.Output, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.poolrpc.Output.displayName = 'proto.poolrpc.Output'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.poolrpc.OutputWithFee = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.poolrpc.OutputWithFee.oneofGroups_); -}; -goog.inherits(proto.poolrpc.OutputWithFee, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.poolrpc.OutputWithFee.displayName = 'proto.poolrpc.OutputWithFee'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.poolrpc.OutputsWithImplicitFee = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.poolrpc.OutputsWithImplicitFee.repeatedFields_, null); -}; -goog.inherits(proto.poolrpc.OutputsWithImplicitFee, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.poolrpc.OutputsWithImplicitFee.displayName = 'proto.poolrpc.OutputsWithImplicitFee'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.poolrpc.CloseAccountRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.poolrpc.CloseAccountRequest.oneofGroups_); -}; -goog.inherits(proto.poolrpc.CloseAccountRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.poolrpc.CloseAccountRequest.displayName = 'proto.poolrpc.CloseAccountRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.poolrpc.CloseAccountResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.poolrpc.CloseAccountResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.poolrpc.CloseAccountResponse.displayName = 'proto.poolrpc.CloseAccountResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.poolrpc.WithdrawAccountRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.poolrpc.WithdrawAccountRequest.repeatedFields_, proto.poolrpc.WithdrawAccountRequest.oneofGroups_); -}; -goog.inherits(proto.poolrpc.WithdrawAccountRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.poolrpc.WithdrawAccountRequest.displayName = 'proto.poolrpc.WithdrawAccountRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.poolrpc.WithdrawAccountResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.poolrpc.WithdrawAccountResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.poolrpc.WithdrawAccountResponse.displayName = 'proto.poolrpc.WithdrawAccountResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.poolrpc.DepositAccountRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.poolrpc.DepositAccountRequest.oneofGroups_); -}; -goog.inherits(proto.poolrpc.DepositAccountRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.poolrpc.DepositAccountRequest.displayName = 'proto.poolrpc.DepositAccountRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.poolrpc.DepositAccountResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.poolrpc.DepositAccountResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.poolrpc.DepositAccountResponse.displayName = 'proto.poolrpc.DepositAccountResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.poolrpc.RenewAccountRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.poolrpc.RenewAccountRequest.oneofGroups_); -}; -goog.inherits(proto.poolrpc.RenewAccountRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.poolrpc.RenewAccountRequest.displayName = 'proto.poolrpc.RenewAccountRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.poolrpc.RenewAccountResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.poolrpc.RenewAccountResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.poolrpc.RenewAccountResponse.displayName = 'proto.poolrpc.RenewAccountResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.poolrpc.BumpAccountFeeRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.poolrpc.BumpAccountFeeRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.poolrpc.BumpAccountFeeRequest.displayName = 'proto.poolrpc.BumpAccountFeeRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.poolrpc.BumpAccountFeeResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.poolrpc.BumpAccountFeeResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.poolrpc.BumpAccountFeeResponse.displayName = 'proto.poolrpc.BumpAccountFeeResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.poolrpc.Account = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.poolrpc.Account, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.poolrpc.Account.displayName = 'proto.poolrpc.Account'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.poolrpc.SubmitOrderRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.poolrpc.SubmitOrderRequest.oneofGroups_); -}; -goog.inherits(proto.poolrpc.SubmitOrderRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.poolrpc.SubmitOrderRequest.displayName = 'proto.poolrpc.SubmitOrderRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.poolrpc.SubmitOrderResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.poolrpc.SubmitOrderResponse.oneofGroups_); -}; -goog.inherits(proto.poolrpc.SubmitOrderResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.poolrpc.SubmitOrderResponse.displayName = 'proto.poolrpc.SubmitOrderResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.poolrpc.ListOrdersRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.poolrpc.ListOrdersRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.poolrpc.ListOrdersRequest.displayName = 'proto.poolrpc.ListOrdersRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.poolrpc.ListOrdersResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.poolrpc.ListOrdersResponse.repeatedFields_, null); -}; -goog.inherits(proto.poolrpc.ListOrdersResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.poolrpc.ListOrdersResponse.displayName = 'proto.poolrpc.ListOrdersResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.poolrpc.CancelOrderRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.poolrpc.CancelOrderRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.poolrpc.CancelOrderRequest.displayName = 'proto.poolrpc.CancelOrderRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.poolrpc.CancelOrderResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.poolrpc.CancelOrderResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.poolrpc.CancelOrderResponse.displayName = 'proto.poolrpc.CancelOrderResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.poolrpc.Order = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.poolrpc.Order.repeatedFields_, null); -}; -goog.inherits(proto.poolrpc.Order, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.poolrpc.Order.displayName = 'proto.poolrpc.Order'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.poolrpc.Bid = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.poolrpc.Bid, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.poolrpc.Bid.displayName = 'proto.poolrpc.Bid'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.poolrpc.Ask = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.poolrpc.Ask, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.poolrpc.Ask.displayName = 'proto.poolrpc.Ask'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.poolrpc.QuoteOrderRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.poolrpc.QuoteOrderRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.poolrpc.QuoteOrderRequest.displayName = 'proto.poolrpc.QuoteOrderRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.poolrpc.QuoteOrderResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.poolrpc.QuoteOrderResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.poolrpc.QuoteOrderResponse.displayName = 'proto.poolrpc.QuoteOrderResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.poolrpc.OrderEvent = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.poolrpc.OrderEvent.oneofGroups_); -}; -goog.inherits(proto.poolrpc.OrderEvent, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.poolrpc.OrderEvent.displayName = 'proto.poolrpc.OrderEvent'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.poolrpc.UpdatedEvent = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.poolrpc.UpdatedEvent, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.poolrpc.UpdatedEvent.displayName = 'proto.poolrpc.UpdatedEvent'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.poolrpc.MatchEvent = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.poolrpc.MatchEvent, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.poolrpc.MatchEvent.displayName = 'proto.poolrpc.MatchEvent'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.poolrpc.RecoverAccountsRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.poolrpc.RecoverAccountsRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.poolrpc.RecoverAccountsRequest.displayName = 'proto.poolrpc.RecoverAccountsRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.poolrpc.RecoverAccountsResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.poolrpc.RecoverAccountsResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.poolrpc.RecoverAccountsResponse.displayName = 'proto.poolrpc.RecoverAccountsResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.poolrpc.AuctionFeeRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.poolrpc.AuctionFeeRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.poolrpc.AuctionFeeRequest.displayName = 'proto.poolrpc.AuctionFeeRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.poolrpc.AuctionFeeResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.poolrpc.AuctionFeeResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.poolrpc.AuctionFeeResponse.displayName = 'proto.poolrpc.AuctionFeeResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.poolrpc.Lease = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.poolrpc.Lease, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.poolrpc.Lease.displayName = 'proto.poolrpc.Lease'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.poolrpc.LeasesRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.poolrpc.LeasesRequest.repeatedFields_, null); -}; -goog.inherits(proto.poolrpc.LeasesRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.poolrpc.LeasesRequest.displayName = 'proto.poolrpc.LeasesRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.poolrpc.LeasesResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.poolrpc.LeasesResponse.repeatedFields_, null); -}; -goog.inherits(proto.poolrpc.LeasesResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.poolrpc.LeasesResponse.displayName = 'proto.poolrpc.LeasesResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.poolrpc.TokensRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.poolrpc.TokensRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.poolrpc.TokensRequest.displayName = 'proto.poolrpc.TokensRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.poolrpc.TokensResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.poolrpc.TokensResponse.repeatedFields_, null); -}; -goog.inherits(proto.poolrpc.TokensResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.poolrpc.TokensResponse.displayName = 'proto.poolrpc.TokensResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.poolrpc.LsatToken = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.poolrpc.LsatToken, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.poolrpc.LsatToken.displayName = 'proto.poolrpc.LsatToken'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.poolrpc.LeaseDurationRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.poolrpc.LeaseDurationRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.poolrpc.LeaseDurationRequest.displayName = 'proto.poolrpc.LeaseDurationRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.poolrpc.LeaseDurationResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.poolrpc.LeaseDurationResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.poolrpc.LeaseDurationResponse.displayName = 'proto.poolrpc.LeaseDurationResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.poolrpc.NextBatchInfoRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.poolrpc.NextBatchInfoRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.poolrpc.NextBatchInfoRequest.displayName = 'proto.poolrpc.NextBatchInfoRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.poolrpc.NextBatchInfoResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.poolrpc.NextBatchInfoResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.poolrpc.NextBatchInfoResponse.displayName = 'proto.poolrpc.NextBatchInfoResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.poolrpc.NodeRatingRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.poolrpc.NodeRatingRequest.repeatedFields_, null); -}; -goog.inherits(proto.poolrpc.NodeRatingRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.poolrpc.NodeRatingRequest.displayName = 'proto.poolrpc.NodeRatingRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.poolrpc.NodeRatingResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.poolrpc.NodeRatingResponse.repeatedFields_, null); -}; -goog.inherits(proto.poolrpc.NodeRatingResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.poolrpc.NodeRatingResponse.displayName = 'proto.poolrpc.NodeRatingResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.poolrpc.GetInfoRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.poolrpc.GetInfoRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.poolrpc.GetInfoRequest.displayName = 'proto.poolrpc.GetInfoRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.poolrpc.GetInfoResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.poolrpc.GetInfoResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.poolrpc.GetInfoResponse.displayName = 'proto.poolrpc.GetInfoResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.poolrpc.StopDaemonRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.poolrpc.StopDaemonRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.poolrpc.StopDaemonRequest.displayName = 'proto.poolrpc.StopDaemonRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.poolrpc.StopDaemonResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.poolrpc.StopDaemonResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.poolrpc.StopDaemonResponse.displayName = 'proto.poolrpc.StopDaemonResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.poolrpc.OfferSidecarRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.poolrpc.OfferSidecarRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.poolrpc.OfferSidecarRequest.displayName = 'proto.poolrpc.OfferSidecarRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.poolrpc.SidecarTicket = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.poolrpc.SidecarTicket, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.poolrpc.SidecarTicket.displayName = 'proto.poolrpc.SidecarTicket'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.poolrpc.DecodedSidecarTicket = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.poolrpc.DecodedSidecarTicket, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.poolrpc.DecodedSidecarTicket.displayName = 'proto.poolrpc.DecodedSidecarTicket'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.poolrpc.RegisterSidecarRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.poolrpc.RegisterSidecarRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.poolrpc.RegisterSidecarRequest.displayName = 'proto.poolrpc.RegisterSidecarRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.poolrpc.ExpectSidecarChannelRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.poolrpc.ExpectSidecarChannelRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.poolrpc.ExpectSidecarChannelRequest.displayName = 'proto.poolrpc.ExpectSidecarChannelRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.poolrpc.ExpectSidecarChannelResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.poolrpc.ExpectSidecarChannelResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.poolrpc.ExpectSidecarChannelResponse.displayName = 'proto.poolrpc.ExpectSidecarChannelResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.poolrpc.ListSidecarsRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.poolrpc.ListSidecarsRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.poolrpc.ListSidecarsRequest.displayName = 'proto.poolrpc.ListSidecarsRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.poolrpc.ListSidecarsResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.poolrpc.ListSidecarsResponse.repeatedFields_, null); -}; -goog.inherits(proto.poolrpc.ListSidecarsResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.poolrpc.ListSidecarsResponse.displayName = 'proto.poolrpc.ListSidecarsResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.poolrpc.CancelSidecarRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.poolrpc.CancelSidecarRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.poolrpc.CancelSidecarRequest.displayName = 'proto.poolrpc.CancelSidecarRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.poolrpc.CancelSidecarResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.poolrpc.CancelSidecarResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.poolrpc.CancelSidecarResponse.displayName = 'proto.poolrpc.CancelSidecarResponse'; -} - -/** - * Oneof group definitions for this message. Each group defines the field - * numbers belonging to that group. When of these fields' value is set, all - * other fields in the group are cleared. During deserialization, if multiple - * fields are encountered for a group, only the last value seen will be kept. - * @private {!Array>} - * @const - */ -proto.poolrpc.InitAccountRequest.oneofGroups_ = [[2,3],[4,6]]; - -/** - * @enum {number} - */ -proto.poolrpc.InitAccountRequest.AccountExpiryCase = { - ACCOUNT_EXPIRY_NOT_SET: 0, - ABSOLUTE_HEIGHT: 2, - RELATIVE_HEIGHT: 3 -}; - -/** - * @return {proto.poolrpc.InitAccountRequest.AccountExpiryCase} - */ -proto.poolrpc.InitAccountRequest.prototype.getAccountExpiryCase = function() { - return /** @type {proto.poolrpc.InitAccountRequest.AccountExpiryCase} */(jspb.Message.computeOneofCase(this, proto.poolrpc.InitAccountRequest.oneofGroups_[0])); -}; - -/** - * @enum {number} - */ -proto.poolrpc.InitAccountRequest.FeesCase = { - FEES_NOT_SET: 0, - CONF_TARGET: 4, - FEE_RATE_SAT_PER_KW: 6 -}; - -/** - * @return {proto.poolrpc.InitAccountRequest.FeesCase} - */ -proto.poolrpc.InitAccountRequest.prototype.getFeesCase = function() { - return /** @type {proto.poolrpc.InitAccountRequest.FeesCase} */(jspb.Message.computeOneofCase(this, proto.poolrpc.InitAccountRequest.oneofGroups_[1])); -}; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.poolrpc.InitAccountRequest.prototype.toObject = function(opt_includeInstance) { - return proto.poolrpc.InitAccountRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.poolrpc.InitAccountRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.InitAccountRequest.toObject = function(includeInstance, msg) { - var f, obj = { - accountValue: jspb.Message.getFieldWithDefault(msg, 1, 0), - absoluteHeight: jspb.Message.getFieldWithDefault(msg, 2, 0), - relativeHeight: jspb.Message.getFieldWithDefault(msg, 3, 0), - confTarget: jspb.Message.getFieldWithDefault(msg, 4, 0), - feeRateSatPerKw: jspb.Message.getFieldWithDefault(msg, 6, 0), - initiator: jspb.Message.getFieldWithDefault(msg, 5, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.poolrpc.InitAccountRequest} - */ -proto.poolrpc.InitAccountRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.poolrpc.InitAccountRequest; - return proto.poolrpc.InitAccountRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.poolrpc.InitAccountRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.poolrpc.InitAccountRequest} - */ -proto.poolrpc.InitAccountRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readUint64()); - msg.setAccountValue(value); - break; - case 2: - var value = /** @type {number} */ (reader.readUint32()); - msg.setAbsoluteHeight(value); - break; - case 3: - var value = /** @type {number} */ (reader.readUint32()); - msg.setRelativeHeight(value); - break; - case 4: - var value = /** @type {number} */ (reader.readUint32()); - msg.setConfTarget(value); - break; - case 6: - var value = /** @type {number} */ (reader.readUint64()); - msg.setFeeRateSatPerKw(value); - break; - case 5: - var value = /** @type {string} */ (reader.readString()); - msg.setInitiator(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.poolrpc.InitAccountRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.poolrpc.InitAccountRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.poolrpc.InitAccountRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.InitAccountRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getAccountValue(); - if (f !== 0) { - writer.writeUint64( - 1, - f - ); - } - f = /** @type {number} */ (jspb.Message.getField(message, 2)); - if (f != null) { - writer.writeUint32( - 2, - f - ); - } - f = /** @type {number} */ (jspb.Message.getField(message, 3)); - if (f != null) { - writer.writeUint32( - 3, - f - ); - } - f = /** @type {number} */ (jspb.Message.getField(message, 4)); - if (f != null) { - writer.writeUint32( - 4, - f - ); - } - f = /** @type {number} */ (jspb.Message.getField(message, 6)); - if (f != null) { - writer.writeUint64( - 6, - f - ); - } - f = message.getInitiator(); - if (f.length > 0) { - writer.writeString( - 5, - f - ); - } -}; - - -/** - * optional uint64 account_value = 1; - * @return {number} - */ -proto.poolrpc.InitAccountRequest.prototype.getAccountValue = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.poolrpc.InitAccountRequest} returns this - */ -proto.poolrpc.InitAccountRequest.prototype.setAccountValue = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); -}; - - -/** - * optional uint32 absolute_height = 2; - * @return {number} - */ -proto.poolrpc.InitAccountRequest.prototype.getAbsoluteHeight = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.poolrpc.InitAccountRequest} returns this - */ -proto.poolrpc.InitAccountRequest.prototype.setAbsoluteHeight = function(value) { - return jspb.Message.setOneofField(this, 2, proto.poolrpc.InitAccountRequest.oneofGroups_[0], value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.poolrpc.InitAccountRequest} returns this - */ -proto.poolrpc.InitAccountRequest.prototype.clearAbsoluteHeight = function() { - return jspb.Message.setOneofField(this, 2, proto.poolrpc.InitAccountRequest.oneofGroups_[0], undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.poolrpc.InitAccountRequest.prototype.hasAbsoluteHeight = function() { - return jspb.Message.getField(this, 2) != null; -}; - - -/** - * optional uint32 relative_height = 3; - * @return {number} - */ -proto.poolrpc.InitAccountRequest.prototype.getRelativeHeight = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.poolrpc.InitAccountRequest} returns this - */ -proto.poolrpc.InitAccountRequest.prototype.setRelativeHeight = function(value) { - return jspb.Message.setOneofField(this, 3, proto.poolrpc.InitAccountRequest.oneofGroups_[0], value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.poolrpc.InitAccountRequest} returns this - */ -proto.poolrpc.InitAccountRequest.prototype.clearRelativeHeight = function() { - return jspb.Message.setOneofField(this, 3, proto.poolrpc.InitAccountRequest.oneofGroups_[0], undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.poolrpc.InitAccountRequest.prototype.hasRelativeHeight = function() { - return jspb.Message.getField(this, 3) != null; -}; - - -/** - * optional uint32 conf_target = 4; - * @return {number} - */ -proto.poolrpc.InitAccountRequest.prototype.getConfTarget = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.poolrpc.InitAccountRequest} returns this - */ -proto.poolrpc.InitAccountRequest.prototype.setConfTarget = function(value) { - return jspb.Message.setOneofField(this, 4, proto.poolrpc.InitAccountRequest.oneofGroups_[1], value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.poolrpc.InitAccountRequest} returns this - */ -proto.poolrpc.InitAccountRequest.prototype.clearConfTarget = function() { - return jspb.Message.setOneofField(this, 4, proto.poolrpc.InitAccountRequest.oneofGroups_[1], undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.poolrpc.InitAccountRequest.prototype.hasConfTarget = function() { - return jspb.Message.getField(this, 4) != null; -}; - - -/** - * optional uint64 fee_rate_sat_per_kw = 6; - * @return {number} - */ -proto.poolrpc.InitAccountRequest.prototype.getFeeRateSatPerKw = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.poolrpc.InitAccountRequest} returns this - */ -proto.poolrpc.InitAccountRequest.prototype.setFeeRateSatPerKw = function(value) { - return jspb.Message.setOneofField(this, 6, proto.poolrpc.InitAccountRequest.oneofGroups_[1], value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.poolrpc.InitAccountRequest} returns this - */ -proto.poolrpc.InitAccountRequest.prototype.clearFeeRateSatPerKw = function() { - return jspb.Message.setOneofField(this, 6, proto.poolrpc.InitAccountRequest.oneofGroups_[1], undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.poolrpc.InitAccountRequest.prototype.hasFeeRateSatPerKw = function() { - return jspb.Message.getField(this, 6) != null; -}; - - -/** - * optional string initiator = 5; - * @return {string} - */ -proto.poolrpc.InitAccountRequest.prototype.getInitiator = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); -}; - - -/** - * @param {string} value - * @return {!proto.poolrpc.InitAccountRequest} returns this - */ -proto.poolrpc.InitAccountRequest.prototype.setInitiator = function(value) { - return jspb.Message.setProto3StringField(this, 5, value); -}; - - - -/** - * Oneof group definitions for this message. Each group defines the field - * numbers belonging to that group. When of these fields' value is set, all - * other fields in the group are cleared. During deserialization, if multiple - * fields are encountered for a group, only the last value seen will be kept. - * @private {!Array>} - * @const - */ -proto.poolrpc.QuoteAccountRequest.oneofGroups_ = [[2]]; - -/** - * @enum {number} - */ -proto.poolrpc.QuoteAccountRequest.FeesCase = { - FEES_NOT_SET: 0, - CONF_TARGET: 2 -}; - -/** - * @return {proto.poolrpc.QuoteAccountRequest.FeesCase} - */ -proto.poolrpc.QuoteAccountRequest.prototype.getFeesCase = function() { - return /** @type {proto.poolrpc.QuoteAccountRequest.FeesCase} */(jspb.Message.computeOneofCase(this, proto.poolrpc.QuoteAccountRequest.oneofGroups_[0])); -}; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.poolrpc.QuoteAccountRequest.prototype.toObject = function(opt_includeInstance) { - return proto.poolrpc.QuoteAccountRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.poolrpc.QuoteAccountRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.QuoteAccountRequest.toObject = function(includeInstance, msg) { - var f, obj = { - accountValue: jspb.Message.getFieldWithDefault(msg, 1, 0), - confTarget: jspb.Message.getFieldWithDefault(msg, 2, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.poolrpc.QuoteAccountRequest} - */ -proto.poolrpc.QuoteAccountRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.poolrpc.QuoteAccountRequest; - return proto.poolrpc.QuoteAccountRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.poolrpc.QuoteAccountRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.poolrpc.QuoteAccountRequest} - */ -proto.poolrpc.QuoteAccountRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readUint64()); - msg.setAccountValue(value); - break; - case 2: - var value = /** @type {number} */ (reader.readUint32()); - msg.setConfTarget(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.poolrpc.QuoteAccountRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.poolrpc.QuoteAccountRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.poolrpc.QuoteAccountRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.QuoteAccountRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getAccountValue(); - if (f !== 0) { - writer.writeUint64( - 1, - f - ); - } - f = /** @type {number} */ (jspb.Message.getField(message, 2)); - if (f != null) { - writer.writeUint32( - 2, - f - ); - } -}; - - -/** - * optional uint64 account_value = 1; - * @return {number} - */ -proto.poolrpc.QuoteAccountRequest.prototype.getAccountValue = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.poolrpc.QuoteAccountRequest} returns this - */ -proto.poolrpc.QuoteAccountRequest.prototype.setAccountValue = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); -}; - - -/** - * optional uint32 conf_target = 2; - * @return {number} - */ -proto.poolrpc.QuoteAccountRequest.prototype.getConfTarget = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.poolrpc.QuoteAccountRequest} returns this - */ -proto.poolrpc.QuoteAccountRequest.prototype.setConfTarget = function(value) { - return jspb.Message.setOneofField(this, 2, proto.poolrpc.QuoteAccountRequest.oneofGroups_[0], value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.poolrpc.QuoteAccountRequest} returns this - */ -proto.poolrpc.QuoteAccountRequest.prototype.clearConfTarget = function() { - return jspb.Message.setOneofField(this, 2, proto.poolrpc.QuoteAccountRequest.oneofGroups_[0], undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.poolrpc.QuoteAccountRequest.prototype.hasConfTarget = function() { - return jspb.Message.getField(this, 2) != null; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.poolrpc.QuoteAccountResponse.prototype.toObject = function(opt_includeInstance) { - return proto.poolrpc.QuoteAccountResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.poolrpc.QuoteAccountResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.QuoteAccountResponse.toObject = function(includeInstance, msg) { - var f, obj = { - minerFeeRateSatPerKw: jspb.Message.getFieldWithDefault(msg, 1, 0), - minerFeeTotal: jspb.Message.getFieldWithDefault(msg, 2, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.poolrpc.QuoteAccountResponse} - */ -proto.poolrpc.QuoteAccountResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.poolrpc.QuoteAccountResponse; - return proto.poolrpc.QuoteAccountResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.poolrpc.QuoteAccountResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.poolrpc.QuoteAccountResponse} - */ -proto.poolrpc.QuoteAccountResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readUint64()); - msg.setMinerFeeRateSatPerKw(value); - break; - case 2: - var value = /** @type {number} */ (reader.readUint64()); - msg.setMinerFeeTotal(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.poolrpc.QuoteAccountResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.poolrpc.QuoteAccountResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.poolrpc.QuoteAccountResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.QuoteAccountResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getMinerFeeRateSatPerKw(); - if (f !== 0) { - writer.writeUint64( - 1, - f - ); - } - f = message.getMinerFeeTotal(); - if (f !== 0) { - writer.writeUint64( - 2, - f - ); - } -}; - - -/** - * optional uint64 miner_fee_rate_sat_per_kw = 1; - * @return {number} - */ -proto.poolrpc.QuoteAccountResponse.prototype.getMinerFeeRateSatPerKw = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.poolrpc.QuoteAccountResponse} returns this - */ -proto.poolrpc.QuoteAccountResponse.prototype.setMinerFeeRateSatPerKw = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); -}; - - -/** - * optional uint64 miner_fee_total = 2; - * @return {number} - */ -proto.poolrpc.QuoteAccountResponse.prototype.getMinerFeeTotal = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.poolrpc.QuoteAccountResponse} returns this - */ -proto.poolrpc.QuoteAccountResponse.prototype.setMinerFeeTotal = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.poolrpc.ListAccountsRequest.prototype.toObject = function(opt_includeInstance) { - return proto.poolrpc.ListAccountsRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.poolrpc.ListAccountsRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.ListAccountsRequest.toObject = function(includeInstance, msg) { - var f, obj = { - activeOnly: jspb.Message.getBooleanFieldWithDefault(msg, 1, false) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.poolrpc.ListAccountsRequest} - */ -proto.poolrpc.ListAccountsRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.poolrpc.ListAccountsRequest; - return proto.poolrpc.ListAccountsRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.poolrpc.ListAccountsRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.poolrpc.ListAccountsRequest} - */ -proto.poolrpc.ListAccountsRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setActiveOnly(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.poolrpc.ListAccountsRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.poolrpc.ListAccountsRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.poolrpc.ListAccountsRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.ListAccountsRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getActiveOnly(); - if (f) { - writer.writeBool( - 1, - f - ); - } -}; - - -/** - * optional bool active_only = 1; - * @return {boolean} - */ -proto.poolrpc.ListAccountsRequest.prototype.getActiveOnly = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.poolrpc.ListAccountsRequest} returns this - */ -proto.poolrpc.ListAccountsRequest.prototype.setActiveOnly = function(value) { - return jspb.Message.setProto3BooleanField(this, 1, value); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.poolrpc.ListAccountsResponse.repeatedFields_ = [1]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.poolrpc.ListAccountsResponse.prototype.toObject = function(opt_includeInstance) { - return proto.poolrpc.ListAccountsResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.poolrpc.ListAccountsResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.ListAccountsResponse.toObject = function(includeInstance, msg) { - var f, obj = { - accountsList: jspb.Message.toObjectList(msg.getAccountsList(), - proto.poolrpc.Account.toObject, includeInstance) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.poolrpc.ListAccountsResponse} - */ -proto.poolrpc.ListAccountsResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.poolrpc.ListAccountsResponse; - return proto.poolrpc.ListAccountsResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.poolrpc.ListAccountsResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.poolrpc.ListAccountsResponse} - */ -proto.poolrpc.ListAccountsResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.poolrpc.Account; - reader.readMessage(value,proto.poolrpc.Account.deserializeBinaryFromReader); - msg.addAccounts(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.poolrpc.ListAccountsResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.poolrpc.ListAccountsResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.poolrpc.ListAccountsResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.ListAccountsResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getAccountsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 1, - f, - proto.poolrpc.Account.serializeBinaryToWriter - ); - } -}; - - -/** - * repeated Account accounts = 1; - * @return {!Array} - */ -proto.poolrpc.ListAccountsResponse.prototype.getAccountsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.poolrpc.Account, 1)); -}; - - -/** - * @param {!Array} value - * @return {!proto.poolrpc.ListAccountsResponse} returns this -*/ -proto.poolrpc.ListAccountsResponse.prototype.setAccountsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); -}; - - -/** - * @param {!proto.poolrpc.Account=} opt_value - * @param {number=} opt_index - * @return {!proto.poolrpc.Account} - */ -proto.poolrpc.ListAccountsResponse.prototype.addAccounts = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.poolrpc.Account, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.poolrpc.ListAccountsResponse} returns this - */ -proto.poolrpc.ListAccountsResponse.prototype.clearAccountsList = function() { - return this.setAccountsList([]); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.poolrpc.Output.prototype.toObject = function(opt_includeInstance) { - return proto.poolrpc.Output.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.poolrpc.Output} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.Output.toObject = function(includeInstance, msg) { - var f, obj = { - valueSat: jspb.Message.getFieldWithDefault(msg, 1, 0), - address: jspb.Message.getFieldWithDefault(msg, 2, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.poolrpc.Output} - */ -proto.poolrpc.Output.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.poolrpc.Output; - return proto.poolrpc.Output.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.poolrpc.Output} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.poolrpc.Output} - */ -proto.poolrpc.Output.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readUint64()); - msg.setValueSat(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setAddress(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.poolrpc.Output.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.poolrpc.Output.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.poolrpc.Output} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.Output.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getValueSat(); - if (f !== 0) { - writer.writeUint64( - 1, - f - ); - } - f = message.getAddress(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } -}; - - -/** - * optional uint64 value_sat = 1; - * @return {number} - */ -proto.poolrpc.Output.prototype.getValueSat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.poolrpc.Output} returns this - */ -proto.poolrpc.Output.prototype.setValueSat = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); -}; - - -/** - * optional string address = 2; - * @return {string} - */ -proto.poolrpc.Output.prototype.getAddress = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.poolrpc.Output} returns this - */ -proto.poolrpc.Output.prototype.setAddress = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - - -/** - * Oneof group definitions for this message. Each group defines the field - * numbers belonging to that group. When of these fields' value is set, all - * other fields in the group are cleared. During deserialization, if multiple - * fields are encountered for a group, only the last value seen will be kept. - * @private {!Array>} - * @const - */ -proto.poolrpc.OutputWithFee.oneofGroups_ = [[2,3]]; - -/** - * @enum {number} - */ -proto.poolrpc.OutputWithFee.FeesCase = { - FEES_NOT_SET: 0, - CONF_TARGET: 2, - FEE_RATE_SAT_PER_KW: 3 -}; - -/** - * @return {proto.poolrpc.OutputWithFee.FeesCase} - */ -proto.poolrpc.OutputWithFee.prototype.getFeesCase = function() { - return /** @type {proto.poolrpc.OutputWithFee.FeesCase} */(jspb.Message.computeOneofCase(this, proto.poolrpc.OutputWithFee.oneofGroups_[0])); -}; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.poolrpc.OutputWithFee.prototype.toObject = function(opt_includeInstance) { - return proto.poolrpc.OutputWithFee.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.poolrpc.OutputWithFee} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.OutputWithFee.toObject = function(includeInstance, msg) { - var f, obj = { - address: jspb.Message.getFieldWithDefault(msg, 1, ""), - confTarget: jspb.Message.getFieldWithDefault(msg, 2, 0), - feeRateSatPerKw: jspb.Message.getFieldWithDefault(msg, 3, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.poolrpc.OutputWithFee} - */ -proto.poolrpc.OutputWithFee.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.poolrpc.OutputWithFee; - return proto.poolrpc.OutputWithFee.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.poolrpc.OutputWithFee} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.poolrpc.OutputWithFee} - */ -proto.poolrpc.OutputWithFee.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setAddress(value); - break; - case 2: - var value = /** @type {number} */ (reader.readUint32()); - msg.setConfTarget(value); - break; - case 3: - var value = /** @type {number} */ (reader.readUint64()); - msg.setFeeRateSatPerKw(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.poolrpc.OutputWithFee.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.poolrpc.OutputWithFee.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.poolrpc.OutputWithFee} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.OutputWithFee.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getAddress(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = /** @type {number} */ (jspb.Message.getField(message, 2)); - if (f != null) { - writer.writeUint32( - 2, - f - ); - } - f = /** @type {number} */ (jspb.Message.getField(message, 3)); - if (f != null) { - writer.writeUint64( - 3, - f - ); - } -}; - - -/** - * optional string address = 1; - * @return {string} - */ -proto.poolrpc.OutputWithFee.prototype.getAddress = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.poolrpc.OutputWithFee} returns this - */ -proto.poolrpc.OutputWithFee.prototype.setAddress = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional uint32 conf_target = 2; - * @return {number} - */ -proto.poolrpc.OutputWithFee.prototype.getConfTarget = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.poolrpc.OutputWithFee} returns this - */ -proto.poolrpc.OutputWithFee.prototype.setConfTarget = function(value) { - return jspb.Message.setOneofField(this, 2, proto.poolrpc.OutputWithFee.oneofGroups_[0], value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.poolrpc.OutputWithFee} returns this - */ -proto.poolrpc.OutputWithFee.prototype.clearConfTarget = function() { - return jspb.Message.setOneofField(this, 2, proto.poolrpc.OutputWithFee.oneofGroups_[0], undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.poolrpc.OutputWithFee.prototype.hasConfTarget = function() { - return jspb.Message.getField(this, 2) != null; -}; - - -/** - * optional uint64 fee_rate_sat_per_kw = 3; - * @return {number} - */ -proto.poolrpc.OutputWithFee.prototype.getFeeRateSatPerKw = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.poolrpc.OutputWithFee} returns this - */ -proto.poolrpc.OutputWithFee.prototype.setFeeRateSatPerKw = function(value) { - return jspb.Message.setOneofField(this, 3, proto.poolrpc.OutputWithFee.oneofGroups_[0], value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.poolrpc.OutputWithFee} returns this - */ -proto.poolrpc.OutputWithFee.prototype.clearFeeRateSatPerKw = function() { - return jspb.Message.setOneofField(this, 3, proto.poolrpc.OutputWithFee.oneofGroups_[0], undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.poolrpc.OutputWithFee.prototype.hasFeeRateSatPerKw = function() { - return jspb.Message.getField(this, 3) != null; -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.poolrpc.OutputsWithImplicitFee.repeatedFields_ = [1]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.poolrpc.OutputsWithImplicitFee.prototype.toObject = function(opt_includeInstance) { - return proto.poolrpc.OutputsWithImplicitFee.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.poolrpc.OutputsWithImplicitFee} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.OutputsWithImplicitFee.toObject = function(includeInstance, msg) { - var f, obj = { - outputsList: jspb.Message.toObjectList(msg.getOutputsList(), - proto.poolrpc.Output.toObject, includeInstance) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.poolrpc.OutputsWithImplicitFee} - */ -proto.poolrpc.OutputsWithImplicitFee.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.poolrpc.OutputsWithImplicitFee; - return proto.poolrpc.OutputsWithImplicitFee.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.poolrpc.OutputsWithImplicitFee} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.poolrpc.OutputsWithImplicitFee} - */ -proto.poolrpc.OutputsWithImplicitFee.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.poolrpc.Output; - reader.readMessage(value,proto.poolrpc.Output.deserializeBinaryFromReader); - msg.addOutputs(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.poolrpc.OutputsWithImplicitFee.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.poolrpc.OutputsWithImplicitFee.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.poolrpc.OutputsWithImplicitFee} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.OutputsWithImplicitFee.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getOutputsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 1, - f, - proto.poolrpc.Output.serializeBinaryToWriter - ); - } -}; - - -/** - * repeated Output outputs = 1; - * @return {!Array} - */ -proto.poolrpc.OutputsWithImplicitFee.prototype.getOutputsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.poolrpc.Output, 1)); -}; - - -/** - * @param {!Array} value - * @return {!proto.poolrpc.OutputsWithImplicitFee} returns this -*/ -proto.poolrpc.OutputsWithImplicitFee.prototype.setOutputsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); -}; - - -/** - * @param {!proto.poolrpc.Output=} opt_value - * @param {number=} opt_index - * @return {!proto.poolrpc.Output} - */ -proto.poolrpc.OutputsWithImplicitFee.prototype.addOutputs = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.poolrpc.Output, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.poolrpc.OutputsWithImplicitFee} returns this - */ -proto.poolrpc.OutputsWithImplicitFee.prototype.clearOutputsList = function() { - return this.setOutputsList([]); -}; - - - -/** - * Oneof group definitions for this message. Each group defines the field - * numbers belonging to that group. When of these fields' value is set, all - * other fields in the group are cleared. During deserialization, if multiple - * fields are encountered for a group, only the last value seen will be kept. - * @private {!Array>} - * @const - */ -proto.poolrpc.CloseAccountRequest.oneofGroups_ = [[2,3]]; - -/** - * @enum {number} - */ -proto.poolrpc.CloseAccountRequest.FundsDestinationCase = { - FUNDS_DESTINATION_NOT_SET: 0, - OUTPUT_WITH_FEE: 2, - OUTPUTS: 3 -}; - -/** - * @return {proto.poolrpc.CloseAccountRequest.FundsDestinationCase} - */ -proto.poolrpc.CloseAccountRequest.prototype.getFundsDestinationCase = function() { - return /** @type {proto.poolrpc.CloseAccountRequest.FundsDestinationCase} */(jspb.Message.computeOneofCase(this, proto.poolrpc.CloseAccountRequest.oneofGroups_[0])); -}; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.poolrpc.CloseAccountRequest.prototype.toObject = function(opt_includeInstance) { - return proto.poolrpc.CloseAccountRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.poolrpc.CloseAccountRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.CloseAccountRequest.toObject = function(includeInstance, msg) { - var f, obj = { - traderKey: msg.getTraderKey_asB64(), - outputWithFee: (f = msg.getOutputWithFee()) && proto.poolrpc.OutputWithFee.toObject(includeInstance, f), - outputs: (f = msg.getOutputs()) && proto.poolrpc.OutputsWithImplicitFee.toObject(includeInstance, f) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.poolrpc.CloseAccountRequest} - */ -proto.poolrpc.CloseAccountRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.poolrpc.CloseAccountRequest; - return proto.poolrpc.CloseAccountRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.poolrpc.CloseAccountRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.poolrpc.CloseAccountRequest} - */ -proto.poolrpc.CloseAccountRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setTraderKey(value); - break; - case 2: - var value = new proto.poolrpc.OutputWithFee; - reader.readMessage(value,proto.poolrpc.OutputWithFee.deserializeBinaryFromReader); - msg.setOutputWithFee(value); - break; - case 3: - var value = new proto.poolrpc.OutputsWithImplicitFee; - reader.readMessage(value,proto.poolrpc.OutputsWithImplicitFee.deserializeBinaryFromReader); - msg.setOutputs(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.poolrpc.CloseAccountRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.poolrpc.CloseAccountRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.poolrpc.CloseAccountRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.CloseAccountRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getTraderKey_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getOutputWithFee(); - if (f != null) { - writer.writeMessage( - 2, - f, - proto.poolrpc.OutputWithFee.serializeBinaryToWriter - ); - } - f = message.getOutputs(); - if (f != null) { - writer.writeMessage( - 3, - f, - proto.poolrpc.OutputsWithImplicitFee.serializeBinaryToWriter - ); - } -}; - - -/** - * optional bytes trader_key = 1; - * @return {!(string|Uint8Array)} - */ -proto.poolrpc.CloseAccountRequest.prototype.getTraderKey = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes trader_key = 1; - * This is a type-conversion wrapper around `getTraderKey()` - * @return {string} - */ -proto.poolrpc.CloseAccountRequest.prototype.getTraderKey_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getTraderKey())); -}; - - -/** - * optional bytes trader_key = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getTraderKey()` - * @return {!Uint8Array} - */ -proto.poolrpc.CloseAccountRequest.prototype.getTraderKey_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getTraderKey())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.poolrpc.CloseAccountRequest} returns this - */ -proto.poolrpc.CloseAccountRequest.prototype.setTraderKey = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional OutputWithFee output_with_fee = 2; - * @return {?proto.poolrpc.OutputWithFee} - */ -proto.poolrpc.CloseAccountRequest.prototype.getOutputWithFee = function() { - return /** @type{?proto.poolrpc.OutputWithFee} */ ( - jspb.Message.getWrapperField(this, proto.poolrpc.OutputWithFee, 2)); -}; - - -/** - * @param {?proto.poolrpc.OutputWithFee|undefined} value - * @return {!proto.poolrpc.CloseAccountRequest} returns this -*/ -proto.poolrpc.CloseAccountRequest.prototype.setOutputWithFee = function(value) { - return jspb.Message.setOneofWrapperField(this, 2, proto.poolrpc.CloseAccountRequest.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.poolrpc.CloseAccountRequest} returns this - */ -proto.poolrpc.CloseAccountRequest.prototype.clearOutputWithFee = function() { - return this.setOutputWithFee(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.poolrpc.CloseAccountRequest.prototype.hasOutputWithFee = function() { - return jspb.Message.getField(this, 2) != null; -}; - - -/** - * optional OutputsWithImplicitFee outputs = 3; - * @return {?proto.poolrpc.OutputsWithImplicitFee} - */ -proto.poolrpc.CloseAccountRequest.prototype.getOutputs = function() { - return /** @type{?proto.poolrpc.OutputsWithImplicitFee} */ ( - jspb.Message.getWrapperField(this, proto.poolrpc.OutputsWithImplicitFee, 3)); -}; - - -/** - * @param {?proto.poolrpc.OutputsWithImplicitFee|undefined} value - * @return {!proto.poolrpc.CloseAccountRequest} returns this -*/ -proto.poolrpc.CloseAccountRequest.prototype.setOutputs = function(value) { - return jspb.Message.setOneofWrapperField(this, 3, proto.poolrpc.CloseAccountRequest.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.poolrpc.CloseAccountRequest} returns this - */ -proto.poolrpc.CloseAccountRequest.prototype.clearOutputs = function() { - return this.setOutputs(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.poolrpc.CloseAccountRequest.prototype.hasOutputs = function() { - return jspb.Message.getField(this, 3) != null; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.poolrpc.CloseAccountResponse.prototype.toObject = function(opt_includeInstance) { - return proto.poolrpc.CloseAccountResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.poolrpc.CloseAccountResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.CloseAccountResponse.toObject = function(includeInstance, msg) { - var f, obj = { - closeTxid: msg.getCloseTxid_asB64() - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.poolrpc.CloseAccountResponse} - */ -proto.poolrpc.CloseAccountResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.poolrpc.CloseAccountResponse; - return proto.poolrpc.CloseAccountResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.poolrpc.CloseAccountResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.poolrpc.CloseAccountResponse} - */ -proto.poolrpc.CloseAccountResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setCloseTxid(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.poolrpc.CloseAccountResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.poolrpc.CloseAccountResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.poolrpc.CloseAccountResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.CloseAccountResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getCloseTxid_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } -}; - - -/** - * optional bytes close_txid = 1; - * @return {!(string|Uint8Array)} - */ -proto.poolrpc.CloseAccountResponse.prototype.getCloseTxid = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes close_txid = 1; - * This is a type-conversion wrapper around `getCloseTxid()` - * @return {string} - */ -proto.poolrpc.CloseAccountResponse.prototype.getCloseTxid_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getCloseTxid())); -}; - - -/** - * optional bytes close_txid = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getCloseTxid()` - * @return {!Uint8Array} - */ -proto.poolrpc.CloseAccountResponse.prototype.getCloseTxid_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getCloseTxid())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.poolrpc.CloseAccountResponse} returns this - */ -proto.poolrpc.CloseAccountResponse.prototype.setCloseTxid = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.poolrpc.WithdrawAccountRequest.repeatedFields_ = [2]; - -/** - * Oneof group definitions for this message. Each group defines the field - * numbers belonging to that group. When of these fields' value is set, all - * other fields in the group are cleared. During deserialization, if multiple - * fields are encountered for a group, only the last value seen will be kept. - * @private {!Array>} - * @const - */ -proto.poolrpc.WithdrawAccountRequest.oneofGroups_ = [[4,5]]; - -/** - * @enum {number} - */ -proto.poolrpc.WithdrawAccountRequest.AccountExpiryCase = { - ACCOUNT_EXPIRY_NOT_SET: 0, - ABSOLUTE_EXPIRY: 4, - RELATIVE_EXPIRY: 5 -}; - -/** - * @return {proto.poolrpc.WithdrawAccountRequest.AccountExpiryCase} - */ -proto.poolrpc.WithdrawAccountRequest.prototype.getAccountExpiryCase = function() { - return /** @type {proto.poolrpc.WithdrawAccountRequest.AccountExpiryCase} */(jspb.Message.computeOneofCase(this, proto.poolrpc.WithdrawAccountRequest.oneofGroups_[0])); -}; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.poolrpc.WithdrawAccountRequest.prototype.toObject = function(opt_includeInstance) { - return proto.poolrpc.WithdrawAccountRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.poolrpc.WithdrawAccountRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.WithdrawAccountRequest.toObject = function(includeInstance, msg) { - var f, obj = { - traderKey: msg.getTraderKey_asB64(), - outputsList: jspb.Message.toObjectList(msg.getOutputsList(), - proto.poolrpc.Output.toObject, includeInstance), - feeRateSatPerKw: jspb.Message.getFieldWithDefault(msg, 3, 0), - absoluteExpiry: jspb.Message.getFieldWithDefault(msg, 4, 0), - relativeExpiry: jspb.Message.getFieldWithDefault(msg, 5, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.poolrpc.WithdrawAccountRequest} - */ -proto.poolrpc.WithdrawAccountRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.poolrpc.WithdrawAccountRequest; - return proto.poolrpc.WithdrawAccountRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.poolrpc.WithdrawAccountRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.poolrpc.WithdrawAccountRequest} - */ -proto.poolrpc.WithdrawAccountRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setTraderKey(value); - break; - case 2: - var value = new proto.poolrpc.Output; - reader.readMessage(value,proto.poolrpc.Output.deserializeBinaryFromReader); - msg.addOutputs(value); - break; - case 3: - var value = /** @type {number} */ (reader.readUint64()); - msg.setFeeRateSatPerKw(value); - break; - case 4: - var value = /** @type {number} */ (reader.readUint32()); - msg.setAbsoluteExpiry(value); - break; - case 5: - var value = /** @type {number} */ (reader.readUint32()); - msg.setRelativeExpiry(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.poolrpc.WithdrawAccountRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.poolrpc.WithdrawAccountRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.poolrpc.WithdrawAccountRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.WithdrawAccountRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getTraderKey_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getOutputsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 2, - f, - proto.poolrpc.Output.serializeBinaryToWriter - ); - } - f = message.getFeeRateSatPerKw(); - if (f !== 0) { - writer.writeUint64( - 3, - f - ); - } - f = /** @type {number} */ (jspb.Message.getField(message, 4)); - if (f != null) { - writer.writeUint32( - 4, - f - ); - } - f = /** @type {number} */ (jspb.Message.getField(message, 5)); - if (f != null) { - writer.writeUint32( - 5, - f - ); - } -}; - - -/** - * optional bytes trader_key = 1; - * @return {!(string|Uint8Array)} - */ -proto.poolrpc.WithdrawAccountRequest.prototype.getTraderKey = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes trader_key = 1; - * This is a type-conversion wrapper around `getTraderKey()` - * @return {string} - */ -proto.poolrpc.WithdrawAccountRequest.prototype.getTraderKey_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getTraderKey())); -}; - - -/** - * optional bytes trader_key = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getTraderKey()` - * @return {!Uint8Array} - */ -proto.poolrpc.WithdrawAccountRequest.prototype.getTraderKey_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getTraderKey())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.poolrpc.WithdrawAccountRequest} returns this - */ -proto.poolrpc.WithdrawAccountRequest.prototype.setTraderKey = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * repeated Output outputs = 2; - * @return {!Array} - */ -proto.poolrpc.WithdrawAccountRequest.prototype.getOutputsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.poolrpc.Output, 2)); -}; - - -/** - * @param {!Array} value - * @return {!proto.poolrpc.WithdrawAccountRequest} returns this -*/ -proto.poolrpc.WithdrawAccountRequest.prototype.setOutputsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 2, value); -}; - - -/** - * @param {!proto.poolrpc.Output=} opt_value - * @param {number=} opt_index - * @return {!proto.poolrpc.Output} - */ -proto.poolrpc.WithdrawAccountRequest.prototype.addOutputs = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.poolrpc.Output, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.poolrpc.WithdrawAccountRequest} returns this - */ -proto.poolrpc.WithdrawAccountRequest.prototype.clearOutputsList = function() { - return this.setOutputsList([]); -}; - - -/** - * optional uint64 fee_rate_sat_per_kw = 3; - * @return {number} - */ -proto.poolrpc.WithdrawAccountRequest.prototype.getFeeRateSatPerKw = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.poolrpc.WithdrawAccountRequest} returns this - */ -proto.poolrpc.WithdrawAccountRequest.prototype.setFeeRateSatPerKw = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - -/** - * optional uint32 absolute_expiry = 4; - * @return {number} - */ -proto.poolrpc.WithdrawAccountRequest.prototype.getAbsoluteExpiry = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.poolrpc.WithdrawAccountRequest} returns this - */ -proto.poolrpc.WithdrawAccountRequest.prototype.setAbsoluteExpiry = function(value) { - return jspb.Message.setOneofField(this, 4, proto.poolrpc.WithdrawAccountRequest.oneofGroups_[0], value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.poolrpc.WithdrawAccountRequest} returns this - */ -proto.poolrpc.WithdrawAccountRequest.prototype.clearAbsoluteExpiry = function() { - return jspb.Message.setOneofField(this, 4, proto.poolrpc.WithdrawAccountRequest.oneofGroups_[0], undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.poolrpc.WithdrawAccountRequest.prototype.hasAbsoluteExpiry = function() { - return jspb.Message.getField(this, 4) != null; -}; - - -/** - * optional uint32 relative_expiry = 5; - * @return {number} - */ -proto.poolrpc.WithdrawAccountRequest.prototype.getRelativeExpiry = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.poolrpc.WithdrawAccountRequest} returns this - */ -proto.poolrpc.WithdrawAccountRequest.prototype.setRelativeExpiry = function(value) { - return jspb.Message.setOneofField(this, 5, proto.poolrpc.WithdrawAccountRequest.oneofGroups_[0], value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.poolrpc.WithdrawAccountRequest} returns this - */ -proto.poolrpc.WithdrawAccountRequest.prototype.clearRelativeExpiry = function() { - return jspb.Message.setOneofField(this, 5, proto.poolrpc.WithdrawAccountRequest.oneofGroups_[0], undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.poolrpc.WithdrawAccountRequest.prototype.hasRelativeExpiry = function() { - return jspb.Message.getField(this, 5) != null; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.poolrpc.WithdrawAccountResponse.prototype.toObject = function(opt_includeInstance) { - return proto.poolrpc.WithdrawAccountResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.poolrpc.WithdrawAccountResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.WithdrawAccountResponse.toObject = function(includeInstance, msg) { - var f, obj = { - account: (f = msg.getAccount()) && proto.poolrpc.Account.toObject(includeInstance, f), - withdrawTxid: msg.getWithdrawTxid_asB64() - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.poolrpc.WithdrawAccountResponse} - */ -proto.poolrpc.WithdrawAccountResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.poolrpc.WithdrawAccountResponse; - return proto.poolrpc.WithdrawAccountResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.poolrpc.WithdrawAccountResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.poolrpc.WithdrawAccountResponse} - */ -proto.poolrpc.WithdrawAccountResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.poolrpc.Account; - reader.readMessage(value,proto.poolrpc.Account.deserializeBinaryFromReader); - msg.setAccount(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setWithdrawTxid(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.poolrpc.WithdrawAccountResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.poolrpc.WithdrawAccountResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.poolrpc.WithdrawAccountResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.WithdrawAccountResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getAccount(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.poolrpc.Account.serializeBinaryToWriter - ); - } - f = message.getWithdrawTxid_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } -}; - - -/** - * optional Account account = 1; - * @return {?proto.poolrpc.Account} - */ -proto.poolrpc.WithdrawAccountResponse.prototype.getAccount = function() { - return /** @type{?proto.poolrpc.Account} */ ( - jspb.Message.getWrapperField(this, proto.poolrpc.Account, 1)); -}; - - -/** - * @param {?proto.poolrpc.Account|undefined} value - * @return {!proto.poolrpc.WithdrawAccountResponse} returns this -*/ -proto.poolrpc.WithdrawAccountResponse.prototype.setAccount = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.poolrpc.WithdrawAccountResponse} returns this - */ -proto.poolrpc.WithdrawAccountResponse.prototype.clearAccount = function() { - return this.setAccount(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.poolrpc.WithdrawAccountResponse.prototype.hasAccount = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional bytes withdraw_txid = 2; - * @return {!(string|Uint8Array)} - */ -proto.poolrpc.WithdrawAccountResponse.prototype.getWithdrawTxid = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes withdraw_txid = 2; - * This is a type-conversion wrapper around `getWithdrawTxid()` - * @return {string} - */ -proto.poolrpc.WithdrawAccountResponse.prototype.getWithdrawTxid_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getWithdrawTxid())); -}; - - -/** - * optional bytes withdraw_txid = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getWithdrawTxid()` - * @return {!Uint8Array} - */ -proto.poolrpc.WithdrawAccountResponse.prototype.getWithdrawTxid_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getWithdrawTxid())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.poolrpc.WithdrawAccountResponse} returns this - */ -proto.poolrpc.WithdrawAccountResponse.prototype.setWithdrawTxid = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); -}; - - - -/** - * Oneof group definitions for this message. Each group defines the field - * numbers belonging to that group. When of these fields' value is set, all - * other fields in the group are cleared. During deserialization, if multiple - * fields are encountered for a group, only the last value seen will be kept. - * @private {!Array>} - * @const - */ -proto.poolrpc.DepositAccountRequest.oneofGroups_ = [[4,5]]; - -/** - * @enum {number} - */ -proto.poolrpc.DepositAccountRequest.AccountExpiryCase = { - ACCOUNT_EXPIRY_NOT_SET: 0, - ABSOLUTE_EXPIRY: 4, - RELATIVE_EXPIRY: 5 -}; - -/** - * @return {proto.poolrpc.DepositAccountRequest.AccountExpiryCase} - */ -proto.poolrpc.DepositAccountRequest.prototype.getAccountExpiryCase = function() { - return /** @type {proto.poolrpc.DepositAccountRequest.AccountExpiryCase} */(jspb.Message.computeOneofCase(this, proto.poolrpc.DepositAccountRequest.oneofGroups_[0])); -}; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.poolrpc.DepositAccountRequest.prototype.toObject = function(opt_includeInstance) { - return proto.poolrpc.DepositAccountRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.poolrpc.DepositAccountRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.DepositAccountRequest.toObject = function(includeInstance, msg) { - var f, obj = { - traderKey: msg.getTraderKey_asB64(), - amountSat: jspb.Message.getFieldWithDefault(msg, 2, 0), - feeRateSatPerKw: jspb.Message.getFieldWithDefault(msg, 3, 0), - absoluteExpiry: jspb.Message.getFieldWithDefault(msg, 4, 0), - relativeExpiry: jspb.Message.getFieldWithDefault(msg, 5, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.poolrpc.DepositAccountRequest} - */ -proto.poolrpc.DepositAccountRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.poolrpc.DepositAccountRequest; - return proto.poolrpc.DepositAccountRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.poolrpc.DepositAccountRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.poolrpc.DepositAccountRequest} - */ -proto.poolrpc.DepositAccountRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setTraderKey(value); - break; - case 2: - var value = /** @type {number} */ (reader.readUint64()); - msg.setAmountSat(value); - break; - case 3: - var value = /** @type {number} */ (reader.readUint64()); - msg.setFeeRateSatPerKw(value); - break; - case 4: - var value = /** @type {number} */ (reader.readUint32()); - msg.setAbsoluteExpiry(value); - break; - case 5: - var value = /** @type {number} */ (reader.readUint32()); - msg.setRelativeExpiry(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.poolrpc.DepositAccountRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.poolrpc.DepositAccountRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.poolrpc.DepositAccountRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.DepositAccountRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getTraderKey_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getAmountSat(); - if (f !== 0) { - writer.writeUint64( - 2, - f - ); - } - f = message.getFeeRateSatPerKw(); - if (f !== 0) { - writer.writeUint64( - 3, - f - ); - } - f = /** @type {number} */ (jspb.Message.getField(message, 4)); - if (f != null) { - writer.writeUint32( - 4, - f - ); - } - f = /** @type {number} */ (jspb.Message.getField(message, 5)); - if (f != null) { - writer.writeUint32( - 5, - f - ); - } -}; - - -/** - * optional bytes trader_key = 1; - * @return {!(string|Uint8Array)} - */ -proto.poolrpc.DepositAccountRequest.prototype.getTraderKey = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes trader_key = 1; - * This is a type-conversion wrapper around `getTraderKey()` - * @return {string} - */ -proto.poolrpc.DepositAccountRequest.prototype.getTraderKey_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getTraderKey())); -}; - - -/** - * optional bytes trader_key = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getTraderKey()` - * @return {!Uint8Array} - */ -proto.poolrpc.DepositAccountRequest.prototype.getTraderKey_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getTraderKey())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.poolrpc.DepositAccountRequest} returns this - */ -proto.poolrpc.DepositAccountRequest.prototype.setTraderKey = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional uint64 amount_sat = 2; - * @return {number} - */ -proto.poolrpc.DepositAccountRequest.prototype.getAmountSat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.poolrpc.DepositAccountRequest} returns this - */ -proto.poolrpc.DepositAccountRequest.prototype.setAmountSat = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * optional uint64 fee_rate_sat_per_kw = 3; - * @return {number} - */ -proto.poolrpc.DepositAccountRequest.prototype.getFeeRateSatPerKw = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.poolrpc.DepositAccountRequest} returns this - */ -proto.poolrpc.DepositAccountRequest.prototype.setFeeRateSatPerKw = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - -/** - * optional uint32 absolute_expiry = 4; - * @return {number} - */ -proto.poolrpc.DepositAccountRequest.prototype.getAbsoluteExpiry = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.poolrpc.DepositAccountRequest} returns this - */ -proto.poolrpc.DepositAccountRequest.prototype.setAbsoluteExpiry = function(value) { - return jspb.Message.setOneofField(this, 4, proto.poolrpc.DepositAccountRequest.oneofGroups_[0], value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.poolrpc.DepositAccountRequest} returns this - */ -proto.poolrpc.DepositAccountRequest.prototype.clearAbsoluteExpiry = function() { - return jspb.Message.setOneofField(this, 4, proto.poolrpc.DepositAccountRequest.oneofGroups_[0], undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.poolrpc.DepositAccountRequest.prototype.hasAbsoluteExpiry = function() { - return jspb.Message.getField(this, 4) != null; -}; - - -/** - * optional uint32 relative_expiry = 5; - * @return {number} - */ -proto.poolrpc.DepositAccountRequest.prototype.getRelativeExpiry = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.poolrpc.DepositAccountRequest} returns this - */ -proto.poolrpc.DepositAccountRequest.prototype.setRelativeExpiry = function(value) { - return jspb.Message.setOneofField(this, 5, proto.poolrpc.DepositAccountRequest.oneofGroups_[0], value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.poolrpc.DepositAccountRequest} returns this - */ -proto.poolrpc.DepositAccountRequest.prototype.clearRelativeExpiry = function() { - return jspb.Message.setOneofField(this, 5, proto.poolrpc.DepositAccountRequest.oneofGroups_[0], undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.poolrpc.DepositAccountRequest.prototype.hasRelativeExpiry = function() { - return jspb.Message.getField(this, 5) != null; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.poolrpc.DepositAccountResponse.prototype.toObject = function(opt_includeInstance) { - return proto.poolrpc.DepositAccountResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.poolrpc.DepositAccountResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.DepositAccountResponse.toObject = function(includeInstance, msg) { - var f, obj = { - account: (f = msg.getAccount()) && proto.poolrpc.Account.toObject(includeInstance, f), - depositTxid: msg.getDepositTxid_asB64() - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.poolrpc.DepositAccountResponse} - */ -proto.poolrpc.DepositAccountResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.poolrpc.DepositAccountResponse; - return proto.poolrpc.DepositAccountResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.poolrpc.DepositAccountResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.poolrpc.DepositAccountResponse} - */ -proto.poolrpc.DepositAccountResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.poolrpc.Account; - reader.readMessage(value,proto.poolrpc.Account.deserializeBinaryFromReader); - msg.setAccount(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setDepositTxid(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.poolrpc.DepositAccountResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.poolrpc.DepositAccountResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.poolrpc.DepositAccountResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.DepositAccountResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getAccount(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.poolrpc.Account.serializeBinaryToWriter - ); - } - f = message.getDepositTxid_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } -}; - - -/** - * optional Account account = 1; - * @return {?proto.poolrpc.Account} - */ -proto.poolrpc.DepositAccountResponse.prototype.getAccount = function() { - return /** @type{?proto.poolrpc.Account} */ ( - jspb.Message.getWrapperField(this, proto.poolrpc.Account, 1)); -}; - - -/** - * @param {?proto.poolrpc.Account|undefined} value - * @return {!proto.poolrpc.DepositAccountResponse} returns this -*/ -proto.poolrpc.DepositAccountResponse.prototype.setAccount = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.poolrpc.DepositAccountResponse} returns this - */ -proto.poolrpc.DepositAccountResponse.prototype.clearAccount = function() { - return this.setAccount(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.poolrpc.DepositAccountResponse.prototype.hasAccount = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional bytes deposit_txid = 2; - * @return {!(string|Uint8Array)} - */ -proto.poolrpc.DepositAccountResponse.prototype.getDepositTxid = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes deposit_txid = 2; - * This is a type-conversion wrapper around `getDepositTxid()` - * @return {string} - */ -proto.poolrpc.DepositAccountResponse.prototype.getDepositTxid_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getDepositTxid())); -}; - - -/** - * optional bytes deposit_txid = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getDepositTxid()` - * @return {!Uint8Array} - */ -proto.poolrpc.DepositAccountResponse.prototype.getDepositTxid_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getDepositTxid())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.poolrpc.DepositAccountResponse} returns this - */ -proto.poolrpc.DepositAccountResponse.prototype.setDepositTxid = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); -}; - - - -/** - * Oneof group definitions for this message. Each group defines the field - * numbers belonging to that group. When of these fields' value is set, all - * other fields in the group are cleared. During deserialization, if multiple - * fields are encountered for a group, only the last value seen will be kept. - * @private {!Array>} - * @const - */ -proto.poolrpc.RenewAccountRequest.oneofGroups_ = [[2,3]]; - -/** - * @enum {number} - */ -proto.poolrpc.RenewAccountRequest.AccountExpiryCase = { - ACCOUNT_EXPIRY_NOT_SET: 0, - ABSOLUTE_EXPIRY: 2, - RELATIVE_EXPIRY: 3 -}; - -/** - * @return {proto.poolrpc.RenewAccountRequest.AccountExpiryCase} - */ -proto.poolrpc.RenewAccountRequest.prototype.getAccountExpiryCase = function() { - return /** @type {proto.poolrpc.RenewAccountRequest.AccountExpiryCase} */(jspb.Message.computeOneofCase(this, proto.poolrpc.RenewAccountRequest.oneofGroups_[0])); -}; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.poolrpc.RenewAccountRequest.prototype.toObject = function(opt_includeInstance) { - return proto.poolrpc.RenewAccountRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.poolrpc.RenewAccountRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.RenewAccountRequest.toObject = function(includeInstance, msg) { - var f, obj = { - accountKey: msg.getAccountKey_asB64(), - absoluteExpiry: jspb.Message.getFieldWithDefault(msg, 2, 0), - relativeExpiry: jspb.Message.getFieldWithDefault(msg, 3, 0), - feeRateSatPerKw: jspb.Message.getFieldWithDefault(msg, 4, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.poolrpc.RenewAccountRequest} - */ -proto.poolrpc.RenewAccountRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.poolrpc.RenewAccountRequest; - return proto.poolrpc.RenewAccountRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.poolrpc.RenewAccountRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.poolrpc.RenewAccountRequest} - */ -proto.poolrpc.RenewAccountRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setAccountKey(value); - break; - case 2: - var value = /** @type {number} */ (reader.readUint32()); - msg.setAbsoluteExpiry(value); - break; - case 3: - var value = /** @type {number} */ (reader.readUint32()); - msg.setRelativeExpiry(value); - break; - case 4: - var value = /** @type {number} */ (reader.readUint64()); - msg.setFeeRateSatPerKw(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.poolrpc.RenewAccountRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.poolrpc.RenewAccountRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.poolrpc.RenewAccountRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.RenewAccountRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getAccountKey_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = /** @type {number} */ (jspb.Message.getField(message, 2)); - if (f != null) { - writer.writeUint32( - 2, - f - ); - } - f = /** @type {number} */ (jspb.Message.getField(message, 3)); - if (f != null) { - writer.writeUint32( - 3, - f - ); - } - f = message.getFeeRateSatPerKw(); - if (f !== 0) { - writer.writeUint64( - 4, - f - ); - } -}; - - -/** - * optional bytes account_key = 1; - * @return {!(string|Uint8Array)} - */ -proto.poolrpc.RenewAccountRequest.prototype.getAccountKey = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes account_key = 1; - * This is a type-conversion wrapper around `getAccountKey()` - * @return {string} - */ -proto.poolrpc.RenewAccountRequest.prototype.getAccountKey_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getAccountKey())); -}; - - -/** - * optional bytes account_key = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getAccountKey()` - * @return {!Uint8Array} - */ -proto.poolrpc.RenewAccountRequest.prototype.getAccountKey_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getAccountKey())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.poolrpc.RenewAccountRequest} returns this - */ -proto.poolrpc.RenewAccountRequest.prototype.setAccountKey = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional uint32 absolute_expiry = 2; - * @return {number} - */ -proto.poolrpc.RenewAccountRequest.prototype.getAbsoluteExpiry = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.poolrpc.RenewAccountRequest} returns this - */ -proto.poolrpc.RenewAccountRequest.prototype.setAbsoluteExpiry = function(value) { - return jspb.Message.setOneofField(this, 2, proto.poolrpc.RenewAccountRequest.oneofGroups_[0], value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.poolrpc.RenewAccountRequest} returns this - */ -proto.poolrpc.RenewAccountRequest.prototype.clearAbsoluteExpiry = function() { - return jspb.Message.setOneofField(this, 2, proto.poolrpc.RenewAccountRequest.oneofGroups_[0], undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.poolrpc.RenewAccountRequest.prototype.hasAbsoluteExpiry = function() { - return jspb.Message.getField(this, 2) != null; -}; - - -/** - * optional uint32 relative_expiry = 3; - * @return {number} - */ -proto.poolrpc.RenewAccountRequest.prototype.getRelativeExpiry = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.poolrpc.RenewAccountRequest} returns this - */ -proto.poolrpc.RenewAccountRequest.prototype.setRelativeExpiry = function(value) { - return jspb.Message.setOneofField(this, 3, proto.poolrpc.RenewAccountRequest.oneofGroups_[0], value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.poolrpc.RenewAccountRequest} returns this - */ -proto.poolrpc.RenewAccountRequest.prototype.clearRelativeExpiry = function() { - return jspb.Message.setOneofField(this, 3, proto.poolrpc.RenewAccountRequest.oneofGroups_[0], undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.poolrpc.RenewAccountRequest.prototype.hasRelativeExpiry = function() { - return jspb.Message.getField(this, 3) != null; -}; - - -/** - * optional uint64 fee_rate_sat_per_kw = 4; - * @return {number} - */ -proto.poolrpc.RenewAccountRequest.prototype.getFeeRateSatPerKw = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.poolrpc.RenewAccountRequest} returns this - */ -proto.poolrpc.RenewAccountRequest.prototype.setFeeRateSatPerKw = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.poolrpc.RenewAccountResponse.prototype.toObject = function(opt_includeInstance) { - return proto.poolrpc.RenewAccountResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.poolrpc.RenewAccountResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.RenewAccountResponse.toObject = function(includeInstance, msg) { - var f, obj = { - account: (f = msg.getAccount()) && proto.poolrpc.Account.toObject(includeInstance, f), - renewalTxid: msg.getRenewalTxid_asB64() - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.poolrpc.RenewAccountResponse} - */ -proto.poolrpc.RenewAccountResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.poolrpc.RenewAccountResponse; - return proto.poolrpc.RenewAccountResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.poolrpc.RenewAccountResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.poolrpc.RenewAccountResponse} - */ -proto.poolrpc.RenewAccountResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.poolrpc.Account; - reader.readMessage(value,proto.poolrpc.Account.deserializeBinaryFromReader); - msg.setAccount(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setRenewalTxid(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.poolrpc.RenewAccountResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.poolrpc.RenewAccountResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.poolrpc.RenewAccountResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.RenewAccountResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getAccount(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.poolrpc.Account.serializeBinaryToWriter - ); - } - f = message.getRenewalTxid_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } -}; - - -/** - * optional Account account = 1; - * @return {?proto.poolrpc.Account} - */ -proto.poolrpc.RenewAccountResponse.prototype.getAccount = function() { - return /** @type{?proto.poolrpc.Account} */ ( - jspb.Message.getWrapperField(this, proto.poolrpc.Account, 1)); -}; - - -/** - * @param {?proto.poolrpc.Account|undefined} value - * @return {!proto.poolrpc.RenewAccountResponse} returns this -*/ -proto.poolrpc.RenewAccountResponse.prototype.setAccount = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.poolrpc.RenewAccountResponse} returns this - */ -proto.poolrpc.RenewAccountResponse.prototype.clearAccount = function() { - return this.setAccount(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.poolrpc.RenewAccountResponse.prototype.hasAccount = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional bytes renewal_txid = 2; - * @return {!(string|Uint8Array)} - */ -proto.poolrpc.RenewAccountResponse.prototype.getRenewalTxid = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes renewal_txid = 2; - * This is a type-conversion wrapper around `getRenewalTxid()` - * @return {string} - */ -proto.poolrpc.RenewAccountResponse.prototype.getRenewalTxid_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getRenewalTxid())); -}; - - -/** - * optional bytes renewal_txid = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getRenewalTxid()` - * @return {!Uint8Array} - */ -proto.poolrpc.RenewAccountResponse.prototype.getRenewalTxid_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getRenewalTxid())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.poolrpc.RenewAccountResponse} returns this - */ -proto.poolrpc.RenewAccountResponse.prototype.setRenewalTxid = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.poolrpc.BumpAccountFeeRequest.prototype.toObject = function(opt_includeInstance) { - return proto.poolrpc.BumpAccountFeeRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.poolrpc.BumpAccountFeeRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.BumpAccountFeeRequest.toObject = function(includeInstance, msg) { - var f, obj = { - traderKey: msg.getTraderKey_asB64(), - feeRateSatPerKw: jspb.Message.getFieldWithDefault(msg, 2, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.poolrpc.BumpAccountFeeRequest} - */ -proto.poolrpc.BumpAccountFeeRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.poolrpc.BumpAccountFeeRequest; - return proto.poolrpc.BumpAccountFeeRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.poolrpc.BumpAccountFeeRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.poolrpc.BumpAccountFeeRequest} - */ -proto.poolrpc.BumpAccountFeeRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setTraderKey(value); - break; - case 2: - var value = /** @type {number} */ (reader.readUint64()); - msg.setFeeRateSatPerKw(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.poolrpc.BumpAccountFeeRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.poolrpc.BumpAccountFeeRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.poolrpc.BumpAccountFeeRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.BumpAccountFeeRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getTraderKey_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getFeeRateSatPerKw(); - if (f !== 0) { - writer.writeUint64( - 2, - f - ); - } -}; - - -/** - * optional bytes trader_key = 1; - * @return {!(string|Uint8Array)} - */ -proto.poolrpc.BumpAccountFeeRequest.prototype.getTraderKey = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes trader_key = 1; - * This is a type-conversion wrapper around `getTraderKey()` - * @return {string} - */ -proto.poolrpc.BumpAccountFeeRequest.prototype.getTraderKey_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getTraderKey())); -}; - - -/** - * optional bytes trader_key = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getTraderKey()` - * @return {!Uint8Array} - */ -proto.poolrpc.BumpAccountFeeRequest.prototype.getTraderKey_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getTraderKey())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.poolrpc.BumpAccountFeeRequest} returns this - */ -proto.poolrpc.BumpAccountFeeRequest.prototype.setTraderKey = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional uint64 fee_rate_sat_per_kw = 2; - * @return {number} - */ -proto.poolrpc.BumpAccountFeeRequest.prototype.getFeeRateSatPerKw = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.poolrpc.BumpAccountFeeRequest} returns this - */ -proto.poolrpc.BumpAccountFeeRequest.prototype.setFeeRateSatPerKw = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.poolrpc.BumpAccountFeeResponse.prototype.toObject = function(opt_includeInstance) { - return proto.poolrpc.BumpAccountFeeResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.poolrpc.BumpAccountFeeResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.BumpAccountFeeResponse.toObject = function(includeInstance, msg) { - var f, obj = { - - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.poolrpc.BumpAccountFeeResponse} - */ -proto.poolrpc.BumpAccountFeeResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.poolrpc.BumpAccountFeeResponse; - return proto.poolrpc.BumpAccountFeeResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.poolrpc.BumpAccountFeeResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.poolrpc.BumpAccountFeeResponse} - */ -proto.poolrpc.BumpAccountFeeResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.poolrpc.BumpAccountFeeResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.poolrpc.BumpAccountFeeResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.poolrpc.BumpAccountFeeResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.BumpAccountFeeResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.poolrpc.Account.prototype.toObject = function(opt_includeInstance) { - return proto.poolrpc.Account.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.poolrpc.Account} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.Account.toObject = function(includeInstance, msg) { - var f, obj = { - traderKey: msg.getTraderKey_asB64(), - outpoint: (f = msg.getOutpoint()) && auctioneerrpc_auctioneer_pb.OutPoint.toObject(includeInstance, f), - value: jspb.Message.getFieldWithDefault(msg, 3, 0), - availableBalance: jspb.Message.getFieldWithDefault(msg, 4, 0), - expirationHeight: jspb.Message.getFieldWithDefault(msg, 5, 0), - state: jspb.Message.getFieldWithDefault(msg, 6, 0), - latestTxid: msg.getLatestTxid_asB64() - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.poolrpc.Account} - */ -proto.poolrpc.Account.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.poolrpc.Account; - return proto.poolrpc.Account.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.poolrpc.Account} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.poolrpc.Account} - */ -proto.poolrpc.Account.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setTraderKey(value); - break; - case 2: - var value = new auctioneerrpc_auctioneer_pb.OutPoint; - reader.readMessage(value,auctioneerrpc_auctioneer_pb.OutPoint.deserializeBinaryFromReader); - msg.setOutpoint(value); - break; - case 3: - var value = /** @type {number} */ (reader.readUint64()); - msg.setValue(value); - break; - case 4: - var value = /** @type {number} */ (reader.readUint64()); - msg.setAvailableBalance(value); - break; - case 5: - var value = /** @type {number} */ (reader.readUint32()); - msg.setExpirationHeight(value); - break; - case 6: - var value = /** @type {!proto.poolrpc.AccountState} */ (reader.readEnum()); - msg.setState(value); - break; - case 7: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setLatestTxid(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.poolrpc.Account.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.poolrpc.Account.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.poolrpc.Account} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.Account.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getTraderKey_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getOutpoint(); - if (f != null) { - writer.writeMessage( - 2, - f, - auctioneerrpc_auctioneer_pb.OutPoint.serializeBinaryToWriter - ); - } - f = message.getValue(); - if (f !== 0) { - writer.writeUint64( - 3, - f - ); - } - f = message.getAvailableBalance(); - if (f !== 0) { - writer.writeUint64( - 4, - f - ); - } - f = message.getExpirationHeight(); - if (f !== 0) { - writer.writeUint32( - 5, - f - ); - } - f = message.getState(); - if (f !== 0.0) { - writer.writeEnum( - 6, - f - ); - } - f = message.getLatestTxid_asU8(); - if (f.length > 0) { - writer.writeBytes( - 7, - f - ); - } -}; - - -/** - * optional bytes trader_key = 1; - * @return {!(string|Uint8Array)} - */ -proto.poolrpc.Account.prototype.getTraderKey = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes trader_key = 1; - * This is a type-conversion wrapper around `getTraderKey()` - * @return {string} - */ -proto.poolrpc.Account.prototype.getTraderKey_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getTraderKey())); -}; - - -/** - * optional bytes trader_key = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getTraderKey()` - * @return {!Uint8Array} - */ -proto.poolrpc.Account.prototype.getTraderKey_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getTraderKey())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.poolrpc.Account} returns this - */ -proto.poolrpc.Account.prototype.setTraderKey = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional OutPoint outpoint = 2; - * @return {?proto.poolrpc.OutPoint} - */ -proto.poolrpc.Account.prototype.getOutpoint = function() { - return /** @type{?proto.poolrpc.OutPoint} */ ( - jspb.Message.getWrapperField(this, auctioneerrpc_auctioneer_pb.OutPoint, 2)); -}; - - -/** - * @param {?proto.poolrpc.OutPoint|undefined} value - * @return {!proto.poolrpc.Account} returns this -*/ -proto.poolrpc.Account.prototype.setOutpoint = function(value) { - return jspb.Message.setWrapperField(this, 2, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.poolrpc.Account} returns this - */ -proto.poolrpc.Account.prototype.clearOutpoint = function() { - return this.setOutpoint(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.poolrpc.Account.prototype.hasOutpoint = function() { - return jspb.Message.getField(this, 2) != null; -}; - - -/** - * optional uint64 value = 3; - * @return {number} - */ -proto.poolrpc.Account.prototype.getValue = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.poolrpc.Account} returns this - */ -proto.poolrpc.Account.prototype.setValue = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - -/** - * optional uint64 available_balance = 4; - * @return {number} - */ -proto.poolrpc.Account.prototype.getAvailableBalance = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.poolrpc.Account} returns this - */ -proto.poolrpc.Account.prototype.setAvailableBalance = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); -}; - - -/** - * optional uint32 expiration_height = 5; - * @return {number} - */ -proto.poolrpc.Account.prototype.getExpirationHeight = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.poolrpc.Account} returns this - */ -proto.poolrpc.Account.prototype.setExpirationHeight = function(value) { - return jspb.Message.setProto3IntField(this, 5, value); -}; - - -/** - * optional AccountState state = 6; - * @return {!proto.poolrpc.AccountState} - */ -proto.poolrpc.Account.prototype.getState = function() { - return /** @type {!proto.poolrpc.AccountState} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); -}; - - -/** - * @param {!proto.poolrpc.AccountState} value - * @return {!proto.poolrpc.Account} returns this - */ -proto.poolrpc.Account.prototype.setState = function(value) { - return jspb.Message.setProto3EnumField(this, 6, value); -}; - - -/** - * optional bytes latest_txid = 7; - * @return {!(string|Uint8Array)} - */ -proto.poolrpc.Account.prototype.getLatestTxid = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 7, "")); -}; - - -/** - * optional bytes latest_txid = 7; - * This is a type-conversion wrapper around `getLatestTxid()` - * @return {string} - */ -proto.poolrpc.Account.prototype.getLatestTxid_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getLatestTxid())); -}; - - -/** - * optional bytes latest_txid = 7; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getLatestTxid()` - * @return {!Uint8Array} - */ -proto.poolrpc.Account.prototype.getLatestTxid_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getLatestTxid())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.poolrpc.Account} returns this - */ -proto.poolrpc.Account.prototype.setLatestTxid = function(value) { - return jspb.Message.setProto3BytesField(this, 7, value); -}; - - - -/** - * Oneof group definitions for this message. Each group defines the field - * numbers belonging to that group. When of these fields' value is set, all - * other fields in the group are cleared. During deserialization, if multiple - * fields are encountered for a group, only the last value seen will be kept. - * @private {!Array>} - * @const - */ -proto.poolrpc.SubmitOrderRequest.oneofGroups_ = [[1,2]]; - -/** - * @enum {number} - */ -proto.poolrpc.SubmitOrderRequest.DetailsCase = { - DETAILS_NOT_SET: 0, - ASK: 1, - BID: 2 -}; - -/** - * @return {proto.poolrpc.SubmitOrderRequest.DetailsCase} - */ -proto.poolrpc.SubmitOrderRequest.prototype.getDetailsCase = function() { - return /** @type {proto.poolrpc.SubmitOrderRequest.DetailsCase} */(jspb.Message.computeOneofCase(this, proto.poolrpc.SubmitOrderRequest.oneofGroups_[0])); -}; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.poolrpc.SubmitOrderRequest.prototype.toObject = function(opt_includeInstance) { - return proto.poolrpc.SubmitOrderRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.poolrpc.SubmitOrderRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.SubmitOrderRequest.toObject = function(includeInstance, msg) { - var f, obj = { - ask: (f = msg.getAsk()) && proto.poolrpc.Ask.toObject(includeInstance, f), - bid: (f = msg.getBid()) && proto.poolrpc.Bid.toObject(includeInstance, f), - initiator: jspb.Message.getFieldWithDefault(msg, 3, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.poolrpc.SubmitOrderRequest} - */ -proto.poolrpc.SubmitOrderRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.poolrpc.SubmitOrderRequest; - return proto.poolrpc.SubmitOrderRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.poolrpc.SubmitOrderRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.poolrpc.SubmitOrderRequest} - */ -proto.poolrpc.SubmitOrderRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.poolrpc.Ask; - reader.readMessage(value,proto.poolrpc.Ask.deserializeBinaryFromReader); - msg.setAsk(value); - break; - case 2: - var value = new proto.poolrpc.Bid; - reader.readMessage(value,proto.poolrpc.Bid.deserializeBinaryFromReader); - msg.setBid(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setInitiator(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.poolrpc.SubmitOrderRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.poolrpc.SubmitOrderRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.poolrpc.SubmitOrderRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.SubmitOrderRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getAsk(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.poolrpc.Ask.serializeBinaryToWriter - ); - } - f = message.getBid(); - if (f != null) { - writer.writeMessage( - 2, - f, - proto.poolrpc.Bid.serializeBinaryToWriter - ); - } - f = message.getInitiator(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } -}; - - -/** - * optional Ask ask = 1; - * @return {?proto.poolrpc.Ask} - */ -proto.poolrpc.SubmitOrderRequest.prototype.getAsk = function() { - return /** @type{?proto.poolrpc.Ask} */ ( - jspb.Message.getWrapperField(this, proto.poolrpc.Ask, 1)); -}; - - -/** - * @param {?proto.poolrpc.Ask|undefined} value - * @return {!proto.poolrpc.SubmitOrderRequest} returns this -*/ -proto.poolrpc.SubmitOrderRequest.prototype.setAsk = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.poolrpc.SubmitOrderRequest.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.poolrpc.SubmitOrderRequest} returns this - */ -proto.poolrpc.SubmitOrderRequest.prototype.clearAsk = function() { - return this.setAsk(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.poolrpc.SubmitOrderRequest.prototype.hasAsk = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional Bid bid = 2; - * @return {?proto.poolrpc.Bid} - */ -proto.poolrpc.SubmitOrderRequest.prototype.getBid = function() { - return /** @type{?proto.poolrpc.Bid} */ ( - jspb.Message.getWrapperField(this, proto.poolrpc.Bid, 2)); -}; - - -/** - * @param {?proto.poolrpc.Bid|undefined} value - * @return {!proto.poolrpc.SubmitOrderRequest} returns this -*/ -proto.poolrpc.SubmitOrderRequest.prototype.setBid = function(value) { - return jspb.Message.setOneofWrapperField(this, 2, proto.poolrpc.SubmitOrderRequest.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.poolrpc.SubmitOrderRequest} returns this - */ -proto.poolrpc.SubmitOrderRequest.prototype.clearBid = function() { - return this.setBid(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.poolrpc.SubmitOrderRequest.prototype.hasBid = function() { - return jspb.Message.getField(this, 2) != null; -}; - - -/** - * optional string initiator = 3; - * @return {string} - */ -proto.poolrpc.SubmitOrderRequest.prototype.getInitiator = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * @param {string} value - * @return {!proto.poolrpc.SubmitOrderRequest} returns this - */ -proto.poolrpc.SubmitOrderRequest.prototype.setInitiator = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); -}; - - - -/** - * Oneof group definitions for this message. Each group defines the field - * numbers belonging to that group. When of these fields' value is set, all - * other fields in the group are cleared. During deserialization, if multiple - * fields are encountered for a group, only the last value seen will be kept. - * @private {!Array>} - * @const - */ -proto.poolrpc.SubmitOrderResponse.oneofGroups_ = [[1,2]]; - -/** - * @enum {number} - */ -proto.poolrpc.SubmitOrderResponse.DetailsCase = { - DETAILS_NOT_SET: 0, - INVALID_ORDER: 1, - ACCEPTED_ORDER_NONCE: 2 -}; - -/** - * @return {proto.poolrpc.SubmitOrderResponse.DetailsCase} - */ -proto.poolrpc.SubmitOrderResponse.prototype.getDetailsCase = function() { - return /** @type {proto.poolrpc.SubmitOrderResponse.DetailsCase} */(jspb.Message.computeOneofCase(this, proto.poolrpc.SubmitOrderResponse.oneofGroups_[0])); -}; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.poolrpc.SubmitOrderResponse.prototype.toObject = function(opt_includeInstance) { - return proto.poolrpc.SubmitOrderResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.poolrpc.SubmitOrderResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.SubmitOrderResponse.toObject = function(includeInstance, msg) { - var f, obj = { - invalidOrder: (f = msg.getInvalidOrder()) && auctioneerrpc_auctioneer_pb.InvalidOrder.toObject(includeInstance, f), - acceptedOrderNonce: msg.getAcceptedOrderNonce_asB64(), - updatedSidecarTicket: jspb.Message.getFieldWithDefault(msg, 3, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.poolrpc.SubmitOrderResponse} - */ -proto.poolrpc.SubmitOrderResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.poolrpc.SubmitOrderResponse; - return proto.poolrpc.SubmitOrderResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.poolrpc.SubmitOrderResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.poolrpc.SubmitOrderResponse} - */ -proto.poolrpc.SubmitOrderResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new auctioneerrpc_auctioneer_pb.InvalidOrder; - reader.readMessage(value,auctioneerrpc_auctioneer_pb.InvalidOrder.deserializeBinaryFromReader); - msg.setInvalidOrder(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setAcceptedOrderNonce(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setUpdatedSidecarTicket(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.poolrpc.SubmitOrderResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.poolrpc.SubmitOrderResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.poolrpc.SubmitOrderResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.SubmitOrderResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getInvalidOrder(); - if (f != null) { - writer.writeMessage( - 1, - f, - auctioneerrpc_auctioneer_pb.InvalidOrder.serializeBinaryToWriter - ); - } - f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 2)); - if (f != null) { - writer.writeBytes( - 2, - f - ); - } - f = message.getUpdatedSidecarTicket(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } -}; - - -/** - * optional InvalidOrder invalid_order = 1; - * @return {?proto.poolrpc.InvalidOrder} - */ -proto.poolrpc.SubmitOrderResponse.prototype.getInvalidOrder = function() { - return /** @type{?proto.poolrpc.InvalidOrder} */ ( - jspb.Message.getWrapperField(this, auctioneerrpc_auctioneer_pb.InvalidOrder, 1)); -}; - - -/** - * @param {?proto.poolrpc.InvalidOrder|undefined} value - * @return {!proto.poolrpc.SubmitOrderResponse} returns this -*/ -proto.poolrpc.SubmitOrderResponse.prototype.setInvalidOrder = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.poolrpc.SubmitOrderResponse.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.poolrpc.SubmitOrderResponse} returns this - */ -proto.poolrpc.SubmitOrderResponse.prototype.clearInvalidOrder = function() { - return this.setInvalidOrder(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.poolrpc.SubmitOrderResponse.prototype.hasInvalidOrder = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional bytes accepted_order_nonce = 2; - * @return {!(string|Uint8Array)} - */ -proto.poolrpc.SubmitOrderResponse.prototype.getAcceptedOrderNonce = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes accepted_order_nonce = 2; - * This is a type-conversion wrapper around `getAcceptedOrderNonce()` - * @return {string} - */ -proto.poolrpc.SubmitOrderResponse.prototype.getAcceptedOrderNonce_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getAcceptedOrderNonce())); -}; - - -/** - * optional bytes accepted_order_nonce = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getAcceptedOrderNonce()` - * @return {!Uint8Array} - */ -proto.poolrpc.SubmitOrderResponse.prototype.getAcceptedOrderNonce_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getAcceptedOrderNonce())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.poolrpc.SubmitOrderResponse} returns this - */ -proto.poolrpc.SubmitOrderResponse.prototype.setAcceptedOrderNonce = function(value) { - return jspb.Message.setOneofField(this, 2, proto.poolrpc.SubmitOrderResponse.oneofGroups_[0], value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.poolrpc.SubmitOrderResponse} returns this - */ -proto.poolrpc.SubmitOrderResponse.prototype.clearAcceptedOrderNonce = function() { - return jspb.Message.setOneofField(this, 2, proto.poolrpc.SubmitOrderResponse.oneofGroups_[0], undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.poolrpc.SubmitOrderResponse.prototype.hasAcceptedOrderNonce = function() { - return jspb.Message.getField(this, 2) != null; -}; - - -/** - * optional string updated_sidecar_ticket = 3; - * @return {string} - */ -proto.poolrpc.SubmitOrderResponse.prototype.getUpdatedSidecarTicket = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * @param {string} value - * @return {!proto.poolrpc.SubmitOrderResponse} returns this - */ -proto.poolrpc.SubmitOrderResponse.prototype.setUpdatedSidecarTicket = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.poolrpc.ListOrdersRequest.prototype.toObject = function(opt_includeInstance) { - return proto.poolrpc.ListOrdersRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.poolrpc.ListOrdersRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.ListOrdersRequest.toObject = function(includeInstance, msg) { - var f, obj = { - verbose: jspb.Message.getBooleanFieldWithDefault(msg, 1, false), - activeOnly: jspb.Message.getBooleanFieldWithDefault(msg, 2, false) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.poolrpc.ListOrdersRequest} - */ -proto.poolrpc.ListOrdersRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.poolrpc.ListOrdersRequest; - return proto.poolrpc.ListOrdersRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.poolrpc.ListOrdersRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.poolrpc.ListOrdersRequest} - */ -proto.poolrpc.ListOrdersRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setVerbose(value); - break; - case 2: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setActiveOnly(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.poolrpc.ListOrdersRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.poolrpc.ListOrdersRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.poolrpc.ListOrdersRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.ListOrdersRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getVerbose(); - if (f) { - writer.writeBool( - 1, - f - ); - } - f = message.getActiveOnly(); - if (f) { - writer.writeBool( - 2, - f - ); - } -}; - - -/** - * optional bool verbose = 1; - * @return {boolean} - */ -proto.poolrpc.ListOrdersRequest.prototype.getVerbose = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.poolrpc.ListOrdersRequest} returns this - */ -proto.poolrpc.ListOrdersRequest.prototype.setVerbose = function(value) { - return jspb.Message.setProto3BooleanField(this, 1, value); -}; - - -/** - * optional bool active_only = 2; - * @return {boolean} - */ -proto.poolrpc.ListOrdersRequest.prototype.getActiveOnly = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.poolrpc.ListOrdersRequest} returns this - */ -proto.poolrpc.ListOrdersRequest.prototype.setActiveOnly = function(value) { - return jspb.Message.setProto3BooleanField(this, 2, value); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.poolrpc.ListOrdersResponse.repeatedFields_ = [1,2]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.poolrpc.ListOrdersResponse.prototype.toObject = function(opt_includeInstance) { - return proto.poolrpc.ListOrdersResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.poolrpc.ListOrdersResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.ListOrdersResponse.toObject = function(includeInstance, msg) { - var f, obj = { - asksList: jspb.Message.toObjectList(msg.getAsksList(), - proto.poolrpc.Ask.toObject, includeInstance), - bidsList: jspb.Message.toObjectList(msg.getBidsList(), - proto.poolrpc.Bid.toObject, includeInstance) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.poolrpc.ListOrdersResponse} - */ -proto.poolrpc.ListOrdersResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.poolrpc.ListOrdersResponse; - return proto.poolrpc.ListOrdersResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.poolrpc.ListOrdersResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.poolrpc.ListOrdersResponse} - */ -proto.poolrpc.ListOrdersResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.poolrpc.Ask; - reader.readMessage(value,proto.poolrpc.Ask.deserializeBinaryFromReader); - msg.addAsks(value); - break; - case 2: - var value = new proto.poolrpc.Bid; - reader.readMessage(value,proto.poolrpc.Bid.deserializeBinaryFromReader); - msg.addBids(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.poolrpc.ListOrdersResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.poolrpc.ListOrdersResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.poolrpc.ListOrdersResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.ListOrdersResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getAsksList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 1, - f, - proto.poolrpc.Ask.serializeBinaryToWriter - ); - } - f = message.getBidsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 2, - f, - proto.poolrpc.Bid.serializeBinaryToWriter - ); - } -}; - - -/** - * repeated Ask asks = 1; - * @return {!Array} - */ -proto.poolrpc.ListOrdersResponse.prototype.getAsksList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.poolrpc.Ask, 1)); -}; - - -/** - * @param {!Array} value - * @return {!proto.poolrpc.ListOrdersResponse} returns this -*/ -proto.poolrpc.ListOrdersResponse.prototype.setAsksList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); -}; - - -/** - * @param {!proto.poolrpc.Ask=} opt_value - * @param {number=} opt_index - * @return {!proto.poolrpc.Ask} - */ -proto.poolrpc.ListOrdersResponse.prototype.addAsks = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.poolrpc.Ask, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.poolrpc.ListOrdersResponse} returns this - */ -proto.poolrpc.ListOrdersResponse.prototype.clearAsksList = function() { - return this.setAsksList([]); -}; - - -/** - * repeated Bid bids = 2; - * @return {!Array} - */ -proto.poolrpc.ListOrdersResponse.prototype.getBidsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.poolrpc.Bid, 2)); -}; - - -/** - * @param {!Array} value - * @return {!proto.poolrpc.ListOrdersResponse} returns this -*/ -proto.poolrpc.ListOrdersResponse.prototype.setBidsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 2, value); -}; - - -/** - * @param {!proto.poolrpc.Bid=} opt_value - * @param {number=} opt_index - * @return {!proto.poolrpc.Bid} - */ -proto.poolrpc.ListOrdersResponse.prototype.addBids = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.poolrpc.Bid, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.poolrpc.ListOrdersResponse} returns this - */ -proto.poolrpc.ListOrdersResponse.prototype.clearBidsList = function() { - return this.setBidsList([]); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.poolrpc.CancelOrderRequest.prototype.toObject = function(opt_includeInstance) { - return proto.poolrpc.CancelOrderRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.poolrpc.CancelOrderRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.CancelOrderRequest.toObject = function(includeInstance, msg) { - var f, obj = { - orderNonce: msg.getOrderNonce_asB64() - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.poolrpc.CancelOrderRequest} - */ -proto.poolrpc.CancelOrderRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.poolrpc.CancelOrderRequest; - return proto.poolrpc.CancelOrderRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.poolrpc.CancelOrderRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.poolrpc.CancelOrderRequest} - */ -proto.poolrpc.CancelOrderRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setOrderNonce(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.poolrpc.CancelOrderRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.poolrpc.CancelOrderRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.poolrpc.CancelOrderRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.CancelOrderRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getOrderNonce_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } -}; - - -/** - * optional bytes order_nonce = 1; - * @return {!(string|Uint8Array)} - */ -proto.poolrpc.CancelOrderRequest.prototype.getOrderNonce = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes order_nonce = 1; - * This is a type-conversion wrapper around `getOrderNonce()` - * @return {string} - */ -proto.poolrpc.CancelOrderRequest.prototype.getOrderNonce_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getOrderNonce())); -}; - - -/** - * optional bytes order_nonce = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getOrderNonce()` - * @return {!Uint8Array} - */ -proto.poolrpc.CancelOrderRequest.prototype.getOrderNonce_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getOrderNonce())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.poolrpc.CancelOrderRequest} returns this - */ -proto.poolrpc.CancelOrderRequest.prototype.setOrderNonce = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.poolrpc.CancelOrderResponse.prototype.toObject = function(opt_includeInstance) { - return proto.poolrpc.CancelOrderResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.poolrpc.CancelOrderResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.CancelOrderResponse.toObject = function(includeInstance, msg) { - var f, obj = { - - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.poolrpc.CancelOrderResponse} - */ -proto.poolrpc.CancelOrderResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.poolrpc.CancelOrderResponse; - return proto.poolrpc.CancelOrderResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.poolrpc.CancelOrderResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.poolrpc.CancelOrderResponse} - */ -proto.poolrpc.CancelOrderResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.poolrpc.CancelOrderResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.poolrpc.CancelOrderResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.poolrpc.CancelOrderResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.CancelOrderResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.poolrpc.Order.repeatedFields_ = [11]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.poolrpc.Order.prototype.toObject = function(opt_includeInstance) { - return proto.poolrpc.Order.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.poolrpc.Order} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.Order.toObject = function(includeInstance, msg) { - var f, obj = { - traderKey: msg.getTraderKey_asB64(), - rateFixed: jspb.Message.getFieldWithDefault(msg, 2, 0), - amt: jspb.Message.getFieldWithDefault(msg, 3, 0), - maxBatchFeeRateSatPerKw: jspb.Message.getFieldWithDefault(msg, 4, 0), - orderNonce: msg.getOrderNonce_asB64(), - state: jspb.Message.getFieldWithDefault(msg, 6, 0), - units: jspb.Message.getFieldWithDefault(msg, 7, 0), - unitsUnfulfilled: jspb.Message.getFieldWithDefault(msg, 8, 0), - reservedValueSat: jspb.Message.getFieldWithDefault(msg, 9, 0), - creationTimestampNs: jspb.Message.getFieldWithDefault(msg, 10, 0), - eventsList: jspb.Message.toObjectList(msg.getEventsList(), - proto.poolrpc.OrderEvent.toObject, includeInstance), - minUnitsMatch: jspb.Message.getFieldWithDefault(msg, 12, 0), - channelType: jspb.Message.getFieldWithDefault(msg, 13, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.poolrpc.Order} - */ -proto.poolrpc.Order.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.poolrpc.Order; - return proto.poolrpc.Order.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.poolrpc.Order} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.poolrpc.Order} - */ -proto.poolrpc.Order.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setTraderKey(value); - break; - case 2: - var value = /** @type {number} */ (reader.readUint32()); - msg.setRateFixed(value); - break; - case 3: - var value = /** @type {number} */ (reader.readUint64()); - msg.setAmt(value); - break; - case 4: - var value = /** @type {number} */ (reader.readUint64()); - msg.setMaxBatchFeeRateSatPerKw(value); - break; - case 5: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setOrderNonce(value); - break; - case 6: - var value = /** @type {!proto.poolrpc.OrderState} */ (reader.readEnum()); - msg.setState(value); - break; - case 7: - var value = /** @type {number} */ (reader.readUint32()); - msg.setUnits(value); - break; - case 8: - var value = /** @type {number} */ (reader.readUint32()); - msg.setUnitsUnfulfilled(value); - break; - case 9: - var value = /** @type {number} */ (reader.readUint64()); - msg.setReservedValueSat(value); - break; - case 10: - var value = /** @type {number} */ (reader.readUint64()); - msg.setCreationTimestampNs(value); - break; - case 11: - var value = new proto.poolrpc.OrderEvent; - reader.readMessage(value,proto.poolrpc.OrderEvent.deserializeBinaryFromReader); - msg.addEvents(value); - break; - case 12: - var value = /** @type {number} */ (reader.readUint32()); - msg.setMinUnitsMatch(value); - break; - case 13: - var value = /** @type {!proto.poolrpc.OrderChannelType} */ (reader.readEnum()); - msg.setChannelType(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.poolrpc.Order.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.poolrpc.Order.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.poolrpc.Order} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.Order.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getTraderKey_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getRateFixed(); - if (f !== 0) { - writer.writeUint32( - 2, - f - ); - } - f = message.getAmt(); - if (f !== 0) { - writer.writeUint64( - 3, - f - ); - } - f = message.getMaxBatchFeeRateSatPerKw(); - if (f !== 0) { - writer.writeUint64( - 4, - f - ); - } - f = message.getOrderNonce_asU8(); - if (f.length > 0) { - writer.writeBytes( - 5, - f - ); - } - f = message.getState(); - if (f !== 0.0) { - writer.writeEnum( - 6, - f - ); - } - f = message.getUnits(); - if (f !== 0) { - writer.writeUint32( - 7, - f - ); - } - f = message.getUnitsUnfulfilled(); - if (f !== 0) { - writer.writeUint32( - 8, - f - ); - } - f = message.getReservedValueSat(); - if (f !== 0) { - writer.writeUint64( - 9, - f - ); - } - f = message.getCreationTimestampNs(); - if (f !== 0) { - writer.writeUint64( - 10, - f - ); - } - f = message.getEventsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 11, - f, - proto.poolrpc.OrderEvent.serializeBinaryToWriter - ); - } - f = message.getMinUnitsMatch(); - if (f !== 0) { - writer.writeUint32( - 12, - f - ); - } - f = message.getChannelType(); - if (f !== 0.0) { - writer.writeEnum( - 13, - f - ); - } -}; - - -/** - * optional bytes trader_key = 1; - * @return {!(string|Uint8Array)} - */ -proto.poolrpc.Order.prototype.getTraderKey = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes trader_key = 1; - * This is a type-conversion wrapper around `getTraderKey()` - * @return {string} - */ -proto.poolrpc.Order.prototype.getTraderKey_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getTraderKey())); -}; - - -/** - * optional bytes trader_key = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getTraderKey()` - * @return {!Uint8Array} - */ -proto.poolrpc.Order.prototype.getTraderKey_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getTraderKey())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.poolrpc.Order} returns this - */ -proto.poolrpc.Order.prototype.setTraderKey = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional uint32 rate_fixed = 2; - * @return {number} - */ -proto.poolrpc.Order.prototype.getRateFixed = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.poolrpc.Order} returns this - */ -proto.poolrpc.Order.prototype.setRateFixed = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * optional uint64 amt = 3; - * @return {number} - */ -proto.poolrpc.Order.prototype.getAmt = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.poolrpc.Order} returns this - */ -proto.poolrpc.Order.prototype.setAmt = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - -/** - * optional uint64 max_batch_fee_rate_sat_per_kw = 4; - * @return {number} - */ -proto.poolrpc.Order.prototype.getMaxBatchFeeRateSatPerKw = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.poolrpc.Order} returns this - */ -proto.poolrpc.Order.prototype.setMaxBatchFeeRateSatPerKw = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); -}; - - -/** - * optional bytes order_nonce = 5; - * @return {!(string|Uint8Array)} - */ -proto.poolrpc.Order.prototype.getOrderNonce = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 5, "")); -}; - - -/** - * optional bytes order_nonce = 5; - * This is a type-conversion wrapper around `getOrderNonce()` - * @return {string} - */ -proto.poolrpc.Order.prototype.getOrderNonce_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getOrderNonce())); -}; - - -/** - * optional bytes order_nonce = 5; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getOrderNonce()` - * @return {!Uint8Array} - */ -proto.poolrpc.Order.prototype.getOrderNonce_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getOrderNonce())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.poolrpc.Order} returns this - */ -proto.poolrpc.Order.prototype.setOrderNonce = function(value) { - return jspb.Message.setProto3BytesField(this, 5, value); -}; - - -/** - * optional OrderState state = 6; - * @return {!proto.poolrpc.OrderState} - */ -proto.poolrpc.Order.prototype.getState = function() { - return /** @type {!proto.poolrpc.OrderState} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); -}; - - -/** - * @param {!proto.poolrpc.OrderState} value - * @return {!proto.poolrpc.Order} returns this - */ -proto.poolrpc.Order.prototype.setState = function(value) { - return jspb.Message.setProto3EnumField(this, 6, value); -}; - - -/** - * optional uint32 units = 7; - * @return {number} - */ -proto.poolrpc.Order.prototype.getUnits = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.poolrpc.Order} returns this - */ -proto.poolrpc.Order.prototype.setUnits = function(value) { - return jspb.Message.setProto3IntField(this, 7, value); -}; - - -/** - * optional uint32 units_unfulfilled = 8; - * @return {number} - */ -proto.poolrpc.Order.prototype.getUnitsUnfulfilled = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.poolrpc.Order} returns this - */ -proto.poolrpc.Order.prototype.setUnitsUnfulfilled = function(value) { - return jspb.Message.setProto3IntField(this, 8, value); -}; - - -/** - * optional uint64 reserved_value_sat = 9; - * @return {number} - */ -proto.poolrpc.Order.prototype.getReservedValueSat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.poolrpc.Order} returns this - */ -proto.poolrpc.Order.prototype.setReservedValueSat = function(value) { - return jspb.Message.setProto3IntField(this, 9, value); -}; - - -/** - * optional uint64 creation_timestamp_ns = 10; - * @return {number} - */ -proto.poolrpc.Order.prototype.getCreationTimestampNs = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 10, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.poolrpc.Order} returns this - */ -proto.poolrpc.Order.prototype.setCreationTimestampNs = function(value) { - return jspb.Message.setProto3IntField(this, 10, value); -}; - - -/** - * repeated OrderEvent events = 11; - * @return {!Array} - */ -proto.poolrpc.Order.prototype.getEventsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.poolrpc.OrderEvent, 11)); -}; - - -/** - * @param {!Array} value - * @return {!proto.poolrpc.Order} returns this -*/ -proto.poolrpc.Order.prototype.setEventsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 11, value); -}; - - -/** - * @param {!proto.poolrpc.OrderEvent=} opt_value - * @param {number=} opt_index - * @return {!proto.poolrpc.OrderEvent} - */ -proto.poolrpc.Order.prototype.addEvents = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 11, opt_value, proto.poolrpc.OrderEvent, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.poolrpc.Order} returns this - */ -proto.poolrpc.Order.prototype.clearEventsList = function() { - return this.setEventsList([]); -}; - - -/** - * optional uint32 min_units_match = 12; - * @return {number} - */ -proto.poolrpc.Order.prototype.getMinUnitsMatch = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 12, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.poolrpc.Order} returns this - */ -proto.poolrpc.Order.prototype.setMinUnitsMatch = function(value) { - return jspb.Message.setProto3IntField(this, 12, value); -}; - - -/** - * optional OrderChannelType channel_type = 13; - * @return {!proto.poolrpc.OrderChannelType} - */ -proto.poolrpc.Order.prototype.getChannelType = function() { - return /** @type {!proto.poolrpc.OrderChannelType} */ (jspb.Message.getFieldWithDefault(this, 13, 0)); -}; - - -/** - * @param {!proto.poolrpc.OrderChannelType} value - * @return {!proto.poolrpc.Order} returns this - */ -proto.poolrpc.Order.prototype.setChannelType = function(value) { - return jspb.Message.setProto3EnumField(this, 13, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.poolrpc.Bid.prototype.toObject = function(opt_includeInstance) { - return proto.poolrpc.Bid.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.poolrpc.Bid} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.Bid.toObject = function(includeInstance, msg) { - var f, obj = { - details: (f = msg.getDetails()) && proto.poolrpc.Order.toObject(includeInstance, f), - leaseDurationBlocks: jspb.Message.getFieldWithDefault(msg, 2, 0), - version: jspb.Message.getFieldWithDefault(msg, 3, 0), - minNodeTier: jspb.Message.getFieldWithDefault(msg, 4, 0), - selfChanBalance: jspb.Message.getFieldWithDefault(msg, 5, 0), - sidecarTicket: jspb.Message.getFieldWithDefault(msg, 6, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.poolrpc.Bid} - */ -proto.poolrpc.Bid.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.poolrpc.Bid; - return proto.poolrpc.Bid.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.poolrpc.Bid} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.poolrpc.Bid} - */ -proto.poolrpc.Bid.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.poolrpc.Order; - reader.readMessage(value,proto.poolrpc.Order.deserializeBinaryFromReader); - msg.setDetails(value); - break; - case 2: - var value = /** @type {number} */ (reader.readUint32()); - msg.setLeaseDurationBlocks(value); - break; - case 3: - var value = /** @type {number} */ (reader.readUint32()); - msg.setVersion(value); - break; - case 4: - var value = /** @type {!proto.poolrpc.NodeTier} */ (reader.readEnum()); - msg.setMinNodeTier(value); - break; - case 5: - var value = /** @type {number} */ (reader.readUint64()); - msg.setSelfChanBalance(value); - break; - case 6: - var value = /** @type {string} */ (reader.readString()); - msg.setSidecarTicket(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.poolrpc.Bid.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.poolrpc.Bid.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.poolrpc.Bid} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.Bid.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getDetails(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.poolrpc.Order.serializeBinaryToWriter - ); - } - f = message.getLeaseDurationBlocks(); - if (f !== 0) { - writer.writeUint32( - 2, - f - ); - } - f = message.getVersion(); - if (f !== 0) { - writer.writeUint32( - 3, - f - ); - } - f = message.getMinNodeTier(); - if (f !== 0.0) { - writer.writeEnum( - 4, - f - ); - } - f = message.getSelfChanBalance(); - if (f !== 0) { - writer.writeUint64( - 5, - f - ); - } - f = message.getSidecarTicket(); - if (f.length > 0) { - writer.writeString( - 6, - f - ); - } -}; - - -/** - * optional Order details = 1; - * @return {?proto.poolrpc.Order} - */ -proto.poolrpc.Bid.prototype.getDetails = function() { - return /** @type{?proto.poolrpc.Order} */ ( - jspb.Message.getWrapperField(this, proto.poolrpc.Order, 1)); -}; - - -/** - * @param {?proto.poolrpc.Order|undefined} value - * @return {!proto.poolrpc.Bid} returns this -*/ -proto.poolrpc.Bid.prototype.setDetails = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.poolrpc.Bid} returns this - */ -proto.poolrpc.Bid.prototype.clearDetails = function() { - return this.setDetails(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.poolrpc.Bid.prototype.hasDetails = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional uint32 lease_duration_blocks = 2; - * @return {number} - */ -proto.poolrpc.Bid.prototype.getLeaseDurationBlocks = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.poolrpc.Bid} returns this - */ -proto.poolrpc.Bid.prototype.setLeaseDurationBlocks = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * optional uint32 version = 3; - * @return {number} - */ -proto.poolrpc.Bid.prototype.getVersion = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.poolrpc.Bid} returns this - */ -proto.poolrpc.Bid.prototype.setVersion = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - -/** - * optional NodeTier min_node_tier = 4; - * @return {!proto.poolrpc.NodeTier} - */ -proto.poolrpc.Bid.prototype.getMinNodeTier = function() { - return /** @type {!proto.poolrpc.NodeTier} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** - * @param {!proto.poolrpc.NodeTier} value - * @return {!proto.poolrpc.Bid} returns this - */ -proto.poolrpc.Bid.prototype.setMinNodeTier = function(value) { - return jspb.Message.setProto3EnumField(this, 4, value); -}; - - -/** - * optional uint64 self_chan_balance = 5; - * @return {number} - */ -proto.poolrpc.Bid.prototype.getSelfChanBalance = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.poolrpc.Bid} returns this - */ -proto.poolrpc.Bid.prototype.setSelfChanBalance = function(value) { - return jspb.Message.setProto3IntField(this, 5, value); -}; - - -/** - * optional string sidecar_ticket = 6; - * @return {string} - */ -proto.poolrpc.Bid.prototype.getSidecarTicket = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); -}; - - -/** - * @param {string} value - * @return {!proto.poolrpc.Bid} returns this - */ -proto.poolrpc.Bid.prototype.setSidecarTicket = function(value) { - return jspb.Message.setProto3StringField(this, 6, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.poolrpc.Ask.prototype.toObject = function(opt_includeInstance) { - return proto.poolrpc.Ask.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.poolrpc.Ask} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.Ask.toObject = function(includeInstance, msg) { - var f, obj = { - details: (f = msg.getDetails()) && proto.poolrpc.Order.toObject(includeInstance, f), - leaseDurationBlocks: jspb.Message.getFieldWithDefault(msg, 2, 0), - version: jspb.Message.getFieldWithDefault(msg, 3, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.poolrpc.Ask} - */ -proto.poolrpc.Ask.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.poolrpc.Ask; - return proto.poolrpc.Ask.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.poolrpc.Ask} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.poolrpc.Ask} - */ -proto.poolrpc.Ask.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.poolrpc.Order; - reader.readMessage(value,proto.poolrpc.Order.deserializeBinaryFromReader); - msg.setDetails(value); - break; - case 2: - var value = /** @type {number} */ (reader.readUint32()); - msg.setLeaseDurationBlocks(value); - break; - case 3: - var value = /** @type {number} */ (reader.readUint32()); - msg.setVersion(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.poolrpc.Ask.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.poolrpc.Ask.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.poolrpc.Ask} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.Ask.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getDetails(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.poolrpc.Order.serializeBinaryToWriter - ); - } - f = message.getLeaseDurationBlocks(); - if (f !== 0) { - writer.writeUint32( - 2, - f - ); - } - f = message.getVersion(); - if (f !== 0) { - writer.writeUint32( - 3, - f - ); - } -}; - - -/** - * optional Order details = 1; - * @return {?proto.poolrpc.Order} - */ -proto.poolrpc.Ask.prototype.getDetails = function() { - return /** @type{?proto.poolrpc.Order} */ ( - jspb.Message.getWrapperField(this, proto.poolrpc.Order, 1)); -}; - - -/** - * @param {?proto.poolrpc.Order|undefined} value - * @return {!proto.poolrpc.Ask} returns this -*/ -proto.poolrpc.Ask.prototype.setDetails = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.poolrpc.Ask} returns this - */ -proto.poolrpc.Ask.prototype.clearDetails = function() { - return this.setDetails(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.poolrpc.Ask.prototype.hasDetails = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional uint32 lease_duration_blocks = 2; - * @return {number} - */ -proto.poolrpc.Ask.prototype.getLeaseDurationBlocks = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.poolrpc.Ask} returns this - */ -proto.poolrpc.Ask.prototype.setLeaseDurationBlocks = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * optional uint32 version = 3; - * @return {number} - */ -proto.poolrpc.Ask.prototype.getVersion = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.poolrpc.Ask} returns this - */ -proto.poolrpc.Ask.prototype.setVersion = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.poolrpc.QuoteOrderRequest.prototype.toObject = function(opt_includeInstance) { - return proto.poolrpc.QuoteOrderRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.poolrpc.QuoteOrderRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.QuoteOrderRequest.toObject = function(includeInstance, msg) { - var f, obj = { - amt: jspb.Message.getFieldWithDefault(msg, 1, 0), - rateFixed: jspb.Message.getFieldWithDefault(msg, 2, 0), - leaseDurationBlocks: jspb.Message.getFieldWithDefault(msg, 3, 0), - maxBatchFeeRateSatPerKw: jspb.Message.getFieldWithDefault(msg, 4, 0), - minUnitsMatch: jspb.Message.getFieldWithDefault(msg, 5, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.poolrpc.QuoteOrderRequest} - */ -proto.poolrpc.QuoteOrderRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.poolrpc.QuoteOrderRequest; - return proto.poolrpc.QuoteOrderRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.poolrpc.QuoteOrderRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.poolrpc.QuoteOrderRequest} - */ -proto.poolrpc.QuoteOrderRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readUint64()); - msg.setAmt(value); - break; - case 2: - var value = /** @type {number} */ (reader.readUint32()); - msg.setRateFixed(value); - break; - case 3: - var value = /** @type {number} */ (reader.readUint32()); - msg.setLeaseDurationBlocks(value); - break; - case 4: - var value = /** @type {number} */ (reader.readUint64()); - msg.setMaxBatchFeeRateSatPerKw(value); - break; - case 5: - var value = /** @type {number} */ (reader.readUint32()); - msg.setMinUnitsMatch(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.poolrpc.QuoteOrderRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.poolrpc.QuoteOrderRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.poolrpc.QuoteOrderRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.QuoteOrderRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getAmt(); - if (f !== 0) { - writer.writeUint64( - 1, - f - ); - } - f = message.getRateFixed(); - if (f !== 0) { - writer.writeUint32( - 2, - f - ); - } - f = message.getLeaseDurationBlocks(); - if (f !== 0) { - writer.writeUint32( - 3, - f - ); - } - f = message.getMaxBatchFeeRateSatPerKw(); - if (f !== 0) { - writer.writeUint64( - 4, - f - ); - } - f = message.getMinUnitsMatch(); - if (f !== 0) { - writer.writeUint32( - 5, - f - ); - } -}; - - -/** - * optional uint64 amt = 1; - * @return {number} - */ -proto.poolrpc.QuoteOrderRequest.prototype.getAmt = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.poolrpc.QuoteOrderRequest} returns this - */ -proto.poolrpc.QuoteOrderRequest.prototype.setAmt = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); -}; - - -/** - * optional uint32 rate_fixed = 2; - * @return {number} - */ -proto.poolrpc.QuoteOrderRequest.prototype.getRateFixed = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.poolrpc.QuoteOrderRequest} returns this - */ -proto.poolrpc.QuoteOrderRequest.prototype.setRateFixed = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * optional uint32 lease_duration_blocks = 3; - * @return {number} - */ -proto.poolrpc.QuoteOrderRequest.prototype.getLeaseDurationBlocks = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.poolrpc.QuoteOrderRequest} returns this - */ -proto.poolrpc.QuoteOrderRequest.prototype.setLeaseDurationBlocks = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - -/** - * optional uint64 max_batch_fee_rate_sat_per_kw = 4; - * @return {number} - */ -proto.poolrpc.QuoteOrderRequest.prototype.getMaxBatchFeeRateSatPerKw = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.poolrpc.QuoteOrderRequest} returns this - */ -proto.poolrpc.QuoteOrderRequest.prototype.setMaxBatchFeeRateSatPerKw = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); -}; - - -/** - * optional uint32 min_units_match = 5; - * @return {number} - */ -proto.poolrpc.QuoteOrderRequest.prototype.getMinUnitsMatch = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.poolrpc.QuoteOrderRequest} returns this - */ -proto.poolrpc.QuoteOrderRequest.prototype.setMinUnitsMatch = function(value) { - return jspb.Message.setProto3IntField(this, 5, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.poolrpc.QuoteOrderResponse.prototype.toObject = function(opt_includeInstance) { - return proto.poolrpc.QuoteOrderResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.poolrpc.QuoteOrderResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.QuoteOrderResponse.toObject = function(includeInstance, msg) { - var f, obj = { - totalPremiumSat: jspb.Message.getFieldWithDefault(msg, 1, 0), - ratePerBlock: jspb.Message.getFloatingPointFieldWithDefault(msg, 2, 0.0), - ratePercent: jspb.Message.getFloatingPointFieldWithDefault(msg, 3, 0.0), - totalExecutionFeeSat: jspb.Message.getFieldWithDefault(msg, 4, 0), - worstCaseChainFeeSat: jspb.Message.getFieldWithDefault(msg, 5, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.poolrpc.QuoteOrderResponse} - */ -proto.poolrpc.QuoteOrderResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.poolrpc.QuoteOrderResponse; - return proto.poolrpc.QuoteOrderResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.poolrpc.QuoteOrderResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.poolrpc.QuoteOrderResponse} - */ -proto.poolrpc.QuoteOrderResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readUint64()); - msg.setTotalPremiumSat(value); - break; - case 2: - var value = /** @type {number} */ (reader.readDouble()); - msg.setRatePerBlock(value); - break; - case 3: - var value = /** @type {number} */ (reader.readDouble()); - msg.setRatePercent(value); - break; - case 4: - var value = /** @type {number} */ (reader.readUint64()); - msg.setTotalExecutionFeeSat(value); - break; - case 5: - var value = /** @type {number} */ (reader.readUint64()); - msg.setWorstCaseChainFeeSat(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.poolrpc.QuoteOrderResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.poolrpc.QuoteOrderResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.poolrpc.QuoteOrderResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.QuoteOrderResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getTotalPremiumSat(); - if (f !== 0) { - writer.writeUint64( - 1, - f - ); - } - f = message.getRatePerBlock(); - if (f !== 0.0) { - writer.writeDouble( - 2, - f - ); - } - f = message.getRatePercent(); - if (f !== 0.0) { - writer.writeDouble( - 3, - f - ); - } - f = message.getTotalExecutionFeeSat(); - if (f !== 0) { - writer.writeUint64( - 4, - f - ); - } - f = message.getWorstCaseChainFeeSat(); - if (f !== 0) { - writer.writeUint64( - 5, - f - ); - } -}; - - -/** - * optional uint64 total_premium_sat = 1; - * @return {number} - */ -proto.poolrpc.QuoteOrderResponse.prototype.getTotalPremiumSat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.poolrpc.QuoteOrderResponse} returns this - */ -proto.poolrpc.QuoteOrderResponse.prototype.setTotalPremiumSat = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); -}; - - -/** - * optional double rate_per_block = 2; - * @return {number} - */ -proto.poolrpc.QuoteOrderResponse.prototype.getRatePerBlock = function() { - return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 2, 0.0)); -}; - - -/** - * @param {number} value - * @return {!proto.poolrpc.QuoteOrderResponse} returns this - */ -proto.poolrpc.QuoteOrderResponse.prototype.setRatePerBlock = function(value) { - return jspb.Message.setProto3FloatField(this, 2, value); -}; - - -/** - * optional double rate_percent = 3; - * @return {number} - */ -proto.poolrpc.QuoteOrderResponse.prototype.getRatePercent = function() { - return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 3, 0.0)); -}; - - -/** - * @param {number} value - * @return {!proto.poolrpc.QuoteOrderResponse} returns this - */ -proto.poolrpc.QuoteOrderResponse.prototype.setRatePercent = function(value) { - return jspb.Message.setProto3FloatField(this, 3, value); -}; - - -/** - * optional uint64 total_execution_fee_sat = 4; - * @return {number} - */ -proto.poolrpc.QuoteOrderResponse.prototype.getTotalExecutionFeeSat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.poolrpc.QuoteOrderResponse} returns this - */ -proto.poolrpc.QuoteOrderResponse.prototype.setTotalExecutionFeeSat = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); -}; - - -/** - * optional uint64 worst_case_chain_fee_sat = 5; - * @return {number} - */ -proto.poolrpc.QuoteOrderResponse.prototype.getWorstCaseChainFeeSat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.poolrpc.QuoteOrderResponse} returns this - */ -proto.poolrpc.QuoteOrderResponse.prototype.setWorstCaseChainFeeSat = function(value) { - return jspb.Message.setProto3IntField(this, 5, value); -}; - - - -/** - * Oneof group definitions for this message. Each group defines the field - * numbers belonging to that group. When of these fields' value is set, all - * other fields in the group are cleared. During deserialization, if multiple - * fields are encountered for a group, only the last value seen will be kept. - * @private {!Array>} - * @const - */ -proto.poolrpc.OrderEvent.oneofGroups_ = [[3,4]]; - -/** - * @enum {number} - */ -proto.poolrpc.OrderEvent.EventCase = { - EVENT_NOT_SET: 0, - STATE_CHANGE: 3, - MATCHED: 4 -}; - -/** - * @return {proto.poolrpc.OrderEvent.EventCase} - */ -proto.poolrpc.OrderEvent.prototype.getEventCase = function() { - return /** @type {proto.poolrpc.OrderEvent.EventCase} */(jspb.Message.computeOneofCase(this, proto.poolrpc.OrderEvent.oneofGroups_[0])); -}; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.poolrpc.OrderEvent.prototype.toObject = function(opt_includeInstance) { - return proto.poolrpc.OrderEvent.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.poolrpc.OrderEvent} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.OrderEvent.toObject = function(includeInstance, msg) { - var f, obj = { - timestampNs: jspb.Message.getFieldWithDefault(msg, 1, 0), - eventStr: jspb.Message.getFieldWithDefault(msg, 2, ""), - stateChange: (f = msg.getStateChange()) && proto.poolrpc.UpdatedEvent.toObject(includeInstance, f), - matched: (f = msg.getMatched()) && proto.poolrpc.MatchEvent.toObject(includeInstance, f) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.poolrpc.OrderEvent} - */ -proto.poolrpc.OrderEvent.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.poolrpc.OrderEvent; - return proto.poolrpc.OrderEvent.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.poolrpc.OrderEvent} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.poolrpc.OrderEvent} - */ -proto.poolrpc.OrderEvent.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readInt64()); - msg.setTimestampNs(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setEventStr(value); - break; - case 3: - var value = new proto.poolrpc.UpdatedEvent; - reader.readMessage(value,proto.poolrpc.UpdatedEvent.deserializeBinaryFromReader); - msg.setStateChange(value); - break; - case 4: - var value = new proto.poolrpc.MatchEvent; - reader.readMessage(value,proto.poolrpc.MatchEvent.deserializeBinaryFromReader); - msg.setMatched(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.poolrpc.OrderEvent.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.poolrpc.OrderEvent.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.poolrpc.OrderEvent} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.OrderEvent.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getTimestampNs(); - if (f !== 0) { - writer.writeInt64( - 1, - f - ); - } - f = message.getEventStr(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getStateChange(); - if (f != null) { - writer.writeMessage( - 3, - f, - proto.poolrpc.UpdatedEvent.serializeBinaryToWriter - ); - } - f = message.getMatched(); - if (f != null) { - writer.writeMessage( - 4, - f, - proto.poolrpc.MatchEvent.serializeBinaryToWriter - ); - } -}; - - -/** - * optional int64 timestamp_ns = 1; - * @return {number} - */ -proto.poolrpc.OrderEvent.prototype.getTimestampNs = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.poolrpc.OrderEvent} returns this - */ -proto.poolrpc.OrderEvent.prototype.setTimestampNs = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); -}; - - -/** - * optional string event_str = 2; - * @return {string} - */ -proto.poolrpc.OrderEvent.prototype.getEventStr = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.poolrpc.OrderEvent} returns this - */ -proto.poolrpc.OrderEvent.prototype.setEventStr = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional UpdatedEvent state_change = 3; - * @return {?proto.poolrpc.UpdatedEvent} - */ -proto.poolrpc.OrderEvent.prototype.getStateChange = function() { - return /** @type{?proto.poolrpc.UpdatedEvent} */ ( - jspb.Message.getWrapperField(this, proto.poolrpc.UpdatedEvent, 3)); -}; - - -/** - * @param {?proto.poolrpc.UpdatedEvent|undefined} value - * @return {!proto.poolrpc.OrderEvent} returns this -*/ -proto.poolrpc.OrderEvent.prototype.setStateChange = function(value) { - return jspb.Message.setOneofWrapperField(this, 3, proto.poolrpc.OrderEvent.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.poolrpc.OrderEvent} returns this - */ -proto.poolrpc.OrderEvent.prototype.clearStateChange = function() { - return this.setStateChange(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.poolrpc.OrderEvent.prototype.hasStateChange = function() { - return jspb.Message.getField(this, 3) != null; -}; - - -/** - * optional MatchEvent matched = 4; - * @return {?proto.poolrpc.MatchEvent} - */ -proto.poolrpc.OrderEvent.prototype.getMatched = function() { - return /** @type{?proto.poolrpc.MatchEvent} */ ( - jspb.Message.getWrapperField(this, proto.poolrpc.MatchEvent, 4)); -}; - - -/** - * @param {?proto.poolrpc.MatchEvent|undefined} value - * @return {!proto.poolrpc.OrderEvent} returns this -*/ -proto.poolrpc.OrderEvent.prototype.setMatched = function(value) { - return jspb.Message.setOneofWrapperField(this, 4, proto.poolrpc.OrderEvent.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.poolrpc.OrderEvent} returns this - */ -proto.poolrpc.OrderEvent.prototype.clearMatched = function() { - return this.setMatched(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.poolrpc.OrderEvent.prototype.hasMatched = function() { - return jspb.Message.getField(this, 4) != null; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.poolrpc.UpdatedEvent.prototype.toObject = function(opt_includeInstance) { - return proto.poolrpc.UpdatedEvent.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.poolrpc.UpdatedEvent} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.UpdatedEvent.toObject = function(includeInstance, msg) { - var f, obj = { - previousState: jspb.Message.getFieldWithDefault(msg, 1, 0), - newState: jspb.Message.getFieldWithDefault(msg, 2, 0), - unitsFilled: jspb.Message.getFieldWithDefault(msg, 3, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.poolrpc.UpdatedEvent} - */ -proto.poolrpc.UpdatedEvent.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.poolrpc.UpdatedEvent; - return proto.poolrpc.UpdatedEvent.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.poolrpc.UpdatedEvent} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.poolrpc.UpdatedEvent} - */ -proto.poolrpc.UpdatedEvent.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!proto.poolrpc.OrderState} */ (reader.readEnum()); - msg.setPreviousState(value); - break; - case 2: - var value = /** @type {!proto.poolrpc.OrderState} */ (reader.readEnum()); - msg.setNewState(value); - break; - case 3: - var value = /** @type {number} */ (reader.readUint32()); - msg.setUnitsFilled(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.poolrpc.UpdatedEvent.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.poolrpc.UpdatedEvent.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.poolrpc.UpdatedEvent} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.UpdatedEvent.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getPreviousState(); - if (f !== 0.0) { - writer.writeEnum( - 1, - f - ); - } - f = message.getNewState(); - if (f !== 0.0) { - writer.writeEnum( - 2, - f - ); - } - f = message.getUnitsFilled(); - if (f !== 0) { - writer.writeUint32( - 3, - f - ); - } -}; - - -/** - * optional OrderState previous_state = 1; - * @return {!proto.poolrpc.OrderState} - */ -proto.poolrpc.UpdatedEvent.prototype.getPreviousState = function() { - return /** @type {!proto.poolrpc.OrderState} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {!proto.poolrpc.OrderState} value - * @return {!proto.poolrpc.UpdatedEvent} returns this - */ -proto.poolrpc.UpdatedEvent.prototype.setPreviousState = function(value) { - return jspb.Message.setProto3EnumField(this, 1, value); -}; - - -/** - * optional OrderState new_state = 2; - * @return {!proto.poolrpc.OrderState} - */ -proto.poolrpc.UpdatedEvent.prototype.getNewState = function() { - return /** @type {!proto.poolrpc.OrderState} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {!proto.poolrpc.OrderState} value - * @return {!proto.poolrpc.UpdatedEvent} returns this - */ -proto.poolrpc.UpdatedEvent.prototype.setNewState = function(value) { - return jspb.Message.setProto3EnumField(this, 2, value); -}; - - -/** - * optional uint32 units_filled = 3; - * @return {number} - */ -proto.poolrpc.UpdatedEvent.prototype.getUnitsFilled = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.poolrpc.UpdatedEvent} returns this - */ -proto.poolrpc.UpdatedEvent.prototype.setUnitsFilled = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.poolrpc.MatchEvent.prototype.toObject = function(opt_includeInstance) { - return proto.poolrpc.MatchEvent.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.poolrpc.MatchEvent} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.MatchEvent.toObject = function(includeInstance, msg) { - var f, obj = { - matchState: jspb.Message.getFieldWithDefault(msg, 1, 0), - unitsFilled: jspb.Message.getFieldWithDefault(msg, 2, 0), - matchedOrder: msg.getMatchedOrder_asB64(), - rejectReason: jspb.Message.getFieldWithDefault(msg, 4, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.poolrpc.MatchEvent} - */ -proto.poolrpc.MatchEvent.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.poolrpc.MatchEvent; - return proto.poolrpc.MatchEvent.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.poolrpc.MatchEvent} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.poolrpc.MatchEvent} - */ -proto.poolrpc.MatchEvent.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!proto.poolrpc.MatchState} */ (reader.readEnum()); - msg.setMatchState(value); - break; - case 2: - var value = /** @type {number} */ (reader.readUint32()); - msg.setUnitsFilled(value); - break; - case 3: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setMatchedOrder(value); - break; - case 4: - var value = /** @type {!proto.poolrpc.MatchRejectReason} */ (reader.readEnum()); - msg.setRejectReason(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.poolrpc.MatchEvent.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.poolrpc.MatchEvent.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.poolrpc.MatchEvent} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.MatchEvent.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getMatchState(); - if (f !== 0.0) { - writer.writeEnum( - 1, - f - ); - } - f = message.getUnitsFilled(); - if (f !== 0) { - writer.writeUint32( - 2, - f - ); - } - f = message.getMatchedOrder_asU8(); - if (f.length > 0) { - writer.writeBytes( - 3, - f - ); - } - f = message.getRejectReason(); - if (f !== 0.0) { - writer.writeEnum( - 4, - f - ); - } -}; - - -/** - * optional MatchState match_state = 1; - * @return {!proto.poolrpc.MatchState} - */ -proto.poolrpc.MatchEvent.prototype.getMatchState = function() { - return /** @type {!proto.poolrpc.MatchState} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {!proto.poolrpc.MatchState} value - * @return {!proto.poolrpc.MatchEvent} returns this - */ -proto.poolrpc.MatchEvent.prototype.setMatchState = function(value) { - return jspb.Message.setProto3EnumField(this, 1, value); -}; - - -/** - * optional uint32 units_filled = 2; - * @return {number} - */ -proto.poolrpc.MatchEvent.prototype.getUnitsFilled = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.poolrpc.MatchEvent} returns this - */ -proto.poolrpc.MatchEvent.prototype.setUnitsFilled = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * optional bytes matched_order = 3; - * @return {!(string|Uint8Array)} - */ -proto.poolrpc.MatchEvent.prototype.getMatchedOrder = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * optional bytes matched_order = 3; - * This is a type-conversion wrapper around `getMatchedOrder()` - * @return {string} - */ -proto.poolrpc.MatchEvent.prototype.getMatchedOrder_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getMatchedOrder())); -}; - - -/** - * optional bytes matched_order = 3; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getMatchedOrder()` - * @return {!Uint8Array} - */ -proto.poolrpc.MatchEvent.prototype.getMatchedOrder_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getMatchedOrder())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.poolrpc.MatchEvent} returns this - */ -proto.poolrpc.MatchEvent.prototype.setMatchedOrder = function(value) { - return jspb.Message.setProto3BytesField(this, 3, value); -}; - - -/** - * optional MatchRejectReason reject_reason = 4; - * @return {!proto.poolrpc.MatchRejectReason} - */ -proto.poolrpc.MatchEvent.prototype.getRejectReason = function() { - return /** @type {!proto.poolrpc.MatchRejectReason} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** - * @param {!proto.poolrpc.MatchRejectReason} value - * @return {!proto.poolrpc.MatchEvent} returns this - */ -proto.poolrpc.MatchEvent.prototype.setRejectReason = function(value) { - return jspb.Message.setProto3EnumField(this, 4, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.poolrpc.RecoverAccountsRequest.prototype.toObject = function(opt_includeInstance) { - return proto.poolrpc.RecoverAccountsRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.poolrpc.RecoverAccountsRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.RecoverAccountsRequest.toObject = function(includeInstance, msg) { - var f, obj = { - fullClient: jspb.Message.getBooleanFieldWithDefault(msg, 1, false), - accountTarget: jspb.Message.getFieldWithDefault(msg, 2, 0), - auctioneerKey: jspb.Message.getFieldWithDefault(msg, 3, ""), - heightHint: jspb.Message.getFieldWithDefault(msg, 4, 0), - bitcoinHost: jspb.Message.getFieldWithDefault(msg, 5, ""), - bitcoinUser: jspb.Message.getFieldWithDefault(msg, 6, ""), - bitcoinPassword: jspb.Message.getFieldWithDefault(msg, 7, ""), - bitcoinHttppostmode: jspb.Message.getBooleanFieldWithDefault(msg, 8, false), - bitcoinUsetls: jspb.Message.getBooleanFieldWithDefault(msg, 9, false), - bitcoinTlspath: jspb.Message.getFieldWithDefault(msg, 10, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.poolrpc.RecoverAccountsRequest} - */ -proto.poolrpc.RecoverAccountsRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.poolrpc.RecoverAccountsRequest; - return proto.poolrpc.RecoverAccountsRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.poolrpc.RecoverAccountsRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.poolrpc.RecoverAccountsRequest} - */ -proto.poolrpc.RecoverAccountsRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setFullClient(value); - break; - case 2: - var value = /** @type {number} */ (reader.readUint32()); - msg.setAccountTarget(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setAuctioneerKey(value); - break; - case 4: - var value = /** @type {number} */ (reader.readUint32()); - msg.setHeightHint(value); - break; - case 5: - var value = /** @type {string} */ (reader.readString()); - msg.setBitcoinHost(value); - break; - case 6: - var value = /** @type {string} */ (reader.readString()); - msg.setBitcoinUser(value); - break; - case 7: - var value = /** @type {string} */ (reader.readString()); - msg.setBitcoinPassword(value); - break; - case 8: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setBitcoinHttppostmode(value); - break; - case 9: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setBitcoinUsetls(value); - break; - case 10: - var value = /** @type {string} */ (reader.readString()); - msg.setBitcoinTlspath(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.poolrpc.RecoverAccountsRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.poolrpc.RecoverAccountsRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.poolrpc.RecoverAccountsRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.RecoverAccountsRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getFullClient(); - if (f) { - writer.writeBool( - 1, - f - ); - } - f = message.getAccountTarget(); - if (f !== 0) { - writer.writeUint32( - 2, - f - ); - } - f = message.getAuctioneerKey(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } - f = message.getHeightHint(); - if (f !== 0) { - writer.writeUint32( - 4, - f - ); - } - f = message.getBitcoinHost(); - if (f.length > 0) { - writer.writeString( - 5, - f - ); - } - f = message.getBitcoinUser(); - if (f.length > 0) { - writer.writeString( - 6, - f - ); - } - f = message.getBitcoinPassword(); - if (f.length > 0) { - writer.writeString( - 7, - f - ); - } - f = message.getBitcoinHttppostmode(); - if (f) { - writer.writeBool( - 8, - f - ); - } - f = message.getBitcoinUsetls(); - if (f) { - writer.writeBool( - 9, - f - ); - } - f = message.getBitcoinTlspath(); - if (f.length > 0) { - writer.writeString( - 10, - f - ); - } -}; - - -/** - * optional bool full_client = 1; - * @return {boolean} - */ -proto.poolrpc.RecoverAccountsRequest.prototype.getFullClient = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.poolrpc.RecoverAccountsRequest} returns this - */ -proto.poolrpc.RecoverAccountsRequest.prototype.setFullClient = function(value) { - return jspb.Message.setProto3BooleanField(this, 1, value); -}; - - -/** - * optional uint32 account_target = 2; - * @return {number} - */ -proto.poolrpc.RecoverAccountsRequest.prototype.getAccountTarget = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.poolrpc.RecoverAccountsRequest} returns this - */ -proto.poolrpc.RecoverAccountsRequest.prototype.setAccountTarget = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * optional string auctioneer_key = 3; - * @return {string} - */ -proto.poolrpc.RecoverAccountsRequest.prototype.getAuctioneerKey = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * @param {string} value - * @return {!proto.poolrpc.RecoverAccountsRequest} returns this - */ -proto.poolrpc.RecoverAccountsRequest.prototype.setAuctioneerKey = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); -}; - - -/** - * optional uint32 height_hint = 4; - * @return {number} - */ -proto.poolrpc.RecoverAccountsRequest.prototype.getHeightHint = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.poolrpc.RecoverAccountsRequest} returns this - */ -proto.poolrpc.RecoverAccountsRequest.prototype.setHeightHint = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); -}; - - -/** - * optional string bitcoin_host = 5; - * @return {string} - */ -proto.poolrpc.RecoverAccountsRequest.prototype.getBitcoinHost = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); -}; - - -/** - * @param {string} value - * @return {!proto.poolrpc.RecoverAccountsRequest} returns this - */ -proto.poolrpc.RecoverAccountsRequest.prototype.setBitcoinHost = function(value) { - return jspb.Message.setProto3StringField(this, 5, value); -}; - - -/** - * optional string bitcoin_user = 6; - * @return {string} - */ -proto.poolrpc.RecoverAccountsRequest.prototype.getBitcoinUser = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); -}; - - -/** - * @param {string} value - * @return {!proto.poolrpc.RecoverAccountsRequest} returns this - */ -proto.poolrpc.RecoverAccountsRequest.prototype.setBitcoinUser = function(value) { - return jspb.Message.setProto3StringField(this, 6, value); -}; - - -/** - * optional string bitcoin_password = 7; - * @return {string} - */ -proto.poolrpc.RecoverAccountsRequest.prototype.getBitcoinPassword = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); -}; - - -/** - * @param {string} value - * @return {!proto.poolrpc.RecoverAccountsRequest} returns this - */ -proto.poolrpc.RecoverAccountsRequest.prototype.setBitcoinPassword = function(value) { - return jspb.Message.setProto3StringField(this, 7, value); -}; - - -/** - * optional bool bitcoin_httppostmode = 8; - * @return {boolean} - */ -proto.poolrpc.RecoverAccountsRequest.prototype.getBitcoinHttppostmode = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 8, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.poolrpc.RecoverAccountsRequest} returns this - */ -proto.poolrpc.RecoverAccountsRequest.prototype.setBitcoinHttppostmode = function(value) { - return jspb.Message.setProto3BooleanField(this, 8, value); -}; - - -/** - * optional bool bitcoin_usetls = 9; - * @return {boolean} - */ -proto.poolrpc.RecoverAccountsRequest.prototype.getBitcoinUsetls = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 9, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.poolrpc.RecoverAccountsRequest} returns this - */ -proto.poolrpc.RecoverAccountsRequest.prototype.setBitcoinUsetls = function(value) { - return jspb.Message.setProto3BooleanField(this, 9, value); -}; - - -/** - * optional string bitcoin_tlspath = 10; - * @return {string} - */ -proto.poolrpc.RecoverAccountsRequest.prototype.getBitcoinTlspath = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 10, "")); -}; - - -/** - * @param {string} value - * @return {!proto.poolrpc.RecoverAccountsRequest} returns this - */ -proto.poolrpc.RecoverAccountsRequest.prototype.setBitcoinTlspath = function(value) { - return jspb.Message.setProto3StringField(this, 10, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.poolrpc.RecoverAccountsResponse.prototype.toObject = function(opt_includeInstance) { - return proto.poolrpc.RecoverAccountsResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.poolrpc.RecoverAccountsResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.RecoverAccountsResponse.toObject = function(includeInstance, msg) { - var f, obj = { - numRecoveredAccounts: jspb.Message.getFieldWithDefault(msg, 1, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.poolrpc.RecoverAccountsResponse} - */ -proto.poolrpc.RecoverAccountsResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.poolrpc.RecoverAccountsResponse; - return proto.poolrpc.RecoverAccountsResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.poolrpc.RecoverAccountsResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.poolrpc.RecoverAccountsResponse} - */ -proto.poolrpc.RecoverAccountsResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readUint32()); - msg.setNumRecoveredAccounts(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.poolrpc.RecoverAccountsResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.poolrpc.RecoverAccountsResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.poolrpc.RecoverAccountsResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.RecoverAccountsResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getNumRecoveredAccounts(); - if (f !== 0) { - writer.writeUint32( - 1, - f - ); - } -}; - - -/** - * optional uint32 num_recovered_accounts = 1; - * @return {number} - */ -proto.poolrpc.RecoverAccountsResponse.prototype.getNumRecoveredAccounts = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.poolrpc.RecoverAccountsResponse} returns this - */ -proto.poolrpc.RecoverAccountsResponse.prototype.setNumRecoveredAccounts = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.poolrpc.AuctionFeeRequest.prototype.toObject = function(opt_includeInstance) { - return proto.poolrpc.AuctionFeeRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.poolrpc.AuctionFeeRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.AuctionFeeRequest.toObject = function(includeInstance, msg) { - var f, obj = { - - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.poolrpc.AuctionFeeRequest} - */ -proto.poolrpc.AuctionFeeRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.poolrpc.AuctionFeeRequest; - return proto.poolrpc.AuctionFeeRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.poolrpc.AuctionFeeRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.poolrpc.AuctionFeeRequest} - */ -proto.poolrpc.AuctionFeeRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.poolrpc.AuctionFeeRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.poolrpc.AuctionFeeRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.poolrpc.AuctionFeeRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.AuctionFeeRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.poolrpc.AuctionFeeResponse.prototype.toObject = function(opt_includeInstance) { - return proto.poolrpc.AuctionFeeResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.poolrpc.AuctionFeeResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.AuctionFeeResponse.toObject = function(includeInstance, msg) { - var f, obj = { - executionFee: (f = msg.getExecutionFee()) && auctioneerrpc_auctioneer_pb.ExecutionFee.toObject(includeInstance, f) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.poolrpc.AuctionFeeResponse} - */ -proto.poolrpc.AuctionFeeResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.poolrpc.AuctionFeeResponse; - return proto.poolrpc.AuctionFeeResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.poolrpc.AuctionFeeResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.poolrpc.AuctionFeeResponse} - */ -proto.poolrpc.AuctionFeeResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new auctioneerrpc_auctioneer_pb.ExecutionFee; - reader.readMessage(value,auctioneerrpc_auctioneer_pb.ExecutionFee.deserializeBinaryFromReader); - msg.setExecutionFee(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.poolrpc.AuctionFeeResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.poolrpc.AuctionFeeResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.poolrpc.AuctionFeeResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.AuctionFeeResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getExecutionFee(); - if (f != null) { - writer.writeMessage( - 1, - f, - auctioneerrpc_auctioneer_pb.ExecutionFee.serializeBinaryToWriter - ); - } -}; - - -/** - * optional ExecutionFee execution_fee = 1; - * @return {?proto.poolrpc.ExecutionFee} - */ -proto.poolrpc.AuctionFeeResponse.prototype.getExecutionFee = function() { - return /** @type{?proto.poolrpc.ExecutionFee} */ ( - jspb.Message.getWrapperField(this, auctioneerrpc_auctioneer_pb.ExecutionFee, 1)); -}; - - -/** - * @param {?proto.poolrpc.ExecutionFee|undefined} value - * @return {!proto.poolrpc.AuctionFeeResponse} returns this -*/ -proto.poolrpc.AuctionFeeResponse.prototype.setExecutionFee = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.poolrpc.AuctionFeeResponse} returns this - */ -proto.poolrpc.AuctionFeeResponse.prototype.clearExecutionFee = function() { - return this.setExecutionFee(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.poolrpc.AuctionFeeResponse.prototype.hasExecutionFee = function() { - return jspb.Message.getField(this, 1) != null; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.poolrpc.Lease.prototype.toObject = function(opt_includeInstance) { - return proto.poolrpc.Lease.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.poolrpc.Lease} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.Lease.toObject = function(includeInstance, msg) { - var f, obj = { - channelPoint: (f = msg.getChannelPoint()) && auctioneerrpc_auctioneer_pb.OutPoint.toObject(includeInstance, f), - channelAmtSat: jspb.Message.getFieldWithDefault(msg, 2, 0), - channelDurationBlocks: jspb.Message.getFieldWithDefault(msg, 3, 0), - channelLeaseExpiry: jspb.Message.getFieldWithDefault(msg, 4, 0), - premiumSat: jspb.Message.getFieldWithDefault(msg, 5, 0), - executionFeeSat: jspb.Message.getFieldWithDefault(msg, 6, 0), - chainFeeSat: jspb.Message.getFieldWithDefault(msg, 7, 0), - clearingRatePrice: jspb.Message.getFieldWithDefault(msg, 8, 0), - orderFixedRate: jspb.Message.getFieldWithDefault(msg, 9, 0), - orderNonce: msg.getOrderNonce_asB64(), - matchedOrderNonce: msg.getMatchedOrderNonce_asB64(), - purchased: jspb.Message.getBooleanFieldWithDefault(msg, 11, false), - channelRemoteNodeKey: msg.getChannelRemoteNodeKey_asB64(), - channelNodeTier: jspb.Message.getFieldWithDefault(msg, 13, 0), - selfChanBalance: jspb.Message.getFieldWithDefault(msg, 14, 0), - sidecarChannel: jspb.Message.getBooleanFieldWithDefault(msg, 15, false) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.poolrpc.Lease} - */ -proto.poolrpc.Lease.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.poolrpc.Lease; - return proto.poolrpc.Lease.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.poolrpc.Lease} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.poolrpc.Lease} - */ -proto.poolrpc.Lease.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new auctioneerrpc_auctioneer_pb.OutPoint; - reader.readMessage(value,auctioneerrpc_auctioneer_pb.OutPoint.deserializeBinaryFromReader); - msg.setChannelPoint(value); - break; - case 2: - var value = /** @type {number} */ (reader.readUint64()); - msg.setChannelAmtSat(value); - break; - case 3: - var value = /** @type {number} */ (reader.readUint32()); - msg.setChannelDurationBlocks(value); - break; - case 4: - var value = /** @type {number} */ (reader.readUint32()); - msg.setChannelLeaseExpiry(value); - break; - case 5: - var value = /** @type {number} */ (reader.readUint64()); - msg.setPremiumSat(value); - break; - case 6: - var value = /** @type {number} */ (reader.readUint64()); - msg.setExecutionFeeSat(value); - break; - case 7: - var value = /** @type {number} */ (reader.readUint64()); - msg.setChainFeeSat(value); - break; - case 8: - var value = /** @type {number} */ (reader.readUint64()); - msg.setClearingRatePrice(value); - break; - case 9: - var value = /** @type {number} */ (reader.readUint64()); - msg.setOrderFixedRate(value); - break; - case 10: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setOrderNonce(value); - break; - case 16: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setMatchedOrderNonce(value); - break; - case 11: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setPurchased(value); - break; - case 12: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setChannelRemoteNodeKey(value); - break; - case 13: - var value = /** @type {!proto.poolrpc.NodeTier} */ (reader.readEnum()); - msg.setChannelNodeTier(value); - break; - case 14: - var value = /** @type {number} */ (reader.readUint64()); - msg.setSelfChanBalance(value); - break; - case 15: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setSidecarChannel(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.poolrpc.Lease.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.poolrpc.Lease.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.poolrpc.Lease} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.Lease.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getChannelPoint(); - if (f != null) { - writer.writeMessage( - 1, - f, - auctioneerrpc_auctioneer_pb.OutPoint.serializeBinaryToWriter - ); - } - f = message.getChannelAmtSat(); - if (f !== 0) { - writer.writeUint64( - 2, - f - ); - } - f = message.getChannelDurationBlocks(); - if (f !== 0) { - writer.writeUint32( - 3, - f - ); - } - f = message.getChannelLeaseExpiry(); - if (f !== 0) { - writer.writeUint32( - 4, - f - ); - } - f = message.getPremiumSat(); - if (f !== 0) { - writer.writeUint64( - 5, - f - ); - } - f = message.getExecutionFeeSat(); - if (f !== 0) { - writer.writeUint64( - 6, - f - ); - } - f = message.getChainFeeSat(); - if (f !== 0) { - writer.writeUint64( - 7, - f - ); - } - f = message.getClearingRatePrice(); - if (f !== 0) { - writer.writeUint64( - 8, - f - ); - } - f = message.getOrderFixedRate(); - if (f !== 0) { - writer.writeUint64( - 9, - f - ); - } - f = message.getOrderNonce_asU8(); - if (f.length > 0) { - writer.writeBytes( - 10, - f - ); - } - f = message.getMatchedOrderNonce_asU8(); - if (f.length > 0) { - writer.writeBytes( - 16, - f - ); - } - f = message.getPurchased(); - if (f) { - writer.writeBool( - 11, - f - ); - } - f = message.getChannelRemoteNodeKey_asU8(); - if (f.length > 0) { - writer.writeBytes( - 12, - f - ); - } - f = message.getChannelNodeTier(); - if (f !== 0.0) { - writer.writeEnum( - 13, - f - ); - } - f = message.getSelfChanBalance(); - if (f !== 0) { - writer.writeUint64( - 14, - f - ); - } - f = message.getSidecarChannel(); - if (f) { - writer.writeBool( - 15, - f - ); - } -}; - - -/** - * optional OutPoint channel_point = 1; - * @return {?proto.poolrpc.OutPoint} - */ -proto.poolrpc.Lease.prototype.getChannelPoint = function() { - return /** @type{?proto.poolrpc.OutPoint} */ ( - jspb.Message.getWrapperField(this, auctioneerrpc_auctioneer_pb.OutPoint, 1)); -}; - - -/** - * @param {?proto.poolrpc.OutPoint|undefined} value - * @return {!proto.poolrpc.Lease} returns this -*/ -proto.poolrpc.Lease.prototype.setChannelPoint = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.poolrpc.Lease} returns this - */ -proto.poolrpc.Lease.prototype.clearChannelPoint = function() { - return this.setChannelPoint(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.poolrpc.Lease.prototype.hasChannelPoint = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional uint64 channel_amt_sat = 2; - * @return {number} - */ -proto.poolrpc.Lease.prototype.getChannelAmtSat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.poolrpc.Lease} returns this - */ -proto.poolrpc.Lease.prototype.setChannelAmtSat = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * optional uint32 channel_duration_blocks = 3; - * @return {number} - */ -proto.poolrpc.Lease.prototype.getChannelDurationBlocks = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.poolrpc.Lease} returns this - */ -proto.poolrpc.Lease.prototype.setChannelDurationBlocks = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - -/** - * optional uint32 channel_lease_expiry = 4; - * @return {number} - */ -proto.poolrpc.Lease.prototype.getChannelLeaseExpiry = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.poolrpc.Lease} returns this - */ -proto.poolrpc.Lease.prototype.setChannelLeaseExpiry = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); -}; - - -/** - * optional uint64 premium_sat = 5; - * @return {number} - */ -proto.poolrpc.Lease.prototype.getPremiumSat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.poolrpc.Lease} returns this - */ -proto.poolrpc.Lease.prototype.setPremiumSat = function(value) { - return jspb.Message.setProto3IntField(this, 5, value); -}; - - -/** - * optional uint64 execution_fee_sat = 6; - * @return {number} - */ -proto.poolrpc.Lease.prototype.getExecutionFeeSat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.poolrpc.Lease} returns this - */ -proto.poolrpc.Lease.prototype.setExecutionFeeSat = function(value) { - return jspb.Message.setProto3IntField(this, 6, value); -}; - - -/** - * optional uint64 chain_fee_sat = 7; - * @return {number} - */ -proto.poolrpc.Lease.prototype.getChainFeeSat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.poolrpc.Lease} returns this - */ -proto.poolrpc.Lease.prototype.setChainFeeSat = function(value) { - return jspb.Message.setProto3IntField(this, 7, value); -}; - - -/** - * optional uint64 clearing_rate_price = 8; - * @return {number} - */ -proto.poolrpc.Lease.prototype.getClearingRatePrice = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.poolrpc.Lease} returns this - */ -proto.poolrpc.Lease.prototype.setClearingRatePrice = function(value) { - return jspb.Message.setProto3IntField(this, 8, value); -}; - - -/** - * optional uint64 order_fixed_rate = 9; - * @return {number} - */ -proto.poolrpc.Lease.prototype.getOrderFixedRate = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.poolrpc.Lease} returns this - */ -proto.poolrpc.Lease.prototype.setOrderFixedRate = function(value) { - return jspb.Message.setProto3IntField(this, 9, value); -}; - - -/** - * optional bytes order_nonce = 10; - * @return {!(string|Uint8Array)} - */ -proto.poolrpc.Lease.prototype.getOrderNonce = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 10, "")); -}; - - -/** - * optional bytes order_nonce = 10; - * This is a type-conversion wrapper around `getOrderNonce()` - * @return {string} - */ -proto.poolrpc.Lease.prototype.getOrderNonce_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getOrderNonce())); -}; - - -/** - * optional bytes order_nonce = 10; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getOrderNonce()` - * @return {!Uint8Array} - */ -proto.poolrpc.Lease.prototype.getOrderNonce_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getOrderNonce())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.poolrpc.Lease} returns this - */ -proto.poolrpc.Lease.prototype.setOrderNonce = function(value) { - return jspb.Message.setProto3BytesField(this, 10, value); -}; - - -/** - * optional bytes matched_order_nonce = 16; - * @return {!(string|Uint8Array)} - */ -proto.poolrpc.Lease.prototype.getMatchedOrderNonce = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 16, "")); -}; - - -/** - * optional bytes matched_order_nonce = 16; - * This is a type-conversion wrapper around `getMatchedOrderNonce()` - * @return {string} - */ -proto.poolrpc.Lease.prototype.getMatchedOrderNonce_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getMatchedOrderNonce())); -}; - - -/** - * optional bytes matched_order_nonce = 16; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getMatchedOrderNonce()` - * @return {!Uint8Array} - */ -proto.poolrpc.Lease.prototype.getMatchedOrderNonce_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getMatchedOrderNonce())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.poolrpc.Lease} returns this - */ -proto.poolrpc.Lease.prototype.setMatchedOrderNonce = function(value) { - return jspb.Message.setProto3BytesField(this, 16, value); -}; - - -/** - * optional bool purchased = 11; - * @return {boolean} - */ -proto.poolrpc.Lease.prototype.getPurchased = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 11, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.poolrpc.Lease} returns this - */ -proto.poolrpc.Lease.prototype.setPurchased = function(value) { - return jspb.Message.setProto3BooleanField(this, 11, value); -}; - - -/** - * optional bytes channel_remote_node_key = 12; - * @return {!(string|Uint8Array)} - */ -proto.poolrpc.Lease.prototype.getChannelRemoteNodeKey = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 12, "")); -}; - - -/** - * optional bytes channel_remote_node_key = 12; - * This is a type-conversion wrapper around `getChannelRemoteNodeKey()` - * @return {string} - */ -proto.poolrpc.Lease.prototype.getChannelRemoteNodeKey_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getChannelRemoteNodeKey())); -}; - - -/** - * optional bytes channel_remote_node_key = 12; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getChannelRemoteNodeKey()` - * @return {!Uint8Array} - */ -proto.poolrpc.Lease.prototype.getChannelRemoteNodeKey_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getChannelRemoteNodeKey())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.poolrpc.Lease} returns this - */ -proto.poolrpc.Lease.prototype.setChannelRemoteNodeKey = function(value) { - return jspb.Message.setProto3BytesField(this, 12, value); -}; - - -/** - * optional NodeTier channel_node_tier = 13; - * @return {!proto.poolrpc.NodeTier} - */ -proto.poolrpc.Lease.prototype.getChannelNodeTier = function() { - return /** @type {!proto.poolrpc.NodeTier} */ (jspb.Message.getFieldWithDefault(this, 13, 0)); -}; - - -/** - * @param {!proto.poolrpc.NodeTier} value - * @return {!proto.poolrpc.Lease} returns this - */ -proto.poolrpc.Lease.prototype.setChannelNodeTier = function(value) { - return jspb.Message.setProto3EnumField(this, 13, value); -}; - - -/** - * optional uint64 self_chan_balance = 14; - * @return {number} - */ -proto.poolrpc.Lease.prototype.getSelfChanBalance = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 14, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.poolrpc.Lease} returns this - */ -proto.poolrpc.Lease.prototype.setSelfChanBalance = function(value) { - return jspb.Message.setProto3IntField(this, 14, value); -}; - - -/** - * optional bool sidecar_channel = 15; - * @return {boolean} - */ -proto.poolrpc.Lease.prototype.getSidecarChannel = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 15, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.poolrpc.Lease} returns this - */ -proto.poolrpc.Lease.prototype.setSidecarChannel = function(value) { - return jspb.Message.setProto3BooleanField(this, 15, value); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.poolrpc.LeasesRequest.repeatedFields_ = [1,2]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.poolrpc.LeasesRequest.prototype.toObject = function(opt_includeInstance) { - return proto.poolrpc.LeasesRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.poolrpc.LeasesRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.LeasesRequest.toObject = function(includeInstance, msg) { - var f, obj = { - batchIdsList: msg.getBatchIdsList_asB64(), - accountsList: msg.getAccountsList_asB64() - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.poolrpc.LeasesRequest} - */ -proto.poolrpc.LeasesRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.poolrpc.LeasesRequest; - return proto.poolrpc.LeasesRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.poolrpc.LeasesRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.poolrpc.LeasesRequest} - */ -proto.poolrpc.LeasesRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.addBatchIds(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.addAccounts(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.poolrpc.LeasesRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.poolrpc.LeasesRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.poolrpc.LeasesRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.LeasesRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getBatchIdsList_asU8(); - if (f.length > 0) { - writer.writeRepeatedBytes( - 1, - f - ); - } - f = message.getAccountsList_asU8(); - if (f.length > 0) { - writer.writeRepeatedBytes( - 2, - f - ); - } -}; - - -/** - * repeated bytes batch_ids = 1; - * @return {!(Array|Array)} - */ -proto.poolrpc.LeasesRequest.prototype.getBatchIdsList = function() { - return /** @type {!(Array|Array)} */ (jspb.Message.getRepeatedField(this, 1)); -}; - - -/** - * repeated bytes batch_ids = 1; - * This is a type-conversion wrapper around `getBatchIdsList()` - * @return {!Array} - */ -proto.poolrpc.LeasesRequest.prototype.getBatchIdsList_asB64 = function() { - return /** @type {!Array} */ (jspb.Message.bytesListAsB64( - this.getBatchIdsList())); -}; - - -/** - * repeated bytes batch_ids = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getBatchIdsList()` - * @return {!Array} - */ -proto.poolrpc.LeasesRequest.prototype.getBatchIdsList_asU8 = function() { - return /** @type {!Array} */ (jspb.Message.bytesListAsU8( - this.getBatchIdsList())); -}; - - -/** - * @param {!(Array|Array)} value - * @return {!proto.poolrpc.LeasesRequest} returns this - */ -proto.poolrpc.LeasesRequest.prototype.setBatchIdsList = function(value) { - return jspb.Message.setField(this, 1, value || []); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @param {number=} opt_index - * @return {!proto.poolrpc.LeasesRequest} returns this - */ -proto.poolrpc.LeasesRequest.prototype.addBatchIds = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 1, value, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.poolrpc.LeasesRequest} returns this - */ -proto.poolrpc.LeasesRequest.prototype.clearBatchIdsList = function() { - return this.setBatchIdsList([]); -}; - - -/** - * repeated bytes accounts = 2; - * @return {!(Array|Array)} - */ -proto.poolrpc.LeasesRequest.prototype.getAccountsList = function() { - return /** @type {!(Array|Array)} */ (jspb.Message.getRepeatedField(this, 2)); -}; - - -/** - * repeated bytes accounts = 2; - * This is a type-conversion wrapper around `getAccountsList()` - * @return {!Array} - */ -proto.poolrpc.LeasesRequest.prototype.getAccountsList_asB64 = function() { - return /** @type {!Array} */ (jspb.Message.bytesListAsB64( - this.getAccountsList())); -}; - - -/** - * repeated bytes accounts = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getAccountsList()` - * @return {!Array} - */ -proto.poolrpc.LeasesRequest.prototype.getAccountsList_asU8 = function() { - return /** @type {!Array} */ (jspb.Message.bytesListAsU8( - this.getAccountsList())); -}; - - -/** - * @param {!(Array|Array)} value - * @return {!proto.poolrpc.LeasesRequest} returns this - */ -proto.poolrpc.LeasesRequest.prototype.setAccountsList = function(value) { - return jspb.Message.setField(this, 2, value || []); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @param {number=} opt_index - * @return {!proto.poolrpc.LeasesRequest} returns this - */ -proto.poolrpc.LeasesRequest.prototype.addAccounts = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 2, value, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.poolrpc.LeasesRequest} returns this - */ -proto.poolrpc.LeasesRequest.prototype.clearAccountsList = function() { - return this.setAccountsList([]); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.poolrpc.LeasesResponse.repeatedFields_ = [1]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.poolrpc.LeasesResponse.prototype.toObject = function(opt_includeInstance) { - return proto.poolrpc.LeasesResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.poolrpc.LeasesResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.LeasesResponse.toObject = function(includeInstance, msg) { - var f, obj = { - leasesList: jspb.Message.toObjectList(msg.getLeasesList(), - proto.poolrpc.Lease.toObject, includeInstance), - totalAmtEarnedSat: jspb.Message.getFieldWithDefault(msg, 2, 0), - totalAmtPaidSat: jspb.Message.getFieldWithDefault(msg, 3, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.poolrpc.LeasesResponse} - */ -proto.poolrpc.LeasesResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.poolrpc.LeasesResponse; - return proto.poolrpc.LeasesResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.poolrpc.LeasesResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.poolrpc.LeasesResponse} - */ -proto.poolrpc.LeasesResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.poolrpc.Lease; - reader.readMessage(value,proto.poolrpc.Lease.deserializeBinaryFromReader); - msg.addLeases(value); - break; - case 2: - var value = /** @type {number} */ (reader.readUint64()); - msg.setTotalAmtEarnedSat(value); - break; - case 3: - var value = /** @type {number} */ (reader.readUint64()); - msg.setTotalAmtPaidSat(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.poolrpc.LeasesResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.poolrpc.LeasesResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.poolrpc.LeasesResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.LeasesResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getLeasesList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 1, - f, - proto.poolrpc.Lease.serializeBinaryToWriter - ); - } - f = message.getTotalAmtEarnedSat(); - if (f !== 0) { - writer.writeUint64( - 2, - f - ); - } - f = message.getTotalAmtPaidSat(); - if (f !== 0) { - writer.writeUint64( - 3, - f - ); - } -}; - - -/** - * repeated Lease leases = 1; - * @return {!Array} - */ -proto.poolrpc.LeasesResponse.prototype.getLeasesList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.poolrpc.Lease, 1)); -}; - - -/** - * @param {!Array} value - * @return {!proto.poolrpc.LeasesResponse} returns this -*/ -proto.poolrpc.LeasesResponse.prototype.setLeasesList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); -}; - - -/** - * @param {!proto.poolrpc.Lease=} opt_value - * @param {number=} opt_index - * @return {!proto.poolrpc.Lease} - */ -proto.poolrpc.LeasesResponse.prototype.addLeases = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.poolrpc.Lease, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.poolrpc.LeasesResponse} returns this - */ -proto.poolrpc.LeasesResponse.prototype.clearLeasesList = function() { - return this.setLeasesList([]); -}; - - -/** - * optional uint64 total_amt_earned_sat = 2; - * @return {number} - */ -proto.poolrpc.LeasesResponse.prototype.getTotalAmtEarnedSat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.poolrpc.LeasesResponse} returns this - */ -proto.poolrpc.LeasesResponse.prototype.setTotalAmtEarnedSat = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * optional uint64 total_amt_paid_sat = 3; - * @return {number} - */ -proto.poolrpc.LeasesResponse.prototype.getTotalAmtPaidSat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.poolrpc.LeasesResponse} returns this - */ -proto.poolrpc.LeasesResponse.prototype.setTotalAmtPaidSat = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.poolrpc.TokensRequest.prototype.toObject = function(opt_includeInstance) { - return proto.poolrpc.TokensRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.poolrpc.TokensRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.TokensRequest.toObject = function(includeInstance, msg) { - var f, obj = { - - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.poolrpc.TokensRequest} - */ -proto.poolrpc.TokensRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.poolrpc.TokensRequest; - return proto.poolrpc.TokensRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.poolrpc.TokensRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.poolrpc.TokensRequest} - */ -proto.poolrpc.TokensRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.poolrpc.TokensRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.poolrpc.TokensRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.poolrpc.TokensRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.TokensRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.poolrpc.TokensResponse.repeatedFields_ = [1]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.poolrpc.TokensResponse.prototype.toObject = function(opt_includeInstance) { - return proto.poolrpc.TokensResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.poolrpc.TokensResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.TokensResponse.toObject = function(includeInstance, msg) { - var f, obj = { - tokensList: jspb.Message.toObjectList(msg.getTokensList(), - proto.poolrpc.LsatToken.toObject, includeInstance) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.poolrpc.TokensResponse} - */ -proto.poolrpc.TokensResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.poolrpc.TokensResponse; - return proto.poolrpc.TokensResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.poolrpc.TokensResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.poolrpc.TokensResponse} - */ -proto.poolrpc.TokensResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.poolrpc.LsatToken; - reader.readMessage(value,proto.poolrpc.LsatToken.deserializeBinaryFromReader); - msg.addTokens(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.poolrpc.TokensResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.poolrpc.TokensResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.poolrpc.TokensResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.TokensResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getTokensList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 1, - f, - proto.poolrpc.LsatToken.serializeBinaryToWriter - ); - } -}; - - -/** - * repeated LsatToken tokens = 1; - * @return {!Array} - */ -proto.poolrpc.TokensResponse.prototype.getTokensList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.poolrpc.LsatToken, 1)); -}; - - -/** - * @param {!Array} value - * @return {!proto.poolrpc.TokensResponse} returns this -*/ -proto.poolrpc.TokensResponse.prototype.setTokensList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); -}; - - -/** - * @param {!proto.poolrpc.LsatToken=} opt_value - * @param {number=} opt_index - * @return {!proto.poolrpc.LsatToken} - */ -proto.poolrpc.TokensResponse.prototype.addTokens = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.poolrpc.LsatToken, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.poolrpc.TokensResponse} returns this - */ -proto.poolrpc.TokensResponse.prototype.clearTokensList = function() { - return this.setTokensList([]); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.poolrpc.LsatToken.prototype.toObject = function(opt_includeInstance) { - return proto.poolrpc.LsatToken.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.poolrpc.LsatToken} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.LsatToken.toObject = function(includeInstance, msg) { - var f, obj = { - baseMacaroon: msg.getBaseMacaroon_asB64(), - paymentHash: msg.getPaymentHash_asB64(), - paymentPreimage: msg.getPaymentPreimage_asB64(), - amountPaidMsat: jspb.Message.getFieldWithDefault(msg, 4, 0), - routingFeePaidMsat: jspb.Message.getFieldWithDefault(msg, 5, 0), - timeCreated: jspb.Message.getFieldWithDefault(msg, 6, 0), - expired: jspb.Message.getBooleanFieldWithDefault(msg, 7, false), - storageName: jspb.Message.getFieldWithDefault(msg, 8, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.poolrpc.LsatToken} - */ -proto.poolrpc.LsatToken.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.poolrpc.LsatToken; - return proto.poolrpc.LsatToken.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.poolrpc.LsatToken} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.poolrpc.LsatToken} - */ -proto.poolrpc.LsatToken.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setBaseMacaroon(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setPaymentHash(value); - break; - case 3: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setPaymentPreimage(value); - break; - case 4: - var value = /** @type {number} */ (reader.readInt64()); - msg.setAmountPaidMsat(value); - break; - case 5: - var value = /** @type {number} */ (reader.readInt64()); - msg.setRoutingFeePaidMsat(value); - break; - case 6: - var value = /** @type {number} */ (reader.readInt64()); - msg.setTimeCreated(value); - break; - case 7: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setExpired(value); - break; - case 8: - var value = /** @type {string} */ (reader.readString()); - msg.setStorageName(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.poolrpc.LsatToken.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.poolrpc.LsatToken.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.poolrpc.LsatToken} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.LsatToken.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getBaseMacaroon_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getPaymentHash_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } - f = message.getPaymentPreimage_asU8(); - if (f.length > 0) { - writer.writeBytes( - 3, - f - ); - } - f = message.getAmountPaidMsat(); - if (f !== 0) { - writer.writeInt64( - 4, - f - ); - } - f = message.getRoutingFeePaidMsat(); - if (f !== 0) { - writer.writeInt64( - 5, - f - ); - } - f = message.getTimeCreated(); - if (f !== 0) { - writer.writeInt64( - 6, - f - ); - } - f = message.getExpired(); - if (f) { - writer.writeBool( - 7, - f - ); - } - f = message.getStorageName(); - if (f.length > 0) { - writer.writeString( - 8, - f - ); - } -}; - - -/** - * optional bytes base_macaroon = 1; - * @return {!(string|Uint8Array)} - */ -proto.poolrpc.LsatToken.prototype.getBaseMacaroon = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes base_macaroon = 1; - * This is a type-conversion wrapper around `getBaseMacaroon()` - * @return {string} - */ -proto.poolrpc.LsatToken.prototype.getBaseMacaroon_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getBaseMacaroon())); -}; - - -/** - * optional bytes base_macaroon = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getBaseMacaroon()` - * @return {!Uint8Array} - */ -proto.poolrpc.LsatToken.prototype.getBaseMacaroon_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getBaseMacaroon())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.poolrpc.LsatToken} returns this - */ -proto.poolrpc.LsatToken.prototype.setBaseMacaroon = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional bytes payment_hash = 2; - * @return {!(string|Uint8Array)} - */ -proto.poolrpc.LsatToken.prototype.getPaymentHash = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes payment_hash = 2; - * This is a type-conversion wrapper around `getPaymentHash()` - * @return {string} - */ -proto.poolrpc.LsatToken.prototype.getPaymentHash_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getPaymentHash())); -}; - - -/** - * optional bytes payment_hash = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getPaymentHash()` - * @return {!Uint8Array} - */ -proto.poolrpc.LsatToken.prototype.getPaymentHash_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getPaymentHash())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.poolrpc.LsatToken} returns this - */ -proto.poolrpc.LsatToken.prototype.setPaymentHash = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); -}; - - -/** - * optional bytes payment_preimage = 3; - * @return {!(string|Uint8Array)} - */ -proto.poolrpc.LsatToken.prototype.getPaymentPreimage = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * optional bytes payment_preimage = 3; - * This is a type-conversion wrapper around `getPaymentPreimage()` - * @return {string} - */ -proto.poolrpc.LsatToken.prototype.getPaymentPreimage_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getPaymentPreimage())); -}; - - -/** - * optional bytes payment_preimage = 3; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getPaymentPreimage()` - * @return {!Uint8Array} - */ -proto.poolrpc.LsatToken.prototype.getPaymentPreimage_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getPaymentPreimage())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.poolrpc.LsatToken} returns this - */ -proto.poolrpc.LsatToken.prototype.setPaymentPreimage = function(value) { - return jspb.Message.setProto3BytesField(this, 3, value); -}; - - -/** - * optional int64 amount_paid_msat = 4; - * @return {number} - */ -proto.poolrpc.LsatToken.prototype.getAmountPaidMsat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.poolrpc.LsatToken} returns this - */ -proto.poolrpc.LsatToken.prototype.setAmountPaidMsat = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); -}; - - -/** - * optional int64 routing_fee_paid_msat = 5; - * @return {number} - */ -proto.poolrpc.LsatToken.prototype.getRoutingFeePaidMsat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.poolrpc.LsatToken} returns this - */ -proto.poolrpc.LsatToken.prototype.setRoutingFeePaidMsat = function(value) { - return jspb.Message.setProto3IntField(this, 5, value); -}; - - -/** - * optional int64 time_created = 6; - * @return {number} - */ -proto.poolrpc.LsatToken.prototype.getTimeCreated = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.poolrpc.LsatToken} returns this - */ -proto.poolrpc.LsatToken.prototype.setTimeCreated = function(value) { - return jspb.Message.setProto3IntField(this, 6, value); -}; - - -/** - * optional bool expired = 7; - * @return {boolean} - */ -proto.poolrpc.LsatToken.prototype.getExpired = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 7, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.poolrpc.LsatToken} returns this - */ -proto.poolrpc.LsatToken.prototype.setExpired = function(value) { - return jspb.Message.setProto3BooleanField(this, 7, value); -}; - - -/** - * optional string storage_name = 8; - * @return {string} - */ -proto.poolrpc.LsatToken.prototype.getStorageName = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, "")); -}; - - -/** - * @param {string} value - * @return {!proto.poolrpc.LsatToken} returns this - */ -proto.poolrpc.LsatToken.prototype.setStorageName = function(value) { - return jspb.Message.setProto3StringField(this, 8, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.poolrpc.LeaseDurationRequest.prototype.toObject = function(opt_includeInstance) { - return proto.poolrpc.LeaseDurationRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.poolrpc.LeaseDurationRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.LeaseDurationRequest.toObject = function(includeInstance, msg) { - var f, obj = { - - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.poolrpc.LeaseDurationRequest} - */ -proto.poolrpc.LeaseDurationRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.poolrpc.LeaseDurationRequest; - return proto.poolrpc.LeaseDurationRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.poolrpc.LeaseDurationRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.poolrpc.LeaseDurationRequest} - */ -proto.poolrpc.LeaseDurationRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.poolrpc.LeaseDurationRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.poolrpc.LeaseDurationRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.poolrpc.LeaseDurationRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.LeaseDurationRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.poolrpc.LeaseDurationResponse.prototype.toObject = function(opt_includeInstance) { - return proto.poolrpc.LeaseDurationResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.poolrpc.LeaseDurationResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.LeaseDurationResponse.toObject = function(includeInstance, msg) { - var f, obj = { - leaseDurationsMap: (f = msg.getLeaseDurationsMap()) ? f.toObject(includeInstance, undefined) : [], - leaseDurationBucketsMap: (f = msg.getLeaseDurationBucketsMap()) ? f.toObject(includeInstance, undefined) : [] - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.poolrpc.LeaseDurationResponse} - */ -proto.poolrpc.LeaseDurationResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.poolrpc.LeaseDurationResponse; - return proto.poolrpc.LeaseDurationResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.poolrpc.LeaseDurationResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.poolrpc.LeaseDurationResponse} - */ -proto.poolrpc.LeaseDurationResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = msg.getLeaseDurationsMap(); - reader.readMessage(value, function(message, reader) { - jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readUint32, jspb.BinaryReader.prototype.readBool, null, 0, false); - }); - break; - case 2: - var value = msg.getLeaseDurationBucketsMap(); - reader.readMessage(value, function(message, reader) { - jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readUint32, jspb.BinaryReader.prototype.readEnum, null, 0, 0); - }); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.poolrpc.LeaseDurationResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.poolrpc.LeaseDurationResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.poolrpc.LeaseDurationResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.LeaseDurationResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getLeaseDurationsMap(true); - if (f && f.getLength() > 0) { - f.serializeBinary(1, writer, jspb.BinaryWriter.prototype.writeUint32, jspb.BinaryWriter.prototype.writeBool); - } - f = message.getLeaseDurationBucketsMap(true); - if (f && f.getLength() > 0) { - f.serializeBinary(2, writer, jspb.BinaryWriter.prototype.writeUint32, jspb.BinaryWriter.prototype.writeEnum); - } -}; - - -/** - * map lease_durations = 1; - * @param {boolean=} opt_noLazyCreate Do not create the map if - * empty, instead returning `undefined` - * @return {!jspb.Map} - */ -proto.poolrpc.LeaseDurationResponse.prototype.getLeaseDurationsMap = function(opt_noLazyCreate) { - return /** @type {!jspb.Map} */ ( - jspb.Message.getMapField(this, 1, opt_noLazyCreate, - null)); -}; - - -/** - * Clears values from the map. The map will be non-null. - * @return {!proto.poolrpc.LeaseDurationResponse} returns this - */ -proto.poolrpc.LeaseDurationResponse.prototype.clearLeaseDurationsMap = function() { - this.getLeaseDurationsMap().clear(); - return this;}; - - -/** - * map lease_duration_buckets = 2; - * @param {boolean=} opt_noLazyCreate Do not create the map if - * empty, instead returning `undefined` - * @return {!jspb.Map} - */ -proto.poolrpc.LeaseDurationResponse.prototype.getLeaseDurationBucketsMap = function(opt_noLazyCreate) { - return /** @type {!jspb.Map} */ ( - jspb.Message.getMapField(this, 2, opt_noLazyCreate, - null)); -}; - - -/** - * Clears values from the map. The map will be non-null. - * @return {!proto.poolrpc.LeaseDurationResponse} returns this - */ -proto.poolrpc.LeaseDurationResponse.prototype.clearLeaseDurationBucketsMap = function() { - this.getLeaseDurationBucketsMap().clear(); - return this;}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.poolrpc.NextBatchInfoRequest.prototype.toObject = function(opt_includeInstance) { - return proto.poolrpc.NextBatchInfoRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.poolrpc.NextBatchInfoRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.NextBatchInfoRequest.toObject = function(includeInstance, msg) { - var f, obj = { - - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.poolrpc.NextBatchInfoRequest} - */ -proto.poolrpc.NextBatchInfoRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.poolrpc.NextBatchInfoRequest; - return proto.poolrpc.NextBatchInfoRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.poolrpc.NextBatchInfoRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.poolrpc.NextBatchInfoRequest} - */ -proto.poolrpc.NextBatchInfoRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.poolrpc.NextBatchInfoRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.poolrpc.NextBatchInfoRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.poolrpc.NextBatchInfoRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.NextBatchInfoRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.poolrpc.NextBatchInfoResponse.prototype.toObject = function(opt_includeInstance) { - return proto.poolrpc.NextBatchInfoResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.poolrpc.NextBatchInfoResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.NextBatchInfoResponse.toObject = function(includeInstance, msg) { - var f, obj = { - confTarget: jspb.Message.getFieldWithDefault(msg, 5, 0), - feeRateSatPerKw: jspb.Message.getFieldWithDefault(msg, 6, 0), - clearTimestamp: jspb.Message.getFieldWithDefault(msg, 7, 0), - autoRenewExtensionBlocks: jspb.Message.getFieldWithDefault(msg, 8, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.poolrpc.NextBatchInfoResponse} - */ -proto.poolrpc.NextBatchInfoResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.poolrpc.NextBatchInfoResponse; - return proto.poolrpc.NextBatchInfoResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.poolrpc.NextBatchInfoResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.poolrpc.NextBatchInfoResponse} - */ -proto.poolrpc.NextBatchInfoResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 5: - var value = /** @type {number} */ (reader.readUint32()); - msg.setConfTarget(value); - break; - case 6: - var value = /** @type {number} */ (reader.readUint64()); - msg.setFeeRateSatPerKw(value); - break; - case 7: - var value = /** @type {number} */ (reader.readUint64()); - msg.setClearTimestamp(value); - break; - case 8: - var value = /** @type {number} */ (reader.readUint32()); - msg.setAutoRenewExtensionBlocks(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.poolrpc.NextBatchInfoResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.poolrpc.NextBatchInfoResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.poolrpc.NextBatchInfoResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.NextBatchInfoResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getConfTarget(); - if (f !== 0) { - writer.writeUint32( - 5, - f - ); - } - f = message.getFeeRateSatPerKw(); - if (f !== 0) { - writer.writeUint64( - 6, - f - ); - } - f = message.getClearTimestamp(); - if (f !== 0) { - writer.writeUint64( - 7, - f - ); - } - f = message.getAutoRenewExtensionBlocks(); - if (f !== 0) { - writer.writeUint32( - 8, - f - ); - } -}; - - -/** - * optional uint32 conf_target = 5; - * @return {number} - */ -proto.poolrpc.NextBatchInfoResponse.prototype.getConfTarget = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.poolrpc.NextBatchInfoResponse} returns this - */ -proto.poolrpc.NextBatchInfoResponse.prototype.setConfTarget = function(value) { - return jspb.Message.setProto3IntField(this, 5, value); -}; - - -/** - * optional uint64 fee_rate_sat_per_kw = 6; - * @return {number} - */ -proto.poolrpc.NextBatchInfoResponse.prototype.getFeeRateSatPerKw = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.poolrpc.NextBatchInfoResponse} returns this - */ -proto.poolrpc.NextBatchInfoResponse.prototype.setFeeRateSatPerKw = function(value) { - return jspb.Message.setProto3IntField(this, 6, value); -}; - - -/** - * optional uint64 clear_timestamp = 7; - * @return {number} - */ -proto.poolrpc.NextBatchInfoResponse.prototype.getClearTimestamp = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.poolrpc.NextBatchInfoResponse} returns this - */ -proto.poolrpc.NextBatchInfoResponse.prototype.setClearTimestamp = function(value) { - return jspb.Message.setProto3IntField(this, 7, value); -}; - - -/** - * optional uint32 auto_renew_extension_blocks = 8; - * @return {number} - */ -proto.poolrpc.NextBatchInfoResponse.prototype.getAutoRenewExtensionBlocks = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.poolrpc.NextBatchInfoResponse} returns this - */ -proto.poolrpc.NextBatchInfoResponse.prototype.setAutoRenewExtensionBlocks = function(value) { - return jspb.Message.setProto3IntField(this, 8, value); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.poolrpc.NodeRatingRequest.repeatedFields_ = [1]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.poolrpc.NodeRatingRequest.prototype.toObject = function(opt_includeInstance) { - return proto.poolrpc.NodeRatingRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.poolrpc.NodeRatingRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.NodeRatingRequest.toObject = function(includeInstance, msg) { - var f, obj = { - nodePubkeysList: msg.getNodePubkeysList_asB64() - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.poolrpc.NodeRatingRequest} - */ -proto.poolrpc.NodeRatingRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.poolrpc.NodeRatingRequest; - return proto.poolrpc.NodeRatingRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.poolrpc.NodeRatingRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.poolrpc.NodeRatingRequest} - */ -proto.poolrpc.NodeRatingRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.addNodePubkeys(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.poolrpc.NodeRatingRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.poolrpc.NodeRatingRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.poolrpc.NodeRatingRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.NodeRatingRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getNodePubkeysList_asU8(); - if (f.length > 0) { - writer.writeRepeatedBytes( - 1, - f - ); - } -}; - - -/** - * repeated bytes node_pubkeys = 1; - * @return {!(Array|Array)} - */ -proto.poolrpc.NodeRatingRequest.prototype.getNodePubkeysList = function() { - return /** @type {!(Array|Array)} */ (jspb.Message.getRepeatedField(this, 1)); -}; - - -/** - * repeated bytes node_pubkeys = 1; - * This is a type-conversion wrapper around `getNodePubkeysList()` - * @return {!Array} - */ -proto.poolrpc.NodeRatingRequest.prototype.getNodePubkeysList_asB64 = function() { - return /** @type {!Array} */ (jspb.Message.bytesListAsB64( - this.getNodePubkeysList())); -}; - - -/** - * repeated bytes node_pubkeys = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getNodePubkeysList()` - * @return {!Array} - */ -proto.poolrpc.NodeRatingRequest.prototype.getNodePubkeysList_asU8 = function() { - return /** @type {!Array} */ (jspb.Message.bytesListAsU8( - this.getNodePubkeysList())); -}; - - -/** - * @param {!(Array|Array)} value - * @return {!proto.poolrpc.NodeRatingRequest} returns this - */ -proto.poolrpc.NodeRatingRequest.prototype.setNodePubkeysList = function(value) { - return jspb.Message.setField(this, 1, value || []); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @param {number=} opt_index - * @return {!proto.poolrpc.NodeRatingRequest} returns this - */ -proto.poolrpc.NodeRatingRequest.prototype.addNodePubkeys = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 1, value, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.poolrpc.NodeRatingRequest} returns this - */ -proto.poolrpc.NodeRatingRequest.prototype.clearNodePubkeysList = function() { - return this.setNodePubkeysList([]); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.poolrpc.NodeRatingResponse.repeatedFields_ = [1]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.poolrpc.NodeRatingResponse.prototype.toObject = function(opt_includeInstance) { - return proto.poolrpc.NodeRatingResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.poolrpc.NodeRatingResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.NodeRatingResponse.toObject = function(includeInstance, msg) { - var f, obj = { - nodeRatingsList: jspb.Message.toObjectList(msg.getNodeRatingsList(), - auctioneerrpc_auctioneer_pb.NodeRating.toObject, includeInstance) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.poolrpc.NodeRatingResponse} - */ -proto.poolrpc.NodeRatingResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.poolrpc.NodeRatingResponse; - return proto.poolrpc.NodeRatingResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.poolrpc.NodeRatingResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.poolrpc.NodeRatingResponse} - */ -proto.poolrpc.NodeRatingResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new auctioneerrpc_auctioneer_pb.NodeRating; - reader.readMessage(value,auctioneerrpc_auctioneer_pb.NodeRating.deserializeBinaryFromReader); - msg.addNodeRatings(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.poolrpc.NodeRatingResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.poolrpc.NodeRatingResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.poolrpc.NodeRatingResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.NodeRatingResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getNodeRatingsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 1, - f, - auctioneerrpc_auctioneer_pb.NodeRating.serializeBinaryToWriter - ); - } -}; - - -/** - * repeated NodeRating node_ratings = 1; - * @return {!Array} - */ -proto.poolrpc.NodeRatingResponse.prototype.getNodeRatingsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, auctioneerrpc_auctioneer_pb.NodeRating, 1)); -}; - - -/** - * @param {!Array} value - * @return {!proto.poolrpc.NodeRatingResponse} returns this -*/ -proto.poolrpc.NodeRatingResponse.prototype.setNodeRatingsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); -}; - - -/** - * @param {!proto.poolrpc.NodeRating=} opt_value - * @param {number=} opt_index - * @return {!proto.poolrpc.NodeRating} - */ -proto.poolrpc.NodeRatingResponse.prototype.addNodeRatings = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.poolrpc.NodeRating, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.poolrpc.NodeRatingResponse} returns this - */ -proto.poolrpc.NodeRatingResponse.prototype.clearNodeRatingsList = function() { - return this.setNodeRatingsList([]); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.poolrpc.GetInfoRequest.prototype.toObject = function(opt_includeInstance) { - return proto.poolrpc.GetInfoRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.poolrpc.GetInfoRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.GetInfoRequest.toObject = function(includeInstance, msg) { - var f, obj = { - - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.poolrpc.GetInfoRequest} - */ -proto.poolrpc.GetInfoRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.poolrpc.GetInfoRequest; - return proto.poolrpc.GetInfoRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.poolrpc.GetInfoRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.poolrpc.GetInfoRequest} - */ -proto.poolrpc.GetInfoRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.poolrpc.GetInfoRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.poolrpc.GetInfoRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.poolrpc.GetInfoRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.GetInfoRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.poolrpc.GetInfoResponse.prototype.toObject = function(opt_includeInstance) { - return proto.poolrpc.GetInfoResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.poolrpc.GetInfoResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.GetInfoResponse.toObject = function(includeInstance, msg) { - var f, obj = { - version: jspb.Message.getFieldWithDefault(msg, 1, ""), - accountsTotal: jspb.Message.getFieldWithDefault(msg, 2, 0), - accountsActive: jspb.Message.getFieldWithDefault(msg, 3, 0), - accountsActiveExpired: jspb.Message.getFieldWithDefault(msg, 4, 0), - accountsArchived: jspb.Message.getFieldWithDefault(msg, 5, 0), - ordersTotal: jspb.Message.getFieldWithDefault(msg, 6, 0), - ordersActive: jspb.Message.getFieldWithDefault(msg, 7, 0), - ordersArchived: jspb.Message.getFieldWithDefault(msg, 8, 0), - currentBlockHeight: jspb.Message.getFieldWithDefault(msg, 9, 0), - batchesInvolved: jspb.Message.getFieldWithDefault(msg, 10, 0), - nodeRating: (f = msg.getNodeRating()) && auctioneerrpc_auctioneer_pb.NodeRating.toObject(includeInstance, f), - lsatTokens: jspb.Message.getFieldWithDefault(msg, 12, 0), - subscribedToAuctioneer: jspb.Message.getBooleanFieldWithDefault(msg, 13, false), - newNodesOnly: jspb.Message.getBooleanFieldWithDefault(msg, 14, false), - marketInfoMap: (f = msg.getMarketInfoMap()) ? f.toObject(includeInstance, proto.poolrpc.MarketInfo.toObject) : [] - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.poolrpc.GetInfoResponse} - */ -proto.poolrpc.GetInfoResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.poolrpc.GetInfoResponse; - return proto.poolrpc.GetInfoResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.poolrpc.GetInfoResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.poolrpc.GetInfoResponse} - */ -proto.poolrpc.GetInfoResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setVersion(value); - break; - case 2: - var value = /** @type {number} */ (reader.readUint32()); - msg.setAccountsTotal(value); - break; - case 3: - var value = /** @type {number} */ (reader.readUint32()); - msg.setAccountsActive(value); - break; - case 4: - var value = /** @type {number} */ (reader.readUint32()); - msg.setAccountsActiveExpired(value); - break; - case 5: - var value = /** @type {number} */ (reader.readUint32()); - msg.setAccountsArchived(value); - break; - case 6: - var value = /** @type {number} */ (reader.readUint32()); - msg.setOrdersTotal(value); - break; - case 7: - var value = /** @type {number} */ (reader.readUint32()); - msg.setOrdersActive(value); - break; - case 8: - var value = /** @type {number} */ (reader.readUint32()); - msg.setOrdersArchived(value); - break; - case 9: - var value = /** @type {number} */ (reader.readUint32()); - msg.setCurrentBlockHeight(value); - break; - case 10: - var value = /** @type {number} */ (reader.readUint32()); - msg.setBatchesInvolved(value); - break; - case 11: - var value = new auctioneerrpc_auctioneer_pb.NodeRating; - reader.readMessage(value,auctioneerrpc_auctioneer_pb.NodeRating.deserializeBinaryFromReader); - msg.setNodeRating(value); - break; - case 12: - var value = /** @type {number} */ (reader.readUint32()); - msg.setLsatTokens(value); - break; - case 13: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setSubscribedToAuctioneer(value); - break; - case 14: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setNewNodesOnly(value); - break; - case 15: - var value = msg.getMarketInfoMap(); - reader.readMessage(value, function(message, reader) { - jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readUint32, jspb.BinaryReader.prototype.readMessage, proto.poolrpc.MarketInfo.deserializeBinaryFromReader, 0, new proto.poolrpc.MarketInfo()); - }); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.poolrpc.GetInfoResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.poolrpc.GetInfoResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.poolrpc.GetInfoResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.GetInfoResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getVersion(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getAccountsTotal(); - if (f !== 0) { - writer.writeUint32( - 2, - f - ); - } - f = message.getAccountsActive(); - if (f !== 0) { - writer.writeUint32( - 3, - f - ); - } - f = message.getAccountsActiveExpired(); - if (f !== 0) { - writer.writeUint32( - 4, - f - ); - } - f = message.getAccountsArchived(); - if (f !== 0) { - writer.writeUint32( - 5, - f - ); - } - f = message.getOrdersTotal(); - if (f !== 0) { - writer.writeUint32( - 6, - f - ); - } - f = message.getOrdersActive(); - if (f !== 0) { - writer.writeUint32( - 7, - f - ); - } - f = message.getOrdersArchived(); - if (f !== 0) { - writer.writeUint32( - 8, - f - ); - } - f = message.getCurrentBlockHeight(); - if (f !== 0) { - writer.writeUint32( - 9, - f - ); - } - f = message.getBatchesInvolved(); - if (f !== 0) { - writer.writeUint32( - 10, - f - ); - } - f = message.getNodeRating(); - if (f != null) { - writer.writeMessage( - 11, - f, - auctioneerrpc_auctioneer_pb.NodeRating.serializeBinaryToWriter - ); - } - f = message.getLsatTokens(); - if (f !== 0) { - writer.writeUint32( - 12, - f - ); - } - f = message.getSubscribedToAuctioneer(); - if (f) { - writer.writeBool( - 13, - f - ); - } - f = message.getNewNodesOnly(); - if (f) { - writer.writeBool( - 14, - f - ); - } - f = message.getMarketInfoMap(true); - if (f && f.getLength() > 0) { - f.serializeBinary(15, writer, jspb.BinaryWriter.prototype.writeUint32, jspb.BinaryWriter.prototype.writeMessage, proto.poolrpc.MarketInfo.serializeBinaryToWriter); - } -}; - - -/** - * optional string version = 1; - * @return {string} - */ -proto.poolrpc.GetInfoResponse.prototype.getVersion = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.poolrpc.GetInfoResponse} returns this - */ -proto.poolrpc.GetInfoResponse.prototype.setVersion = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional uint32 accounts_total = 2; - * @return {number} - */ -proto.poolrpc.GetInfoResponse.prototype.getAccountsTotal = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.poolrpc.GetInfoResponse} returns this - */ -proto.poolrpc.GetInfoResponse.prototype.setAccountsTotal = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * optional uint32 accounts_active = 3; - * @return {number} - */ -proto.poolrpc.GetInfoResponse.prototype.getAccountsActive = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.poolrpc.GetInfoResponse} returns this - */ -proto.poolrpc.GetInfoResponse.prototype.setAccountsActive = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - -/** - * optional uint32 accounts_active_expired = 4; - * @return {number} - */ -proto.poolrpc.GetInfoResponse.prototype.getAccountsActiveExpired = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.poolrpc.GetInfoResponse} returns this - */ -proto.poolrpc.GetInfoResponse.prototype.setAccountsActiveExpired = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); -}; - - -/** - * optional uint32 accounts_archived = 5; - * @return {number} - */ -proto.poolrpc.GetInfoResponse.prototype.getAccountsArchived = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.poolrpc.GetInfoResponse} returns this - */ -proto.poolrpc.GetInfoResponse.prototype.setAccountsArchived = function(value) { - return jspb.Message.setProto3IntField(this, 5, value); -}; - - -/** - * optional uint32 orders_total = 6; - * @return {number} - */ -proto.poolrpc.GetInfoResponse.prototype.getOrdersTotal = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.poolrpc.GetInfoResponse} returns this - */ -proto.poolrpc.GetInfoResponse.prototype.setOrdersTotal = function(value) { - return jspb.Message.setProto3IntField(this, 6, value); -}; - - -/** - * optional uint32 orders_active = 7; - * @return {number} - */ -proto.poolrpc.GetInfoResponse.prototype.getOrdersActive = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.poolrpc.GetInfoResponse} returns this - */ -proto.poolrpc.GetInfoResponse.prototype.setOrdersActive = function(value) { - return jspb.Message.setProto3IntField(this, 7, value); -}; - - -/** - * optional uint32 orders_archived = 8; - * @return {number} - */ -proto.poolrpc.GetInfoResponse.prototype.getOrdersArchived = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.poolrpc.GetInfoResponse} returns this - */ -proto.poolrpc.GetInfoResponse.prototype.setOrdersArchived = function(value) { - return jspb.Message.setProto3IntField(this, 8, value); -}; - - -/** - * optional uint32 current_block_height = 9; - * @return {number} - */ -proto.poolrpc.GetInfoResponse.prototype.getCurrentBlockHeight = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.poolrpc.GetInfoResponse} returns this - */ -proto.poolrpc.GetInfoResponse.prototype.setCurrentBlockHeight = function(value) { - return jspb.Message.setProto3IntField(this, 9, value); -}; - - -/** - * optional uint32 batches_involved = 10; - * @return {number} - */ -proto.poolrpc.GetInfoResponse.prototype.getBatchesInvolved = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 10, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.poolrpc.GetInfoResponse} returns this - */ -proto.poolrpc.GetInfoResponse.prototype.setBatchesInvolved = function(value) { - return jspb.Message.setProto3IntField(this, 10, value); -}; - - -/** - * optional NodeRating node_rating = 11; - * @return {?proto.poolrpc.NodeRating} - */ -proto.poolrpc.GetInfoResponse.prototype.getNodeRating = function() { - return /** @type{?proto.poolrpc.NodeRating} */ ( - jspb.Message.getWrapperField(this, auctioneerrpc_auctioneer_pb.NodeRating, 11)); -}; - - -/** - * @param {?proto.poolrpc.NodeRating|undefined} value - * @return {!proto.poolrpc.GetInfoResponse} returns this -*/ -proto.poolrpc.GetInfoResponse.prototype.setNodeRating = function(value) { - return jspb.Message.setWrapperField(this, 11, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.poolrpc.GetInfoResponse} returns this - */ -proto.poolrpc.GetInfoResponse.prototype.clearNodeRating = function() { - return this.setNodeRating(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.poolrpc.GetInfoResponse.prototype.hasNodeRating = function() { - return jspb.Message.getField(this, 11) != null; -}; - - -/** - * optional uint32 lsat_tokens = 12; - * @return {number} - */ -proto.poolrpc.GetInfoResponse.prototype.getLsatTokens = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 12, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.poolrpc.GetInfoResponse} returns this - */ -proto.poolrpc.GetInfoResponse.prototype.setLsatTokens = function(value) { - return jspb.Message.setProto3IntField(this, 12, value); -}; - - -/** - * optional bool subscribed_to_auctioneer = 13; - * @return {boolean} - */ -proto.poolrpc.GetInfoResponse.prototype.getSubscribedToAuctioneer = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 13, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.poolrpc.GetInfoResponse} returns this - */ -proto.poolrpc.GetInfoResponse.prototype.setSubscribedToAuctioneer = function(value) { - return jspb.Message.setProto3BooleanField(this, 13, value); -}; - - -/** - * optional bool new_nodes_only = 14; - * @return {boolean} - */ -proto.poolrpc.GetInfoResponse.prototype.getNewNodesOnly = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 14, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.poolrpc.GetInfoResponse} returns this - */ -proto.poolrpc.GetInfoResponse.prototype.setNewNodesOnly = function(value) { - return jspb.Message.setProto3BooleanField(this, 14, value); -}; - - -/** - * map market_info = 15; - * @param {boolean=} opt_noLazyCreate Do not create the map if - * empty, instead returning `undefined` - * @return {!jspb.Map} - */ -proto.poolrpc.GetInfoResponse.prototype.getMarketInfoMap = function(opt_noLazyCreate) { - return /** @type {!jspb.Map} */ ( - jspb.Message.getMapField(this, 15, opt_noLazyCreate, - proto.poolrpc.MarketInfo)); -}; - - -/** - * Clears values from the map. The map will be non-null. - * @return {!proto.poolrpc.GetInfoResponse} returns this - */ -proto.poolrpc.GetInfoResponse.prototype.clearMarketInfoMap = function() { - this.getMarketInfoMap().clear(); - return this;}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.poolrpc.StopDaemonRequest.prototype.toObject = function(opt_includeInstance) { - return proto.poolrpc.StopDaemonRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.poolrpc.StopDaemonRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.StopDaemonRequest.toObject = function(includeInstance, msg) { - var f, obj = { - - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.poolrpc.StopDaemonRequest} - */ -proto.poolrpc.StopDaemonRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.poolrpc.StopDaemonRequest; - return proto.poolrpc.StopDaemonRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.poolrpc.StopDaemonRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.poolrpc.StopDaemonRequest} - */ -proto.poolrpc.StopDaemonRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.poolrpc.StopDaemonRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.poolrpc.StopDaemonRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.poolrpc.StopDaemonRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.StopDaemonRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.poolrpc.StopDaemonResponse.prototype.toObject = function(opt_includeInstance) { - return proto.poolrpc.StopDaemonResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.poolrpc.StopDaemonResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.StopDaemonResponse.toObject = function(includeInstance, msg) { - var f, obj = { - - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.poolrpc.StopDaemonResponse} - */ -proto.poolrpc.StopDaemonResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.poolrpc.StopDaemonResponse; - return proto.poolrpc.StopDaemonResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.poolrpc.StopDaemonResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.poolrpc.StopDaemonResponse} - */ -proto.poolrpc.StopDaemonResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.poolrpc.StopDaemonResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.poolrpc.StopDaemonResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.poolrpc.StopDaemonResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.StopDaemonResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.poolrpc.OfferSidecarRequest.prototype.toObject = function(opt_includeInstance) { - return proto.poolrpc.OfferSidecarRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.poolrpc.OfferSidecarRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.OfferSidecarRequest.toObject = function(includeInstance, msg) { - var f, obj = { - autoNegotiate: jspb.Message.getBooleanFieldWithDefault(msg, 1, false), - bid: (f = msg.getBid()) && proto.poolrpc.Bid.toObject(includeInstance, f) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.poolrpc.OfferSidecarRequest} - */ -proto.poolrpc.OfferSidecarRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.poolrpc.OfferSidecarRequest; - return proto.poolrpc.OfferSidecarRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.poolrpc.OfferSidecarRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.poolrpc.OfferSidecarRequest} - */ -proto.poolrpc.OfferSidecarRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setAutoNegotiate(value); - break; - case 2: - var value = new proto.poolrpc.Bid; - reader.readMessage(value,proto.poolrpc.Bid.deserializeBinaryFromReader); - msg.setBid(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.poolrpc.OfferSidecarRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.poolrpc.OfferSidecarRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.poolrpc.OfferSidecarRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.OfferSidecarRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getAutoNegotiate(); - if (f) { - writer.writeBool( - 1, - f - ); - } - f = message.getBid(); - if (f != null) { - writer.writeMessage( - 2, - f, - proto.poolrpc.Bid.serializeBinaryToWriter - ); - } -}; - - -/** - * optional bool auto_negotiate = 1; - * @return {boolean} - */ -proto.poolrpc.OfferSidecarRequest.prototype.getAutoNegotiate = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.poolrpc.OfferSidecarRequest} returns this - */ -proto.poolrpc.OfferSidecarRequest.prototype.setAutoNegotiate = function(value) { - return jspb.Message.setProto3BooleanField(this, 1, value); -}; - - -/** - * optional Bid bid = 2; - * @return {?proto.poolrpc.Bid} - */ -proto.poolrpc.OfferSidecarRequest.prototype.getBid = function() { - return /** @type{?proto.poolrpc.Bid} */ ( - jspb.Message.getWrapperField(this, proto.poolrpc.Bid, 2)); -}; - - -/** - * @param {?proto.poolrpc.Bid|undefined} value - * @return {!proto.poolrpc.OfferSidecarRequest} returns this -*/ -proto.poolrpc.OfferSidecarRequest.prototype.setBid = function(value) { - return jspb.Message.setWrapperField(this, 2, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.poolrpc.OfferSidecarRequest} returns this - */ -proto.poolrpc.OfferSidecarRequest.prototype.clearBid = function() { - return this.setBid(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.poolrpc.OfferSidecarRequest.prototype.hasBid = function() { - return jspb.Message.getField(this, 2) != null; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.poolrpc.SidecarTicket.prototype.toObject = function(opt_includeInstance) { - return proto.poolrpc.SidecarTicket.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.poolrpc.SidecarTicket} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.SidecarTicket.toObject = function(includeInstance, msg) { - var f, obj = { - ticket: jspb.Message.getFieldWithDefault(msg, 1, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.poolrpc.SidecarTicket} - */ -proto.poolrpc.SidecarTicket.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.poolrpc.SidecarTicket; - return proto.poolrpc.SidecarTicket.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.poolrpc.SidecarTicket} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.poolrpc.SidecarTicket} - */ -proto.poolrpc.SidecarTicket.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setTicket(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.poolrpc.SidecarTicket.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.poolrpc.SidecarTicket.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.poolrpc.SidecarTicket} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.SidecarTicket.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getTicket(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } -}; - - -/** - * optional string ticket = 1; - * @return {string} - */ -proto.poolrpc.SidecarTicket.prototype.getTicket = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.poolrpc.SidecarTicket} returns this - */ -proto.poolrpc.SidecarTicket.prototype.setTicket = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.poolrpc.DecodedSidecarTicket.prototype.toObject = function(opt_includeInstance) { - return proto.poolrpc.DecodedSidecarTicket.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.poolrpc.DecodedSidecarTicket} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.DecodedSidecarTicket.toObject = function(includeInstance, msg) { - var f, obj = { - id: msg.getId_asB64(), - version: jspb.Message.getFieldWithDefault(msg, 2, 0), - state: jspb.Message.getFieldWithDefault(msg, 3, ""), - offerCapacity: jspb.Message.getFieldWithDefault(msg, 4, 0), - offerPushAmount: jspb.Message.getFieldWithDefault(msg, 5, 0), - offerLeaseDurationBlocks: jspb.Message.getFieldWithDefault(msg, 6, 0), - offerSignPubkey: msg.getOfferSignPubkey_asB64(), - offerSignature: msg.getOfferSignature_asB64(), - offerAuto: jspb.Message.getBooleanFieldWithDefault(msg, 9, false), - recipientNodePubkey: msg.getRecipientNodePubkey_asB64(), - recipientMultisigPubkey: msg.getRecipientMultisigPubkey_asB64(), - recipientMultisigPubkeyIndex: jspb.Message.getFieldWithDefault(msg, 12, 0), - orderBidNonce: msg.getOrderBidNonce_asB64(), - orderSignature: msg.getOrderSignature_asB64(), - executionPendingChannelId: msg.getExecutionPendingChannelId_asB64(), - encodedTicket: jspb.Message.getFieldWithDefault(msg, 16, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.poolrpc.DecodedSidecarTicket} - */ -proto.poolrpc.DecodedSidecarTicket.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.poolrpc.DecodedSidecarTicket; - return proto.poolrpc.DecodedSidecarTicket.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.poolrpc.DecodedSidecarTicket} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.poolrpc.DecodedSidecarTicket} - */ -proto.poolrpc.DecodedSidecarTicket.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setId(value); - break; - case 2: - var value = /** @type {number} */ (reader.readUint32()); - msg.setVersion(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setState(value); - break; - case 4: - var value = /** @type {number} */ (reader.readUint64()); - msg.setOfferCapacity(value); - break; - case 5: - var value = /** @type {number} */ (reader.readUint64()); - msg.setOfferPushAmount(value); - break; - case 6: - var value = /** @type {number} */ (reader.readUint32()); - msg.setOfferLeaseDurationBlocks(value); - break; - case 7: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setOfferSignPubkey(value); - break; - case 8: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setOfferSignature(value); - break; - case 9: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setOfferAuto(value); - break; - case 10: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setRecipientNodePubkey(value); - break; - case 11: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setRecipientMultisigPubkey(value); - break; - case 12: - var value = /** @type {number} */ (reader.readUint32()); - msg.setRecipientMultisigPubkeyIndex(value); - break; - case 13: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setOrderBidNonce(value); - break; - case 14: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setOrderSignature(value); - break; - case 15: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setExecutionPendingChannelId(value); - break; - case 16: - var value = /** @type {string} */ (reader.readString()); - msg.setEncodedTicket(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.poolrpc.DecodedSidecarTicket.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.poolrpc.DecodedSidecarTicket.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.poolrpc.DecodedSidecarTicket} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.DecodedSidecarTicket.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getId_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getVersion(); - if (f !== 0) { - writer.writeUint32( - 2, - f - ); - } - f = message.getState(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } - f = message.getOfferCapacity(); - if (f !== 0) { - writer.writeUint64( - 4, - f - ); - } - f = message.getOfferPushAmount(); - if (f !== 0) { - writer.writeUint64( - 5, - f - ); - } - f = message.getOfferLeaseDurationBlocks(); - if (f !== 0) { - writer.writeUint32( - 6, - f - ); - } - f = message.getOfferSignPubkey_asU8(); - if (f.length > 0) { - writer.writeBytes( - 7, - f - ); - } - f = message.getOfferSignature_asU8(); - if (f.length > 0) { - writer.writeBytes( - 8, - f - ); - } - f = message.getOfferAuto(); - if (f) { - writer.writeBool( - 9, - f - ); - } - f = message.getRecipientNodePubkey_asU8(); - if (f.length > 0) { - writer.writeBytes( - 10, - f - ); - } - f = message.getRecipientMultisigPubkey_asU8(); - if (f.length > 0) { - writer.writeBytes( - 11, - f - ); - } - f = message.getRecipientMultisigPubkeyIndex(); - if (f !== 0) { - writer.writeUint32( - 12, - f - ); - } - f = message.getOrderBidNonce_asU8(); - if (f.length > 0) { - writer.writeBytes( - 13, - f - ); - } - f = message.getOrderSignature_asU8(); - if (f.length > 0) { - writer.writeBytes( - 14, - f - ); - } - f = message.getExecutionPendingChannelId_asU8(); - if (f.length > 0) { - writer.writeBytes( - 15, - f - ); - } - f = message.getEncodedTicket(); - if (f.length > 0) { - writer.writeString( - 16, - f - ); - } -}; - - -/** - * optional bytes id = 1; - * @return {!(string|Uint8Array)} - */ -proto.poolrpc.DecodedSidecarTicket.prototype.getId = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes id = 1; - * This is a type-conversion wrapper around `getId()` - * @return {string} - */ -proto.poolrpc.DecodedSidecarTicket.prototype.getId_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getId())); -}; - - -/** - * optional bytes id = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getId()` - * @return {!Uint8Array} - */ -proto.poolrpc.DecodedSidecarTicket.prototype.getId_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getId())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.poolrpc.DecodedSidecarTicket} returns this - */ -proto.poolrpc.DecodedSidecarTicket.prototype.setId = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional uint32 version = 2; - * @return {number} - */ -proto.poolrpc.DecodedSidecarTicket.prototype.getVersion = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.poolrpc.DecodedSidecarTicket} returns this - */ -proto.poolrpc.DecodedSidecarTicket.prototype.setVersion = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * optional string state = 3; - * @return {string} - */ -proto.poolrpc.DecodedSidecarTicket.prototype.getState = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * @param {string} value - * @return {!proto.poolrpc.DecodedSidecarTicket} returns this - */ -proto.poolrpc.DecodedSidecarTicket.prototype.setState = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); -}; - - -/** - * optional uint64 offer_capacity = 4; - * @return {number} - */ -proto.poolrpc.DecodedSidecarTicket.prototype.getOfferCapacity = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.poolrpc.DecodedSidecarTicket} returns this - */ -proto.poolrpc.DecodedSidecarTicket.prototype.setOfferCapacity = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); -}; - - -/** - * optional uint64 offer_push_amount = 5; - * @return {number} - */ -proto.poolrpc.DecodedSidecarTicket.prototype.getOfferPushAmount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.poolrpc.DecodedSidecarTicket} returns this - */ -proto.poolrpc.DecodedSidecarTicket.prototype.setOfferPushAmount = function(value) { - return jspb.Message.setProto3IntField(this, 5, value); -}; - - -/** - * optional uint32 offer_lease_duration_blocks = 6; - * @return {number} - */ -proto.poolrpc.DecodedSidecarTicket.prototype.getOfferLeaseDurationBlocks = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.poolrpc.DecodedSidecarTicket} returns this - */ -proto.poolrpc.DecodedSidecarTicket.prototype.setOfferLeaseDurationBlocks = function(value) { - return jspb.Message.setProto3IntField(this, 6, value); -}; - - -/** - * optional bytes offer_sign_pubkey = 7; - * @return {!(string|Uint8Array)} - */ -proto.poolrpc.DecodedSidecarTicket.prototype.getOfferSignPubkey = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 7, "")); -}; - - -/** - * optional bytes offer_sign_pubkey = 7; - * This is a type-conversion wrapper around `getOfferSignPubkey()` - * @return {string} - */ -proto.poolrpc.DecodedSidecarTicket.prototype.getOfferSignPubkey_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getOfferSignPubkey())); -}; - - -/** - * optional bytes offer_sign_pubkey = 7; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getOfferSignPubkey()` - * @return {!Uint8Array} - */ -proto.poolrpc.DecodedSidecarTicket.prototype.getOfferSignPubkey_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getOfferSignPubkey())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.poolrpc.DecodedSidecarTicket} returns this - */ -proto.poolrpc.DecodedSidecarTicket.prototype.setOfferSignPubkey = function(value) { - return jspb.Message.setProto3BytesField(this, 7, value); -}; - - -/** - * optional bytes offer_signature = 8; - * @return {!(string|Uint8Array)} - */ -proto.poolrpc.DecodedSidecarTicket.prototype.getOfferSignature = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 8, "")); -}; - - -/** - * optional bytes offer_signature = 8; - * This is a type-conversion wrapper around `getOfferSignature()` - * @return {string} - */ -proto.poolrpc.DecodedSidecarTicket.prototype.getOfferSignature_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getOfferSignature())); -}; - - -/** - * optional bytes offer_signature = 8; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getOfferSignature()` - * @return {!Uint8Array} - */ -proto.poolrpc.DecodedSidecarTicket.prototype.getOfferSignature_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getOfferSignature())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.poolrpc.DecodedSidecarTicket} returns this - */ -proto.poolrpc.DecodedSidecarTicket.prototype.setOfferSignature = function(value) { - return jspb.Message.setProto3BytesField(this, 8, value); -}; - - -/** - * optional bool offer_auto = 9; - * @return {boolean} - */ -proto.poolrpc.DecodedSidecarTicket.prototype.getOfferAuto = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 9, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.poolrpc.DecodedSidecarTicket} returns this - */ -proto.poolrpc.DecodedSidecarTicket.prototype.setOfferAuto = function(value) { - return jspb.Message.setProto3BooleanField(this, 9, value); -}; - - -/** - * optional bytes recipient_node_pubkey = 10; - * @return {!(string|Uint8Array)} - */ -proto.poolrpc.DecodedSidecarTicket.prototype.getRecipientNodePubkey = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 10, "")); -}; - - -/** - * optional bytes recipient_node_pubkey = 10; - * This is a type-conversion wrapper around `getRecipientNodePubkey()` - * @return {string} - */ -proto.poolrpc.DecodedSidecarTicket.prototype.getRecipientNodePubkey_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getRecipientNodePubkey())); -}; - - -/** - * optional bytes recipient_node_pubkey = 10; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getRecipientNodePubkey()` - * @return {!Uint8Array} - */ -proto.poolrpc.DecodedSidecarTicket.prototype.getRecipientNodePubkey_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getRecipientNodePubkey())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.poolrpc.DecodedSidecarTicket} returns this - */ -proto.poolrpc.DecodedSidecarTicket.prototype.setRecipientNodePubkey = function(value) { - return jspb.Message.setProto3BytesField(this, 10, value); -}; - - -/** - * optional bytes recipient_multisig_pubkey = 11; - * @return {!(string|Uint8Array)} - */ -proto.poolrpc.DecodedSidecarTicket.prototype.getRecipientMultisigPubkey = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 11, "")); -}; - - -/** - * optional bytes recipient_multisig_pubkey = 11; - * This is a type-conversion wrapper around `getRecipientMultisigPubkey()` - * @return {string} - */ -proto.poolrpc.DecodedSidecarTicket.prototype.getRecipientMultisigPubkey_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getRecipientMultisigPubkey())); -}; - - -/** - * optional bytes recipient_multisig_pubkey = 11; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getRecipientMultisigPubkey()` - * @return {!Uint8Array} - */ -proto.poolrpc.DecodedSidecarTicket.prototype.getRecipientMultisigPubkey_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getRecipientMultisigPubkey())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.poolrpc.DecodedSidecarTicket} returns this - */ -proto.poolrpc.DecodedSidecarTicket.prototype.setRecipientMultisigPubkey = function(value) { - return jspb.Message.setProto3BytesField(this, 11, value); -}; - - -/** - * optional uint32 recipient_multisig_pubkey_index = 12; - * @return {number} - */ -proto.poolrpc.DecodedSidecarTicket.prototype.getRecipientMultisigPubkeyIndex = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 12, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.poolrpc.DecodedSidecarTicket} returns this - */ -proto.poolrpc.DecodedSidecarTicket.prototype.setRecipientMultisigPubkeyIndex = function(value) { - return jspb.Message.setProto3IntField(this, 12, value); -}; - - -/** - * optional bytes order_bid_nonce = 13; - * @return {!(string|Uint8Array)} - */ -proto.poolrpc.DecodedSidecarTicket.prototype.getOrderBidNonce = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 13, "")); -}; - - -/** - * optional bytes order_bid_nonce = 13; - * This is a type-conversion wrapper around `getOrderBidNonce()` - * @return {string} - */ -proto.poolrpc.DecodedSidecarTicket.prototype.getOrderBidNonce_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getOrderBidNonce())); -}; - - -/** - * optional bytes order_bid_nonce = 13; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getOrderBidNonce()` - * @return {!Uint8Array} - */ -proto.poolrpc.DecodedSidecarTicket.prototype.getOrderBidNonce_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getOrderBidNonce())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.poolrpc.DecodedSidecarTicket} returns this - */ -proto.poolrpc.DecodedSidecarTicket.prototype.setOrderBidNonce = function(value) { - return jspb.Message.setProto3BytesField(this, 13, value); -}; - - -/** - * optional bytes order_signature = 14; - * @return {!(string|Uint8Array)} - */ -proto.poolrpc.DecodedSidecarTicket.prototype.getOrderSignature = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 14, "")); -}; - - -/** - * optional bytes order_signature = 14; - * This is a type-conversion wrapper around `getOrderSignature()` - * @return {string} - */ -proto.poolrpc.DecodedSidecarTicket.prototype.getOrderSignature_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getOrderSignature())); -}; - - -/** - * optional bytes order_signature = 14; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getOrderSignature()` - * @return {!Uint8Array} - */ -proto.poolrpc.DecodedSidecarTicket.prototype.getOrderSignature_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getOrderSignature())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.poolrpc.DecodedSidecarTicket} returns this - */ -proto.poolrpc.DecodedSidecarTicket.prototype.setOrderSignature = function(value) { - return jspb.Message.setProto3BytesField(this, 14, value); -}; - - -/** - * optional bytes execution_pending_channel_id = 15; - * @return {!(string|Uint8Array)} - */ -proto.poolrpc.DecodedSidecarTicket.prototype.getExecutionPendingChannelId = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 15, "")); -}; - - -/** - * optional bytes execution_pending_channel_id = 15; - * This is a type-conversion wrapper around `getExecutionPendingChannelId()` - * @return {string} - */ -proto.poolrpc.DecodedSidecarTicket.prototype.getExecutionPendingChannelId_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getExecutionPendingChannelId())); -}; - - -/** - * optional bytes execution_pending_channel_id = 15; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getExecutionPendingChannelId()` - * @return {!Uint8Array} - */ -proto.poolrpc.DecodedSidecarTicket.prototype.getExecutionPendingChannelId_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getExecutionPendingChannelId())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.poolrpc.DecodedSidecarTicket} returns this - */ -proto.poolrpc.DecodedSidecarTicket.prototype.setExecutionPendingChannelId = function(value) { - return jspb.Message.setProto3BytesField(this, 15, value); -}; - - -/** - * optional string encoded_ticket = 16; - * @return {string} - */ -proto.poolrpc.DecodedSidecarTicket.prototype.getEncodedTicket = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 16, "")); -}; - - -/** - * @param {string} value - * @return {!proto.poolrpc.DecodedSidecarTicket} returns this - */ -proto.poolrpc.DecodedSidecarTicket.prototype.setEncodedTicket = function(value) { - return jspb.Message.setProto3StringField(this, 16, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.poolrpc.RegisterSidecarRequest.prototype.toObject = function(opt_includeInstance) { - return proto.poolrpc.RegisterSidecarRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.poolrpc.RegisterSidecarRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.RegisterSidecarRequest.toObject = function(includeInstance, msg) { - var f, obj = { - ticket: jspb.Message.getFieldWithDefault(msg, 1, ""), - autoNegotiate: jspb.Message.getBooleanFieldWithDefault(msg, 2, false) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.poolrpc.RegisterSidecarRequest} - */ -proto.poolrpc.RegisterSidecarRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.poolrpc.RegisterSidecarRequest; - return proto.poolrpc.RegisterSidecarRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.poolrpc.RegisterSidecarRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.poolrpc.RegisterSidecarRequest} - */ -proto.poolrpc.RegisterSidecarRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setTicket(value); - break; - case 2: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setAutoNegotiate(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.poolrpc.RegisterSidecarRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.poolrpc.RegisterSidecarRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.poolrpc.RegisterSidecarRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.RegisterSidecarRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getTicket(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getAutoNegotiate(); - if (f) { - writer.writeBool( - 2, - f - ); - } -}; - - -/** - * optional string ticket = 1; - * @return {string} - */ -proto.poolrpc.RegisterSidecarRequest.prototype.getTicket = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.poolrpc.RegisterSidecarRequest} returns this - */ -proto.poolrpc.RegisterSidecarRequest.prototype.setTicket = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional bool auto_negotiate = 2; - * @return {boolean} - */ -proto.poolrpc.RegisterSidecarRequest.prototype.getAutoNegotiate = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.poolrpc.RegisterSidecarRequest} returns this - */ -proto.poolrpc.RegisterSidecarRequest.prototype.setAutoNegotiate = function(value) { - return jspb.Message.setProto3BooleanField(this, 2, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.poolrpc.ExpectSidecarChannelRequest.prototype.toObject = function(opt_includeInstance) { - return proto.poolrpc.ExpectSidecarChannelRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.poolrpc.ExpectSidecarChannelRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.ExpectSidecarChannelRequest.toObject = function(includeInstance, msg) { - var f, obj = { - ticket: jspb.Message.getFieldWithDefault(msg, 1, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.poolrpc.ExpectSidecarChannelRequest} - */ -proto.poolrpc.ExpectSidecarChannelRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.poolrpc.ExpectSidecarChannelRequest; - return proto.poolrpc.ExpectSidecarChannelRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.poolrpc.ExpectSidecarChannelRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.poolrpc.ExpectSidecarChannelRequest} - */ -proto.poolrpc.ExpectSidecarChannelRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setTicket(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.poolrpc.ExpectSidecarChannelRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.poolrpc.ExpectSidecarChannelRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.poolrpc.ExpectSidecarChannelRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.ExpectSidecarChannelRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getTicket(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } -}; - - -/** - * optional string ticket = 1; - * @return {string} - */ -proto.poolrpc.ExpectSidecarChannelRequest.prototype.getTicket = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.poolrpc.ExpectSidecarChannelRequest} returns this - */ -proto.poolrpc.ExpectSidecarChannelRequest.prototype.setTicket = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.poolrpc.ExpectSidecarChannelResponse.prototype.toObject = function(opt_includeInstance) { - return proto.poolrpc.ExpectSidecarChannelResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.poolrpc.ExpectSidecarChannelResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.ExpectSidecarChannelResponse.toObject = function(includeInstance, msg) { - var f, obj = { - - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.poolrpc.ExpectSidecarChannelResponse} - */ -proto.poolrpc.ExpectSidecarChannelResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.poolrpc.ExpectSidecarChannelResponse; - return proto.poolrpc.ExpectSidecarChannelResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.poolrpc.ExpectSidecarChannelResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.poolrpc.ExpectSidecarChannelResponse} - */ -proto.poolrpc.ExpectSidecarChannelResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.poolrpc.ExpectSidecarChannelResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.poolrpc.ExpectSidecarChannelResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.poolrpc.ExpectSidecarChannelResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.ExpectSidecarChannelResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.poolrpc.ListSidecarsRequest.prototype.toObject = function(opt_includeInstance) { - return proto.poolrpc.ListSidecarsRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.poolrpc.ListSidecarsRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.ListSidecarsRequest.toObject = function(includeInstance, msg) { - var f, obj = { - sidecarId: msg.getSidecarId_asB64() - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.poolrpc.ListSidecarsRequest} - */ -proto.poolrpc.ListSidecarsRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.poolrpc.ListSidecarsRequest; - return proto.poolrpc.ListSidecarsRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.poolrpc.ListSidecarsRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.poolrpc.ListSidecarsRequest} - */ -proto.poolrpc.ListSidecarsRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setSidecarId(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.poolrpc.ListSidecarsRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.poolrpc.ListSidecarsRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.poolrpc.ListSidecarsRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.ListSidecarsRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getSidecarId_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } -}; - - -/** - * optional bytes sidecar_id = 1; - * @return {!(string|Uint8Array)} - */ -proto.poolrpc.ListSidecarsRequest.prototype.getSidecarId = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes sidecar_id = 1; - * This is a type-conversion wrapper around `getSidecarId()` - * @return {string} - */ -proto.poolrpc.ListSidecarsRequest.prototype.getSidecarId_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getSidecarId())); -}; - - -/** - * optional bytes sidecar_id = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getSidecarId()` - * @return {!Uint8Array} - */ -proto.poolrpc.ListSidecarsRequest.prototype.getSidecarId_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getSidecarId())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.poolrpc.ListSidecarsRequest} returns this - */ -proto.poolrpc.ListSidecarsRequest.prototype.setSidecarId = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.poolrpc.ListSidecarsResponse.repeatedFields_ = [1]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.poolrpc.ListSidecarsResponse.prototype.toObject = function(opt_includeInstance) { - return proto.poolrpc.ListSidecarsResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.poolrpc.ListSidecarsResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.ListSidecarsResponse.toObject = function(includeInstance, msg) { - var f, obj = { - ticketsList: jspb.Message.toObjectList(msg.getTicketsList(), - proto.poolrpc.DecodedSidecarTicket.toObject, includeInstance) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.poolrpc.ListSidecarsResponse} - */ -proto.poolrpc.ListSidecarsResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.poolrpc.ListSidecarsResponse; - return proto.poolrpc.ListSidecarsResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.poolrpc.ListSidecarsResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.poolrpc.ListSidecarsResponse} - */ -proto.poolrpc.ListSidecarsResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.poolrpc.DecodedSidecarTicket; - reader.readMessage(value,proto.poolrpc.DecodedSidecarTicket.deserializeBinaryFromReader); - msg.addTickets(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.poolrpc.ListSidecarsResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.poolrpc.ListSidecarsResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.poolrpc.ListSidecarsResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.ListSidecarsResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getTicketsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 1, - f, - proto.poolrpc.DecodedSidecarTicket.serializeBinaryToWriter - ); - } -}; - - -/** - * repeated DecodedSidecarTicket tickets = 1; - * @return {!Array} - */ -proto.poolrpc.ListSidecarsResponse.prototype.getTicketsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.poolrpc.DecodedSidecarTicket, 1)); -}; - - -/** - * @param {!Array} value - * @return {!proto.poolrpc.ListSidecarsResponse} returns this -*/ -proto.poolrpc.ListSidecarsResponse.prototype.setTicketsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); -}; - - -/** - * @param {!proto.poolrpc.DecodedSidecarTicket=} opt_value - * @param {number=} opt_index - * @return {!proto.poolrpc.DecodedSidecarTicket} - */ -proto.poolrpc.ListSidecarsResponse.prototype.addTickets = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.poolrpc.DecodedSidecarTicket, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.poolrpc.ListSidecarsResponse} returns this - */ -proto.poolrpc.ListSidecarsResponse.prototype.clearTicketsList = function() { - return this.setTicketsList([]); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.poolrpc.CancelSidecarRequest.prototype.toObject = function(opt_includeInstance) { - return proto.poolrpc.CancelSidecarRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.poolrpc.CancelSidecarRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.CancelSidecarRequest.toObject = function(includeInstance, msg) { - var f, obj = { - sidecarId: msg.getSidecarId_asB64() - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.poolrpc.CancelSidecarRequest} - */ -proto.poolrpc.CancelSidecarRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.poolrpc.CancelSidecarRequest; - return proto.poolrpc.CancelSidecarRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.poolrpc.CancelSidecarRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.poolrpc.CancelSidecarRequest} - */ -proto.poolrpc.CancelSidecarRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setSidecarId(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.poolrpc.CancelSidecarRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.poolrpc.CancelSidecarRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.poolrpc.CancelSidecarRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.CancelSidecarRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getSidecarId_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } -}; - - -/** - * optional bytes sidecar_id = 1; - * @return {!(string|Uint8Array)} - */ -proto.poolrpc.CancelSidecarRequest.prototype.getSidecarId = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes sidecar_id = 1; - * This is a type-conversion wrapper around `getSidecarId()` - * @return {string} - */ -proto.poolrpc.CancelSidecarRequest.prototype.getSidecarId_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getSidecarId())); -}; - - -/** - * optional bytes sidecar_id = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getSidecarId()` - * @return {!Uint8Array} - */ -proto.poolrpc.CancelSidecarRequest.prototype.getSidecarId_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getSidecarId())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.poolrpc.CancelSidecarRequest} returns this - */ -proto.poolrpc.CancelSidecarRequest.prototype.setSidecarId = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.poolrpc.CancelSidecarResponse.prototype.toObject = function(opt_includeInstance) { - return proto.poolrpc.CancelSidecarResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.poolrpc.CancelSidecarResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.CancelSidecarResponse.toObject = function(includeInstance, msg) { - var f, obj = { - - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.poolrpc.CancelSidecarResponse} - */ -proto.poolrpc.CancelSidecarResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.poolrpc.CancelSidecarResponse; - return proto.poolrpc.CancelSidecarResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.poolrpc.CancelSidecarResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.poolrpc.CancelSidecarResponse} - */ -proto.poolrpc.CancelSidecarResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.poolrpc.CancelSidecarResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.poolrpc.CancelSidecarResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.poolrpc.CancelSidecarResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.poolrpc.CancelSidecarResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; -}; - - -/** - * @enum {number} - */ -proto.poolrpc.AccountState = { - PENDING_OPEN: 0, - PENDING_UPDATE: 1, - OPEN: 2, - EXPIRED: 3, - PENDING_CLOSED: 4, - CLOSED: 5, - RECOVERY_FAILED: 6, - PENDING_BATCH: 7 -}; - -/** - * @enum {number} - */ -proto.poolrpc.MatchState = { - PREPARE: 0, - ACCEPTED: 1, - REJECTED: 2, - SIGNED: 3, - FINALIZED: 4 -}; - -/** - * @enum {number} - */ -proto.poolrpc.MatchRejectReason = { - NONE: 0, - SERVER_MISBEHAVIOR: 1, - BATCH_VERSION_MISMATCH: 2, - PARTIAL_REJECT_COLLATERAL: 3, - PARTIAL_REJECT_DUPLICATE_PEER: 4, - PARTIAL_REJECT_CHANNEL_FUNDING_FAILED: 5 -}; - -goog.object.extend(exports, proto.poolrpc); diff --git a/lib/types/generated/trader_pb_service.d.ts b/lib/types/generated/trader_pb_service.d.ts deleted file mode 100644 index 8d0f6ea..0000000 --- a/lib/types/generated/trader_pb_service.d.ts +++ /dev/null @@ -1,596 +0,0 @@ -// package: poolrpc -// file: trader.proto - -import * as trader_pb from "./trader_pb"; -import * as auctioneerrpc_auctioneer_pb from "./auctioneerrpc/auctioneer_pb"; -import {grpc} from "@improbable-eng/grpc-web"; - -type TraderGetInfo = { - readonly methodName: string; - readonly service: typeof Trader; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof trader_pb.GetInfoRequest; - readonly responseType: typeof trader_pb.GetInfoResponse; -}; - -type TraderStopDaemon = { - readonly methodName: string; - readonly service: typeof Trader; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof trader_pb.StopDaemonRequest; - readonly responseType: typeof trader_pb.StopDaemonResponse; -}; - -type TraderQuoteAccount = { - readonly methodName: string; - readonly service: typeof Trader; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof trader_pb.QuoteAccountRequest; - readonly responseType: typeof trader_pb.QuoteAccountResponse; -}; - -type TraderInitAccount = { - readonly methodName: string; - readonly service: typeof Trader; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof trader_pb.InitAccountRequest; - readonly responseType: typeof trader_pb.Account; -}; - -type TraderListAccounts = { - readonly methodName: string; - readonly service: typeof Trader; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof trader_pb.ListAccountsRequest; - readonly responseType: typeof trader_pb.ListAccountsResponse; -}; - -type TraderCloseAccount = { - readonly methodName: string; - readonly service: typeof Trader; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof trader_pb.CloseAccountRequest; - readonly responseType: typeof trader_pb.CloseAccountResponse; -}; - -type TraderWithdrawAccount = { - readonly methodName: string; - readonly service: typeof Trader; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof trader_pb.WithdrawAccountRequest; - readonly responseType: typeof trader_pb.WithdrawAccountResponse; -}; - -type TraderDepositAccount = { - readonly methodName: string; - readonly service: typeof Trader; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof trader_pb.DepositAccountRequest; - readonly responseType: typeof trader_pb.DepositAccountResponse; -}; - -type TraderRenewAccount = { - readonly methodName: string; - readonly service: typeof Trader; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof trader_pb.RenewAccountRequest; - readonly responseType: typeof trader_pb.RenewAccountResponse; -}; - -type TraderBumpAccountFee = { - readonly methodName: string; - readonly service: typeof Trader; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof trader_pb.BumpAccountFeeRequest; - readonly responseType: typeof trader_pb.BumpAccountFeeResponse; -}; - -type TraderRecoverAccounts = { - readonly methodName: string; - readonly service: typeof Trader; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof trader_pb.RecoverAccountsRequest; - readonly responseType: typeof trader_pb.RecoverAccountsResponse; -}; - -type TraderSubmitOrder = { - readonly methodName: string; - readonly service: typeof Trader; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof trader_pb.SubmitOrderRequest; - readonly responseType: typeof trader_pb.SubmitOrderResponse; -}; - -type TraderListOrders = { - readonly methodName: string; - readonly service: typeof Trader; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof trader_pb.ListOrdersRequest; - readonly responseType: typeof trader_pb.ListOrdersResponse; -}; - -type TraderCancelOrder = { - readonly methodName: string; - readonly service: typeof Trader; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof trader_pb.CancelOrderRequest; - readonly responseType: typeof trader_pb.CancelOrderResponse; -}; - -type TraderQuoteOrder = { - readonly methodName: string; - readonly service: typeof Trader; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof trader_pb.QuoteOrderRequest; - readonly responseType: typeof trader_pb.QuoteOrderResponse; -}; - -type TraderAuctionFee = { - readonly methodName: string; - readonly service: typeof Trader; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof trader_pb.AuctionFeeRequest; - readonly responseType: typeof trader_pb.AuctionFeeResponse; -}; - -type TraderLeaseDurations = { - readonly methodName: string; - readonly service: typeof Trader; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof trader_pb.LeaseDurationRequest; - readonly responseType: typeof trader_pb.LeaseDurationResponse; -}; - -type TraderNextBatchInfo = { - readonly methodName: string; - readonly service: typeof Trader; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof trader_pb.NextBatchInfoRequest; - readonly responseType: typeof trader_pb.NextBatchInfoResponse; -}; - -type TraderBatchSnapshot = { - readonly methodName: string; - readonly service: typeof Trader; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof auctioneerrpc_auctioneer_pb.BatchSnapshotRequest; - readonly responseType: typeof auctioneerrpc_auctioneer_pb.BatchSnapshotResponse; -}; - -type TraderGetLsatTokens = { - readonly methodName: string; - readonly service: typeof Trader; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof trader_pb.TokensRequest; - readonly responseType: typeof trader_pb.TokensResponse; -}; - -type TraderLeases = { - readonly methodName: string; - readonly service: typeof Trader; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof trader_pb.LeasesRequest; - readonly responseType: typeof trader_pb.LeasesResponse; -}; - -type TraderNodeRatings = { - readonly methodName: string; - readonly service: typeof Trader; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof trader_pb.NodeRatingRequest; - readonly responseType: typeof trader_pb.NodeRatingResponse; -}; - -type TraderBatchSnapshots = { - readonly methodName: string; - readonly service: typeof Trader; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof auctioneerrpc_auctioneer_pb.BatchSnapshotsRequest; - readonly responseType: typeof auctioneerrpc_auctioneer_pb.BatchSnapshotsResponse; -}; - -type TraderOfferSidecar = { - readonly methodName: string; - readonly service: typeof Trader; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof trader_pb.OfferSidecarRequest; - readonly responseType: typeof trader_pb.SidecarTicket; -}; - -type TraderRegisterSidecar = { - readonly methodName: string; - readonly service: typeof Trader; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof trader_pb.RegisterSidecarRequest; - readonly responseType: typeof trader_pb.SidecarTicket; -}; - -type TraderExpectSidecarChannel = { - readonly methodName: string; - readonly service: typeof Trader; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof trader_pb.ExpectSidecarChannelRequest; - readonly responseType: typeof trader_pb.ExpectSidecarChannelResponse; -}; - -type TraderDecodeSidecarTicket = { - readonly methodName: string; - readonly service: typeof Trader; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof trader_pb.SidecarTicket; - readonly responseType: typeof trader_pb.DecodedSidecarTicket; -}; - -type TraderListSidecars = { - readonly methodName: string; - readonly service: typeof Trader; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof trader_pb.ListSidecarsRequest; - readonly responseType: typeof trader_pb.ListSidecarsResponse; -}; - -type TraderCancelSidecar = { - readonly methodName: string; - readonly service: typeof Trader; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof trader_pb.CancelSidecarRequest; - readonly responseType: typeof trader_pb.CancelSidecarResponse; -}; - -export class Trader { - static readonly serviceName: string; - static readonly GetInfo: TraderGetInfo; - static readonly StopDaemon: TraderStopDaemon; - static readonly QuoteAccount: TraderQuoteAccount; - static readonly InitAccount: TraderInitAccount; - static readonly ListAccounts: TraderListAccounts; - static readonly CloseAccount: TraderCloseAccount; - static readonly WithdrawAccount: TraderWithdrawAccount; - static readonly DepositAccount: TraderDepositAccount; - static readonly RenewAccount: TraderRenewAccount; - static readonly BumpAccountFee: TraderBumpAccountFee; - static readonly RecoverAccounts: TraderRecoverAccounts; - static readonly SubmitOrder: TraderSubmitOrder; - static readonly ListOrders: TraderListOrders; - static readonly CancelOrder: TraderCancelOrder; - static readonly QuoteOrder: TraderQuoteOrder; - static readonly AuctionFee: TraderAuctionFee; - static readonly LeaseDurations: TraderLeaseDurations; - static readonly NextBatchInfo: TraderNextBatchInfo; - static readonly BatchSnapshot: TraderBatchSnapshot; - static readonly GetLsatTokens: TraderGetLsatTokens; - static readonly Leases: TraderLeases; - static readonly NodeRatings: TraderNodeRatings; - static readonly BatchSnapshots: TraderBatchSnapshots; - static readonly OfferSidecar: TraderOfferSidecar; - static readonly RegisterSidecar: TraderRegisterSidecar; - static readonly ExpectSidecarChannel: TraderExpectSidecarChannel; - static readonly DecodeSidecarTicket: TraderDecodeSidecarTicket; - static readonly ListSidecars: TraderListSidecars; - static readonly CancelSidecar: TraderCancelSidecar; -} - -export type ServiceError = { message: string, code: number; metadata: grpc.Metadata } -export type Status = { details: string, code: number; metadata: grpc.Metadata } - -interface UnaryResponse { - cancel(): void; -} -interface ResponseStream { - cancel(): void; - on(type: 'data', handler: (message: T) => void): ResponseStream; - on(type: 'end', handler: (status?: Status) => void): ResponseStream; - on(type: 'status', handler: (status: Status) => void): ResponseStream; -} -interface RequestStream { - write(message: T): RequestStream; - end(): void; - cancel(): void; - on(type: 'end', handler: (status?: Status) => void): RequestStream; - on(type: 'status', handler: (status: Status) => void): RequestStream; -} -interface BidirectionalStream { - write(message: ReqT): BidirectionalStream; - end(): void; - cancel(): void; - on(type: 'data', handler: (message: ResT) => void): BidirectionalStream; - on(type: 'end', handler: (status?: Status) => void): BidirectionalStream; - on(type: 'status', handler: (status: Status) => void): BidirectionalStream; -} - -export class TraderClient { - readonly serviceHost: string; - - constructor(serviceHost: string, options?: grpc.RpcOptions); - getInfo( - requestMessage: trader_pb.GetInfoRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: trader_pb.GetInfoResponse|null) => void - ): UnaryResponse; - getInfo( - requestMessage: trader_pb.GetInfoRequest, - callback: (error: ServiceError|null, responseMessage: trader_pb.GetInfoResponse|null) => void - ): UnaryResponse; - stopDaemon( - requestMessage: trader_pb.StopDaemonRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: trader_pb.StopDaemonResponse|null) => void - ): UnaryResponse; - stopDaemon( - requestMessage: trader_pb.StopDaemonRequest, - callback: (error: ServiceError|null, responseMessage: trader_pb.StopDaemonResponse|null) => void - ): UnaryResponse; - quoteAccount( - requestMessage: trader_pb.QuoteAccountRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: trader_pb.QuoteAccountResponse|null) => void - ): UnaryResponse; - quoteAccount( - requestMessage: trader_pb.QuoteAccountRequest, - callback: (error: ServiceError|null, responseMessage: trader_pb.QuoteAccountResponse|null) => void - ): UnaryResponse; - initAccount( - requestMessage: trader_pb.InitAccountRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: trader_pb.Account|null) => void - ): UnaryResponse; - initAccount( - requestMessage: trader_pb.InitAccountRequest, - callback: (error: ServiceError|null, responseMessage: trader_pb.Account|null) => void - ): UnaryResponse; - listAccounts( - requestMessage: trader_pb.ListAccountsRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: trader_pb.ListAccountsResponse|null) => void - ): UnaryResponse; - listAccounts( - requestMessage: trader_pb.ListAccountsRequest, - callback: (error: ServiceError|null, responseMessage: trader_pb.ListAccountsResponse|null) => void - ): UnaryResponse; - closeAccount( - requestMessage: trader_pb.CloseAccountRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: trader_pb.CloseAccountResponse|null) => void - ): UnaryResponse; - closeAccount( - requestMessage: trader_pb.CloseAccountRequest, - callback: (error: ServiceError|null, responseMessage: trader_pb.CloseAccountResponse|null) => void - ): UnaryResponse; - withdrawAccount( - requestMessage: trader_pb.WithdrawAccountRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: trader_pb.WithdrawAccountResponse|null) => void - ): UnaryResponse; - withdrawAccount( - requestMessage: trader_pb.WithdrawAccountRequest, - callback: (error: ServiceError|null, responseMessage: trader_pb.WithdrawAccountResponse|null) => void - ): UnaryResponse; - depositAccount( - requestMessage: trader_pb.DepositAccountRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: trader_pb.DepositAccountResponse|null) => void - ): UnaryResponse; - depositAccount( - requestMessage: trader_pb.DepositAccountRequest, - callback: (error: ServiceError|null, responseMessage: trader_pb.DepositAccountResponse|null) => void - ): UnaryResponse; - renewAccount( - requestMessage: trader_pb.RenewAccountRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: trader_pb.RenewAccountResponse|null) => void - ): UnaryResponse; - renewAccount( - requestMessage: trader_pb.RenewAccountRequest, - callback: (error: ServiceError|null, responseMessage: trader_pb.RenewAccountResponse|null) => void - ): UnaryResponse; - bumpAccountFee( - requestMessage: trader_pb.BumpAccountFeeRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: trader_pb.BumpAccountFeeResponse|null) => void - ): UnaryResponse; - bumpAccountFee( - requestMessage: trader_pb.BumpAccountFeeRequest, - callback: (error: ServiceError|null, responseMessage: trader_pb.BumpAccountFeeResponse|null) => void - ): UnaryResponse; - recoverAccounts( - requestMessage: trader_pb.RecoverAccountsRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: trader_pb.RecoverAccountsResponse|null) => void - ): UnaryResponse; - recoverAccounts( - requestMessage: trader_pb.RecoverAccountsRequest, - callback: (error: ServiceError|null, responseMessage: trader_pb.RecoverAccountsResponse|null) => void - ): UnaryResponse; - submitOrder( - requestMessage: trader_pb.SubmitOrderRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: trader_pb.SubmitOrderResponse|null) => void - ): UnaryResponse; - submitOrder( - requestMessage: trader_pb.SubmitOrderRequest, - callback: (error: ServiceError|null, responseMessage: trader_pb.SubmitOrderResponse|null) => void - ): UnaryResponse; - listOrders( - requestMessage: trader_pb.ListOrdersRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: trader_pb.ListOrdersResponse|null) => void - ): UnaryResponse; - listOrders( - requestMessage: trader_pb.ListOrdersRequest, - callback: (error: ServiceError|null, responseMessage: trader_pb.ListOrdersResponse|null) => void - ): UnaryResponse; - cancelOrder( - requestMessage: trader_pb.CancelOrderRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: trader_pb.CancelOrderResponse|null) => void - ): UnaryResponse; - cancelOrder( - requestMessage: trader_pb.CancelOrderRequest, - callback: (error: ServiceError|null, responseMessage: trader_pb.CancelOrderResponse|null) => void - ): UnaryResponse; - quoteOrder( - requestMessage: trader_pb.QuoteOrderRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: trader_pb.QuoteOrderResponse|null) => void - ): UnaryResponse; - quoteOrder( - requestMessage: trader_pb.QuoteOrderRequest, - callback: (error: ServiceError|null, responseMessage: trader_pb.QuoteOrderResponse|null) => void - ): UnaryResponse; - auctionFee( - requestMessage: trader_pb.AuctionFeeRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: trader_pb.AuctionFeeResponse|null) => void - ): UnaryResponse; - auctionFee( - requestMessage: trader_pb.AuctionFeeRequest, - callback: (error: ServiceError|null, responseMessage: trader_pb.AuctionFeeResponse|null) => void - ): UnaryResponse; - leaseDurations( - requestMessage: trader_pb.LeaseDurationRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: trader_pb.LeaseDurationResponse|null) => void - ): UnaryResponse; - leaseDurations( - requestMessage: trader_pb.LeaseDurationRequest, - callback: (error: ServiceError|null, responseMessage: trader_pb.LeaseDurationResponse|null) => void - ): UnaryResponse; - nextBatchInfo( - requestMessage: trader_pb.NextBatchInfoRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: trader_pb.NextBatchInfoResponse|null) => void - ): UnaryResponse; - nextBatchInfo( - requestMessage: trader_pb.NextBatchInfoRequest, - callback: (error: ServiceError|null, responseMessage: trader_pb.NextBatchInfoResponse|null) => void - ): UnaryResponse; - batchSnapshot( - requestMessage: auctioneerrpc_auctioneer_pb.BatchSnapshotRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: auctioneerrpc_auctioneer_pb.BatchSnapshotResponse|null) => void - ): UnaryResponse; - batchSnapshot( - requestMessage: auctioneerrpc_auctioneer_pb.BatchSnapshotRequest, - callback: (error: ServiceError|null, responseMessage: auctioneerrpc_auctioneer_pb.BatchSnapshotResponse|null) => void - ): UnaryResponse; - getLsatTokens( - requestMessage: trader_pb.TokensRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: trader_pb.TokensResponse|null) => void - ): UnaryResponse; - getLsatTokens( - requestMessage: trader_pb.TokensRequest, - callback: (error: ServiceError|null, responseMessage: trader_pb.TokensResponse|null) => void - ): UnaryResponse; - leases( - requestMessage: trader_pb.LeasesRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: trader_pb.LeasesResponse|null) => void - ): UnaryResponse; - leases( - requestMessage: trader_pb.LeasesRequest, - callback: (error: ServiceError|null, responseMessage: trader_pb.LeasesResponse|null) => void - ): UnaryResponse; - nodeRatings( - requestMessage: trader_pb.NodeRatingRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: trader_pb.NodeRatingResponse|null) => void - ): UnaryResponse; - nodeRatings( - requestMessage: trader_pb.NodeRatingRequest, - callback: (error: ServiceError|null, responseMessage: trader_pb.NodeRatingResponse|null) => void - ): UnaryResponse; - batchSnapshots( - requestMessage: auctioneerrpc_auctioneer_pb.BatchSnapshotsRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: auctioneerrpc_auctioneer_pb.BatchSnapshotsResponse|null) => void - ): UnaryResponse; - batchSnapshots( - requestMessage: auctioneerrpc_auctioneer_pb.BatchSnapshotsRequest, - callback: (error: ServiceError|null, responseMessage: auctioneerrpc_auctioneer_pb.BatchSnapshotsResponse|null) => void - ): UnaryResponse; - offerSidecar( - requestMessage: trader_pb.OfferSidecarRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: trader_pb.SidecarTicket|null) => void - ): UnaryResponse; - offerSidecar( - requestMessage: trader_pb.OfferSidecarRequest, - callback: (error: ServiceError|null, responseMessage: trader_pb.SidecarTicket|null) => void - ): UnaryResponse; - registerSidecar( - requestMessage: trader_pb.RegisterSidecarRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: trader_pb.SidecarTicket|null) => void - ): UnaryResponse; - registerSidecar( - requestMessage: trader_pb.RegisterSidecarRequest, - callback: (error: ServiceError|null, responseMessage: trader_pb.SidecarTicket|null) => void - ): UnaryResponse; - expectSidecarChannel( - requestMessage: trader_pb.ExpectSidecarChannelRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: trader_pb.ExpectSidecarChannelResponse|null) => void - ): UnaryResponse; - expectSidecarChannel( - requestMessage: trader_pb.ExpectSidecarChannelRequest, - callback: (error: ServiceError|null, responseMessage: trader_pb.ExpectSidecarChannelResponse|null) => void - ): UnaryResponse; - decodeSidecarTicket( - requestMessage: trader_pb.SidecarTicket, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: trader_pb.DecodedSidecarTicket|null) => void - ): UnaryResponse; - decodeSidecarTicket( - requestMessage: trader_pb.SidecarTicket, - callback: (error: ServiceError|null, responseMessage: trader_pb.DecodedSidecarTicket|null) => void - ): UnaryResponse; - listSidecars( - requestMessage: trader_pb.ListSidecarsRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: trader_pb.ListSidecarsResponse|null) => void - ): UnaryResponse; - listSidecars( - requestMessage: trader_pb.ListSidecarsRequest, - callback: (error: ServiceError|null, responseMessage: trader_pb.ListSidecarsResponse|null) => void - ): UnaryResponse; - cancelSidecar( - requestMessage: trader_pb.CancelSidecarRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: trader_pb.CancelSidecarResponse|null) => void - ): UnaryResponse; - cancelSidecar( - requestMessage: trader_pb.CancelSidecarRequest, - callback: (error: ServiceError|null, responseMessage: trader_pb.CancelSidecarResponse|null) => void - ): UnaryResponse; -} - diff --git a/lib/types/generated/trader_pb_service.js b/lib/types/generated/trader_pb_service.js deleted file mode 100644 index f997521..0000000 --- a/lib/types/generated/trader_pb_service.js +++ /dev/null @@ -1,1182 +0,0 @@ -// package: poolrpc -// file: trader.proto - -var trader_pb = require("./trader_pb"); -var auctioneerrpc_auctioneer_pb = require("./auctioneerrpc/auctioneer_pb"); -var grpc = require("@improbable-eng/grpc-web").grpc; - -var Trader = (function () { - function Trader() {} - Trader.serviceName = "poolrpc.Trader"; - return Trader; -}()); - -Trader.GetInfo = { - methodName: "GetInfo", - service: Trader, - requestStream: false, - responseStream: false, - requestType: trader_pb.GetInfoRequest, - responseType: trader_pb.GetInfoResponse -}; - -Trader.StopDaemon = { - methodName: "StopDaemon", - service: Trader, - requestStream: false, - responseStream: false, - requestType: trader_pb.StopDaemonRequest, - responseType: trader_pb.StopDaemonResponse -}; - -Trader.QuoteAccount = { - methodName: "QuoteAccount", - service: Trader, - requestStream: false, - responseStream: false, - requestType: trader_pb.QuoteAccountRequest, - responseType: trader_pb.QuoteAccountResponse -}; - -Trader.InitAccount = { - methodName: "InitAccount", - service: Trader, - requestStream: false, - responseStream: false, - requestType: trader_pb.InitAccountRequest, - responseType: trader_pb.Account -}; - -Trader.ListAccounts = { - methodName: "ListAccounts", - service: Trader, - requestStream: false, - responseStream: false, - requestType: trader_pb.ListAccountsRequest, - responseType: trader_pb.ListAccountsResponse -}; - -Trader.CloseAccount = { - methodName: "CloseAccount", - service: Trader, - requestStream: false, - responseStream: false, - requestType: trader_pb.CloseAccountRequest, - responseType: trader_pb.CloseAccountResponse -}; - -Trader.WithdrawAccount = { - methodName: "WithdrawAccount", - service: Trader, - requestStream: false, - responseStream: false, - requestType: trader_pb.WithdrawAccountRequest, - responseType: trader_pb.WithdrawAccountResponse -}; - -Trader.DepositAccount = { - methodName: "DepositAccount", - service: Trader, - requestStream: false, - responseStream: false, - requestType: trader_pb.DepositAccountRequest, - responseType: trader_pb.DepositAccountResponse -}; - -Trader.RenewAccount = { - methodName: "RenewAccount", - service: Trader, - requestStream: false, - responseStream: false, - requestType: trader_pb.RenewAccountRequest, - responseType: trader_pb.RenewAccountResponse -}; - -Trader.BumpAccountFee = { - methodName: "BumpAccountFee", - service: Trader, - requestStream: false, - responseStream: false, - requestType: trader_pb.BumpAccountFeeRequest, - responseType: trader_pb.BumpAccountFeeResponse -}; - -Trader.RecoverAccounts = { - methodName: "RecoverAccounts", - service: Trader, - requestStream: false, - responseStream: false, - requestType: trader_pb.RecoverAccountsRequest, - responseType: trader_pb.RecoverAccountsResponse -}; - -Trader.SubmitOrder = { - methodName: "SubmitOrder", - service: Trader, - requestStream: false, - responseStream: false, - requestType: trader_pb.SubmitOrderRequest, - responseType: trader_pb.SubmitOrderResponse -}; - -Trader.ListOrders = { - methodName: "ListOrders", - service: Trader, - requestStream: false, - responseStream: false, - requestType: trader_pb.ListOrdersRequest, - responseType: trader_pb.ListOrdersResponse -}; - -Trader.CancelOrder = { - methodName: "CancelOrder", - service: Trader, - requestStream: false, - responseStream: false, - requestType: trader_pb.CancelOrderRequest, - responseType: trader_pb.CancelOrderResponse -}; - -Trader.QuoteOrder = { - methodName: "QuoteOrder", - service: Trader, - requestStream: false, - responseStream: false, - requestType: trader_pb.QuoteOrderRequest, - responseType: trader_pb.QuoteOrderResponse -}; - -Trader.AuctionFee = { - methodName: "AuctionFee", - service: Trader, - requestStream: false, - responseStream: false, - requestType: trader_pb.AuctionFeeRequest, - responseType: trader_pb.AuctionFeeResponse -}; - -Trader.LeaseDurations = { - methodName: "LeaseDurations", - service: Trader, - requestStream: false, - responseStream: false, - requestType: trader_pb.LeaseDurationRequest, - responseType: trader_pb.LeaseDurationResponse -}; - -Trader.NextBatchInfo = { - methodName: "NextBatchInfo", - service: Trader, - requestStream: false, - responseStream: false, - requestType: trader_pb.NextBatchInfoRequest, - responseType: trader_pb.NextBatchInfoResponse -}; - -Trader.BatchSnapshot = { - methodName: "BatchSnapshot", - service: Trader, - requestStream: false, - responseStream: false, - requestType: auctioneerrpc_auctioneer_pb.BatchSnapshotRequest, - responseType: auctioneerrpc_auctioneer_pb.BatchSnapshotResponse -}; - -Trader.GetLsatTokens = { - methodName: "GetLsatTokens", - service: Trader, - requestStream: false, - responseStream: false, - requestType: trader_pb.TokensRequest, - responseType: trader_pb.TokensResponse -}; - -Trader.Leases = { - methodName: "Leases", - service: Trader, - requestStream: false, - responseStream: false, - requestType: trader_pb.LeasesRequest, - responseType: trader_pb.LeasesResponse -}; - -Trader.NodeRatings = { - methodName: "NodeRatings", - service: Trader, - requestStream: false, - responseStream: false, - requestType: trader_pb.NodeRatingRequest, - responseType: trader_pb.NodeRatingResponse -}; - -Trader.BatchSnapshots = { - methodName: "BatchSnapshots", - service: Trader, - requestStream: false, - responseStream: false, - requestType: auctioneerrpc_auctioneer_pb.BatchSnapshotsRequest, - responseType: auctioneerrpc_auctioneer_pb.BatchSnapshotsResponse -}; - -Trader.OfferSidecar = { - methodName: "OfferSidecar", - service: Trader, - requestStream: false, - responseStream: false, - requestType: trader_pb.OfferSidecarRequest, - responseType: trader_pb.SidecarTicket -}; - -Trader.RegisterSidecar = { - methodName: "RegisterSidecar", - service: Trader, - requestStream: false, - responseStream: false, - requestType: trader_pb.RegisterSidecarRequest, - responseType: trader_pb.SidecarTicket -}; - -Trader.ExpectSidecarChannel = { - methodName: "ExpectSidecarChannel", - service: Trader, - requestStream: false, - responseStream: false, - requestType: trader_pb.ExpectSidecarChannelRequest, - responseType: trader_pb.ExpectSidecarChannelResponse -}; - -Trader.DecodeSidecarTicket = { - methodName: "DecodeSidecarTicket", - service: Trader, - requestStream: false, - responseStream: false, - requestType: trader_pb.SidecarTicket, - responseType: trader_pb.DecodedSidecarTicket -}; - -Trader.ListSidecars = { - methodName: "ListSidecars", - service: Trader, - requestStream: false, - responseStream: false, - requestType: trader_pb.ListSidecarsRequest, - responseType: trader_pb.ListSidecarsResponse -}; - -Trader.CancelSidecar = { - methodName: "CancelSidecar", - service: Trader, - requestStream: false, - responseStream: false, - requestType: trader_pb.CancelSidecarRequest, - responseType: trader_pb.CancelSidecarResponse -}; - -exports.Trader = Trader; - -function TraderClient(serviceHost, options) { - this.serviceHost = serviceHost; - this.options = options || {}; -} - -TraderClient.prototype.getInfo = function getInfo(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(Trader.GetInfo, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -TraderClient.prototype.stopDaemon = function stopDaemon(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(Trader.StopDaemon, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -TraderClient.prototype.quoteAccount = function quoteAccount(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(Trader.QuoteAccount, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -TraderClient.prototype.initAccount = function initAccount(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(Trader.InitAccount, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -TraderClient.prototype.listAccounts = function listAccounts(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(Trader.ListAccounts, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -TraderClient.prototype.closeAccount = function closeAccount(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(Trader.CloseAccount, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -TraderClient.prototype.withdrawAccount = function withdrawAccount(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(Trader.WithdrawAccount, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -TraderClient.prototype.depositAccount = function depositAccount(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(Trader.DepositAccount, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -TraderClient.prototype.renewAccount = function renewAccount(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(Trader.RenewAccount, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -TraderClient.prototype.bumpAccountFee = function bumpAccountFee(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(Trader.BumpAccountFee, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -TraderClient.prototype.recoverAccounts = function recoverAccounts(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(Trader.RecoverAccounts, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -TraderClient.prototype.submitOrder = function submitOrder(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(Trader.SubmitOrder, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -TraderClient.prototype.listOrders = function listOrders(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(Trader.ListOrders, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -TraderClient.prototype.cancelOrder = function cancelOrder(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(Trader.CancelOrder, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -TraderClient.prototype.quoteOrder = function quoteOrder(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(Trader.QuoteOrder, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -TraderClient.prototype.auctionFee = function auctionFee(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(Trader.AuctionFee, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -TraderClient.prototype.leaseDurations = function leaseDurations(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(Trader.LeaseDurations, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -TraderClient.prototype.nextBatchInfo = function nextBatchInfo(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(Trader.NextBatchInfo, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -TraderClient.prototype.batchSnapshot = function batchSnapshot(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(Trader.BatchSnapshot, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -TraderClient.prototype.getLsatTokens = function getLsatTokens(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(Trader.GetLsatTokens, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -TraderClient.prototype.leases = function leases(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(Trader.Leases, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -TraderClient.prototype.nodeRatings = function nodeRatings(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(Trader.NodeRatings, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -TraderClient.prototype.batchSnapshots = function batchSnapshots(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(Trader.BatchSnapshots, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -TraderClient.prototype.offerSidecar = function offerSidecar(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(Trader.OfferSidecar, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -TraderClient.prototype.registerSidecar = function registerSidecar(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(Trader.RegisterSidecar, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -TraderClient.prototype.expectSidecarChannel = function expectSidecarChannel(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(Trader.ExpectSidecarChannel, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -TraderClient.prototype.decodeSidecarTicket = function decodeSidecarTicket(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(Trader.DecodeSidecarTicket, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -TraderClient.prototype.listSidecars = function listSidecars(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(Trader.ListSidecars, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -TraderClient.prototype.cancelSidecar = function cancelSidecar(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(Trader.CancelSidecar, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -exports.TraderClient = TraderClient; - diff --git a/lib/types/generated/walletrpc/walletkit_pb.d.ts b/lib/types/generated/walletrpc/walletkit_pb.d.ts deleted file mode 100644 index d54280c..0000000 --- a/lib/types/generated/walletrpc/walletkit_pb.d.ts +++ /dev/null @@ -1,1179 +0,0 @@ -// package: walletrpc -// file: walletrpc/walletkit.proto - -import * as jspb from "google-protobuf"; -import * as lightning_pb from "../lightning_pb"; -import * as signrpc_signer_pb from "../signrpc/signer_pb"; - -export class ListUnspentRequest extends jspb.Message { - getMinConfs(): number; - setMinConfs(value: number): void; - - getMaxConfs(): number; - setMaxConfs(value: number): void; - - getAccount(): string; - setAccount(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ListUnspentRequest.AsObject; - static toObject(includeInstance: boolean, msg: ListUnspentRequest): ListUnspentRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ListUnspentRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ListUnspentRequest; - static deserializeBinaryFromReader(message: ListUnspentRequest, reader: jspb.BinaryReader): ListUnspentRequest; -} - -export namespace ListUnspentRequest { - export type AsObject = { - minConfs: number, - maxConfs: number, - account: string, - } -} - -export class ListUnspentResponse extends jspb.Message { - clearUtxosList(): void; - getUtxosList(): Array; - setUtxosList(value: Array): void; - addUtxos(value?: lightning_pb.Utxo, index?: number): lightning_pb.Utxo; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ListUnspentResponse.AsObject; - static toObject(includeInstance: boolean, msg: ListUnspentResponse): ListUnspentResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ListUnspentResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ListUnspentResponse; - static deserializeBinaryFromReader(message: ListUnspentResponse, reader: jspb.BinaryReader): ListUnspentResponse; -} - -export namespace ListUnspentResponse { - export type AsObject = { - utxos: Array, - } -} - -export class LeaseOutputRequest extends jspb.Message { - getId(): Uint8Array | string; - getId_asU8(): Uint8Array; - getId_asB64(): string; - setId(value: Uint8Array | string): void; - - hasOutpoint(): boolean; - clearOutpoint(): void; - getOutpoint(): lightning_pb.OutPoint | undefined; - setOutpoint(value?: lightning_pb.OutPoint): void; - - getExpirationSeconds(): number; - setExpirationSeconds(value: number): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): LeaseOutputRequest.AsObject; - static toObject(includeInstance: boolean, msg: LeaseOutputRequest): LeaseOutputRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: LeaseOutputRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): LeaseOutputRequest; - static deserializeBinaryFromReader(message: LeaseOutputRequest, reader: jspb.BinaryReader): LeaseOutputRequest; -} - -export namespace LeaseOutputRequest { - export type AsObject = { - id: Uint8Array | string, - outpoint?: lightning_pb.OutPoint.AsObject, - expirationSeconds: number, - } -} - -export class LeaseOutputResponse extends jspb.Message { - getExpiration(): number; - setExpiration(value: number): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): LeaseOutputResponse.AsObject; - static toObject(includeInstance: boolean, msg: LeaseOutputResponse): LeaseOutputResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: LeaseOutputResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): LeaseOutputResponse; - static deserializeBinaryFromReader(message: LeaseOutputResponse, reader: jspb.BinaryReader): LeaseOutputResponse; -} - -export namespace LeaseOutputResponse { - export type AsObject = { - expiration: number, - } -} - -export class ReleaseOutputRequest extends jspb.Message { - getId(): Uint8Array | string; - getId_asU8(): Uint8Array; - getId_asB64(): string; - setId(value: Uint8Array | string): void; - - hasOutpoint(): boolean; - clearOutpoint(): void; - getOutpoint(): lightning_pb.OutPoint | undefined; - setOutpoint(value?: lightning_pb.OutPoint): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ReleaseOutputRequest.AsObject; - static toObject(includeInstance: boolean, msg: ReleaseOutputRequest): ReleaseOutputRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ReleaseOutputRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ReleaseOutputRequest; - static deserializeBinaryFromReader(message: ReleaseOutputRequest, reader: jspb.BinaryReader): ReleaseOutputRequest; -} - -export namespace ReleaseOutputRequest { - export type AsObject = { - id: Uint8Array | string, - outpoint?: lightning_pb.OutPoint.AsObject, - } -} - -export class ReleaseOutputResponse extends jspb.Message { - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ReleaseOutputResponse.AsObject; - static toObject(includeInstance: boolean, msg: ReleaseOutputResponse): ReleaseOutputResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ReleaseOutputResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ReleaseOutputResponse; - static deserializeBinaryFromReader(message: ReleaseOutputResponse, reader: jspb.BinaryReader): ReleaseOutputResponse; -} - -export namespace ReleaseOutputResponse { - export type AsObject = { - } -} - -export class KeyReq extends jspb.Message { - getKeyFingerPrint(): number; - setKeyFingerPrint(value: number): void; - - getKeyFamily(): number; - setKeyFamily(value: number): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): KeyReq.AsObject; - static toObject(includeInstance: boolean, msg: KeyReq): KeyReq.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: KeyReq, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): KeyReq; - static deserializeBinaryFromReader(message: KeyReq, reader: jspb.BinaryReader): KeyReq; -} - -export namespace KeyReq { - export type AsObject = { - keyFingerPrint: number, - keyFamily: number, - } -} - -export class AddrRequest extends jspb.Message { - getAccount(): string; - setAccount(value: string): void; - - getType(): AddressTypeMap[keyof AddressTypeMap]; - setType(value: AddressTypeMap[keyof AddressTypeMap]): void; - - getChange(): boolean; - setChange(value: boolean): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): AddrRequest.AsObject; - static toObject(includeInstance: boolean, msg: AddrRequest): AddrRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: AddrRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): AddrRequest; - static deserializeBinaryFromReader(message: AddrRequest, reader: jspb.BinaryReader): AddrRequest; -} - -export namespace AddrRequest { - export type AsObject = { - account: string, - type: AddressTypeMap[keyof AddressTypeMap], - change: boolean, - } -} - -export class AddrResponse extends jspb.Message { - getAddr(): string; - setAddr(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): AddrResponse.AsObject; - static toObject(includeInstance: boolean, msg: AddrResponse): AddrResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: AddrResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): AddrResponse; - static deserializeBinaryFromReader(message: AddrResponse, reader: jspb.BinaryReader): AddrResponse; -} - -export namespace AddrResponse { - export type AsObject = { - addr: string, - } -} - -export class Account extends jspb.Message { - getName(): string; - setName(value: string): void; - - getAddressType(): AddressTypeMap[keyof AddressTypeMap]; - setAddressType(value: AddressTypeMap[keyof AddressTypeMap]): void; - - getExtendedPublicKey(): string; - setExtendedPublicKey(value: string): void; - - getMasterKeyFingerprint(): Uint8Array | string; - getMasterKeyFingerprint_asU8(): Uint8Array; - getMasterKeyFingerprint_asB64(): string; - setMasterKeyFingerprint(value: Uint8Array | string): void; - - getDerivationPath(): string; - setDerivationPath(value: string): void; - - getExternalKeyCount(): number; - setExternalKeyCount(value: number): void; - - getInternalKeyCount(): number; - setInternalKeyCount(value: number): void; - - getWatchOnly(): boolean; - setWatchOnly(value: boolean): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Account.AsObject; - static toObject(includeInstance: boolean, msg: Account): Account.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: Account, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Account; - static deserializeBinaryFromReader(message: Account, reader: jspb.BinaryReader): Account; -} - -export namespace Account { - export type AsObject = { - name: string, - addressType: AddressTypeMap[keyof AddressTypeMap], - extendedPublicKey: string, - masterKeyFingerprint: Uint8Array | string, - derivationPath: string, - externalKeyCount: number, - internalKeyCount: number, - watchOnly: boolean, - } -} - -export class ListAccountsRequest extends jspb.Message { - getName(): string; - setName(value: string): void; - - getAddressType(): AddressTypeMap[keyof AddressTypeMap]; - setAddressType(value: AddressTypeMap[keyof AddressTypeMap]): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ListAccountsRequest.AsObject; - static toObject(includeInstance: boolean, msg: ListAccountsRequest): ListAccountsRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ListAccountsRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ListAccountsRequest; - static deserializeBinaryFromReader(message: ListAccountsRequest, reader: jspb.BinaryReader): ListAccountsRequest; -} - -export namespace ListAccountsRequest { - export type AsObject = { - name: string, - addressType: AddressTypeMap[keyof AddressTypeMap], - } -} - -export class ListAccountsResponse extends jspb.Message { - clearAccountsList(): void; - getAccountsList(): Array; - setAccountsList(value: Array): void; - addAccounts(value?: Account, index?: number): Account; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ListAccountsResponse.AsObject; - static toObject(includeInstance: boolean, msg: ListAccountsResponse): ListAccountsResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ListAccountsResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ListAccountsResponse; - static deserializeBinaryFromReader(message: ListAccountsResponse, reader: jspb.BinaryReader): ListAccountsResponse; -} - -export namespace ListAccountsResponse { - export type AsObject = { - accounts: Array, - } -} - -export class ImportAccountRequest extends jspb.Message { - getName(): string; - setName(value: string): void; - - getExtendedPublicKey(): string; - setExtendedPublicKey(value: string): void; - - getMasterKeyFingerprint(): Uint8Array | string; - getMasterKeyFingerprint_asU8(): Uint8Array; - getMasterKeyFingerprint_asB64(): string; - setMasterKeyFingerprint(value: Uint8Array | string): void; - - getAddressType(): AddressTypeMap[keyof AddressTypeMap]; - setAddressType(value: AddressTypeMap[keyof AddressTypeMap]): void; - - getDryRun(): boolean; - setDryRun(value: boolean): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ImportAccountRequest.AsObject; - static toObject(includeInstance: boolean, msg: ImportAccountRequest): ImportAccountRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ImportAccountRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ImportAccountRequest; - static deserializeBinaryFromReader(message: ImportAccountRequest, reader: jspb.BinaryReader): ImportAccountRequest; -} - -export namespace ImportAccountRequest { - export type AsObject = { - name: string, - extendedPublicKey: string, - masterKeyFingerprint: Uint8Array | string, - addressType: AddressTypeMap[keyof AddressTypeMap], - dryRun: boolean, - } -} - -export class ImportAccountResponse extends jspb.Message { - hasAccount(): boolean; - clearAccount(): void; - getAccount(): Account | undefined; - setAccount(value?: Account): void; - - clearDryRunExternalAddrsList(): void; - getDryRunExternalAddrsList(): Array; - setDryRunExternalAddrsList(value: Array): void; - addDryRunExternalAddrs(value: string, index?: number): string; - - clearDryRunInternalAddrsList(): void; - getDryRunInternalAddrsList(): Array; - setDryRunInternalAddrsList(value: Array): void; - addDryRunInternalAddrs(value: string, index?: number): string; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ImportAccountResponse.AsObject; - static toObject(includeInstance: boolean, msg: ImportAccountResponse): ImportAccountResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ImportAccountResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ImportAccountResponse; - static deserializeBinaryFromReader(message: ImportAccountResponse, reader: jspb.BinaryReader): ImportAccountResponse; -} - -export namespace ImportAccountResponse { - export type AsObject = { - account?: Account.AsObject, - dryRunExternalAddrs: Array, - dryRunInternalAddrs: Array, - } -} - -export class ImportPublicKeyRequest extends jspb.Message { - getPublicKey(): Uint8Array | string; - getPublicKey_asU8(): Uint8Array; - getPublicKey_asB64(): string; - setPublicKey(value: Uint8Array | string): void; - - getAddressType(): AddressTypeMap[keyof AddressTypeMap]; - setAddressType(value: AddressTypeMap[keyof AddressTypeMap]): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ImportPublicKeyRequest.AsObject; - static toObject(includeInstance: boolean, msg: ImportPublicKeyRequest): ImportPublicKeyRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ImportPublicKeyRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ImportPublicKeyRequest; - static deserializeBinaryFromReader(message: ImportPublicKeyRequest, reader: jspb.BinaryReader): ImportPublicKeyRequest; -} - -export namespace ImportPublicKeyRequest { - export type AsObject = { - publicKey: Uint8Array | string, - addressType: AddressTypeMap[keyof AddressTypeMap], - } -} - -export class ImportPublicKeyResponse extends jspb.Message { - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ImportPublicKeyResponse.AsObject; - static toObject(includeInstance: boolean, msg: ImportPublicKeyResponse): ImportPublicKeyResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ImportPublicKeyResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ImportPublicKeyResponse; - static deserializeBinaryFromReader(message: ImportPublicKeyResponse, reader: jspb.BinaryReader): ImportPublicKeyResponse; -} - -export namespace ImportPublicKeyResponse { - export type AsObject = { - } -} - -export class Transaction extends jspb.Message { - getTxHex(): Uint8Array | string; - getTxHex_asU8(): Uint8Array; - getTxHex_asB64(): string; - setTxHex(value: Uint8Array | string): void; - - getLabel(): string; - setLabel(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Transaction.AsObject; - static toObject(includeInstance: boolean, msg: Transaction): Transaction.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: Transaction, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Transaction; - static deserializeBinaryFromReader(message: Transaction, reader: jspb.BinaryReader): Transaction; -} - -export namespace Transaction { - export type AsObject = { - txHex: Uint8Array | string, - label: string, - } -} - -export class PublishResponse extends jspb.Message { - getPublishError(): string; - setPublishError(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): PublishResponse.AsObject; - static toObject(includeInstance: boolean, msg: PublishResponse): PublishResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: PublishResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): PublishResponse; - static deserializeBinaryFromReader(message: PublishResponse, reader: jspb.BinaryReader): PublishResponse; -} - -export namespace PublishResponse { - export type AsObject = { - publishError: string, - } -} - -export class SendOutputsRequest extends jspb.Message { - getSatPerKw(): number; - setSatPerKw(value: number): void; - - clearOutputsList(): void; - getOutputsList(): Array; - setOutputsList(value: Array): void; - addOutputs(value?: signrpc_signer_pb.TxOut, index?: number): signrpc_signer_pb.TxOut; - - getLabel(): string; - setLabel(value: string): void; - - getMinConfs(): number; - setMinConfs(value: number): void; - - getSpendUnconfirmed(): boolean; - setSpendUnconfirmed(value: boolean): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): SendOutputsRequest.AsObject; - static toObject(includeInstance: boolean, msg: SendOutputsRequest): SendOutputsRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: SendOutputsRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): SendOutputsRequest; - static deserializeBinaryFromReader(message: SendOutputsRequest, reader: jspb.BinaryReader): SendOutputsRequest; -} - -export namespace SendOutputsRequest { - export type AsObject = { - satPerKw: number, - outputs: Array, - label: string, - minConfs: number, - spendUnconfirmed: boolean, - } -} - -export class SendOutputsResponse extends jspb.Message { - getRawTx(): Uint8Array | string; - getRawTx_asU8(): Uint8Array; - getRawTx_asB64(): string; - setRawTx(value: Uint8Array | string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): SendOutputsResponse.AsObject; - static toObject(includeInstance: boolean, msg: SendOutputsResponse): SendOutputsResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: SendOutputsResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): SendOutputsResponse; - static deserializeBinaryFromReader(message: SendOutputsResponse, reader: jspb.BinaryReader): SendOutputsResponse; -} - -export namespace SendOutputsResponse { - export type AsObject = { - rawTx: Uint8Array | string, - } -} - -export class EstimateFeeRequest extends jspb.Message { - getConfTarget(): number; - setConfTarget(value: number): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): EstimateFeeRequest.AsObject; - static toObject(includeInstance: boolean, msg: EstimateFeeRequest): EstimateFeeRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: EstimateFeeRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): EstimateFeeRequest; - static deserializeBinaryFromReader(message: EstimateFeeRequest, reader: jspb.BinaryReader): EstimateFeeRequest; -} - -export namespace EstimateFeeRequest { - export type AsObject = { - confTarget: number, - } -} - -export class EstimateFeeResponse extends jspb.Message { - getSatPerKw(): number; - setSatPerKw(value: number): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): EstimateFeeResponse.AsObject; - static toObject(includeInstance: boolean, msg: EstimateFeeResponse): EstimateFeeResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: EstimateFeeResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): EstimateFeeResponse; - static deserializeBinaryFromReader(message: EstimateFeeResponse, reader: jspb.BinaryReader): EstimateFeeResponse; -} - -export namespace EstimateFeeResponse { - export type AsObject = { - satPerKw: number, - } -} - -export class PendingSweep extends jspb.Message { - hasOutpoint(): boolean; - clearOutpoint(): void; - getOutpoint(): lightning_pb.OutPoint | undefined; - setOutpoint(value?: lightning_pb.OutPoint): void; - - getWitnessType(): WitnessTypeMap[keyof WitnessTypeMap]; - setWitnessType(value: WitnessTypeMap[keyof WitnessTypeMap]): void; - - getAmountSat(): number; - setAmountSat(value: number): void; - - getSatPerByte(): number; - setSatPerByte(value: number): void; - - getBroadcastAttempts(): number; - setBroadcastAttempts(value: number): void; - - getNextBroadcastHeight(): number; - setNextBroadcastHeight(value: number): void; - - getRequestedConfTarget(): number; - setRequestedConfTarget(value: number): void; - - getRequestedSatPerByte(): number; - setRequestedSatPerByte(value: number): void; - - getSatPerVbyte(): number; - setSatPerVbyte(value: number): void; - - getRequestedSatPerVbyte(): number; - setRequestedSatPerVbyte(value: number): void; - - getForce(): boolean; - setForce(value: boolean): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): PendingSweep.AsObject; - static toObject(includeInstance: boolean, msg: PendingSweep): PendingSweep.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: PendingSweep, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): PendingSweep; - static deserializeBinaryFromReader(message: PendingSweep, reader: jspb.BinaryReader): PendingSweep; -} - -export namespace PendingSweep { - export type AsObject = { - outpoint?: lightning_pb.OutPoint.AsObject, - witnessType: WitnessTypeMap[keyof WitnessTypeMap], - amountSat: number, - satPerByte: number, - broadcastAttempts: number, - nextBroadcastHeight: number, - requestedConfTarget: number, - requestedSatPerByte: number, - satPerVbyte: number, - requestedSatPerVbyte: number, - force: boolean, - } -} - -export class PendingSweepsRequest extends jspb.Message { - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): PendingSweepsRequest.AsObject; - static toObject(includeInstance: boolean, msg: PendingSweepsRequest): PendingSweepsRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: PendingSweepsRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): PendingSweepsRequest; - static deserializeBinaryFromReader(message: PendingSweepsRequest, reader: jspb.BinaryReader): PendingSweepsRequest; -} - -export namespace PendingSweepsRequest { - export type AsObject = { - } -} - -export class PendingSweepsResponse extends jspb.Message { - clearPendingSweepsList(): void; - getPendingSweepsList(): Array; - setPendingSweepsList(value: Array): void; - addPendingSweeps(value?: PendingSweep, index?: number): PendingSweep; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): PendingSweepsResponse.AsObject; - static toObject(includeInstance: boolean, msg: PendingSweepsResponse): PendingSweepsResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: PendingSweepsResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): PendingSweepsResponse; - static deserializeBinaryFromReader(message: PendingSweepsResponse, reader: jspb.BinaryReader): PendingSweepsResponse; -} - -export namespace PendingSweepsResponse { - export type AsObject = { - pendingSweeps: Array, - } -} - -export class BumpFeeRequest extends jspb.Message { - hasOutpoint(): boolean; - clearOutpoint(): void; - getOutpoint(): lightning_pb.OutPoint | undefined; - setOutpoint(value?: lightning_pb.OutPoint): void; - - getTargetConf(): number; - setTargetConf(value: number): void; - - getSatPerByte(): number; - setSatPerByte(value: number): void; - - getForce(): boolean; - setForce(value: boolean): void; - - getSatPerVbyte(): number; - setSatPerVbyte(value: number): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): BumpFeeRequest.AsObject; - static toObject(includeInstance: boolean, msg: BumpFeeRequest): BumpFeeRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: BumpFeeRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): BumpFeeRequest; - static deserializeBinaryFromReader(message: BumpFeeRequest, reader: jspb.BinaryReader): BumpFeeRequest; -} - -export namespace BumpFeeRequest { - export type AsObject = { - outpoint?: lightning_pb.OutPoint.AsObject, - targetConf: number, - satPerByte: number, - force: boolean, - satPerVbyte: number, - } -} - -export class BumpFeeResponse extends jspb.Message { - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): BumpFeeResponse.AsObject; - static toObject(includeInstance: boolean, msg: BumpFeeResponse): BumpFeeResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: BumpFeeResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): BumpFeeResponse; - static deserializeBinaryFromReader(message: BumpFeeResponse, reader: jspb.BinaryReader): BumpFeeResponse; -} - -export namespace BumpFeeResponse { - export type AsObject = { - } -} - -export class ListSweepsRequest extends jspb.Message { - getVerbose(): boolean; - setVerbose(value: boolean): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ListSweepsRequest.AsObject; - static toObject(includeInstance: boolean, msg: ListSweepsRequest): ListSweepsRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ListSweepsRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ListSweepsRequest; - static deserializeBinaryFromReader(message: ListSweepsRequest, reader: jspb.BinaryReader): ListSweepsRequest; -} - -export namespace ListSweepsRequest { - export type AsObject = { - verbose: boolean, - } -} - -export class ListSweepsResponse extends jspb.Message { - hasTransactionDetails(): boolean; - clearTransactionDetails(): void; - getTransactionDetails(): lightning_pb.TransactionDetails | undefined; - setTransactionDetails(value?: lightning_pb.TransactionDetails): void; - - hasTransactionIds(): boolean; - clearTransactionIds(): void; - getTransactionIds(): ListSweepsResponse.TransactionIDs | undefined; - setTransactionIds(value?: ListSweepsResponse.TransactionIDs): void; - - getSweepsCase(): ListSweepsResponse.SweepsCase; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ListSweepsResponse.AsObject; - static toObject(includeInstance: boolean, msg: ListSweepsResponse): ListSweepsResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ListSweepsResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ListSweepsResponse; - static deserializeBinaryFromReader(message: ListSweepsResponse, reader: jspb.BinaryReader): ListSweepsResponse; -} - -export namespace ListSweepsResponse { - export type AsObject = { - transactionDetails?: lightning_pb.TransactionDetails.AsObject, - transactionIds?: ListSweepsResponse.TransactionIDs.AsObject, - } - - export class TransactionIDs extends jspb.Message { - clearTransactionIdsList(): void; - getTransactionIdsList(): Array; - setTransactionIdsList(value: Array): void; - addTransactionIds(value: string, index?: number): string; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): TransactionIDs.AsObject; - static toObject(includeInstance: boolean, msg: TransactionIDs): TransactionIDs.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: TransactionIDs, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): TransactionIDs; - static deserializeBinaryFromReader(message: TransactionIDs, reader: jspb.BinaryReader): TransactionIDs; - } - - export namespace TransactionIDs { - export type AsObject = { - transactionIds: Array, - } - } - - export enum SweepsCase { - SWEEPS_NOT_SET = 0, - TRANSACTION_DETAILS = 1, - TRANSACTION_IDS = 2, - } -} - -export class LabelTransactionRequest extends jspb.Message { - getTxid(): Uint8Array | string; - getTxid_asU8(): Uint8Array; - getTxid_asB64(): string; - setTxid(value: Uint8Array | string): void; - - getLabel(): string; - setLabel(value: string): void; - - getOverwrite(): boolean; - setOverwrite(value: boolean): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): LabelTransactionRequest.AsObject; - static toObject(includeInstance: boolean, msg: LabelTransactionRequest): LabelTransactionRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: LabelTransactionRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): LabelTransactionRequest; - static deserializeBinaryFromReader(message: LabelTransactionRequest, reader: jspb.BinaryReader): LabelTransactionRequest; -} - -export namespace LabelTransactionRequest { - export type AsObject = { - txid: Uint8Array | string, - label: string, - overwrite: boolean, - } -} - -export class LabelTransactionResponse extends jspb.Message { - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): LabelTransactionResponse.AsObject; - static toObject(includeInstance: boolean, msg: LabelTransactionResponse): LabelTransactionResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: LabelTransactionResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): LabelTransactionResponse; - static deserializeBinaryFromReader(message: LabelTransactionResponse, reader: jspb.BinaryReader): LabelTransactionResponse; -} - -export namespace LabelTransactionResponse { - export type AsObject = { - } -} - -export class FundPsbtRequest extends jspb.Message { - hasPsbt(): boolean; - clearPsbt(): void; - getPsbt(): Uint8Array | string; - getPsbt_asU8(): Uint8Array; - getPsbt_asB64(): string; - setPsbt(value: Uint8Array | string): void; - - hasRaw(): boolean; - clearRaw(): void; - getRaw(): TxTemplate | undefined; - setRaw(value?: TxTemplate): void; - - hasTargetConf(): boolean; - clearTargetConf(): void; - getTargetConf(): number; - setTargetConf(value: number): void; - - hasSatPerVbyte(): boolean; - clearSatPerVbyte(): void; - getSatPerVbyte(): number; - setSatPerVbyte(value: number): void; - - getAccount(): string; - setAccount(value: string): void; - - getMinConfs(): number; - setMinConfs(value: number): void; - - getSpendUnconfirmed(): boolean; - setSpendUnconfirmed(value: boolean): void; - - getTemplateCase(): FundPsbtRequest.TemplateCase; - getFeesCase(): FundPsbtRequest.FeesCase; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): FundPsbtRequest.AsObject; - static toObject(includeInstance: boolean, msg: FundPsbtRequest): FundPsbtRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: FundPsbtRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): FundPsbtRequest; - static deserializeBinaryFromReader(message: FundPsbtRequest, reader: jspb.BinaryReader): FundPsbtRequest; -} - -export namespace FundPsbtRequest { - export type AsObject = { - psbt: Uint8Array | string, - raw?: TxTemplate.AsObject, - targetConf: number, - satPerVbyte: number, - account: string, - minConfs: number, - spendUnconfirmed: boolean, - } - - export enum TemplateCase { - TEMPLATE_NOT_SET = 0, - PSBT = 1, - RAW = 2, - } - - export enum FeesCase { - FEES_NOT_SET = 0, - TARGET_CONF = 3, - SAT_PER_VBYTE = 4, - } -} - -export class FundPsbtResponse extends jspb.Message { - getFundedPsbt(): Uint8Array | string; - getFundedPsbt_asU8(): Uint8Array; - getFundedPsbt_asB64(): string; - setFundedPsbt(value: Uint8Array | string): void; - - getChangeOutputIndex(): number; - setChangeOutputIndex(value: number): void; - - clearLockedUtxosList(): void; - getLockedUtxosList(): Array; - setLockedUtxosList(value: Array): void; - addLockedUtxos(value?: UtxoLease, index?: number): UtxoLease; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): FundPsbtResponse.AsObject; - static toObject(includeInstance: boolean, msg: FundPsbtResponse): FundPsbtResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: FundPsbtResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): FundPsbtResponse; - static deserializeBinaryFromReader(message: FundPsbtResponse, reader: jspb.BinaryReader): FundPsbtResponse; -} - -export namespace FundPsbtResponse { - export type AsObject = { - fundedPsbt: Uint8Array | string, - changeOutputIndex: number, - lockedUtxos: Array, - } -} - -export class TxTemplate extends jspb.Message { - clearInputsList(): void; - getInputsList(): Array; - setInputsList(value: Array): void; - addInputs(value?: lightning_pb.OutPoint, index?: number): lightning_pb.OutPoint; - - getOutputsMap(): jspb.Map; - clearOutputsMap(): void; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): TxTemplate.AsObject; - static toObject(includeInstance: boolean, msg: TxTemplate): TxTemplate.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: TxTemplate, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): TxTemplate; - static deserializeBinaryFromReader(message: TxTemplate, reader: jspb.BinaryReader): TxTemplate; -} - -export namespace TxTemplate { - export type AsObject = { - inputs: Array, - outputs: Array<[string, number]>, - } -} - -export class UtxoLease extends jspb.Message { - getId(): Uint8Array | string; - getId_asU8(): Uint8Array; - getId_asB64(): string; - setId(value: Uint8Array | string): void; - - hasOutpoint(): boolean; - clearOutpoint(): void; - getOutpoint(): lightning_pb.OutPoint | undefined; - setOutpoint(value?: lightning_pb.OutPoint): void; - - getExpiration(): number; - setExpiration(value: number): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): UtxoLease.AsObject; - static toObject(includeInstance: boolean, msg: UtxoLease): UtxoLease.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: UtxoLease, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): UtxoLease; - static deserializeBinaryFromReader(message: UtxoLease, reader: jspb.BinaryReader): UtxoLease; -} - -export namespace UtxoLease { - export type AsObject = { - id: Uint8Array | string, - outpoint?: lightning_pb.OutPoint.AsObject, - expiration: number, - } -} - -export class SignPsbtRequest extends jspb.Message { - getFundedPsbt(): Uint8Array | string; - getFundedPsbt_asU8(): Uint8Array; - getFundedPsbt_asB64(): string; - setFundedPsbt(value: Uint8Array | string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): SignPsbtRequest.AsObject; - static toObject(includeInstance: boolean, msg: SignPsbtRequest): SignPsbtRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: SignPsbtRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): SignPsbtRequest; - static deserializeBinaryFromReader(message: SignPsbtRequest, reader: jspb.BinaryReader): SignPsbtRequest; -} - -export namespace SignPsbtRequest { - export type AsObject = { - fundedPsbt: Uint8Array | string, - } -} - -export class SignPsbtResponse extends jspb.Message { - getSignedPsbt(): Uint8Array | string; - getSignedPsbt_asU8(): Uint8Array; - getSignedPsbt_asB64(): string; - setSignedPsbt(value: Uint8Array | string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): SignPsbtResponse.AsObject; - static toObject(includeInstance: boolean, msg: SignPsbtResponse): SignPsbtResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: SignPsbtResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): SignPsbtResponse; - static deserializeBinaryFromReader(message: SignPsbtResponse, reader: jspb.BinaryReader): SignPsbtResponse; -} - -export namespace SignPsbtResponse { - export type AsObject = { - signedPsbt: Uint8Array | string, - } -} - -export class FinalizePsbtRequest extends jspb.Message { - getFundedPsbt(): Uint8Array | string; - getFundedPsbt_asU8(): Uint8Array; - getFundedPsbt_asB64(): string; - setFundedPsbt(value: Uint8Array | string): void; - - getAccount(): string; - setAccount(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): FinalizePsbtRequest.AsObject; - static toObject(includeInstance: boolean, msg: FinalizePsbtRequest): FinalizePsbtRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: FinalizePsbtRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): FinalizePsbtRequest; - static deserializeBinaryFromReader(message: FinalizePsbtRequest, reader: jspb.BinaryReader): FinalizePsbtRequest; -} - -export namespace FinalizePsbtRequest { - export type AsObject = { - fundedPsbt: Uint8Array | string, - account: string, - } -} - -export class FinalizePsbtResponse extends jspb.Message { - getSignedPsbt(): Uint8Array | string; - getSignedPsbt_asU8(): Uint8Array; - getSignedPsbt_asB64(): string; - setSignedPsbt(value: Uint8Array | string): void; - - getRawFinalTx(): Uint8Array | string; - getRawFinalTx_asU8(): Uint8Array; - getRawFinalTx_asB64(): string; - setRawFinalTx(value: Uint8Array | string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): FinalizePsbtResponse.AsObject; - static toObject(includeInstance: boolean, msg: FinalizePsbtResponse): FinalizePsbtResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: FinalizePsbtResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): FinalizePsbtResponse; - static deserializeBinaryFromReader(message: FinalizePsbtResponse, reader: jspb.BinaryReader): FinalizePsbtResponse; -} - -export namespace FinalizePsbtResponse { - export type AsObject = { - signedPsbt: Uint8Array | string, - rawFinalTx: Uint8Array | string, - } -} - -export class ListLeasesRequest extends jspb.Message { - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ListLeasesRequest.AsObject; - static toObject(includeInstance: boolean, msg: ListLeasesRequest): ListLeasesRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ListLeasesRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ListLeasesRequest; - static deserializeBinaryFromReader(message: ListLeasesRequest, reader: jspb.BinaryReader): ListLeasesRequest; -} - -export namespace ListLeasesRequest { - export type AsObject = { - } -} - -export class ListLeasesResponse extends jspb.Message { - clearLockedUtxosList(): void; - getLockedUtxosList(): Array; - setLockedUtxosList(value: Array): void; - addLockedUtxos(value?: UtxoLease, index?: number): UtxoLease; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ListLeasesResponse.AsObject; - static toObject(includeInstance: boolean, msg: ListLeasesResponse): ListLeasesResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ListLeasesResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ListLeasesResponse; - static deserializeBinaryFromReader(message: ListLeasesResponse, reader: jspb.BinaryReader): ListLeasesResponse; -} - -export namespace ListLeasesResponse { - export type AsObject = { - lockedUtxos: Array, - } -} - -export interface AddressTypeMap { - UNKNOWN: 0; - WITNESS_PUBKEY_HASH: 1; - NESTED_WITNESS_PUBKEY_HASH: 2; - HYBRID_NESTED_WITNESS_PUBKEY_HASH: 3; -} - -export const AddressType: AddressTypeMap; - -export interface WitnessTypeMap { - UNKNOWN_WITNESS: 0; - COMMITMENT_TIME_LOCK: 1; - COMMITMENT_NO_DELAY: 2; - COMMITMENT_REVOKE: 3; - HTLC_OFFERED_REVOKE: 4; - HTLC_ACCEPTED_REVOKE: 5; - HTLC_OFFERED_TIMEOUT_SECOND_LEVEL: 6; - HTLC_ACCEPTED_SUCCESS_SECOND_LEVEL: 7; - HTLC_OFFERED_REMOTE_TIMEOUT: 8; - HTLC_ACCEPTED_REMOTE_SUCCESS: 9; - HTLC_SECOND_LEVEL_REVOKE: 10; - WITNESS_KEY_HASH: 11; - NESTED_WITNESS_KEY_HASH: 12; - COMMITMENT_ANCHOR: 13; -} - -export const WitnessType: WitnessTypeMap; - diff --git a/lib/types/generated/walletrpc/walletkit_pb.js b/lib/types/generated/walletrpc/walletkit_pb.js deleted file mode 100644 index 3d40db7..0000000 --- a/lib/types/generated/walletrpc/walletkit_pb.js +++ /dev/null @@ -1,8986 +0,0 @@ -// source: walletrpc/walletkit.proto -/** - * @fileoverview - * @enhanceable - * @suppress {missingRequire} reports error on implicit type usages. - * @suppress {messageConventions} JS Compiler reports an error if a variable or - * field starts with 'MSG_' and isn't a translatable message. - * @public - */ -// GENERATED CODE -- DO NOT EDIT! -/* eslint-disable */ -// @ts-nocheck - -var jspb = require('google-protobuf'); -var goog = jspb; -var global = Function('return this')(); - -var lightning_pb = require('../lightning_pb.js'); -goog.object.extend(proto, lightning_pb); -var signrpc_signer_pb = require('../signrpc/signer_pb.js'); -goog.object.extend(proto, signrpc_signer_pb); -goog.exportSymbol('proto.walletrpc.Account', null, global); -goog.exportSymbol('proto.walletrpc.AddrRequest', null, global); -goog.exportSymbol('proto.walletrpc.AddrResponse', null, global); -goog.exportSymbol('proto.walletrpc.AddressType', null, global); -goog.exportSymbol('proto.walletrpc.BumpFeeRequest', null, global); -goog.exportSymbol('proto.walletrpc.BumpFeeResponse', null, global); -goog.exportSymbol('proto.walletrpc.EstimateFeeRequest', null, global); -goog.exportSymbol('proto.walletrpc.EstimateFeeResponse', null, global); -goog.exportSymbol('proto.walletrpc.FinalizePsbtRequest', null, global); -goog.exportSymbol('proto.walletrpc.FinalizePsbtResponse', null, global); -goog.exportSymbol('proto.walletrpc.FundPsbtRequest', null, global); -goog.exportSymbol('proto.walletrpc.FundPsbtRequest.FeesCase', null, global); -goog.exportSymbol('proto.walletrpc.FundPsbtRequest.TemplateCase', null, global); -goog.exportSymbol('proto.walletrpc.FundPsbtResponse', null, global); -goog.exportSymbol('proto.walletrpc.ImportAccountRequest', null, global); -goog.exportSymbol('proto.walletrpc.ImportAccountResponse', null, global); -goog.exportSymbol('proto.walletrpc.ImportPublicKeyRequest', null, global); -goog.exportSymbol('proto.walletrpc.ImportPublicKeyResponse', null, global); -goog.exportSymbol('proto.walletrpc.KeyReq', null, global); -goog.exportSymbol('proto.walletrpc.LabelTransactionRequest', null, global); -goog.exportSymbol('proto.walletrpc.LabelTransactionResponse', null, global); -goog.exportSymbol('proto.walletrpc.LeaseOutputRequest', null, global); -goog.exportSymbol('proto.walletrpc.LeaseOutputResponse', null, global); -goog.exportSymbol('proto.walletrpc.ListAccountsRequest', null, global); -goog.exportSymbol('proto.walletrpc.ListAccountsResponse', null, global); -goog.exportSymbol('proto.walletrpc.ListLeasesRequest', null, global); -goog.exportSymbol('proto.walletrpc.ListLeasesResponse', null, global); -goog.exportSymbol('proto.walletrpc.ListSweepsRequest', null, global); -goog.exportSymbol('proto.walletrpc.ListSweepsResponse', null, global); -goog.exportSymbol('proto.walletrpc.ListSweepsResponse.SweepsCase', null, global); -goog.exportSymbol('proto.walletrpc.ListSweepsResponse.TransactionIDs', null, global); -goog.exportSymbol('proto.walletrpc.ListUnspentRequest', null, global); -goog.exportSymbol('proto.walletrpc.ListUnspentResponse', null, global); -goog.exportSymbol('proto.walletrpc.PendingSweep', null, global); -goog.exportSymbol('proto.walletrpc.PendingSweepsRequest', null, global); -goog.exportSymbol('proto.walletrpc.PendingSweepsResponse', null, global); -goog.exportSymbol('proto.walletrpc.PublishResponse', null, global); -goog.exportSymbol('proto.walletrpc.ReleaseOutputRequest', null, global); -goog.exportSymbol('proto.walletrpc.ReleaseOutputResponse', null, global); -goog.exportSymbol('proto.walletrpc.SendOutputsRequest', null, global); -goog.exportSymbol('proto.walletrpc.SendOutputsResponse', null, global); -goog.exportSymbol('proto.walletrpc.SignPsbtRequest', null, global); -goog.exportSymbol('proto.walletrpc.SignPsbtResponse', null, global); -goog.exportSymbol('proto.walletrpc.Transaction', null, global); -goog.exportSymbol('proto.walletrpc.TxTemplate', null, global); -goog.exportSymbol('proto.walletrpc.UtxoLease', null, global); -goog.exportSymbol('proto.walletrpc.WitnessType', null, global); -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.walletrpc.ListUnspentRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.walletrpc.ListUnspentRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.walletrpc.ListUnspentRequest.displayName = 'proto.walletrpc.ListUnspentRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.walletrpc.ListUnspentResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.walletrpc.ListUnspentResponse.repeatedFields_, null); -}; -goog.inherits(proto.walletrpc.ListUnspentResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.walletrpc.ListUnspentResponse.displayName = 'proto.walletrpc.ListUnspentResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.walletrpc.LeaseOutputRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.walletrpc.LeaseOutputRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.walletrpc.LeaseOutputRequest.displayName = 'proto.walletrpc.LeaseOutputRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.walletrpc.LeaseOutputResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.walletrpc.LeaseOutputResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.walletrpc.LeaseOutputResponse.displayName = 'proto.walletrpc.LeaseOutputResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.walletrpc.ReleaseOutputRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.walletrpc.ReleaseOutputRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.walletrpc.ReleaseOutputRequest.displayName = 'proto.walletrpc.ReleaseOutputRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.walletrpc.ReleaseOutputResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.walletrpc.ReleaseOutputResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.walletrpc.ReleaseOutputResponse.displayName = 'proto.walletrpc.ReleaseOutputResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.walletrpc.KeyReq = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.walletrpc.KeyReq, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.walletrpc.KeyReq.displayName = 'proto.walletrpc.KeyReq'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.walletrpc.AddrRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.walletrpc.AddrRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.walletrpc.AddrRequest.displayName = 'proto.walletrpc.AddrRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.walletrpc.AddrResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.walletrpc.AddrResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.walletrpc.AddrResponse.displayName = 'proto.walletrpc.AddrResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.walletrpc.Account = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.walletrpc.Account, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.walletrpc.Account.displayName = 'proto.walletrpc.Account'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.walletrpc.ListAccountsRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.walletrpc.ListAccountsRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.walletrpc.ListAccountsRequest.displayName = 'proto.walletrpc.ListAccountsRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.walletrpc.ListAccountsResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.walletrpc.ListAccountsResponse.repeatedFields_, null); -}; -goog.inherits(proto.walletrpc.ListAccountsResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.walletrpc.ListAccountsResponse.displayName = 'proto.walletrpc.ListAccountsResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.walletrpc.ImportAccountRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.walletrpc.ImportAccountRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.walletrpc.ImportAccountRequest.displayName = 'proto.walletrpc.ImportAccountRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.walletrpc.ImportAccountResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.walletrpc.ImportAccountResponse.repeatedFields_, null); -}; -goog.inherits(proto.walletrpc.ImportAccountResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.walletrpc.ImportAccountResponse.displayName = 'proto.walletrpc.ImportAccountResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.walletrpc.ImportPublicKeyRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.walletrpc.ImportPublicKeyRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.walletrpc.ImportPublicKeyRequest.displayName = 'proto.walletrpc.ImportPublicKeyRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.walletrpc.ImportPublicKeyResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.walletrpc.ImportPublicKeyResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.walletrpc.ImportPublicKeyResponse.displayName = 'proto.walletrpc.ImportPublicKeyResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.walletrpc.Transaction = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.walletrpc.Transaction, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.walletrpc.Transaction.displayName = 'proto.walletrpc.Transaction'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.walletrpc.PublishResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.walletrpc.PublishResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.walletrpc.PublishResponse.displayName = 'proto.walletrpc.PublishResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.walletrpc.SendOutputsRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.walletrpc.SendOutputsRequest.repeatedFields_, null); -}; -goog.inherits(proto.walletrpc.SendOutputsRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.walletrpc.SendOutputsRequest.displayName = 'proto.walletrpc.SendOutputsRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.walletrpc.SendOutputsResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.walletrpc.SendOutputsResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.walletrpc.SendOutputsResponse.displayName = 'proto.walletrpc.SendOutputsResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.walletrpc.EstimateFeeRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.walletrpc.EstimateFeeRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.walletrpc.EstimateFeeRequest.displayName = 'proto.walletrpc.EstimateFeeRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.walletrpc.EstimateFeeResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.walletrpc.EstimateFeeResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.walletrpc.EstimateFeeResponse.displayName = 'proto.walletrpc.EstimateFeeResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.walletrpc.PendingSweep = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.walletrpc.PendingSweep, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.walletrpc.PendingSweep.displayName = 'proto.walletrpc.PendingSweep'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.walletrpc.PendingSweepsRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.walletrpc.PendingSweepsRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.walletrpc.PendingSweepsRequest.displayName = 'proto.walletrpc.PendingSweepsRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.walletrpc.PendingSweepsResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.walletrpc.PendingSweepsResponse.repeatedFields_, null); -}; -goog.inherits(proto.walletrpc.PendingSweepsResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.walletrpc.PendingSweepsResponse.displayName = 'proto.walletrpc.PendingSweepsResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.walletrpc.BumpFeeRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.walletrpc.BumpFeeRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.walletrpc.BumpFeeRequest.displayName = 'proto.walletrpc.BumpFeeRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.walletrpc.BumpFeeResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.walletrpc.BumpFeeResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.walletrpc.BumpFeeResponse.displayName = 'proto.walletrpc.BumpFeeResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.walletrpc.ListSweepsRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.walletrpc.ListSweepsRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.walletrpc.ListSweepsRequest.displayName = 'proto.walletrpc.ListSweepsRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.walletrpc.ListSweepsResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.walletrpc.ListSweepsResponse.oneofGroups_); -}; -goog.inherits(proto.walletrpc.ListSweepsResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.walletrpc.ListSweepsResponse.displayName = 'proto.walletrpc.ListSweepsResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.walletrpc.ListSweepsResponse.TransactionIDs = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.walletrpc.ListSweepsResponse.TransactionIDs.repeatedFields_, null); -}; -goog.inherits(proto.walletrpc.ListSweepsResponse.TransactionIDs, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.walletrpc.ListSweepsResponse.TransactionIDs.displayName = 'proto.walletrpc.ListSweepsResponse.TransactionIDs'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.walletrpc.LabelTransactionRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.walletrpc.LabelTransactionRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.walletrpc.LabelTransactionRequest.displayName = 'proto.walletrpc.LabelTransactionRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.walletrpc.LabelTransactionResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.walletrpc.LabelTransactionResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.walletrpc.LabelTransactionResponse.displayName = 'proto.walletrpc.LabelTransactionResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.walletrpc.FundPsbtRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.walletrpc.FundPsbtRequest.oneofGroups_); -}; -goog.inherits(proto.walletrpc.FundPsbtRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.walletrpc.FundPsbtRequest.displayName = 'proto.walletrpc.FundPsbtRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.walletrpc.FundPsbtResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.walletrpc.FundPsbtResponse.repeatedFields_, null); -}; -goog.inherits(proto.walletrpc.FundPsbtResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.walletrpc.FundPsbtResponse.displayName = 'proto.walletrpc.FundPsbtResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.walletrpc.TxTemplate = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.walletrpc.TxTemplate.repeatedFields_, null); -}; -goog.inherits(proto.walletrpc.TxTemplate, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.walletrpc.TxTemplate.displayName = 'proto.walletrpc.TxTemplate'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.walletrpc.UtxoLease = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.walletrpc.UtxoLease, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.walletrpc.UtxoLease.displayName = 'proto.walletrpc.UtxoLease'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.walletrpc.SignPsbtRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.walletrpc.SignPsbtRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.walletrpc.SignPsbtRequest.displayName = 'proto.walletrpc.SignPsbtRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.walletrpc.SignPsbtResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.walletrpc.SignPsbtResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.walletrpc.SignPsbtResponse.displayName = 'proto.walletrpc.SignPsbtResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.walletrpc.FinalizePsbtRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.walletrpc.FinalizePsbtRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.walletrpc.FinalizePsbtRequest.displayName = 'proto.walletrpc.FinalizePsbtRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.walletrpc.FinalizePsbtResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.walletrpc.FinalizePsbtResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.walletrpc.FinalizePsbtResponse.displayName = 'proto.walletrpc.FinalizePsbtResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.walletrpc.ListLeasesRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.walletrpc.ListLeasesRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.walletrpc.ListLeasesRequest.displayName = 'proto.walletrpc.ListLeasesRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.walletrpc.ListLeasesResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.walletrpc.ListLeasesResponse.repeatedFields_, null); -}; -goog.inherits(proto.walletrpc.ListLeasesResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.walletrpc.ListLeasesResponse.displayName = 'proto.walletrpc.ListLeasesResponse'; -} - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.walletrpc.ListUnspentRequest.prototype.toObject = function(opt_includeInstance) { - return proto.walletrpc.ListUnspentRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.walletrpc.ListUnspentRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.walletrpc.ListUnspentRequest.toObject = function(includeInstance, msg) { - var f, obj = { - minConfs: jspb.Message.getFieldWithDefault(msg, 1, 0), - maxConfs: jspb.Message.getFieldWithDefault(msg, 2, 0), - account: jspb.Message.getFieldWithDefault(msg, 3, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.walletrpc.ListUnspentRequest} - */ -proto.walletrpc.ListUnspentRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.walletrpc.ListUnspentRequest; - return proto.walletrpc.ListUnspentRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.walletrpc.ListUnspentRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.walletrpc.ListUnspentRequest} - */ -proto.walletrpc.ListUnspentRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readInt32()); - msg.setMinConfs(value); - break; - case 2: - var value = /** @type {number} */ (reader.readInt32()); - msg.setMaxConfs(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setAccount(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.walletrpc.ListUnspentRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.walletrpc.ListUnspentRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.walletrpc.ListUnspentRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.walletrpc.ListUnspentRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getMinConfs(); - if (f !== 0) { - writer.writeInt32( - 1, - f - ); - } - f = message.getMaxConfs(); - if (f !== 0) { - writer.writeInt32( - 2, - f - ); - } - f = message.getAccount(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } -}; - - -/** - * optional int32 min_confs = 1; - * @return {number} - */ -proto.walletrpc.ListUnspentRequest.prototype.getMinConfs = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.walletrpc.ListUnspentRequest} returns this - */ -proto.walletrpc.ListUnspentRequest.prototype.setMinConfs = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); -}; - - -/** - * optional int32 max_confs = 2; - * @return {number} - */ -proto.walletrpc.ListUnspentRequest.prototype.getMaxConfs = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.walletrpc.ListUnspentRequest} returns this - */ -proto.walletrpc.ListUnspentRequest.prototype.setMaxConfs = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * optional string account = 3; - * @return {string} - */ -proto.walletrpc.ListUnspentRequest.prototype.getAccount = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * @param {string} value - * @return {!proto.walletrpc.ListUnspentRequest} returns this - */ -proto.walletrpc.ListUnspentRequest.prototype.setAccount = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.walletrpc.ListUnspentResponse.repeatedFields_ = [1]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.walletrpc.ListUnspentResponse.prototype.toObject = function(opt_includeInstance) { - return proto.walletrpc.ListUnspentResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.walletrpc.ListUnspentResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.walletrpc.ListUnspentResponse.toObject = function(includeInstance, msg) { - var f, obj = { - utxosList: jspb.Message.toObjectList(msg.getUtxosList(), - lightning_pb.Utxo.toObject, includeInstance) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.walletrpc.ListUnspentResponse} - */ -proto.walletrpc.ListUnspentResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.walletrpc.ListUnspentResponse; - return proto.walletrpc.ListUnspentResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.walletrpc.ListUnspentResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.walletrpc.ListUnspentResponse} - */ -proto.walletrpc.ListUnspentResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new lightning_pb.Utxo; - reader.readMessage(value,lightning_pb.Utxo.deserializeBinaryFromReader); - msg.addUtxos(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.walletrpc.ListUnspentResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.walletrpc.ListUnspentResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.walletrpc.ListUnspentResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.walletrpc.ListUnspentResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getUtxosList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 1, - f, - lightning_pb.Utxo.serializeBinaryToWriter - ); - } -}; - - -/** - * repeated lnrpc.Utxo utxos = 1; - * @return {!Array} - */ -proto.walletrpc.ListUnspentResponse.prototype.getUtxosList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, lightning_pb.Utxo, 1)); -}; - - -/** - * @param {!Array} value - * @return {!proto.walletrpc.ListUnspentResponse} returns this -*/ -proto.walletrpc.ListUnspentResponse.prototype.setUtxosList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); -}; - - -/** - * @param {!proto.lnrpc.Utxo=} opt_value - * @param {number=} opt_index - * @return {!proto.lnrpc.Utxo} - */ -proto.walletrpc.ListUnspentResponse.prototype.addUtxos = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.lnrpc.Utxo, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.walletrpc.ListUnspentResponse} returns this - */ -proto.walletrpc.ListUnspentResponse.prototype.clearUtxosList = function() { - return this.setUtxosList([]); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.walletrpc.LeaseOutputRequest.prototype.toObject = function(opt_includeInstance) { - return proto.walletrpc.LeaseOutputRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.walletrpc.LeaseOutputRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.walletrpc.LeaseOutputRequest.toObject = function(includeInstance, msg) { - var f, obj = { - id: msg.getId_asB64(), - outpoint: (f = msg.getOutpoint()) && lightning_pb.OutPoint.toObject(includeInstance, f), - expirationSeconds: jspb.Message.getFieldWithDefault(msg, 3, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.walletrpc.LeaseOutputRequest} - */ -proto.walletrpc.LeaseOutputRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.walletrpc.LeaseOutputRequest; - return proto.walletrpc.LeaseOutputRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.walletrpc.LeaseOutputRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.walletrpc.LeaseOutputRequest} - */ -proto.walletrpc.LeaseOutputRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setId(value); - break; - case 2: - var value = new lightning_pb.OutPoint; - reader.readMessage(value,lightning_pb.OutPoint.deserializeBinaryFromReader); - msg.setOutpoint(value); - break; - case 3: - var value = /** @type {number} */ (reader.readUint64()); - msg.setExpirationSeconds(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.walletrpc.LeaseOutputRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.walletrpc.LeaseOutputRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.walletrpc.LeaseOutputRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.walletrpc.LeaseOutputRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getId_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getOutpoint(); - if (f != null) { - writer.writeMessage( - 2, - f, - lightning_pb.OutPoint.serializeBinaryToWriter - ); - } - f = message.getExpirationSeconds(); - if (f !== 0) { - writer.writeUint64( - 3, - f - ); - } -}; - - -/** - * optional bytes id = 1; - * @return {!(string|Uint8Array)} - */ -proto.walletrpc.LeaseOutputRequest.prototype.getId = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes id = 1; - * This is a type-conversion wrapper around `getId()` - * @return {string} - */ -proto.walletrpc.LeaseOutputRequest.prototype.getId_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getId())); -}; - - -/** - * optional bytes id = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getId()` - * @return {!Uint8Array} - */ -proto.walletrpc.LeaseOutputRequest.prototype.getId_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getId())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.walletrpc.LeaseOutputRequest} returns this - */ -proto.walletrpc.LeaseOutputRequest.prototype.setId = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional lnrpc.OutPoint outpoint = 2; - * @return {?proto.lnrpc.OutPoint} - */ -proto.walletrpc.LeaseOutputRequest.prototype.getOutpoint = function() { - return /** @type{?proto.lnrpc.OutPoint} */ ( - jspb.Message.getWrapperField(this, lightning_pb.OutPoint, 2)); -}; - - -/** - * @param {?proto.lnrpc.OutPoint|undefined} value - * @return {!proto.walletrpc.LeaseOutputRequest} returns this -*/ -proto.walletrpc.LeaseOutputRequest.prototype.setOutpoint = function(value) { - return jspb.Message.setWrapperField(this, 2, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.walletrpc.LeaseOutputRequest} returns this - */ -proto.walletrpc.LeaseOutputRequest.prototype.clearOutpoint = function() { - return this.setOutpoint(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.walletrpc.LeaseOutputRequest.prototype.hasOutpoint = function() { - return jspb.Message.getField(this, 2) != null; -}; - - -/** - * optional uint64 expiration_seconds = 3; - * @return {number} - */ -proto.walletrpc.LeaseOutputRequest.prototype.getExpirationSeconds = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.walletrpc.LeaseOutputRequest} returns this - */ -proto.walletrpc.LeaseOutputRequest.prototype.setExpirationSeconds = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.walletrpc.LeaseOutputResponse.prototype.toObject = function(opt_includeInstance) { - return proto.walletrpc.LeaseOutputResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.walletrpc.LeaseOutputResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.walletrpc.LeaseOutputResponse.toObject = function(includeInstance, msg) { - var f, obj = { - expiration: jspb.Message.getFieldWithDefault(msg, 1, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.walletrpc.LeaseOutputResponse} - */ -proto.walletrpc.LeaseOutputResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.walletrpc.LeaseOutputResponse; - return proto.walletrpc.LeaseOutputResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.walletrpc.LeaseOutputResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.walletrpc.LeaseOutputResponse} - */ -proto.walletrpc.LeaseOutputResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readUint64()); - msg.setExpiration(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.walletrpc.LeaseOutputResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.walletrpc.LeaseOutputResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.walletrpc.LeaseOutputResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.walletrpc.LeaseOutputResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getExpiration(); - if (f !== 0) { - writer.writeUint64( - 1, - f - ); - } -}; - - -/** - * optional uint64 expiration = 1; - * @return {number} - */ -proto.walletrpc.LeaseOutputResponse.prototype.getExpiration = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.walletrpc.LeaseOutputResponse} returns this - */ -proto.walletrpc.LeaseOutputResponse.prototype.setExpiration = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.walletrpc.ReleaseOutputRequest.prototype.toObject = function(opt_includeInstance) { - return proto.walletrpc.ReleaseOutputRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.walletrpc.ReleaseOutputRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.walletrpc.ReleaseOutputRequest.toObject = function(includeInstance, msg) { - var f, obj = { - id: msg.getId_asB64(), - outpoint: (f = msg.getOutpoint()) && lightning_pb.OutPoint.toObject(includeInstance, f) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.walletrpc.ReleaseOutputRequest} - */ -proto.walletrpc.ReleaseOutputRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.walletrpc.ReleaseOutputRequest; - return proto.walletrpc.ReleaseOutputRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.walletrpc.ReleaseOutputRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.walletrpc.ReleaseOutputRequest} - */ -proto.walletrpc.ReleaseOutputRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setId(value); - break; - case 2: - var value = new lightning_pb.OutPoint; - reader.readMessage(value,lightning_pb.OutPoint.deserializeBinaryFromReader); - msg.setOutpoint(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.walletrpc.ReleaseOutputRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.walletrpc.ReleaseOutputRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.walletrpc.ReleaseOutputRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.walletrpc.ReleaseOutputRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getId_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getOutpoint(); - if (f != null) { - writer.writeMessage( - 2, - f, - lightning_pb.OutPoint.serializeBinaryToWriter - ); - } -}; - - -/** - * optional bytes id = 1; - * @return {!(string|Uint8Array)} - */ -proto.walletrpc.ReleaseOutputRequest.prototype.getId = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes id = 1; - * This is a type-conversion wrapper around `getId()` - * @return {string} - */ -proto.walletrpc.ReleaseOutputRequest.prototype.getId_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getId())); -}; - - -/** - * optional bytes id = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getId()` - * @return {!Uint8Array} - */ -proto.walletrpc.ReleaseOutputRequest.prototype.getId_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getId())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.walletrpc.ReleaseOutputRequest} returns this - */ -proto.walletrpc.ReleaseOutputRequest.prototype.setId = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional lnrpc.OutPoint outpoint = 2; - * @return {?proto.lnrpc.OutPoint} - */ -proto.walletrpc.ReleaseOutputRequest.prototype.getOutpoint = function() { - return /** @type{?proto.lnrpc.OutPoint} */ ( - jspb.Message.getWrapperField(this, lightning_pb.OutPoint, 2)); -}; - - -/** - * @param {?proto.lnrpc.OutPoint|undefined} value - * @return {!proto.walletrpc.ReleaseOutputRequest} returns this -*/ -proto.walletrpc.ReleaseOutputRequest.prototype.setOutpoint = function(value) { - return jspb.Message.setWrapperField(this, 2, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.walletrpc.ReleaseOutputRequest} returns this - */ -proto.walletrpc.ReleaseOutputRequest.prototype.clearOutpoint = function() { - return this.setOutpoint(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.walletrpc.ReleaseOutputRequest.prototype.hasOutpoint = function() { - return jspb.Message.getField(this, 2) != null; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.walletrpc.ReleaseOutputResponse.prototype.toObject = function(opt_includeInstance) { - return proto.walletrpc.ReleaseOutputResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.walletrpc.ReleaseOutputResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.walletrpc.ReleaseOutputResponse.toObject = function(includeInstance, msg) { - var f, obj = { - - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.walletrpc.ReleaseOutputResponse} - */ -proto.walletrpc.ReleaseOutputResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.walletrpc.ReleaseOutputResponse; - return proto.walletrpc.ReleaseOutputResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.walletrpc.ReleaseOutputResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.walletrpc.ReleaseOutputResponse} - */ -proto.walletrpc.ReleaseOutputResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.walletrpc.ReleaseOutputResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.walletrpc.ReleaseOutputResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.walletrpc.ReleaseOutputResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.walletrpc.ReleaseOutputResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.walletrpc.KeyReq.prototype.toObject = function(opt_includeInstance) { - return proto.walletrpc.KeyReq.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.walletrpc.KeyReq} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.walletrpc.KeyReq.toObject = function(includeInstance, msg) { - var f, obj = { - keyFingerPrint: jspb.Message.getFieldWithDefault(msg, 1, 0), - keyFamily: jspb.Message.getFieldWithDefault(msg, 2, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.walletrpc.KeyReq} - */ -proto.walletrpc.KeyReq.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.walletrpc.KeyReq; - return proto.walletrpc.KeyReq.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.walletrpc.KeyReq} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.walletrpc.KeyReq} - */ -proto.walletrpc.KeyReq.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readInt32()); - msg.setKeyFingerPrint(value); - break; - case 2: - var value = /** @type {number} */ (reader.readInt32()); - msg.setKeyFamily(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.walletrpc.KeyReq.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.walletrpc.KeyReq.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.walletrpc.KeyReq} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.walletrpc.KeyReq.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getKeyFingerPrint(); - if (f !== 0) { - writer.writeInt32( - 1, - f - ); - } - f = message.getKeyFamily(); - if (f !== 0) { - writer.writeInt32( - 2, - f - ); - } -}; - - -/** - * optional int32 key_finger_print = 1; - * @return {number} - */ -proto.walletrpc.KeyReq.prototype.getKeyFingerPrint = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.walletrpc.KeyReq} returns this - */ -proto.walletrpc.KeyReq.prototype.setKeyFingerPrint = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); -}; - - -/** - * optional int32 key_family = 2; - * @return {number} - */ -proto.walletrpc.KeyReq.prototype.getKeyFamily = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.walletrpc.KeyReq} returns this - */ -proto.walletrpc.KeyReq.prototype.setKeyFamily = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.walletrpc.AddrRequest.prototype.toObject = function(opt_includeInstance) { - return proto.walletrpc.AddrRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.walletrpc.AddrRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.walletrpc.AddrRequest.toObject = function(includeInstance, msg) { - var f, obj = { - account: jspb.Message.getFieldWithDefault(msg, 1, ""), - type: jspb.Message.getFieldWithDefault(msg, 2, 0), - change: jspb.Message.getBooleanFieldWithDefault(msg, 3, false) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.walletrpc.AddrRequest} - */ -proto.walletrpc.AddrRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.walletrpc.AddrRequest; - return proto.walletrpc.AddrRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.walletrpc.AddrRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.walletrpc.AddrRequest} - */ -proto.walletrpc.AddrRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setAccount(value); - break; - case 2: - var value = /** @type {!proto.walletrpc.AddressType} */ (reader.readEnum()); - msg.setType(value); - break; - case 3: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setChange(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.walletrpc.AddrRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.walletrpc.AddrRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.walletrpc.AddrRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.walletrpc.AddrRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getAccount(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getType(); - if (f !== 0.0) { - writer.writeEnum( - 2, - f - ); - } - f = message.getChange(); - if (f) { - writer.writeBool( - 3, - f - ); - } -}; - - -/** - * optional string account = 1; - * @return {string} - */ -proto.walletrpc.AddrRequest.prototype.getAccount = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.walletrpc.AddrRequest} returns this - */ -proto.walletrpc.AddrRequest.prototype.setAccount = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional AddressType type = 2; - * @return {!proto.walletrpc.AddressType} - */ -proto.walletrpc.AddrRequest.prototype.getType = function() { - return /** @type {!proto.walletrpc.AddressType} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {!proto.walletrpc.AddressType} value - * @return {!proto.walletrpc.AddrRequest} returns this - */ -proto.walletrpc.AddrRequest.prototype.setType = function(value) { - return jspb.Message.setProto3EnumField(this, 2, value); -}; - - -/** - * optional bool change = 3; - * @return {boolean} - */ -proto.walletrpc.AddrRequest.prototype.getChange = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.walletrpc.AddrRequest} returns this - */ -proto.walletrpc.AddrRequest.prototype.setChange = function(value) { - return jspb.Message.setProto3BooleanField(this, 3, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.walletrpc.AddrResponse.prototype.toObject = function(opt_includeInstance) { - return proto.walletrpc.AddrResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.walletrpc.AddrResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.walletrpc.AddrResponse.toObject = function(includeInstance, msg) { - var f, obj = { - addr: jspb.Message.getFieldWithDefault(msg, 1, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.walletrpc.AddrResponse} - */ -proto.walletrpc.AddrResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.walletrpc.AddrResponse; - return proto.walletrpc.AddrResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.walletrpc.AddrResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.walletrpc.AddrResponse} - */ -proto.walletrpc.AddrResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setAddr(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.walletrpc.AddrResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.walletrpc.AddrResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.walletrpc.AddrResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.walletrpc.AddrResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getAddr(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } -}; - - -/** - * optional string addr = 1; - * @return {string} - */ -proto.walletrpc.AddrResponse.prototype.getAddr = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.walletrpc.AddrResponse} returns this - */ -proto.walletrpc.AddrResponse.prototype.setAddr = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.walletrpc.Account.prototype.toObject = function(opt_includeInstance) { - return proto.walletrpc.Account.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.walletrpc.Account} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.walletrpc.Account.toObject = function(includeInstance, msg) { - var f, obj = { - name: jspb.Message.getFieldWithDefault(msg, 1, ""), - addressType: jspb.Message.getFieldWithDefault(msg, 2, 0), - extendedPublicKey: jspb.Message.getFieldWithDefault(msg, 3, ""), - masterKeyFingerprint: msg.getMasterKeyFingerprint_asB64(), - derivationPath: jspb.Message.getFieldWithDefault(msg, 5, ""), - externalKeyCount: jspb.Message.getFieldWithDefault(msg, 6, 0), - internalKeyCount: jspb.Message.getFieldWithDefault(msg, 7, 0), - watchOnly: jspb.Message.getBooleanFieldWithDefault(msg, 8, false) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.walletrpc.Account} - */ -proto.walletrpc.Account.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.walletrpc.Account; - return proto.walletrpc.Account.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.walletrpc.Account} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.walletrpc.Account} - */ -proto.walletrpc.Account.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setName(value); - break; - case 2: - var value = /** @type {!proto.walletrpc.AddressType} */ (reader.readEnum()); - msg.setAddressType(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setExtendedPublicKey(value); - break; - case 4: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setMasterKeyFingerprint(value); - break; - case 5: - var value = /** @type {string} */ (reader.readString()); - msg.setDerivationPath(value); - break; - case 6: - var value = /** @type {number} */ (reader.readUint32()); - msg.setExternalKeyCount(value); - break; - case 7: - var value = /** @type {number} */ (reader.readUint32()); - msg.setInternalKeyCount(value); - break; - case 8: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setWatchOnly(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.walletrpc.Account.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.walletrpc.Account.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.walletrpc.Account} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.walletrpc.Account.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getName(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getAddressType(); - if (f !== 0.0) { - writer.writeEnum( - 2, - f - ); - } - f = message.getExtendedPublicKey(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } - f = message.getMasterKeyFingerprint_asU8(); - if (f.length > 0) { - writer.writeBytes( - 4, - f - ); - } - f = message.getDerivationPath(); - if (f.length > 0) { - writer.writeString( - 5, - f - ); - } - f = message.getExternalKeyCount(); - if (f !== 0) { - writer.writeUint32( - 6, - f - ); - } - f = message.getInternalKeyCount(); - if (f !== 0) { - writer.writeUint32( - 7, - f - ); - } - f = message.getWatchOnly(); - if (f) { - writer.writeBool( - 8, - f - ); - } -}; - - -/** - * optional string name = 1; - * @return {string} - */ -proto.walletrpc.Account.prototype.getName = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.walletrpc.Account} returns this - */ -proto.walletrpc.Account.prototype.setName = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional AddressType address_type = 2; - * @return {!proto.walletrpc.AddressType} - */ -proto.walletrpc.Account.prototype.getAddressType = function() { - return /** @type {!proto.walletrpc.AddressType} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {!proto.walletrpc.AddressType} value - * @return {!proto.walletrpc.Account} returns this - */ -proto.walletrpc.Account.prototype.setAddressType = function(value) { - return jspb.Message.setProto3EnumField(this, 2, value); -}; - - -/** - * optional string extended_public_key = 3; - * @return {string} - */ -proto.walletrpc.Account.prototype.getExtendedPublicKey = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * @param {string} value - * @return {!proto.walletrpc.Account} returns this - */ -proto.walletrpc.Account.prototype.setExtendedPublicKey = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); -}; - - -/** - * optional bytes master_key_fingerprint = 4; - * @return {!(string|Uint8Array)} - */ -proto.walletrpc.Account.prototype.getMasterKeyFingerprint = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 4, "")); -}; - - -/** - * optional bytes master_key_fingerprint = 4; - * This is a type-conversion wrapper around `getMasterKeyFingerprint()` - * @return {string} - */ -proto.walletrpc.Account.prototype.getMasterKeyFingerprint_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getMasterKeyFingerprint())); -}; - - -/** - * optional bytes master_key_fingerprint = 4; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getMasterKeyFingerprint()` - * @return {!Uint8Array} - */ -proto.walletrpc.Account.prototype.getMasterKeyFingerprint_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getMasterKeyFingerprint())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.walletrpc.Account} returns this - */ -proto.walletrpc.Account.prototype.setMasterKeyFingerprint = function(value) { - return jspb.Message.setProto3BytesField(this, 4, value); -}; - - -/** - * optional string derivation_path = 5; - * @return {string} - */ -proto.walletrpc.Account.prototype.getDerivationPath = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); -}; - - -/** - * @param {string} value - * @return {!proto.walletrpc.Account} returns this - */ -proto.walletrpc.Account.prototype.setDerivationPath = function(value) { - return jspb.Message.setProto3StringField(this, 5, value); -}; - - -/** - * optional uint32 external_key_count = 6; - * @return {number} - */ -proto.walletrpc.Account.prototype.getExternalKeyCount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.walletrpc.Account} returns this - */ -proto.walletrpc.Account.prototype.setExternalKeyCount = function(value) { - return jspb.Message.setProto3IntField(this, 6, value); -}; - - -/** - * optional uint32 internal_key_count = 7; - * @return {number} - */ -proto.walletrpc.Account.prototype.getInternalKeyCount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.walletrpc.Account} returns this - */ -proto.walletrpc.Account.prototype.setInternalKeyCount = function(value) { - return jspb.Message.setProto3IntField(this, 7, value); -}; - - -/** - * optional bool watch_only = 8; - * @return {boolean} - */ -proto.walletrpc.Account.prototype.getWatchOnly = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 8, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.walletrpc.Account} returns this - */ -proto.walletrpc.Account.prototype.setWatchOnly = function(value) { - return jspb.Message.setProto3BooleanField(this, 8, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.walletrpc.ListAccountsRequest.prototype.toObject = function(opt_includeInstance) { - return proto.walletrpc.ListAccountsRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.walletrpc.ListAccountsRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.walletrpc.ListAccountsRequest.toObject = function(includeInstance, msg) { - var f, obj = { - name: jspb.Message.getFieldWithDefault(msg, 1, ""), - addressType: jspb.Message.getFieldWithDefault(msg, 2, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.walletrpc.ListAccountsRequest} - */ -proto.walletrpc.ListAccountsRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.walletrpc.ListAccountsRequest; - return proto.walletrpc.ListAccountsRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.walletrpc.ListAccountsRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.walletrpc.ListAccountsRequest} - */ -proto.walletrpc.ListAccountsRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setName(value); - break; - case 2: - var value = /** @type {!proto.walletrpc.AddressType} */ (reader.readEnum()); - msg.setAddressType(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.walletrpc.ListAccountsRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.walletrpc.ListAccountsRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.walletrpc.ListAccountsRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.walletrpc.ListAccountsRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getName(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getAddressType(); - if (f !== 0.0) { - writer.writeEnum( - 2, - f - ); - } -}; - - -/** - * optional string name = 1; - * @return {string} - */ -proto.walletrpc.ListAccountsRequest.prototype.getName = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.walletrpc.ListAccountsRequest} returns this - */ -proto.walletrpc.ListAccountsRequest.prototype.setName = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional AddressType address_type = 2; - * @return {!proto.walletrpc.AddressType} - */ -proto.walletrpc.ListAccountsRequest.prototype.getAddressType = function() { - return /** @type {!proto.walletrpc.AddressType} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {!proto.walletrpc.AddressType} value - * @return {!proto.walletrpc.ListAccountsRequest} returns this - */ -proto.walletrpc.ListAccountsRequest.prototype.setAddressType = function(value) { - return jspb.Message.setProto3EnumField(this, 2, value); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.walletrpc.ListAccountsResponse.repeatedFields_ = [1]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.walletrpc.ListAccountsResponse.prototype.toObject = function(opt_includeInstance) { - return proto.walletrpc.ListAccountsResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.walletrpc.ListAccountsResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.walletrpc.ListAccountsResponse.toObject = function(includeInstance, msg) { - var f, obj = { - accountsList: jspb.Message.toObjectList(msg.getAccountsList(), - proto.walletrpc.Account.toObject, includeInstance) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.walletrpc.ListAccountsResponse} - */ -proto.walletrpc.ListAccountsResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.walletrpc.ListAccountsResponse; - return proto.walletrpc.ListAccountsResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.walletrpc.ListAccountsResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.walletrpc.ListAccountsResponse} - */ -proto.walletrpc.ListAccountsResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.walletrpc.Account; - reader.readMessage(value,proto.walletrpc.Account.deserializeBinaryFromReader); - msg.addAccounts(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.walletrpc.ListAccountsResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.walletrpc.ListAccountsResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.walletrpc.ListAccountsResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.walletrpc.ListAccountsResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getAccountsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 1, - f, - proto.walletrpc.Account.serializeBinaryToWriter - ); - } -}; - - -/** - * repeated Account accounts = 1; - * @return {!Array} - */ -proto.walletrpc.ListAccountsResponse.prototype.getAccountsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.walletrpc.Account, 1)); -}; - - -/** - * @param {!Array} value - * @return {!proto.walletrpc.ListAccountsResponse} returns this -*/ -proto.walletrpc.ListAccountsResponse.prototype.setAccountsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); -}; - - -/** - * @param {!proto.walletrpc.Account=} opt_value - * @param {number=} opt_index - * @return {!proto.walletrpc.Account} - */ -proto.walletrpc.ListAccountsResponse.prototype.addAccounts = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.walletrpc.Account, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.walletrpc.ListAccountsResponse} returns this - */ -proto.walletrpc.ListAccountsResponse.prototype.clearAccountsList = function() { - return this.setAccountsList([]); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.walletrpc.ImportAccountRequest.prototype.toObject = function(opt_includeInstance) { - return proto.walletrpc.ImportAccountRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.walletrpc.ImportAccountRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.walletrpc.ImportAccountRequest.toObject = function(includeInstance, msg) { - var f, obj = { - name: jspb.Message.getFieldWithDefault(msg, 1, ""), - extendedPublicKey: jspb.Message.getFieldWithDefault(msg, 2, ""), - masterKeyFingerprint: msg.getMasterKeyFingerprint_asB64(), - addressType: jspb.Message.getFieldWithDefault(msg, 4, 0), - dryRun: jspb.Message.getBooleanFieldWithDefault(msg, 5, false) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.walletrpc.ImportAccountRequest} - */ -proto.walletrpc.ImportAccountRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.walletrpc.ImportAccountRequest; - return proto.walletrpc.ImportAccountRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.walletrpc.ImportAccountRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.walletrpc.ImportAccountRequest} - */ -proto.walletrpc.ImportAccountRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setName(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setExtendedPublicKey(value); - break; - case 3: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setMasterKeyFingerprint(value); - break; - case 4: - var value = /** @type {!proto.walletrpc.AddressType} */ (reader.readEnum()); - msg.setAddressType(value); - break; - case 5: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setDryRun(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.walletrpc.ImportAccountRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.walletrpc.ImportAccountRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.walletrpc.ImportAccountRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.walletrpc.ImportAccountRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getName(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getExtendedPublicKey(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getMasterKeyFingerprint_asU8(); - if (f.length > 0) { - writer.writeBytes( - 3, - f - ); - } - f = message.getAddressType(); - if (f !== 0.0) { - writer.writeEnum( - 4, - f - ); - } - f = message.getDryRun(); - if (f) { - writer.writeBool( - 5, - f - ); - } -}; - - -/** - * optional string name = 1; - * @return {string} - */ -proto.walletrpc.ImportAccountRequest.prototype.getName = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.walletrpc.ImportAccountRequest} returns this - */ -proto.walletrpc.ImportAccountRequest.prototype.setName = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional string extended_public_key = 2; - * @return {string} - */ -proto.walletrpc.ImportAccountRequest.prototype.getExtendedPublicKey = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.walletrpc.ImportAccountRequest} returns this - */ -proto.walletrpc.ImportAccountRequest.prototype.setExtendedPublicKey = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional bytes master_key_fingerprint = 3; - * @return {!(string|Uint8Array)} - */ -proto.walletrpc.ImportAccountRequest.prototype.getMasterKeyFingerprint = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * optional bytes master_key_fingerprint = 3; - * This is a type-conversion wrapper around `getMasterKeyFingerprint()` - * @return {string} - */ -proto.walletrpc.ImportAccountRequest.prototype.getMasterKeyFingerprint_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getMasterKeyFingerprint())); -}; - - -/** - * optional bytes master_key_fingerprint = 3; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getMasterKeyFingerprint()` - * @return {!Uint8Array} - */ -proto.walletrpc.ImportAccountRequest.prototype.getMasterKeyFingerprint_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getMasterKeyFingerprint())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.walletrpc.ImportAccountRequest} returns this - */ -proto.walletrpc.ImportAccountRequest.prototype.setMasterKeyFingerprint = function(value) { - return jspb.Message.setProto3BytesField(this, 3, value); -}; - - -/** - * optional AddressType address_type = 4; - * @return {!proto.walletrpc.AddressType} - */ -proto.walletrpc.ImportAccountRequest.prototype.getAddressType = function() { - return /** @type {!proto.walletrpc.AddressType} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** - * @param {!proto.walletrpc.AddressType} value - * @return {!proto.walletrpc.ImportAccountRequest} returns this - */ -proto.walletrpc.ImportAccountRequest.prototype.setAddressType = function(value) { - return jspb.Message.setProto3EnumField(this, 4, value); -}; - - -/** - * optional bool dry_run = 5; - * @return {boolean} - */ -proto.walletrpc.ImportAccountRequest.prototype.getDryRun = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 5, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.walletrpc.ImportAccountRequest} returns this - */ -proto.walletrpc.ImportAccountRequest.prototype.setDryRun = function(value) { - return jspb.Message.setProto3BooleanField(this, 5, value); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.walletrpc.ImportAccountResponse.repeatedFields_ = [2,3]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.walletrpc.ImportAccountResponse.prototype.toObject = function(opt_includeInstance) { - return proto.walletrpc.ImportAccountResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.walletrpc.ImportAccountResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.walletrpc.ImportAccountResponse.toObject = function(includeInstance, msg) { - var f, obj = { - account: (f = msg.getAccount()) && proto.walletrpc.Account.toObject(includeInstance, f), - dryRunExternalAddrsList: (f = jspb.Message.getRepeatedField(msg, 2)) == null ? undefined : f, - dryRunInternalAddrsList: (f = jspb.Message.getRepeatedField(msg, 3)) == null ? undefined : f - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.walletrpc.ImportAccountResponse} - */ -proto.walletrpc.ImportAccountResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.walletrpc.ImportAccountResponse; - return proto.walletrpc.ImportAccountResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.walletrpc.ImportAccountResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.walletrpc.ImportAccountResponse} - */ -proto.walletrpc.ImportAccountResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.walletrpc.Account; - reader.readMessage(value,proto.walletrpc.Account.deserializeBinaryFromReader); - msg.setAccount(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.addDryRunExternalAddrs(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.addDryRunInternalAddrs(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.walletrpc.ImportAccountResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.walletrpc.ImportAccountResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.walletrpc.ImportAccountResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.walletrpc.ImportAccountResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getAccount(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.walletrpc.Account.serializeBinaryToWriter - ); - } - f = message.getDryRunExternalAddrsList(); - if (f.length > 0) { - writer.writeRepeatedString( - 2, - f - ); - } - f = message.getDryRunInternalAddrsList(); - if (f.length > 0) { - writer.writeRepeatedString( - 3, - f - ); - } -}; - - -/** - * optional Account account = 1; - * @return {?proto.walletrpc.Account} - */ -proto.walletrpc.ImportAccountResponse.prototype.getAccount = function() { - return /** @type{?proto.walletrpc.Account} */ ( - jspb.Message.getWrapperField(this, proto.walletrpc.Account, 1)); -}; - - -/** - * @param {?proto.walletrpc.Account|undefined} value - * @return {!proto.walletrpc.ImportAccountResponse} returns this -*/ -proto.walletrpc.ImportAccountResponse.prototype.setAccount = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.walletrpc.ImportAccountResponse} returns this - */ -proto.walletrpc.ImportAccountResponse.prototype.clearAccount = function() { - return this.setAccount(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.walletrpc.ImportAccountResponse.prototype.hasAccount = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * repeated string dry_run_external_addrs = 2; - * @return {!Array} - */ -proto.walletrpc.ImportAccountResponse.prototype.getDryRunExternalAddrsList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 2)); -}; - - -/** - * @param {!Array} value - * @return {!proto.walletrpc.ImportAccountResponse} returns this - */ -proto.walletrpc.ImportAccountResponse.prototype.setDryRunExternalAddrsList = function(value) { - return jspb.Message.setField(this, 2, value || []); -}; - - -/** - * @param {string} value - * @param {number=} opt_index - * @return {!proto.walletrpc.ImportAccountResponse} returns this - */ -proto.walletrpc.ImportAccountResponse.prototype.addDryRunExternalAddrs = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 2, value, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.walletrpc.ImportAccountResponse} returns this - */ -proto.walletrpc.ImportAccountResponse.prototype.clearDryRunExternalAddrsList = function() { - return this.setDryRunExternalAddrsList([]); -}; - - -/** - * repeated string dry_run_internal_addrs = 3; - * @return {!Array} - */ -proto.walletrpc.ImportAccountResponse.prototype.getDryRunInternalAddrsList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 3)); -}; - - -/** - * @param {!Array} value - * @return {!proto.walletrpc.ImportAccountResponse} returns this - */ -proto.walletrpc.ImportAccountResponse.prototype.setDryRunInternalAddrsList = function(value) { - return jspb.Message.setField(this, 3, value || []); -}; - - -/** - * @param {string} value - * @param {number=} opt_index - * @return {!proto.walletrpc.ImportAccountResponse} returns this - */ -proto.walletrpc.ImportAccountResponse.prototype.addDryRunInternalAddrs = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 3, value, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.walletrpc.ImportAccountResponse} returns this - */ -proto.walletrpc.ImportAccountResponse.prototype.clearDryRunInternalAddrsList = function() { - return this.setDryRunInternalAddrsList([]); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.walletrpc.ImportPublicKeyRequest.prototype.toObject = function(opt_includeInstance) { - return proto.walletrpc.ImportPublicKeyRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.walletrpc.ImportPublicKeyRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.walletrpc.ImportPublicKeyRequest.toObject = function(includeInstance, msg) { - var f, obj = { - publicKey: msg.getPublicKey_asB64(), - addressType: jspb.Message.getFieldWithDefault(msg, 2, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.walletrpc.ImportPublicKeyRequest} - */ -proto.walletrpc.ImportPublicKeyRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.walletrpc.ImportPublicKeyRequest; - return proto.walletrpc.ImportPublicKeyRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.walletrpc.ImportPublicKeyRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.walletrpc.ImportPublicKeyRequest} - */ -proto.walletrpc.ImportPublicKeyRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setPublicKey(value); - break; - case 2: - var value = /** @type {!proto.walletrpc.AddressType} */ (reader.readEnum()); - msg.setAddressType(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.walletrpc.ImportPublicKeyRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.walletrpc.ImportPublicKeyRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.walletrpc.ImportPublicKeyRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.walletrpc.ImportPublicKeyRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getPublicKey_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getAddressType(); - if (f !== 0.0) { - writer.writeEnum( - 2, - f - ); - } -}; - - -/** - * optional bytes public_key = 1; - * @return {!(string|Uint8Array)} - */ -proto.walletrpc.ImportPublicKeyRequest.prototype.getPublicKey = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes public_key = 1; - * This is a type-conversion wrapper around `getPublicKey()` - * @return {string} - */ -proto.walletrpc.ImportPublicKeyRequest.prototype.getPublicKey_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getPublicKey())); -}; - - -/** - * optional bytes public_key = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getPublicKey()` - * @return {!Uint8Array} - */ -proto.walletrpc.ImportPublicKeyRequest.prototype.getPublicKey_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getPublicKey())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.walletrpc.ImportPublicKeyRequest} returns this - */ -proto.walletrpc.ImportPublicKeyRequest.prototype.setPublicKey = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional AddressType address_type = 2; - * @return {!proto.walletrpc.AddressType} - */ -proto.walletrpc.ImportPublicKeyRequest.prototype.getAddressType = function() { - return /** @type {!proto.walletrpc.AddressType} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {!proto.walletrpc.AddressType} value - * @return {!proto.walletrpc.ImportPublicKeyRequest} returns this - */ -proto.walletrpc.ImportPublicKeyRequest.prototype.setAddressType = function(value) { - return jspb.Message.setProto3EnumField(this, 2, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.walletrpc.ImportPublicKeyResponse.prototype.toObject = function(opt_includeInstance) { - return proto.walletrpc.ImportPublicKeyResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.walletrpc.ImportPublicKeyResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.walletrpc.ImportPublicKeyResponse.toObject = function(includeInstance, msg) { - var f, obj = { - - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.walletrpc.ImportPublicKeyResponse} - */ -proto.walletrpc.ImportPublicKeyResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.walletrpc.ImportPublicKeyResponse; - return proto.walletrpc.ImportPublicKeyResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.walletrpc.ImportPublicKeyResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.walletrpc.ImportPublicKeyResponse} - */ -proto.walletrpc.ImportPublicKeyResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.walletrpc.ImportPublicKeyResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.walletrpc.ImportPublicKeyResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.walletrpc.ImportPublicKeyResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.walletrpc.ImportPublicKeyResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.walletrpc.Transaction.prototype.toObject = function(opt_includeInstance) { - return proto.walletrpc.Transaction.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.walletrpc.Transaction} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.walletrpc.Transaction.toObject = function(includeInstance, msg) { - var f, obj = { - txHex: msg.getTxHex_asB64(), - label: jspb.Message.getFieldWithDefault(msg, 2, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.walletrpc.Transaction} - */ -proto.walletrpc.Transaction.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.walletrpc.Transaction; - return proto.walletrpc.Transaction.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.walletrpc.Transaction} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.walletrpc.Transaction} - */ -proto.walletrpc.Transaction.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setTxHex(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setLabel(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.walletrpc.Transaction.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.walletrpc.Transaction.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.walletrpc.Transaction} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.walletrpc.Transaction.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getTxHex_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getLabel(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } -}; - - -/** - * optional bytes tx_hex = 1; - * @return {!(string|Uint8Array)} - */ -proto.walletrpc.Transaction.prototype.getTxHex = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes tx_hex = 1; - * This is a type-conversion wrapper around `getTxHex()` - * @return {string} - */ -proto.walletrpc.Transaction.prototype.getTxHex_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getTxHex())); -}; - - -/** - * optional bytes tx_hex = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getTxHex()` - * @return {!Uint8Array} - */ -proto.walletrpc.Transaction.prototype.getTxHex_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getTxHex())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.walletrpc.Transaction} returns this - */ -proto.walletrpc.Transaction.prototype.setTxHex = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional string label = 2; - * @return {string} - */ -proto.walletrpc.Transaction.prototype.getLabel = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.walletrpc.Transaction} returns this - */ -proto.walletrpc.Transaction.prototype.setLabel = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.walletrpc.PublishResponse.prototype.toObject = function(opt_includeInstance) { - return proto.walletrpc.PublishResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.walletrpc.PublishResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.walletrpc.PublishResponse.toObject = function(includeInstance, msg) { - var f, obj = { - publishError: jspb.Message.getFieldWithDefault(msg, 1, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.walletrpc.PublishResponse} - */ -proto.walletrpc.PublishResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.walletrpc.PublishResponse; - return proto.walletrpc.PublishResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.walletrpc.PublishResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.walletrpc.PublishResponse} - */ -proto.walletrpc.PublishResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setPublishError(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.walletrpc.PublishResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.walletrpc.PublishResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.walletrpc.PublishResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.walletrpc.PublishResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getPublishError(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } -}; - - -/** - * optional string publish_error = 1; - * @return {string} - */ -proto.walletrpc.PublishResponse.prototype.getPublishError = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.walletrpc.PublishResponse} returns this - */ -proto.walletrpc.PublishResponse.prototype.setPublishError = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.walletrpc.SendOutputsRequest.repeatedFields_ = [2]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.walletrpc.SendOutputsRequest.prototype.toObject = function(opt_includeInstance) { - return proto.walletrpc.SendOutputsRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.walletrpc.SendOutputsRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.walletrpc.SendOutputsRequest.toObject = function(includeInstance, msg) { - var f, obj = { - satPerKw: jspb.Message.getFieldWithDefault(msg, 1, 0), - outputsList: jspb.Message.toObjectList(msg.getOutputsList(), - signrpc_signer_pb.TxOut.toObject, includeInstance), - label: jspb.Message.getFieldWithDefault(msg, 3, ""), - minConfs: jspb.Message.getFieldWithDefault(msg, 4, 0), - spendUnconfirmed: jspb.Message.getBooleanFieldWithDefault(msg, 5, false) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.walletrpc.SendOutputsRequest} - */ -proto.walletrpc.SendOutputsRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.walletrpc.SendOutputsRequest; - return proto.walletrpc.SendOutputsRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.walletrpc.SendOutputsRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.walletrpc.SendOutputsRequest} - */ -proto.walletrpc.SendOutputsRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readInt64()); - msg.setSatPerKw(value); - break; - case 2: - var value = new signrpc_signer_pb.TxOut; - reader.readMessage(value,signrpc_signer_pb.TxOut.deserializeBinaryFromReader); - msg.addOutputs(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setLabel(value); - break; - case 4: - var value = /** @type {number} */ (reader.readInt32()); - msg.setMinConfs(value); - break; - case 5: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setSpendUnconfirmed(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.walletrpc.SendOutputsRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.walletrpc.SendOutputsRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.walletrpc.SendOutputsRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.walletrpc.SendOutputsRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getSatPerKw(); - if (f !== 0) { - writer.writeInt64( - 1, - f - ); - } - f = message.getOutputsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 2, - f, - signrpc_signer_pb.TxOut.serializeBinaryToWriter - ); - } - f = message.getLabel(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } - f = message.getMinConfs(); - if (f !== 0) { - writer.writeInt32( - 4, - f - ); - } - f = message.getSpendUnconfirmed(); - if (f) { - writer.writeBool( - 5, - f - ); - } -}; - - -/** - * optional int64 sat_per_kw = 1; - * @return {number} - */ -proto.walletrpc.SendOutputsRequest.prototype.getSatPerKw = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.walletrpc.SendOutputsRequest} returns this - */ -proto.walletrpc.SendOutputsRequest.prototype.setSatPerKw = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); -}; - - -/** - * repeated signrpc.TxOut outputs = 2; - * @return {!Array} - */ -proto.walletrpc.SendOutputsRequest.prototype.getOutputsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, signrpc_signer_pb.TxOut, 2)); -}; - - -/** - * @param {!Array} value - * @return {!proto.walletrpc.SendOutputsRequest} returns this -*/ -proto.walletrpc.SendOutputsRequest.prototype.setOutputsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 2, value); -}; - - -/** - * @param {!proto.signrpc.TxOut=} opt_value - * @param {number=} opt_index - * @return {!proto.signrpc.TxOut} - */ -proto.walletrpc.SendOutputsRequest.prototype.addOutputs = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.signrpc.TxOut, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.walletrpc.SendOutputsRequest} returns this - */ -proto.walletrpc.SendOutputsRequest.prototype.clearOutputsList = function() { - return this.setOutputsList([]); -}; - - -/** - * optional string label = 3; - * @return {string} - */ -proto.walletrpc.SendOutputsRequest.prototype.getLabel = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * @param {string} value - * @return {!proto.walletrpc.SendOutputsRequest} returns this - */ -proto.walletrpc.SendOutputsRequest.prototype.setLabel = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); -}; - - -/** - * optional int32 min_confs = 4; - * @return {number} - */ -proto.walletrpc.SendOutputsRequest.prototype.getMinConfs = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.walletrpc.SendOutputsRequest} returns this - */ -proto.walletrpc.SendOutputsRequest.prototype.setMinConfs = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); -}; - - -/** - * optional bool spend_unconfirmed = 5; - * @return {boolean} - */ -proto.walletrpc.SendOutputsRequest.prototype.getSpendUnconfirmed = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 5, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.walletrpc.SendOutputsRequest} returns this - */ -proto.walletrpc.SendOutputsRequest.prototype.setSpendUnconfirmed = function(value) { - return jspb.Message.setProto3BooleanField(this, 5, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.walletrpc.SendOutputsResponse.prototype.toObject = function(opt_includeInstance) { - return proto.walletrpc.SendOutputsResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.walletrpc.SendOutputsResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.walletrpc.SendOutputsResponse.toObject = function(includeInstance, msg) { - var f, obj = { - rawTx: msg.getRawTx_asB64() - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.walletrpc.SendOutputsResponse} - */ -proto.walletrpc.SendOutputsResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.walletrpc.SendOutputsResponse; - return proto.walletrpc.SendOutputsResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.walletrpc.SendOutputsResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.walletrpc.SendOutputsResponse} - */ -proto.walletrpc.SendOutputsResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setRawTx(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.walletrpc.SendOutputsResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.walletrpc.SendOutputsResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.walletrpc.SendOutputsResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.walletrpc.SendOutputsResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getRawTx_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } -}; - - -/** - * optional bytes raw_tx = 1; - * @return {!(string|Uint8Array)} - */ -proto.walletrpc.SendOutputsResponse.prototype.getRawTx = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes raw_tx = 1; - * This is a type-conversion wrapper around `getRawTx()` - * @return {string} - */ -proto.walletrpc.SendOutputsResponse.prototype.getRawTx_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getRawTx())); -}; - - -/** - * optional bytes raw_tx = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getRawTx()` - * @return {!Uint8Array} - */ -proto.walletrpc.SendOutputsResponse.prototype.getRawTx_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getRawTx())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.walletrpc.SendOutputsResponse} returns this - */ -proto.walletrpc.SendOutputsResponse.prototype.setRawTx = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.walletrpc.EstimateFeeRequest.prototype.toObject = function(opt_includeInstance) { - return proto.walletrpc.EstimateFeeRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.walletrpc.EstimateFeeRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.walletrpc.EstimateFeeRequest.toObject = function(includeInstance, msg) { - var f, obj = { - confTarget: jspb.Message.getFieldWithDefault(msg, 1, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.walletrpc.EstimateFeeRequest} - */ -proto.walletrpc.EstimateFeeRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.walletrpc.EstimateFeeRequest; - return proto.walletrpc.EstimateFeeRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.walletrpc.EstimateFeeRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.walletrpc.EstimateFeeRequest} - */ -proto.walletrpc.EstimateFeeRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readInt32()); - msg.setConfTarget(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.walletrpc.EstimateFeeRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.walletrpc.EstimateFeeRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.walletrpc.EstimateFeeRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.walletrpc.EstimateFeeRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getConfTarget(); - if (f !== 0) { - writer.writeInt32( - 1, - f - ); - } -}; - - -/** - * optional int32 conf_target = 1; - * @return {number} - */ -proto.walletrpc.EstimateFeeRequest.prototype.getConfTarget = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.walletrpc.EstimateFeeRequest} returns this - */ -proto.walletrpc.EstimateFeeRequest.prototype.setConfTarget = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.walletrpc.EstimateFeeResponse.prototype.toObject = function(opt_includeInstance) { - return proto.walletrpc.EstimateFeeResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.walletrpc.EstimateFeeResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.walletrpc.EstimateFeeResponse.toObject = function(includeInstance, msg) { - var f, obj = { - satPerKw: jspb.Message.getFieldWithDefault(msg, 1, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.walletrpc.EstimateFeeResponse} - */ -proto.walletrpc.EstimateFeeResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.walletrpc.EstimateFeeResponse; - return proto.walletrpc.EstimateFeeResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.walletrpc.EstimateFeeResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.walletrpc.EstimateFeeResponse} - */ -proto.walletrpc.EstimateFeeResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readInt64()); - msg.setSatPerKw(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.walletrpc.EstimateFeeResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.walletrpc.EstimateFeeResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.walletrpc.EstimateFeeResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.walletrpc.EstimateFeeResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getSatPerKw(); - if (f !== 0) { - writer.writeInt64( - 1, - f - ); - } -}; - - -/** - * optional int64 sat_per_kw = 1; - * @return {number} - */ -proto.walletrpc.EstimateFeeResponse.prototype.getSatPerKw = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.walletrpc.EstimateFeeResponse} returns this - */ -proto.walletrpc.EstimateFeeResponse.prototype.setSatPerKw = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.walletrpc.PendingSweep.prototype.toObject = function(opt_includeInstance) { - return proto.walletrpc.PendingSweep.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.walletrpc.PendingSweep} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.walletrpc.PendingSweep.toObject = function(includeInstance, msg) { - var f, obj = { - outpoint: (f = msg.getOutpoint()) && lightning_pb.OutPoint.toObject(includeInstance, f), - witnessType: jspb.Message.getFieldWithDefault(msg, 2, 0), - amountSat: jspb.Message.getFieldWithDefault(msg, 3, 0), - satPerByte: jspb.Message.getFieldWithDefault(msg, 4, 0), - broadcastAttempts: jspb.Message.getFieldWithDefault(msg, 5, 0), - nextBroadcastHeight: jspb.Message.getFieldWithDefault(msg, 6, 0), - requestedConfTarget: jspb.Message.getFieldWithDefault(msg, 8, 0), - requestedSatPerByte: jspb.Message.getFieldWithDefault(msg, 9, 0), - satPerVbyte: jspb.Message.getFieldWithDefault(msg, 10, 0), - requestedSatPerVbyte: jspb.Message.getFieldWithDefault(msg, 11, 0), - force: jspb.Message.getBooleanFieldWithDefault(msg, 7, false) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.walletrpc.PendingSweep} - */ -proto.walletrpc.PendingSweep.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.walletrpc.PendingSweep; - return proto.walletrpc.PendingSweep.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.walletrpc.PendingSweep} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.walletrpc.PendingSweep} - */ -proto.walletrpc.PendingSweep.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new lightning_pb.OutPoint; - reader.readMessage(value,lightning_pb.OutPoint.deserializeBinaryFromReader); - msg.setOutpoint(value); - break; - case 2: - var value = /** @type {!proto.walletrpc.WitnessType} */ (reader.readEnum()); - msg.setWitnessType(value); - break; - case 3: - var value = /** @type {number} */ (reader.readUint32()); - msg.setAmountSat(value); - break; - case 4: - var value = /** @type {number} */ (reader.readUint32()); - msg.setSatPerByte(value); - break; - case 5: - var value = /** @type {number} */ (reader.readUint32()); - msg.setBroadcastAttempts(value); - break; - case 6: - var value = /** @type {number} */ (reader.readUint32()); - msg.setNextBroadcastHeight(value); - break; - case 8: - var value = /** @type {number} */ (reader.readUint32()); - msg.setRequestedConfTarget(value); - break; - case 9: - var value = /** @type {number} */ (reader.readUint32()); - msg.setRequestedSatPerByte(value); - break; - case 10: - var value = /** @type {number} */ (reader.readUint64()); - msg.setSatPerVbyte(value); - break; - case 11: - var value = /** @type {number} */ (reader.readUint64()); - msg.setRequestedSatPerVbyte(value); - break; - case 7: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setForce(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.walletrpc.PendingSweep.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.walletrpc.PendingSweep.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.walletrpc.PendingSweep} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.walletrpc.PendingSweep.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getOutpoint(); - if (f != null) { - writer.writeMessage( - 1, - f, - lightning_pb.OutPoint.serializeBinaryToWriter - ); - } - f = message.getWitnessType(); - if (f !== 0.0) { - writer.writeEnum( - 2, - f - ); - } - f = message.getAmountSat(); - if (f !== 0) { - writer.writeUint32( - 3, - f - ); - } - f = message.getSatPerByte(); - if (f !== 0) { - writer.writeUint32( - 4, - f - ); - } - f = message.getBroadcastAttempts(); - if (f !== 0) { - writer.writeUint32( - 5, - f - ); - } - f = message.getNextBroadcastHeight(); - if (f !== 0) { - writer.writeUint32( - 6, - f - ); - } - f = message.getRequestedConfTarget(); - if (f !== 0) { - writer.writeUint32( - 8, - f - ); - } - f = message.getRequestedSatPerByte(); - if (f !== 0) { - writer.writeUint32( - 9, - f - ); - } - f = message.getSatPerVbyte(); - if (f !== 0) { - writer.writeUint64( - 10, - f - ); - } - f = message.getRequestedSatPerVbyte(); - if (f !== 0) { - writer.writeUint64( - 11, - f - ); - } - f = message.getForce(); - if (f) { - writer.writeBool( - 7, - f - ); - } -}; - - -/** - * optional lnrpc.OutPoint outpoint = 1; - * @return {?proto.lnrpc.OutPoint} - */ -proto.walletrpc.PendingSweep.prototype.getOutpoint = function() { - return /** @type{?proto.lnrpc.OutPoint} */ ( - jspb.Message.getWrapperField(this, lightning_pb.OutPoint, 1)); -}; - - -/** - * @param {?proto.lnrpc.OutPoint|undefined} value - * @return {!proto.walletrpc.PendingSweep} returns this -*/ -proto.walletrpc.PendingSweep.prototype.setOutpoint = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.walletrpc.PendingSweep} returns this - */ -proto.walletrpc.PendingSweep.prototype.clearOutpoint = function() { - return this.setOutpoint(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.walletrpc.PendingSweep.prototype.hasOutpoint = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional WitnessType witness_type = 2; - * @return {!proto.walletrpc.WitnessType} - */ -proto.walletrpc.PendingSweep.prototype.getWitnessType = function() { - return /** @type {!proto.walletrpc.WitnessType} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {!proto.walletrpc.WitnessType} value - * @return {!proto.walletrpc.PendingSweep} returns this - */ -proto.walletrpc.PendingSweep.prototype.setWitnessType = function(value) { - return jspb.Message.setProto3EnumField(this, 2, value); -}; - - -/** - * optional uint32 amount_sat = 3; - * @return {number} - */ -proto.walletrpc.PendingSweep.prototype.getAmountSat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.walletrpc.PendingSweep} returns this - */ -proto.walletrpc.PendingSweep.prototype.setAmountSat = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - -/** - * optional uint32 sat_per_byte = 4; - * @return {number} - */ -proto.walletrpc.PendingSweep.prototype.getSatPerByte = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.walletrpc.PendingSweep} returns this - */ -proto.walletrpc.PendingSweep.prototype.setSatPerByte = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); -}; - - -/** - * optional uint32 broadcast_attempts = 5; - * @return {number} - */ -proto.walletrpc.PendingSweep.prototype.getBroadcastAttempts = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.walletrpc.PendingSweep} returns this - */ -proto.walletrpc.PendingSweep.prototype.setBroadcastAttempts = function(value) { - return jspb.Message.setProto3IntField(this, 5, value); -}; - - -/** - * optional uint32 next_broadcast_height = 6; - * @return {number} - */ -proto.walletrpc.PendingSweep.prototype.getNextBroadcastHeight = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.walletrpc.PendingSweep} returns this - */ -proto.walletrpc.PendingSweep.prototype.setNextBroadcastHeight = function(value) { - return jspb.Message.setProto3IntField(this, 6, value); -}; - - -/** - * optional uint32 requested_conf_target = 8; - * @return {number} - */ -proto.walletrpc.PendingSweep.prototype.getRequestedConfTarget = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.walletrpc.PendingSweep} returns this - */ -proto.walletrpc.PendingSweep.prototype.setRequestedConfTarget = function(value) { - return jspb.Message.setProto3IntField(this, 8, value); -}; - - -/** - * optional uint32 requested_sat_per_byte = 9; - * @return {number} - */ -proto.walletrpc.PendingSweep.prototype.getRequestedSatPerByte = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.walletrpc.PendingSweep} returns this - */ -proto.walletrpc.PendingSweep.prototype.setRequestedSatPerByte = function(value) { - return jspb.Message.setProto3IntField(this, 9, value); -}; - - -/** - * optional uint64 sat_per_vbyte = 10; - * @return {number} - */ -proto.walletrpc.PendingSweep.prototype.getSatPerVbyte = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 10, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.walletrpc.PendingSweep} returns this - */ -proto.walletrpc.PendingSweep.prototype.setSatPerVbyte = function(value) { - return jspb.Message.setProto3IntField(this, 10, value); -}; - - -/** - * optional uint64 requested_sat_per_vbyte = 11; - * @return {number} - */ -proto.walletrpc.PendingSweep.prototype.getRequestedSatPerVbyte = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 11, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.walletrpc.PendingSweep} returns this - */ -proto.walletrpc.PendingSweep.prototype.setRequestedSatPerVbyte = function(value) { - return jspb.Message.setProto3IntField(this, 11, value); -}; - - -/** - * optional bool force = 7; - * @return {boolean} - */ -proto.walletrpc.PendingSweep.prototype.getForce = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 7, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.walletrpc.PendingSweep} returns this - */ -proto.walletrpc.PendingSweep.prototype.setForce = function(value) { - return jspb.Message.setProto3BooleanField(this, 7, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.walletrpc.PendingSweepsRequest.prototype.toObject = function(opt_includeInstance) { - return proto.walletrpc.PendingSweepsRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.walletrpc.PendingSweepsRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.walletrpc.PendingSweepsRequest.toObject = function(includeInstance, msg) { - var f, obj = { - - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.walletrpc.PendingSweepsRequest} - */ -proto.walletrpc.PendingSweepsRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.walletrpc.PendingSweepsRequest; - return proto.walletrpc.PendingSweepsRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.walletrpc.PendingSweepsRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.walletrpc.PendingSweepsRequest} - */ -proto.walletrpc.PendingSweepsRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.walletrpc.PendingSweepsRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.walletrpc.PendingSweepsRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.walletrpc.PendingSweepsRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.walletrpc.PendingSweepsRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.walletrpc.PendingSweepsResponse.repeatedFields_ = [1]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.walletrpc.PendingSweepsResponse.prototype.toObject = function(opt_includeInstance) { - return proto.walletrpc.PendingSweepsResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.walletrpc.PendingSweepsResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.walletrpc.PendingSweepsResponse.toObject = function(includeInstance, msg) { - var f, obj = { - pendingSweepsList: jspb.Message.toObjectList(msg.getPendingSweepsList(), - proto.walletrpc.PendingSweep.toObject, includeInstance) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.walletrpc.PendingSweepsResponse} - */ -proto.walletrpc.PendingSweepsResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.walletrpc.PendingSweepsResponse; - return proto.walletrpc.PendingSweepsResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.walletrpc.PendingSweepsResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.walletrpc.PendingSweepsResponse} - */ -proto.walletrpc.PendingSweepsResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.walletrpc.PendingSweep; - reader.readMessage(value,proto.walletrpc.PendingSweep.deserializeBinaryFromReader); - msg.addPendingSweeps(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.walletrpc.PendingSweepsResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.walletrpc.PendingSweepsResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.walletrpc.PendingSweepsResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.walletrpc.PendingSweepsResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getPendingSweepsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 1, - f, - proto.walletrpc.PendingSweep.serializeBinaryToWriter - ); - } -}; - - -/** - * repeated PendingSweep pending_sweeps = 1; - * @return {!Array} - */ -proto.walletrpc.PendingSweepsResponse.prototype.getPendingSweepsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.walletrpc.PendingSweep, 1)); -}; - - -/** - * @param {!Array} value - * @return {!proto.walletrpc.PendingSweepsResponse} returns this -*/ -proto.walletrpc.PendingSweepsResponse.prototype.setPendingSweepsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); -}; - - -/** - * @param {!proto.walletrpc.PendingSweep=} opt_value - * @param {number=} opt_index - * @return {!proto.walletrpc.PendingSweep} - */ -proto.walletrpc.PendingSweepsResponse.prototype.addPendingSweeps = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.walletrpc.PendingSweep, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.walletrpc.PendingSweepsResponse} returns this - */ -proto.walletrpc.PendingSweepsResponse.prototype.clearPendingSweepsList = function() { - return this.setPendingSweepsList([]); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.walletrpc.BumpFeeRequest.prototype.toObject = function(opt_includeInstance) { - return proto.walletrpc.BumpFeeRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.walletrpc.BumpFeeRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.walletrpc.BumpFeeRequest.toObject = function(includeInstance, msg) { - var f, obj = { - outpoint: (f = msg.getOutpoint()) && lightning_pb.OutPoint.toObject(includeInstance, f), - targetConf: jspb.Message.getFieldWithDefault(msg, 2, 0), - satPerByte: jspb.Message.getFieldWithDefault(msg, 3, 0), - force: jspb.Message.getBooleanFieldWithDefault(msg, 4, false), - satPerVbyte: jspb.Message.getFieldWithDefault(msg, 5, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.walletrpc.BumpFeeRequest} - */ -proto.walletrpc.BumpFeeRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.walletrpc.BumpFeeRequest; - return proto.walletrpc.BumpFeeRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.walletrpc.BumpFeeRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.walletrpc.BumpFeeRequest} - */ -proto.walletrpc.BumpFeeRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new lightning_pb.OutPoint; - reader.readMessage(value,lightning_pb.OutPoint.deserializeBinaryFromReader); - msg.setOutpoint(value); - break; - case 2: - var value = /** @type {number} */ (reader.readUint32()); - msg.setTargetConf(value); - break; - case 3: - var value = /** @type {number} */ (reader.readUint32()); - msg.setSatPerByte(value); - break; - case 4: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setForce(value); - break; - case 5: - var value = /** @type {number} */ (reader.readUint64()); - msg.setSatPerVbyte(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.walletrpc.BumpFeeRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.walletrpc.BumpFeeRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.walletrpc.BumpFeeRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.walletrpc.BumpFeeRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getOutpoint(); - if (f != null) { - writer.writeMessage( - 1, - f, - lightning_pb.OutPoint.serializeBinaryToWriter - ); - } - f = message.getTargetConf(); - if (f !== 0) { - writer.writeUint32( - 2, - f - ); - } - f = message.getSatPerByte(); - if (f !== 0) { - writer.writeUint32( - 3, - f - ); - } - f = message.getForce(); - if (f) { - writer.writeBool( - 4, - f - ); - } - f = message.getSatPerVbyte(); - if (f !== 0) { - writer.writeUint64( - 5, - f - ); - } -}; - - -/** - * optional lnrpc.OutPoint outpoint = 1; - * @return {?proto.lnrpc.OutPoint} - */ -proto.walletrpc.BumpFeeRequest.prototype.getOutpoint = function() { - return /** @type{?proto.lnrpc.OutPoint} */ ( - jspb.Message.getWrapperField(this, lightning_pb.OutPoint, 1)); -}; - - -/** - * @param {?proto.lnrpc.OutPoint|undefined} value - * @return {!proto.walletrpc.BumpFeeRequest} returns this -*/ -proto.walletrpc.BumpFeeRequest.prototype.setOutpoint = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.walletrpc.BumpFeeRequest} returns this - */ -proto.walletrpc.BumpFeeRequest.prototype.clearOutpoint = function() { - return this.setOutpoint(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.walletrpc.BumpFeeRequest.prototype.hasOutpoint = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional uint32 target_conf = 2; - * @return {number} - */ -proto.walletrpc.BumpFeeRequest.prototype.getTargetConf = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.walletrpc.BumpFeeRequest} returns this - */ -proto.walletrpc.BumpFeeRequest.prototype.setTargetConf = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * optional uint32 sat_per_byte = 3; - * @return {number} - */ -proto.walletrpc.BumpFeeRequest.prototype.getSatPerByte = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.walletrpc.BumpFeeRequest} returns this - */ -proto.walletrpc.BumpFeeRequest.prototype.setSatPerByte = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - -/** - * optional bool force = 4; - * @return {boolean} - */ -proto.walletrpc.BumpFeeRequest.prototype.getForce = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 4, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.walletrpc.BumpFeeRequest} returns this - */ -proto.walletrpc.BumpFeeRequest.prototype.setForce = function(value) { - return jspb.Message.setProto3BooleanField(this, 4, value); -}; - - -/** - * optional uint64 sat_per_vbyte = 5; - * @return {number} - */ -proto.walletrpc.BumpFeeRequest.prototype.getSatPerVbyte = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.walletrpc.BumpFeeRequest} returns this - */ -proto.walletrpc.BumpFeeRequest.prototype.setSatPerVbyte = function(value) { - return jspb.Message.setProto3IntField(this, 5, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.walletrpc.BumpFeeResponse.prototype.toObject = function(opt_includeInstance) { - return proto.walletrpc.BumpFeeResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.walletrpc.BumpFeeResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.walletrpc.BumpFeeResponse.toObject = function(includeInstance, msg) { - var f, obj = { - - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.walletrpc.BumpFeeResponse} - */ -proto.walletrpc.BumpFeeResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.walletrpc.BumpFeeResponse; - return proto.walletrpc.BumpFeeResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.walletrpc.BumpFeeResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.walletrpc.BumpFeeResponse} - */ -proto.walletrpc.BumpFeeResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.walletrpc.BumpFeeResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.walletrpc.BumpFeeResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.walletrpc.BumpFeeResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.walletrpc.BumpFeeResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.walletrpc.ListSweepsRequest.prototype.toObject = function(opt_includeInstance) { - return proto.walletrpc.ListSweepsRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.walletrpc.ListSweepsRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.walletrpc.ListSweepsRequest.toObject = function(includeInstance, msg) { - var f, obj = { - verbose: jspb.Message.getBooleanFieldWithDefault(msg, 1, false) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.walletrpc.ListSweepsRequest} - */ -proto.walletrpc.ListSweepsRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.walletrpc.ListSweepsRequest; - return proto.walletrpc.ListSweepsRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.walletrpc.ListSweepsRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.walletrpc.ListSweepsRequest} - */ -proto.walletrpc.ListSweepsRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setVerbose(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.walletrpc.ListSweepsRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.walletrpc.ListSweepsRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.walletrpc.ListSweepsRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.walletrpc.ListSweepsRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getVerbose(); - if (f) { - writer.writeBool( - 1, - f - ); - } -}; - - -/** - * optional bool verbose = 1; - * @return {boolean} - */ -proto.walletrpc.ListSweepsRequest.prototype.getVerbose = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.walletrpc.ListSweepsRequest} returns this - */ -proto.walletrpc.ListSweepsRequest.prototype.setVerbose = function(value) { - return jspb.Message.setProto3BooleanField(this, 1, value); -}; - - - -/** - * Oneof group definitions for this message. Each group defines the field - * numbers belonging to that group. When of these fields' value is set, all - * other fields in the group are cleared. During deserialization, if multiple - * fields are encountered for a group, only the last value seen will be kept. - * @private {!Array>} - * @const - */ -proto.walletrpc.ListSweepsResponse.oneofGroups_ = [[1,2]]; - -/** - * @enum {number} - */ -proto.walletrpc.ListSweepsResponse.SweepsCase = { - SWEEPS_NOT_SET: 0, - TRANSACTION_DETAILS: 1, - TRANSACTION_IDS: 2 -}; - -/** - * @return {proto.walletrpc.ListSweepsResponse.SweepsCase} - */ -proto.walletrpc.ListSweepsResponse.prototype.getSweepsCase = function() { - return /** @type {proto.walletrpc.ListSweepsResponse.SweepsCase} */(jspb.Message.computeOneofCase(this, proto.walletrpc.ListSweepsResponse.oneofGroups_[0])); -}; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.walletrpc.ListSweepsResponse.prototype.toObject = function(opt_includeInstance) { - return proto.walletrpc.ListSweepsResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.walletrpc.ListSweepsResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.walletrpc.ListSweepsResponse.toObject = function(includeInstance, msg) { - var f, obj = { - transactionDetails: (f = msg.getTransactionDetails()) && lightning_pb.TransactionDetails.toObject(includeInstance, f), - transactionIds: (f = msg.getTransactionIds()) && proto.walletrpc.ListSweepsResponse.TransactionIDs.toObject(includeInstance, f) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.walletrpc.ListSweepsResponse} - */ -proto.walletrpc.ListSweepsResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.walletrpc.ListSweepsResponse; - return proto.walletrpc.ListSweepsResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.walletrpc.ListSweepsResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.walletrpc.ListSweepsResponse} - */ -proto.walletrpc.ListSweepsResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new lightning_pb.TransactionDetails; - reader.readMessage(value,lightning_pb.TransactionDetails.deserializeBinaryFromReader); - msg.setTransactionDetails(value); - break; - case 2: - var value = new proto.walletrpc.ListSweepsResponse.TransactionIDs; - reader.readMessage(value,proto.walletrpc.ListSweepsResponse.TransactionIDs.deserializeBinaryFromReader); - msg.setTransactionIds(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.walletrpc.ListSweepsResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.walletrpc.ListSweepsResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.walletrpc.ListSweepsResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.walletrpc.ListSweepsResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getTransactionDetails(); - if (f != null) { - writer.writeMessage( - 1, - f, - lightning_pb.TransactionDetails.serializeBinaryToWriter - ); - } - f = message.getTransactionIds(); - if (f != null) { - writer.writeMessage( - 2, - f, - proto.walletrpc.ListSweepsResponse.TransactionIDs.serializeBinaryToWriter - ); - } -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.walletrpc.ListSweepsResponse.TransactionIDs.repeatedFields_ = [1]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.walletrpc.ListSweepsResponse.TransactionIDs.prototype.toObject = function(opt_includeInstance) { - return proto.walletrpc.ListSweepsResponse.TransactionIDs.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.walletrpc.ListSweepsResponse.TransactionIDs} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.walletrpc.ListSweepsResponse.TransactionIDs.toObject = function(includeInstance, msg) { - var f, obj = { - transactionIdsList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : f - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.walletrpc.ListSweepsResponse.TransactionIDs} - */ -proto.walletrpc.ListSweepsResponse.TransactionIDs.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.walletrpc.ListSweepsResponse.TransactionIDs; - return proto.walletrpc.ListSweepsResponse.TransactionIDs.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.walletrpc.ListSweepsResponse.TransactionIDs} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.walletrpc.ListSweepsResponse.TransactionIDs} - */ -proto.walletrpc.ListSweepsResponse.TransactionIDs.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.addTransactionIds(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.walletrpc.ListSweepsResponse.TransactionIDs.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.walletrpc.ListSweepsResponse.TransactionIDs.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.walletrpc.ListSweepsResponse.TransactionIDs} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.walletrpc.ListSweepsResponse.TransactionIDs.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getTransactionIdsList(); - if (f.length > 0) { - writer.writeRepeatedString( - 1, - f - ); - } -}; - - -/** - * repeated string transaction_ids = 1; - * @return {!Array} - */ -proto.walletrpc.ListSweepsResponse.TransactionIDs.prototype.getTransactionIdsList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); -}; - - -/** - * @param {!Array} value - * @return {!proto.walletrpc.ListSweepsResponse.TransactionIDs} returns this - */ -proto.walletrpc.ListSweepsResponse.TransactionIDs.prototype.setTransactionIdsList = function(value) { - return jspb.Message.setField(this, 1, value || []); -}; - - -/** - * @param {string} value - * @param {number=} opt_index - * @return {!proto.walletrpc.ListSweepsResponse.TransactionIDs} returns this - */ -proto.walletrpc.ListSweepsResponse.TransactionIDs.prototype.addTransactionIds = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 1, value, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.walletrpc.ListSweepsResponse.TransactionIDs} returns this - */ -proto.walletrpc.ListSweepsResponse.TransactionIDs.prototype.clearTransactionIdsList = function() { - return this.setTransactionIdsList([]); -}; - - -/** - * optional lnrpc.TransactionDetails transaction_details = 1; - * @return {?proto.lnrpc.TransactionDetails} - */ -proto.walletrpc.ListSweepsResponse.prototype.getTransactionDetails = function() { - return /** @type{?proto.lnrpc.TransactionDetails} */ ( - jspb.Message.getWrapperField(this, lightning_pb.TransactionDetails, 1)); -}; - - -/** - * @param {?proto.lnrpc.TransactionDetails|undefined} value - * @return {!proto.walletrpc.ListSweepsResponse} returns this -*/ -proto.walletrpc.ListSweepsResponse.prototype.setTransactionDetails = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.walletrpc.ListSweepsResponse.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.walletrpc.ListSweepsResponse} returns this - */ -proto.walletrpc.ListSweepsResponse.prototype.clearTransactionDetails = function() { - return this.setTransactionDetails(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.walletrpc.ListSweepsResponse.prototype.hasTransactionDetails = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional TransactionIDs transaction_ids = 2; - * @return {?proto.walletrpc.ListSweepsResponse.TransactionIDs} - */ -proto.walletrpc.ListSweepsResponse.prototype.getTransactionIds = function() { - return /** @type{?proto.walletrpc.ListSweepsResponse.TransactionIDs} */ ( - jspb.Message.getWrapperField(this, proto.walletrpc.ListSweepsResponse.TransactionIDs, 2)); -}; - - -/** - * @param {?proto.walletrpc.ListSweepsResponse.TransactionIDs|undefined} value - * @return {!proto.walletrpc.ListSweepsResponse} returns this -*/ -proto.walletrpc.ListSweepsResponse.prototype.setTransactionIds = function(value) { - return jspb.Message.setOneofWrapperField(this, 2, proto.walletrpc.ListSweepsResponse.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.walletrpc.ListSweepsResponse} returns this - */ -proto.walletrpc.ListSweepsResponse.prototype.clearTransactionIds = function() { - return this.setTransactionIds(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.walletrpc.ListSweepsResponse.prototype.hasTransactionIds = function() { - return jspb.Message.getField(this, 2) != null; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.walletrpc.LabelTransactionRequest.prototype.toObject = function(opt_includeInstance) { - return proto.walletrpc.LabelTransactionRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.walletrpc.LabelTransactionRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.walletrpc.LabelTransactionRequest.toObject = function(includeInstance, msg) { - var f, obj = { - txid: msg.getTxid_asB64(), - label: jspb.Message.getFieldWithDefault(msg, 2, ""), - overwrite: jspb.Message.getBooleanFieldWithDefault(msg, 3, false) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.walletrpc.LabelTransactionRequest} - */ -proto.walletrpc.LabelTransactionRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.walletrpc.LabelTransactionRequest; - return proto.walletrpc.LabelTransactionRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.walletrpc.LabelTransactionRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.walletrpc.LabelTransactionRequest} - */ -proto.walletrpc.LabelTransactionRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setTxid(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setLabel(value); - break; - case 3: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setOverwrite(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.walletrpc.LabelTransactionRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.walletrpc.LabelTransactionRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.walletrpc.LabelTransactionRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.walletrpc.LabelTransactionRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getTxid_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getLabel(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getOverwrite(); - if (f) { - writer.writeBool( - 3, - f - ); - } -}; - - -/** - * optional bytes txid = 1; - * @return {!(string|Uint8Array)} - */ -proto.walletrpc.LabelTransactionRequest.prototype.getTxid = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes txid = 1; - * This is a type-conversion wrapper around `getTxid()` - * @return {string} - */ -proto.walletrpc.LabelTransactionRequest.prototype.getTxid_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getTxid())); -}; - - -/** - * optional bytes txid = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getTxid()` - * @return {!Uint8Array} - */ -proto.walletrpc.LabelTransactionRequest.prototype.getTxid_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getTxid())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.walletrpc.LabelTransactionRequest} returns this - */ -proto.walletrpc.LabelTransactionRequest.prototype.setTxid = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional string label = 2; - * @return {string} - */ -proto.walletrpc.LabelTransactionRequest.prototype.getLabel = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.walletrpc.LabelTransactionRequest} returns this - */ -proto.walletrpc.LabelTransactionRequest.prototype.setLabel = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional bool overwrite = 3; - * @return {boolean} - */ -proto.walletrpc.LabelTransactionRequest.prototype.getOverwrite = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.walletrpc.LabelTransactionRequest} returns this - */ -proto.walletrpc.LabelTransactionRequest.prototype.setOverwrite = function(value) { - return jspb.Message.setProto3BooleanField(this, 3, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.walletrpc.LabelTransactionResponse.prototype.toObject = function(opt_includeInstance) { - return proto.walletrpc.LabelTransactionResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.walletrpc.LabelTransactionResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.walletrpc.LabelTransactionResponse.toObject = function(includeInstance, msg) { - var f, obj = { - - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.walletrpc.LabelTransactionResponse} - */ -proto.walletrpc.LabelTransactionResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.walletrpc.LabelTransactionResponse; - return proto.walletrpc.LabelTransactionResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.walletrpc.LabelTransactionResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.walletrpc.LabelTransactionResponse} - */ -proto.walletrpc.LabelTransactionResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.walletrpc.LabelTransactionResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.walletrpc.LabelTransactionResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.walletrpc.LabelTransactionResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.walletrpc.LabelTransactionResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; -}; - - - -/** - * Oneof group definitions for this message. Each group defines the field - * numbers belonging to that group. When of these fields' value is set, all - * other fields in the group are cleared. During deserialization, if multiple - * fields are encountered for a group, only the last value seen will be kept. - * @private {!Array>} - * @const - */ -proto.walletrpc.FundPsbtRequest.oneofGroups_ = [[1,2],[3,4]]; - -/** - * @enum {number} - */ -proto.walletrpc.FundPsbtRequest.TemplateCase = { - TEMPLATE_NOT_SET: 0, - PSBT: 1, - RAW: 2 -}; - -/** - * @return {proto.walletrpc.FundPsbtRequest.TemplateCase} - */ -proto.walletrpc.FundPsbtRequest.prototype.getTemplateCase = function() { - return /** @type {proto.walletrpc.FundPsbtRequest.TemplateCase} */(jspb.Message.computeOneofCase(this, proto.walletrpc.FundPsbtRequest.oneofGroups_[0])); -}; - -/** - * @enum {number} - */ -proto.walletrpc.FundPsbtRequest.FeesCase = { - FEES_NOT_SET: 0, - TARGET_CONF: 3, - SAT_PER_VBYTE: 4 -}; - -/** - * @return {proto.walletrpc.FundPsbtRequest.FeesCase} - */ -proto.walletrpc.FundPsbtRequest.prototype.getFeesCase = function() { - return /** @type {proto.walletrpc.FundPsbtRequest.FeesCase} */(jspb.Message.computeOneofCase(this, proto.walletrpc.FundPsbtRequest.oneofGroups_[1])); -}; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.walletrpc.FundPsbtRequest.prototype.toObject = function(opt_includeInstance) { - return proto.walletrpc.FundPsbtRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.walletrpc.FundPsbtRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.walletrpc.FundPsbtRequest.toObject = function(includeInstance, msg) { - var f, obj = { - psbt: msg.getPsbt_asB64(), - raw: (f = msg.getRaw()) && proto.walletrpc.TxTemplate.toObject(includeInstance, f), - targetConf: jspb.Message.getFieldWithDefault(msg, 3, 0), - satPerVbyte: jspb.Message.getFieldWithDefault(msg, 4, 0), - account: jspb.Message.getFieldWithDefault(msg, 5, ""), - minConfs: jspb.Message.getFieldWithDefault(msg, 6, 0), - spendUnconfirmed: jspb.Message.getBooleanFieldWithDefault(msg, 7, false) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.walletrpc.FundPsbtRequest} - */ -proto.walletrpc.FundPsbtRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.walletrpc.FundPsbtRequest; - return proto.walletrpc.FundPsbtRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.walletrpc.FundPsbtRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.walletrpc.FundPsbtRequest} - */ -proto.walletrpc.FundPsbtRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setPsbt(value); - break; - case 2: - var value = new proto.walletrpc.TxTemplate; - reader.readMessage(value,proto.walletrpc.TxTemplate.deserializeBinaryFromReader); - msg.setRaw(value); - break; - case 3: - var value = /** @type {number} */ (reader.readUint32()); - msg.setTargetConf(value); - break; - case 4: - var value = /** @type {number} */ (reader.readUint64()); - msg.setSatPerVbyte(value); - break; - case 5: - var value = /** @type {string} */ (reader.readString()); - msg.setAccount(value); - break; - case 6: - var value = /** @type {number} */ (reader.readInt32()); - msg.setMinConfs(value); - break; - case 7: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setSpendUnconfirmed(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.walletrpc.FundPsbtRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.walletrpc.FundPsbtRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.walletrpc.FundPsbtRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.walletrpc.FundPsbtRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 1)); - if (f != null) { - writer.writeBytes( - 1, - f - ); - } - f = message.getRaw(); - if (f != null) { - writer.writeMessage( - 2, - f, - proto.walletrpc.TxTemplate.serializeBinaryToWriter - ); - } - f = /** @type {number} */ (jspb.Message.getField(message, 3)); - if (f != null) { - writer.writeUint32( - 3, - f - ); - } - f = /** @type {number} */ (jspb.Message.getField(message, 4)); - if (f != null) { - writer.writeUint64( - 4, - f - ); - } - f = message.getAccount(); - if (f.length > 0) { - writer.writeString( - 5, - f - ); - } - f = message.getMinConfs(); - if (f !== 0) { - writer.writeInt32( - 6, - f - ); - } - f = message.getSpendUnconfirmed(); - if (f) { - writer.writeBool( - 7, - f - ); - } -}; - - -/** - * optional bytes psbt = 1; - * @return {!(string|Uint8Array)} - */ -proto.walletrpc.FundPsbtRequest.prototype.getPsbt = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes psbt = 1; - * This is a type-conversion wrapper around `getPsbt()` - * @return {string} - */ -proto.walletrpc.FundPsbtRequest.prototype.getPsbt_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getPsbt())); -}; - - -/** - * optional bytes psbt = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getPsbt()` - * @return {!Uint8Array} - */ -proto.walletrpc.FundPsbtRequest.prototype.getPsbt_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getPsbt())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.walletrpc.FundPsbtRequest} returns this - */ -proto.walletrpc.FundPsbtRequest.prototype.setPsbt = function(value) { - return jspb.Message.setOneofField(this, 1, proto.walletrpc.FundPsbtRequest.oneofGroups_[0], value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.walletrpc.FundPsbtRequest} returns this - */ -proto.walletrpc.FundPsbtRequest.prototype.clearPsbt = function() { - return jspb.Message.setOneofField(this, 1, proto.walletrpc.FundPsbtRequest.oneofGroups_[0], undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.walletrpc.FundPsbtRequest.prototype.hasPsbt = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional TxTemplate raw = 2; - * @return {?proto.walletrpc.TxTemplate} - */ -proto.walletrpc.FundPsbtRequest.prototype.getRaw = function() { - return /** @type{?proto.walletrpc.TxTemplate} */ ( - jspb.Message.getWrapperField(this, proto.walletrpc.TxTemplate, 2)); -}; - - -/** - * @param {?proto.walletrpc.TxTemplate|undefined} value - * @return {!proto.walletrpc.FundPsbtRequest} returns this -*/ -proto.walletrpc.FundPsbtRequest.prototype.setRaw = function(value) { - return jspb.Message.setOneofWrapperField(this, 2, proto.walletrpc.FundPsbtRequest.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.walletrpc.FundPsbtRequest} returns this - */ -proto.walletrpc.FundPsbtRequest.prototype.clearRaw = function() { - return this.setRaw(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.walletrpc.FundPsbtRequest.prototype.hasRaw = function() { - return jspb.Message.getField(this, 2) != null; -}; - - -/** - * optional uint32 target_conf = 3; - * @return {number} - */ -proto.walletrpc.FundPsbtRequest.prototype.getTargetConf = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.walletrpc.FundPsbtRequest} returns this - */ -proto.walletrpc.FundPsbtRequest.prototype.setTargetConf = function(value) { - return jspb.Message.setOneofField(this, 3, proto.walletrpc.FundPsbtRequest.oneofGroups_[1], value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.walletrpc.FundPsbtRequest} returns this - */ -proto.walletrpc.FundPsbtRequest.prototype.clearTargetConf = function() { - return jspb.Message.setOneofField(this, 3, proto.walletrpc.FundPsbtRequest.oneofGroups_[1], undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.walletrpc.FundPsbtRequest.prototype.hasTargetConf = function() { - return jspb.Message.getField(this, 3) != null; -}; - - -/** - * optional uint64 sat_per_vbyte = 4; - * @return {number} - */ -proto.walletrpc.FundPsbtRequest.prototype.getSatPerVbyte = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.walletrpc.FundPsbtRequest} returns this - */ -proto.walletrpc.FundPsbtRequest.prototype.setSatPerVbyte = function(value) { - return jspb.Message.setOneofField(this, 4, proto.walletrpc.FundPsbtRequest.oneofGroups_[1], value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.walletrpc.FundPsbtRequest} returns this - */ -proto.walletrpc.FundPsbtRequest.prototype.clearSatPerVbyte = function() { - return jspb.Message.setOneofField(this, 4, proto.walletrpc.FundPsbtRequest.oneofGroups_[1], undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.walletrpc.FundPsbtRequest.prototype.hasSatPerVbyte = function() { - return jspb.Message.getField(this, 4) != null; -}; - - -/** - * optional string account = 5; - * @return {string} - */ -proto.walletrpc.FundPsbtRequest.prototype.getAccount = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); -}; - - -/** - * @param {string} value - * @return {!proto.walletrpc.FundPsbtRequest} returns this - */ -proto.walletrpc.FundPsbtRequest.prototype.setAccount = function(value) { - return jspb.Message.setProto3StringField(this, 5, value); -}; - - -/** - * optional int32 min_confs = 6; - * @return {number} - */ -proto.walletrpc.FundPsbtRequest.prototype.getMinConfs = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.walletrpc.FundPsbtRequest} returns this - */ -proto.walletrpc.FundPsbtRequest.prototype.setMinConfs = function(value) { - return jspb.Message.setProto3IntField(this, 6, value); -}; - - -/** - * optional bool spend_unconfirmed = 7; - * @return {boolean} - */ -proto.walletrpc.FundPsbtRequest.prototype.getSpendUnconfirmed = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 7, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.walletrpc.FundPsbtRequest} returns this - */ -proto.walletrpc.FundPsbtRequest.prototype.setSpendUnconfirmed = function(value) { - return jspb.Message.setProto3BooleanField(this, 7, value); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.walletrpc.FundPsbtResponse.repeatedFields_ = [3]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.walletrpc.FundPsbtResponse.prototype.toObject = function(opt_includeInstance) { - return proto.walletrpc.FundPsbtResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.walletrpc.FundPsbtResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.walletrpc.FundPsbtResponse.toObject = function(includeInstance, msg) { - var f, obj = { - fundedPsbt: msg.getFundedPsbt_asB64(), - changeOutputIndex: jspb.Message.getFieldWithDefault(msg, 2, 0), - lockedUtxosList: jspb.Message.toObjectList(msg.getLockedUtxosList(), - proto.walletrpc.UtxoLease.toObject, includeInstance) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.walletrpc.FundPsbtResponse} - */ -proto.walletrpc.FundPsbtResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.walletrpc.FundPsbtResponse; - return proto.walletrpc.FundPsbtResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.walletrpc.FundPsbtResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.walletrpc.FundPsbtResponse} - */ -proto.walletrpc.FundPsbtResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setFundedPsbt(value); - break; - case 2: - var value = /** @type {number} */ (reader.readInt32()); - msg.setChangeOutputIndex(value); - break; - case 3: - var value = new proto.walletrpc.UtxoLease; - reader.readMessage(value,proto.walletrpc.UtxoLease.deserializeBinaryFromReader); - msg.addLockedUtxos(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.walletrpc.FundPsbtResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.walletrpc.FundPsbtResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.walletrpc.FundPsbtResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.walletrpc.FundPsbtResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getFundedPsbt_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getChangeOutputIndex(); - if (f !== 0) { - writer.writeInt32( - 2, - f - ); - } - f = message.getLockedUtxosList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 3, - f, - proto.walletrpc.UtxoLease.serializeBinaryToWriter - ); - } -}; - - -/** - * optional bytes funded_psbt = 1; - * @return {!(string|Uint8Array)} - */ -proto.walletrpc.FundPsbtResponse.prototype.getFundedPsbt = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes funded_psbt = 1; - * This is a type-conversion wrapper around `getFundedPsbt()` - * @return {string} - */ -proto.walletrpc.FundPsbtResponse.prototype.getFundedPsbt_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getFundedPsbt())); -}; - - -/** - * optional bytes funded_psbt = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getFundedPsbt()` - * @return {!Uint8Array} - */ -proto.walletrpc.FundPsbtResponse.prototype.getFundedPsbt_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getFundedPsbt())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.walletrpc.FundPsbtResponse} returns this - */ -proto.walletrpc.FundPsbtResponse.prototype.setFundedPsbt = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional int32 change_output_index = 2; - * @return {number} - */ -proto.walletrpc.FundPsbtResponse.prototype.getChangeOutputIndex = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.walletrpc.FundPsbtResponse} returns this - */ -proto.walletrpc.FundPsbtResponse.prototype.setChangeOutputIndex = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * repeated UtxoLease locked_utxos = 3; - * @return {!Array} - */ -proto.walletrpc.FundPsbtResponse.prototype.getLockedUtxosList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.walletrpc.UtxoLease, 3)); -}; - - -/** - * @param {!Array} value - * @return {!proto.walletrpc.FundPsbtResponse} returns this -*/ -proto.walletrpc.FundPsbtResponse.prototype.setLockedUtxosList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 3, value); -}; - - -/** - * @param {!proto.walletrpc.UtxoLease=} opt_value - * @param {number=} opt_index - * @return {!proto.walletrpc.UtxoLease} - */ -proto.walletrpc.FundPsbtResponse.prototype.addLockedUtxos = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.walletrpc.UtxoLease, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.walletrpc.FundPsbtResponse} returns this - */ -proto.walletrpc.FundPsbtResponse.prototype.clearLockedUtxosList = function() { - return this.setLockedUtxosList([]); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.walletrpc.TxTemplate.repeatedFields_ = [1]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.walletrpc.TxTemplate.prototype.toObject = function(opt_includeInstance) { - return proto.walletrpc.TxTemplate.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.walletrpc.TxTemplate} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.walletrpc.TxTemplate.toObject = function(includeInstance, msg) { - var f, obj = { - inputsList: jspb.Message.toObjectList(msg.getInputsList(), - lightning_pb.OutPoint.toObject, includeInstance), - outputsMap: (f = msg.getOutputsMap()) ? f.toObject(includeInstance, undefined) : [] - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.walletrpc.TxTemplate} - */ -proto.walletrpc.TxTemplate.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.walletrpc.TxTemplate; - return proto.walletrpc.TxTemplate.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.walletrpc.TxTemplate} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.walletrpc.TxTemplate} - */ -proto.walletrpc.TxTemplate.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new lightning_pb.OutPoint; - reader.readMessage(value,lightning_pb.OutPoint.deserializeBinaryFromReader); - msg.addInputs(value); - break; - case 2: - var value = msg.getOutputsMap(); - reader.readMessage(value, function(message, reader) { - jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readUint64, null, "", 0); - }); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.walletrpc.TxTemplate.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.walletrpc.TxTemplate.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.walletrpc.TxTemplate} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.walletrpc.TxTemplate.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getInputsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 1, - f, - lightning_pb.OutPoint.serializeBinaryToWriter - ); - } - f = message.getOutputsMap(true); - if (f && f.getLength() > 0) { - f.serializeBinary(2, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeUint64); - } -}; - - -/** - * repeated lnrpc.OutPoint inputs = 1; - * @return {!Array} - */ -proto.walletrpc.TxTemplate.prototype.getInputsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, lightning_pb.OutPoint, 1)); -}; - - -/** - * @param {!Array} value - * @return {!proto.walletrpc.TxTemplate} returns this -*/ -proto.walletrpc.TxTemplate.prototype.setInputsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); -}; - - -/** - * @param {!proto.lnrpc.OutPoint=} opt_value - * @param {number=} opt_index - * @return {!proto.lnrpc.OutPoint} - */ -proto.walletrpc.TxTemplate.prototype.addInputs = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.lnrpc.OutPoint, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.walletrpc.TxTemplate} returns this - */ -proto.walletrpc.TxTemplate.prototype.clearInputsList = function() { - return this.setInputsList([]); -}; - - -/** - * map outputs = 2; - * @param {boolean=} opt_noLazyCreate Do not create the map if - * empty, instead returning `undefined` - * @return {!jspb.Map} - */ -proto.walletrpc.TxTemplate.prototype.getOutputsMap = function(opt_noLazyCreate) { - return /** @type {!jspb.Map} */ ( - jspb.Message.getMapField(this, 2, opt_noLazyCreate, - null)); -}; - - -/** - * Clears values from the map. The map will be non-null. - * @return {!proto.walletrpc.TxTemplate} returns this - */ -proto.walletrpc.TxTemplate.prototype.clearOutputsMap = function() { - this.getOutputsMap().clear(); - return this;}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.walletrpc.UtxoLease.prototype.toObject = function(opt_includeInstance) { - return proto.walletrpc.UtxoLease.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.walletrpc.UtxoLease} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.walletrpc.UtxoLease.toObject = function(includeInstance, msg) { - var f, obj = { - id: msg.getId_asB64(), - outpoint: (f = msg.getOutpoint()) && lightning_pb.OutPoint.toObject(includeInstance, f), - expiration: jspb.Message.getFieldWithDefault(msg, 3, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.walletrpc.UtxoLease} - */ -proto.walletrpc.UtxoLease.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.walletrpc.UtxoLease; - return proto.walletrpc.UtxoLease.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.walletrpc.UtxoLease} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.walletrpc.UtxoLease} - */ -proto.walletrpc.UtxoLease.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setId(value); - break; - case 2: - var value = new lightning_pb.OutPoint; - reader.readMessage(value,lightning_pb.OutPoint.deserializeBinaryFromReader); - msg.setOutpoint(value); - break; - case 3: - var value = /** @type {number} */ (reader.readUint64()); - msg.setExpiration(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.walletrpc.UtxoLease.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.walletrpc.UtxoLease.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.walletrpc.UtxoLease} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.walletrpc.UtxoLease.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getId_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getOutpoint(); - if (f != null) { - writer.writeMessage( - 2, - f, - lightning_pb.OutPoint.serializeBinaryToWriter - ); - } - f = message.getExpiration(); - if (f !== 0) { - writer.writeUint64( - 3, - f - ); - } -}; - - -/** - * optional bytes id = 1; - * @return {!(string|Uint8Array)} - */ -proto.walletrpc.UtxoLease.prototype.getId = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes id = 1; - * This is a type-conversion wrapper around `getId()` - * @return {string} - */ -proto.walletrpc.UtxoLease.prototype.getId_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getId())); -}; - - -/** - * optional bytes id = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getId()` - * @return {!Uint8Array} - */ -proto.walletrpc.UtxoLease.prototype.getId_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getId())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.walletrpc.UtxoLease} returns this - */ -proto.walletrpc.UtxoLease.prototype.setId = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional lnrpc.OutPoint outpoint = 2; - * @return {?proto.lnrpc.OutPoint} - */ -proto.walletrpc.UtxoLease.prototype.getOutpoint = function() { - return /** @type{?proto.lnrpc.OutPoint} */ ( - jspb.Message.getWrapperField(this, lightning_pb.OutPoint, 2)); -}; - - -/** - * @param {?proto.lnrpc.OutPoint|undefined} value - * @return {!proto.walletrpc.UtxoLease} returns this -*/ -proto.walletrpc.UtxoLease.prototype.setOutpoint = function(value) { - return jspb.Message.setWrapperField(this, 2, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.walletrpc.UtxoLease} returns this - */ -proto.walletrpc.UtxoLease.prototype.clearOutpoint = function() { - return this.setOutpoint(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.walletrpc.UtxoLease.prototype.hasOutpoint = function() { - return jspb.Message.getField(this, 2) != null; -}; - - -/** - * optional uint64 expiration = 3; - * @return {number} - */ -proto.walletrpc.UtxoLease.prototype.getExpiration = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.walletrpc.UtxoLease} returns this - */ -proto.walletrpc.UtxoLease.prototype.setExpiration = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.walletrpc.SignPsbtRequest.prototype.toObject = function(opt_includeInstance) { - return proto.walletrpc.SignPsbtRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.walletrpc.SignPsbtRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.walletrpc.SignPsbtRequest.toObject = function(includeInstance, msg) { - var f, obj = { - fundedPsbt: msg.getFundedPsbt_asB64() - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.walletrpc.SignPsbtRequest} - */ -proto.walletrpc.SignPsbtRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.walletrpc.SignPsbtRequest; - return proto.walletrpc.SignPsbtRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.walletrpc.SignPsbtRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.walletrpc.SignPsbtRequest} - */ -proto.walletrpc.SignPsbtRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setFundedPsbt(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.walletrpc.SignPsbtRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.walletrpc.SignPsbtRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.walletrpc.SignPsbtRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.walletrpc.SignPsbtRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getFundedPsbt_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } -}; - - -/** - * optional bytes funded_psbt = 1; - * @return {!(string|Uint8Array)} - */ -proto.walletrpc.SignPsbtRequest.prototype.getFundedPsbt = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes funded_psbt = 1; - * This is a type-conversion wrapper around `getFundedPsbt()` - * @return {string} - */ -proto.walletrpc.SignPsbtRequest.prototype.getFundedPsbt_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getFundedPsbt())); -}; - - -/** - * optional bytes funded_psbt = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getFundedPsbt()` - * @return {!Uint8Array} - */ -proto.walletrpc.SignPsbtRequest.prototype.getFundedPsbt_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getFundedPsbt())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.walletrpc.SignPsbtRequest} returns this - */ -proto.walletrpc.SignPsbtRequest.prototype.setFundedPsbt = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.walletrpc.SignPsbtResponse.prototype.toObject = function(opt_includeInstance) { - return proto.walletrpc.SignPsbtResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.walletrpc.SignPsbtResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.walletrpc.SignPsbtResponse.toObject = function(includeInstance, msg) { - var f, obj = { - signedPsbt: msg.getSignedPsbt_asB64() - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.walletrpc.SignPsbtResponse} - */ -proto.walletrpc.SignPsbtResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.walletrpc.SignPsbtResponse; - return proto.walletrpc.SignPsbtResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.walletrpc.SignPsbtResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.walletrpc.SignPsbtResponse} - */ -proto.walletrpc.SignPsbtResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setSignedPsbt(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.walletrpc.SignPsbtResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.walletrpc.SignPsbtResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.walletrpc.SignPsbtResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.walletrpc.SignPsbtResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getSignedPsbt_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } -}; - - -/** - * optional bytes signed_psbt = 1; - * @return {!(string|Uint8Array)} - */ -proto.walletrpc.SignPsbtResponse.prototype.getSignedPsbt = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes signed_psbt = 1; - * This is a type-conversion wrapper around `getSignedPsbt()` - * @return {string} - */ -proto.walletrpc.SignPsbtResponse.prototype.getSignedPsbt_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getSignedPsbt())); -}; - - -/** - * optional bytes signed_psbt = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getSignedPsbt()` - * @return {!Uint8Array} - */ -proto.walletrpc.SignPsbtResponse.prototype.getSignedPsbt_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getSignedPsbt())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.walletrpc.SignPsbtResponse} returns this - */ -proto.walletrpc.SignPsbtResponse.prototype.setSignedPsbt = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.walletrpc.FinalizePsbtRequest.prototype.toObject = function(opt_includeInstance) { - return proto.walletrpc.FinalizePsbtRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.walletrpc.FinalizePsbtRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.walletrpc.FinalizePsbtRequest.toObject = function(includeInstance, msg) { - var f, obj = { - fundedPsbt: msg.getFundedPsbt_asB64(), - account: jspb.Message.getFieldWithDefault(msg, 5, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.walletrpc.FinalizePsbtRequest} - */ -proto.walletrpc.FinalizePsbtRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.walletrpc.FinalizePsbtRequest; - return proto.walletrpc.FinalizePsbtRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.walletrpc.FinalizePsbtRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.walletrpc.FinalizePsbtRequest} - */ -proto.walletrpc.FinalizePsbtRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setFundedPsbt(value); - break; - case 5: - var value = /** @type {string} */ (reader.readString()); - msg.setAccount(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.walletrpc.FinalizePsbtRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.walletrpc.FinalizePsbtRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.walletrpc.FinalizePsbtRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.walletrpc.FinalizePsbtRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getFundedPsbt_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getAccount(); - if (f.length > 0) { - writer.writeString( - 5, - f - ); - } -}; - - -/** - * optional bytes funded_psbt = 1; - * @return {!(string|Uint8Array)} - */ -proto.walletrpc.FinalizePsbtRequest.prototype.getFundedPsbt = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes funded_psbt = 1; - * This is a type-conversion wrapper around `getFundedPsbt()` - * @return {string} - */ -proto.walletrpc.FinalizePsbtRequest.prototype.getFundedPsbt_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getFundedPsbt())); -}; - - -/** - * optional bytes funded_psbt = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getFundedPsbt()` - * @return {!Uint8Array} - */ -proto.walletrpc.FinalizePsbtRequest.prototype.getFundedPsbt_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getFundedPsbt())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.walletrpc.FinalizePsbtRequest} returns this - */ -proto.walletrpc.FinalizePsbtRequest.prototype.setFundedPsbt = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional string account = 5; - * @return {string} - */ -proto.walletrpc.FinalizePsbtRequest.prototype.getAccount = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); -}; - - -/** - * @param {string} value - * @return {!proto.walletrpc.FinalizePsbtRequest} returns this - */ -proto.walletrpc.FinalizePsbtRequest.prototype.setAccount = function(value) { - return jspb.Message.setProto3StringField(this, 5, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.walletrpc.FinalizePsbtResponse.prototype.toObject = function(opt_includeInstance) { - return proto.walletrpc.FinalizePsbtResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.walletrpc.FinalizePsbtResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.walletrpc.FinalizePsbtResponse.toObject = function(includeInstance, msg) { - var f, obj = { - signedPsbt: msg.getSignedPsbt_asB64(), - rawFinalTx: msg.getRawFinalTx_asB64() - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.walletrpc.FinalizePsbtResponse} - */ -proto.walletrpc.FinalizePsbtResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.walletrpc.FinalizePsbtResponse; - return proto.walletrpc.FinalizePsbtResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.walletrpc.FinalizePsbtResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.walletrpc.FinalizePsbtResponse} - */ -proto.walletrpc.FinalizePsbtResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setSignedPsbt(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setRawFinalTx(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.walletrpc.FinalizePsbtResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.walletrpc.FinalizePsbtResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.walletrpc.FinalizePsbtResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.walletrpc.FinalizePsbtResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getSignedPsbt_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getRawFinalTx_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } -}; - - -/** - * optional bytes signed_psbt = 1; - * @return {!(string|Uint8Array)} - */ -proto.walletrpc.FinalizePsbtResponse.prototype.getSignedPsbt = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes signed_psbt = 1; - * This is a type-conversion wrapper around `getSignedPsbt()` - * @return {string} - */ -proto.walletrpc.FinalizePsbtResponse.prototype.getSignedPsbt_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getSignedPsbt())); -}; - - -/** - * optional bytes signed_psbt = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getSignedPsbt()` - * @return {!Uint8Array} - */ -proto.walletrpc.FinalizePsbtResponse.prototype.getSignedPsbt_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getSignedPsbt())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.walletrpc.FinalizePsbtResponse} returns this - */ -proto.walletrpc.FinalizePsbtResponse.prototype.setSignedPsbt = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional bytes raw_final_tx = 2; - * @return {!(string|Uint8Array)} - */ -proto.walletrpc.FinalizePsbtResponse.prototype.getRawFinalTx = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes raw_final_tx = 2; - * This is a type-conversion wrapper around `getRawFinalTx()` - * @return {string} - */ -proto.walletrpc.FinalizePsbtResponse.prototype.getRawFinalTx_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getRawFinalTx())); -}; - - -/** - * optional bytes raw_final_tx = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getRawFinalTx()` - * @return {!Uint8Array} - */ -proto.walletrpc.FinalizePsbtResponse.prototype.getRawFinalTx_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getRawFinalTx())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.walletrpc.FinalizePsbtResponse} returns this - */ -proto.walletrpc.FinalizePsbtResponse.prototype.setRawFinalTx = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.walletrpc.ListLeasesRequest.prototype.toObject = function(opt_includeInstance) { - return proto.walletrpc.ListLeasesRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.walletrpc.ListLeasesRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.walletrpc.ListLeasesRequest.toObject = function(includeInstance, msg) { - var f, obj = { - - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.walletrpc.ListLeasesRequest} - */ -proto.walletrpc.ListLeasesRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.walletrpc.ListLeasesRequest; - return proto.walletrpc.ListLeasesRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.walletrpc.ListLeasesRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.walletrpc.ListLeasesRequest} - */ -proto.walletrpc.ListLeasesRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.walletrpc.ListLeasesRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.walletrpc.ListLeasesRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.walletrpc.ListLeasesRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.walletrpc.ListLeasesRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.walletrpc.ListLeasesResponse.repeatedFields_ = [1]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.walletrpc.ListLeasesResponse.prototype.toObject = function(opt_includeInstance) { - return proto.walletrpc.ListLeasesResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.walletrpc.ListLeasesResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.walletrpc.ListLeasesResponse.toObject = function(includeInstance, msg) { - var f, obj = { - lockedUtxosList: jspb.Message.toObjectList(msg.getLockedUtxosList(), - proto.walletrpc.UtxoLease.toObject, includeInstance) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.walletrpc.ListLeasesResponse} - */ -proto.walletrpc.ListLeasesResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.walletrpc.ListLeasesResponse; - return proto.walletrpc.ListLeasesResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.walletrpc.ListLeasesResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.walletrpc.ListLeasesResponse} - */ -proto.walletrpc.ListLeasesResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.walletrpc.UtxoLease; - reader.readMessage(value,proto.walletrpc.UtxoLease.deserializeBinaryFromReader); - msg.addLockedUtxos(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.walletrpc.ListLeasesResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.walletrpc.ListLeasesResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.walletrpc.ListLeasesResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.walletrpc.ListLeasesResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getLockedUtxosList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 1, - f, - proto.walletrpc.UtxoLease.serializeBinaryToWriter - ); - } -}; - - -/** - * repeated UtxoLease locked_utxos = 1; - * @return {!Array} - */ -proto.walletrpc.ListLeasesResponse.prototype.getLockedUtxosList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.walletrpc.UtxoLease, 1)); -}; - - -/** - * @param {!Array} value - * @return {!proto.walletrpc.ListLeasesResponse} returns this -*/ -proto.walletrpc.ListLeasesResponse.prototype.setLockedUtxosList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); -}; - - -/** - * @param {!proto.walletrpc.UtxoLease=} opt_value - * @param {number=} opt_index - * @return {!proto.walletrpc.UtxoLease} - */ -proto.walletrpc.ListLeasesResponse.prototype.addLockedUtxos = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.walletrpc.UtxoLease, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.walletrpc.ListLeasesResponse} returns this - */ -proto.walletrpc.ListLeasesResponse.prototype.clearLockedUtxosList = function() { - return this.setLockedUtxosList([]); -}; - - -/** - * @enum {number} - */ -proto.walletrpc.AddressType = { - UNKNOWN: 0, - WITNESS_PUBKEY_HASH: 1, - NESTED_WITNESS_PUBKEY_HASH: 2, - HYBRID_NESTED_WITNESS_PUBKEY_HASH: 3 -}; - -/** - * @enum {number} - */ -proto.walletrpc.WitnessType = { - UNKNOWN_WITNESS: 0, - COMMITMENT_TIME_LOCK: 1, - COMMITMENT_NO_DELAY: 2, - COMMITMENT_REVOKE: 3, - HTLC_OFFERED_REVOKE: 4, - HTLC_ACCEPTED_REVOKE: 5, - HTLC_OFFERED_TIMEOUT_SECOND_LEVEL: 6, - HTLC_ACCEPTED_SUCCESS_SECOND_LEVEL: 7, - HTLC_OFFERED_REMOTE_TIMEOUT: 8, - HTLC_ACCEPTED_REMOTE_SUCCESS: 9, - HTLC_SECOND_LEVEL_REVOKE: 10, - WITNESS_KEY_HASH: 11, - NESTED_WITNESS_KEY_HASH: 12, - COMMITMENT_ANCHOR: 13 -}; - -goog.object.extend(exports, proto.walletrpc); diff --git a/lib/types/generated/walletrpc/walletkit_pb_service.d.ts b/lib/types/generated/walletrpc/walletkit_pb_service.d.ts deleted file mode 100644 index ce409dc..0000000 --- a/lib/types/generated/walletrpc/walletkit_pb_service.d.ts +++ /dev/null @@ -1,425 +0,0 @@ -// package: walletrpc -// file: walletrpc/walletkit.proto - -import * as walletrpc_walletkit_pb from "../walletrpc/walletkit_pb"; -import * as signrpc_signer_pb from "../signrpc/signer_pb"; -import {grpc} from "@improbable-eng/grpc-web"; - -type WalletKitListUnspent = { - readonly methodName: string; - readonly service: typeof WalletKit; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof walletrpc_walletkit_pb.ListUnspentRequest; - readonly responseType: typeof walletrpc_walletkit_pb.ListUnspentResponse; -}; - -type WalletKitLeaseOutput = { - readonly methodName: string; - readonly service: typeof WalletKit; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof walletrpc_walletkit_pb.LeaseOutputRequest; - readonly responseType: typeof walletrpc_walletkit_pb.LeaseOutputResponse; -}; - -type WalletKitReleaseOutput = { - readonly methodName: string; - readonly service: typeof WalletKit; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof walletrpc_walletkit_pb.ReleaseOutputRequest; - readonly responseType: typeof walletrpc_walletkit_pb.ReleaseOutputResponse; -}; - -type WalletKitListLeases = { - readonly methodName: string; - readonly service: typeof WalletKit; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof walletrpc_walletkit_pb.ListLeasesRequest; - readonly responseType: typeof walletrpc_walletkit_pb.ListLeasesResponse; -}; - -type WalletKitDeriveNextKey = { - readonly methodName: string; - readonly service: typeof WalletKit; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof walletrpc_walletkit_pb.KeyReq; - readonly responseType: typeof signrpc_signer_pb.KeyDescriptor; -}; - -type WalletKitDeriveKey = { - readonly methodName: string; - readonly service: typeof WalletKit; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof signrpc_signer_pb.KeyLocator; - readonly responseType: typeof signrpc_signer_pb.KeyDescriptor; -}; - -type WalletKitNextAddr = { - readonly methodName: string; - readonly service: typeof WalletKit; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof walletrpc_walletkit_pb.AddrRequest; - readonly responseType: typeof walletrpc_walletkit_pb.AddrResponse; -}; - -type WalletKitListAccounts = { - readonly methodName: string; - readonly service: typeof WalletKit; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof walletrpc_walletkit_pb.ListAccountsRequest; - readonly responseType: typeof walletrpc_walletkit_pb.ListAccountsResponse; -}; - -type WalletKitImportAccount = { - readonly methodName: string; - readonly service: typeof WalletKit; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof walletrpc_walletkit_pb.ImportAccountRequest; - readonly responseType: typeof walletrpc_walletkit_pb.ImportAccountResponse; -}; - -type WalletKitImportPublicKey = { - readonly methodName: string; - readonly service: typeof WalletKit; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof walletrpc_walletkit_pb.ImportPublicKeyRequest; - readonly responseType: typeof walletrpc_walletkit_pb.ImportPublicKeyResponse; -}; - -type WalletKitPublishTransaction = { - readonly methodName: string; - readonly service: typeof WalletKit; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof walletrpc_walletkit_pb.Transaction; - readonly responseType: typeof walletrpc_walletkit_pb.PublishResponse; -}; - -type WalletKitSendOutputs = { - readonly methodName: string; - readonly service: typeof WalletKit; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof walletrpc_walletkit_pb.SendOutputsRequest; - readonly responseType: typeof walletrpc_walletkit_pb.SendOutputsResponse; -}; - -type WalletKitEstimateFee = { - readonly methodName: string; - readonly service: typeof WalletKit; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof walletrpc_walletkit_pb.EstimateFeeRequest; - readonly responseType: typeof walletrpc_walletkit_pb.EstimateFeeResponse; -}; - -type WalletKitPendingSweeps = { - readonly methodName: string; - readonly service: typeof WalletKit; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof walletrpc_walletkit_pb.PendingSweepsRequest; - readonly responseType: typeof walletrpc_walletkit_pb.PendingSweepsResponse; -}; - -type WalletKitBumpFee = { - readonly methodName: string; - readonly service: typeof WalletKit; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof walletrpc_walletkit_pb.BumpFeeRequest; - readonly responseType: typeof walletrpc_walletkit_pb.BumpFeeResponse; -}; - -type WalletKitListSweeps = { - readonly methodName: string; - readonly service: typeof WalletKit; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof walletrpc_walletkit_pb.ListSweepsRequest; - readonly responseType: typeof walletrpc_walletkit_pb.ListSweepsResponse; -}; - -type WalletKitLabelTransaction = { - readonly methodName: string; - readonly service: typeof WalletKit; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof walletrpc_walletkit_pb.LabelTransactionRequest; - readonly responseType: typeof walletrpc_walletkit_pb.LabelTransactionResponse; -}; - -type WalletKitFundPsbt = { - readonly methodName: string; - readonly service: typeof WalletKit; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof walletrpc_walletkit_pb.FundPsbtRequest; - readonly responseType: typeof walletrpc_walletkit_pb.FundPsbtResponse; -}; - -type WalletKitSignPsbt = { - readonly methodName: string; - readonly service: typeof WalletKit; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof walletrpc_walletkit_pb.SignPsbtRequest; - readonly responseType: typeof walletrpc_walletkit_pb.SignPsbtResponse; -}; - -type WalletKitFinalizePsbt = { - readonly methodName: string; - readonly service: typeof WalletKit; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof walletrpc_walletkit_pb.FinalizePsbtRequest; - readonly responseType: typeof walletrpc_walletkit_pb.FinalizePsbtResponse; -}; - -export class WalletKit { - static readonly serviceName: string; - static readonly ListUnspent: WalletKitListUnspent; - static readonly LeaseOutput: WalletKitLeaseOutput; - static readonly ReleaseOutput: WalletKitReleaseOutput; - static readonly ListLeases: WalletKitListLeases; - static readonly DeriveNextKey: WalletKitDeriveNextKey; - static readonly DeriveKey: WalletKitDeriveKey; - static readonly NextAddr: WalletKitNextAddr; - static readonly ListAccounts: WalletKitListAccounts; - static readonly ImportAccount: WalletKitImportAccount; - static readonly ImportPublicKey: WalletKitImportPublicKey; - static readonly PublishTransaction: WalletKitPublishTransaction; - static readonly SendOutputs: WalletKitSendOutputs; - static readonly EstimateFee: WalletKitEstimateFee; - static readonly PendingSweeps: WalletKitPendingSweeps; - static readonly BumpFee: WalletKitBumpFee; - static readonly ListSweeps: WalletKitListSweeps; - static readonly LabelTransaction: WalletKitLabelTransaction; - static readonly FundPsbt: WalletKitFundPsbt; - static readonly SignPsbt: WalletKitSignPsbt; - static readonly FinalizePsbt: WalletKitFinalizePsbt; -} - -export type ServiceError = { message: string, code: number; metadata: grpc.Metadata } -export type Status = { details: string, code: number; metadata: grpc.Metadata } - -interface UnaryResponse { - cancel(): void; -} -interface ResponseStream { - cancel(): void; - on(type: 'data', handler: (message: T) => void): ResponseStream; - on(type: 'end', handler: (status?: Status) => void): ResponseStream; - on(type: 'status', handler: (status: Status) => void): ResponseStream; -} -interface RequestStream { - write(message: T): RequestStream; - end(): void; - cancel(): void; - on(type: 'end', handler: (status?: Status) => void): RequestStream; - on(type: 'status', handler: (status: Status) => void): RequestStream; -} -interface BidirectionalStream { - write(message: ReqT): BidirectionalStream; - end(): void; - cancel(): void; - on(type: 'data', handler: (message: ResT) => void): BidirectionalStream; - on(type: 'end', handler: (status?: Status) => void): BidirectionalStream; - on(type: 'status', handler: (status: Status) => void): BidirectionalStream; -} - -export class WalletKitClient { - readonly serviceHost: string; - - constructor(serviceHost: string, options?: grpc.RpcOptions); - listUnspent( - requestMessage: walletrpc_walletkit_pb.ListUnspentRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: walletrpc_walletkit_pb.ListUnspentResponse|null) => void - ): UnaryResponse; - listUnspent( - requestMessage: walletrpc_walletkit_pb.ListUnspentRequest, - callback: (error: ServiceError|null, responseMessage: walletrpc_walletkit_pb.ListUnspentResponse|null) => void - ): UnaryResponse; - leaseOutput( - requestMessage: walletrpc_walletkit_pb.LeaseOutputRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: walletrpc_walletkit_pb.LeaseOutputResponse|null) => void - ): UnaryResponse; - leaseOutput( - requestMessage: walletrpc_walletkit_pb.LeaseOutputRequest, - callback: (error: ServiceError|null, responseMessage: walletrpc_walletkit_pb.LeaseOutputResponse|null) => void - ): UnaryResponse; - releaseOutput( - requestMessage: walletrpc_walletkit_pb.ReleaseOutputRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: walletrpc_walletkit_pb.ReleaseOutputResponse|null) => void - ): UnaryResponse; - releaseOutput( - requestMessage: walletrpc_walletkit_pb.ReleaseOutputRequest, - callback: (error: ServiceError|null, responseMessage: walletrpc_walletkit_pb.ReleaseOutputResponse|null) => void - ): UnaryResponse; - listLeases( - requestMessage: walletrpc_walletkit_pb.ListLeasesRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: walletrpc_walletkit_pb.ListLeasesResponse|null) => void - ): UnaryResponse; - listLeases( - requestMessage: walletrpc_walletkit_pb.ListLeasesRequest, - callback: (error: ServiceError|null, responseMessage: walletrpc_walletkit_pb.ListLeasesResponse|null) => void - ): UnaryResponse; - deriveNextKey( - requestMessage: walletrpc_walletkit_pb.KeyReq, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: signrpc_signer_pb.KeyDescriptor|null) => void - ): UnaryResponse; - deriveNextKey( - requestMessage: walletrpc_walletkit_pb.KeyReq, - callback: (error: ServiceError|null, responseMessage: signrpc_signer_pb.KeyDescriptor|null) => void - ): UnaryResponse; - deriveKey( - requestMessage: signrpc_signer_pb.KeyLocator, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: signrpc_signer_pb.KeyDescriptor|null) => void - ): UnaryResponse; - deriveKey( - requestMessage: signrpc_signer_pb.KeyLocator, - callback: (error: ServiceError|null, responseMessage: signrpc_signer_pb.KeyDescriptor|null) => void - ): UnaryResponse; - nextAddr( - requestMessage: walletrpc_walletkit_pb.AddrRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: walletrpc_walletkit_pb.AddrResponse|null) => void - ): UnaryResponse; - nextAddr( - requestMessage: walletrpc_walletkit_pb.AddrRequest, - callback: (error: ServiceError|null, responseMessage: walletrpc_walletkit_pb.AddrResponse|null) => void - ): UnaryResponse; - listAccounts( - requestMessage: walletrpc_walletkit_pb.ListAccountsRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: walletrpc_walletkit_pb.ListAccountsResponse|null) => void - ): UnaryResponse; - listAccounts( - requestMessage: walletrpc_walletkit_pb.ListAccountsRequest, - callback: (error: ServiceError|null, responseMessage: walletrpc_walletkit_pb.ListAccountsResponse|null) => void - ): UnaryResponse; - importAccount( - requestMessage: walletrpc_walletkit_pb.ImportAccountRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: walletrpc_walletkit_pb.ImportAccountResponse|null) => void - ): UnaryResponse; - importAccount( - requestMessage: walletrpc_walletkit_pb.ImportAccountRequest, - callback: (error: ServiceError|null, responseMessage: walletrpc_walletkit_pb.ImportAccountResponse|null) => void - ): UnaryResponse; - importPublicKey( - requestMessage: walletrpc_walletkit_pb.ImportPublicKeyRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: walletrpc_walletkit_pb.ImportPublicKeyResponse|null) => void - ): UnaryResponse; - importPublicKey( - requestMessage: walletrpc_walletkit_pb.ImportPublicKeyRequest, - callback: (error: ServiceError|null, responseMessage: walletrpc_walletkit_pb.ImportPublicKeyResponse|null) => void - ): UnaryResponse; - publishTransaction( - requestMessage: walletrpc_walletkit_pb.Transaction, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: walletrpc_walletkit_pb.PublishResponse|null) => void - ): UnaryResponse; - publishTransaction( - requestMessage: walletrpc_walletkit_pb.Transaction, - callback: (error: ServiceError|null, responseMessage: walletrpc_walletkit_pb.PublishResponse|null) => void - ): UnaryResponse; - sendOutputs( - requestMessage: walletrpc_walletkit_pb.SendOutputsRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: walletrpc_walletkit_pb.SendOutputsResponse|null) => void - ): UnaryResponse; - sendOutputs( - requestMessage: walletrpc_walletkit_pb.SendOutputsRequest, - callback: (error: ServiceError|null, responseMessage: walletrpc_walletkit_pb.SendOutputsResponse|null) => void - ): UnaryResponse; - estimateFee( - requestMessage: walletrpc_walletkit_pb.EstimateFeeRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: walletrpc_walletkit_pb.EstimateFeeResponse|null) => void - ): UnaryResponse; - estimateFee( - requestMessage: walletrpc_walletkit_pb.EstimateFeeRequest, - callback: (error: ServiceError|null, responseMessage: walletrpc_walletkit_pb.EstimateFeeResponse|null) => void - ): UnaryResponse; - pendingSweeps( - requestMessage: walletrpc_walletkit_pb.PendingSweepsRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: walletrpc_walletkit_pb.PendingSweepsResponse|null) => void - ): UnaryResponse; - pendingSweeps( - requestMessage: walletrpc_walletkit_pb.PendingSweepsRequest, - callback: (error: ServiceError|null, responseMessage: walletrpc_walletkit_pb.PendingSweepsResponse|null) => void - ): UnaryResponse; - bumpFee( - requestMessage: walletrpc_walletkit_pb.BumpFeeRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: walletrpc_walletkit_pb.BumpFeeResponse|null) => void - ): UnaryResponse; - bumpFee( - requestMessage: walletrpc_walletkit_pb.BumpFeeRequest, - callback: (error: ServiceError|null, responseMessage: walletrpc_walletkit_pb.BumpFeeResponse|null) => void - ): UnaryResponse; - listSweeps( - requestMessage: walletrpc_walletkit_pb.ListSweepsRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: walletrpc_walletkit_pb.ListSweepsResponse|null) => void - ): UnaryResponse; - listSweeps( - requestMessage: walletrpc_walletkit_pb.ListSweepsRequest, - callback: (error: ServiceError|null, responseMessage: walletrpc_walletkit_pb.ListSweepsResponse|null) => void - ): UnaryResponse; - labelTransaction( - requestMessage: walletrpc_walletkit_pb.LabelTransactionRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: walletrpc_walletkit_pb.LabelTransactionResponse|null) => void - ): UnaryResponse; - labelTransaction( - requestMessage: walletrpc_walletkit_pb.LabelTransactionRequest, - callback: (error: ServiceError|null, responseMessage: walletrpc_walletkit_pb.LabelTransactionResponse|null) => void - ): UnaryResponse; - fundPsbt( - requestMessage: walletrpc_walletkit_pb.FundPsbtRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: walletrpc_walletkit_pb.FundPsbtResponse|null) => void - ): UnaryResponse; - fundPsbt( - requestMessage: walletrpc_walletkit_pb.FundPsbtRequest, - callback: (error: ServiceError|null, responseMessage: walletrpc_walletkit_pb.FundPsbtResponse|null) => void - ): UnaryResponse; - signPsbt( - requestMessage: walletrpc_walletkit_pb.SignPsbtRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: walletrpc_walletkit_pb.SignPsbtResponse|null) => void - ): UnaryResponse; - signPsbt( - requestMessage: walletrpc_walletkit_pb.SignPsbtRequest, - callback: (error: ServiceError|null, responseMessage: walletrpc_walletkit_pb.SignPsbtResponse|null) => void - ): UnaryResponse; - finalizePsbt( - requestMessage: walletrpc_walletkit_pb.FinalizePsbtRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: walletrpc_walletkit_pb.FinalizePsbtResponse|null) => void - ): UnaryResponse; - finalizePsbt( - requestMessage: walletrpc_walletkit_pb.FinalizePsbtRequest, - callback: (error: ServiceError|null, responseMessage: walletrpc_walletkit_pb.FinalizePsbtResponse|null) => void - ): UnaryResponse; -} - diff --git a/lib/types/generated/walletrpc/walletkit_pb_service.js b/lib/types/generated/walletrpc/walletkit_pb_service.js deleted file mode 100644 index 58ddf2a..0000000 --- a/lib/types/generated/walletrpc/walletkit_pb_service.js +++ /dev/null @@ -1,822 +0,0 @@ -// package: walletrpc -// file: walletrpc/walletkit.proto - -var walletrpc_walletkit_pb = require("../walletrpc/walletkit_pb"); -var signrpc_signer_pb = require("../signrpc/signer_pb"); -var grpc = require("@improbable-eng/grpc-web").grpc; - -var WalletKit = (function () { - function WalletKit() {} - WalletKit.serviceName = "walletrpc.WalletKit"; - return WalletKit; -}()); - -WalletKit.ListUnspent = { - methodName: "ListUnspent", - service: WalletKit, - requestStream: false, - responseStream: false, - requestType: walletrpc_walletkit_pb.ListUnspentRequest, - responseType: walletrpc_walletkit_pb.ListUnspentResponse -}; - -WalletKit.LeaseOutput = { - methodName: "LeaseOutput", - service: WalletKit, - requestStream: false, - responseStream: false, - requestType: walletrpc_walletkit_pb.LeaseOutputRequest, - responseType: walletrpc_walletkit_pb.LeaseOutputResponse -}; - -WalletKit.ReleaseOutput = { - methodName: "ReleaseOutput", - service: WalletKit, - requestStream: false, - responseStream: false, - requestType: walletrpc_walletkit_pb.ReleaseOutputRequest, - responseType: walletrpc_walletkit_pb.ReleaseOutputResponse -}; - -WalletKit.ListLeases = { - methodName: "ListLeases", - service: WalletKit, - requestStream: false, - responseStream: false, - requestType: walletrpc_walletkit_pb.ListLeasesRequest, - responseType: walletrpc_walletkit_pb.ListLeasesResponse -}; - -WalletKit.DeriveNextKey = { - methodName: "DeriveNextKey", - service: WalletKit, - requestStream: false, - responseStream: false, - requestType: walletrpc_walletkit_pb.KeyReq, - responseType: signrpc_signer_pb.KeyDescriptor -}; - -WalletKit.DeriveKey = { - methodName: "DeriveKey", - service: WalletKit, - requestStream: false, - responseStream: false, - requestType: signrpc_signer_pb.KeyLocator, - responseType: signrpc_signer_pb.KeyDescriptor -}; - -WalletKit.NextAddr = { - methodName: "NextAddr", - service: WalletKit, - requestStream: false, - responseStream: false, - requestType: walletrpc_walletkit_pb.AddrRequest, - responseType: walletrpc_walletkit_pb.AddrResponse -}; - -WalletKit.ListAccounts = { - methodName: "ListAccounts", - service: WalletKit, - requestStream: false, - responseStream: false, - requestType: walletrpc_walletkit_pb.ListAccountsRequest, - responseType: walletrpc_walletkit_pb.ListAccountsResponse -}; - -WalletKit.ImportAccount = { - methodName: "ImportAccount", - service: WalletKit, - requestStream: false, - responseStream: false, - requestType: walletrpc_walletkit_pb.ImportAccountRequest, - responseType: walletrpc_walletkit_pb.ImportAccountResponse -}; - -WalletKit.ImportPublicKey = { - methodName: "ImportPublicKey", - service: WalletKit, - requestStream: false, - responseStream: false, - requestType: walletrpc_walletkit_pb.ImportPublicKeyRequest, - responseType: walletrpc_walletkit_pb.ImportPublicKeyResponse -}; - -WalletKit.PublishTransaction = { - methodName: "PublishTransaction", - service: WalletKit, - requestStream: false, - responseStream: false, - requestType: walletrpc_walletkit_pb.Transaction, - responseType: walletrpc_walletkit_pb.PublishResponse -}; - -WalletKit.SendOutputs = { - methodName: "SendOutputs", - service: WalletKit, - requestStream: false, - responseStream: false, - requestType: walletrpc_walletkit_pb.SendOutputsRequest, - responseType: walletrpc_walletkit_pb.SendOutputsResponse -}; - -WalletKit.EstimateFee = { - methodName: "EstimateFee", - service: WalletKit, - requestStream: false, - responseStream: false, - requestType: walletrpc_walletkit_pb.EstimateFeeRequest, - responseType: walletrpc_walletkit_pb.EstimateFeeResponse -}; - -WalletKit.PendingSweeps = { - methodName: "PendingSweeps", - service: WalletKit, - requestStream: false, - responseStream: false, - requestType: walletrpc_walletkit_pb.PendingSweepsRequest, - responseType: walletrpc_walletkit_pb.PendingSweepsResponse -}; - -WalletKit.BumpFee = { - methodName: "BumpFee", - service: WalletKit, - requestStream: false, - responseStream: false, - requestType: walletrpc_walletkit_pb.BumpFeeRequest, - responseType: walletrpc_walletkit_pb.BumpFeeResponse -}; - -WalletKit.ListSweeps = { - methodName: "ListSweeps", - service: WalletKit, - requestStream: false, - responseStream: false, - requestType: walletrpc_walletkit_pb.ListSweepsRequest, - responseType: walletrpc_walletkit_pb.ListSweepsResponse -}; - -WalletKit.LabelTransaction = { - methodName: "LabelTransaction", - service: WalletKit, - requestStream: false, - responseStream: false, - requestType: walletrpc_walletkit_pb.LabelTransactionRequest, - responseType: walletrpc_walletkit_pb.LabelTransactionResponse -}; - -WalletKit.FundPsbt = { - methodName: "FundPsbt", - service: WalletKit, - requestStream: false, - responseStream: false, - requestType: walletrpc_walletkit_pb.FundPsbtRequest, - responseType: walletrpc_walletkit_pb.FundPsbtResponse -}; - -WalletKit.SignPsbt = { - methodName: "SignPsbt", - service: WalletKit, - requestStream: false, - responseStream: false, - requestType: walletrpc_walletkit_pb.SignPsbtRequest, - responseType: walletrpc_walletkit_pb.SignPsbtResponse -}; - -WalletKit.FinalizePsbt = { - methodName: "FinalizePsbt", - service: WalletKit, - requestStream: false, - responseStream: false, - requestType: walletrpc_walletkit_pb.FinalizePsbtRequest, - responseType: walletrpc_walletkit_pb.FinalizePsbtResponse -}; - -exports.WalletKit = WalletKit; - -function WalletKitClient(serviceHost, options) { - this.serviceHost = serviceHost; - this.options = options || {}; -} - -WalletKitClient.prototype.listUnspent = function listUnspent(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(WalletKit.ListUnspent, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -WalletKitClient.prototype.leaseOutput = function leaseOutput(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(WalletKit.LeaseOutput, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -WalletKitClient.prototype.releaseOutput = function releaseOutput(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(WalletKit.ReleaseOutput, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -WalletKitClient.prototype.listLeases = function listLeases(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(WalletKit.ListLeases, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -WalletKitClient.prototype.deriveNextKey = function deriveNextKey(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(WalletKit.DeriveNextKey, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -WalletKitClient.prototype.deriveKey = function deriveKey(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(WalletKit.DeriveKey, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -WalletKitClient.prototype.nextAddr = function nextAddr(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(WalletKit.NextAddr, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -WalletKitClient.prototype.listAccounts = function listAccounts(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(WalletKit.ListAccounts, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -WalletKitClient.prototype.importAccount = function importAccount(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(WalletKit.ImportAccount, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -WalletKitClient.prototype.importPublicKey = function importPublicKey(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(WalletKit.ImportPublicKey, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -WalletKitClient.prototype.publishTransaction = function publishTransaction(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(WalletKit.PublishTransaction, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -WalletKitClient.prototype.sendOutputs = function sendOutputs(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(WalletKit.SendOutputs, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -WalletKitClient.prototype.estimateFee = function estimateFee(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(WalletKit.EstimateFee, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -WalletKitClient.prototype.pendingSweeps = function pendingSweeps(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(WalletKit.PendingSweeps, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -WalletKitClient.prototype.bumpFee = function bumpFee(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(WalletKit.BumpFee, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -WalletKitClient.prototype.listSweeps = function listSweeps(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(WalletKit.ListSweeps, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -WalletKitClient.prototype.labelTransaction = function labelTransaction(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(WalletKit.LabelTransaction, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -WalletKitClient.prototype.fundPsbt = function fundPsbt(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(WalletKit.FundPsbt, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -WalletKitClient.prototype.signPsbt = function signPsbt(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(WalletKit.SignPsbt, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -WalletKitClient.prototype.finalizePsbt = function finalizePsbt(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(WalletKit.FinalizePsbt, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -exports.WalletKitClient = WalletKitClient; - diff --git a/lib/types/generated/walletunlocker_pb.d.ts b/lib/types/generated/walletunlocker_pb.d.ts deleted file mode 100644 index c3691ef..0000000 --- a/lib/types/generated/walletunlocker_pb.d.ts +++ /dev/null @@ -1,320 +0,0 @@ -// package: lnrpc -// file: walletunlocker.proto - -import * as jspb from "google-protobuf"; -import * as lightning_pb from "./lightning_pb"; - -export class GenSeedRequest extends jspb.Message { - getAezeedPassphrase(): Uint8Array | string; - getAezeedPassphrase_asU8(): Uint8Array; - getAezeedPassphrase_asB64(): string; - setAezeedPassphrase(value: Uint8Array | string): void; - - getSeedEntropy(): Uint8Array | string; - getSeedEntropy_asU8(): Uint8Array; - getSeedEntropy_asB64(): string; - setSeedEntropy(value: Uint8Array | string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GenSeedRequest.AsObject; - static toObject(includeInstance: boolean, msg: GenSeedRequest): GenSeedRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: GenSeedRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GenSeedRequest; - static deserializeBinaryFromReader(message: GenSeedRequest, reader: jspb.BinaryReader): GenSeedRequest; -} - -export namespace GenSeedRequest { - export type AsObject = { - aezeedPassphrase: Uint8Array | string, - seedEntropy: Uint8Array | string, - } -} - -export class GenSeedResponse extends jspb.Message { - clearCipherSeedMnemonicList(): void; - getCipherSeedMnemonicList(): Array; - setCipherSeedMnemonicList(value: Array): void; - addCipherSeedMnemonic(value: string, index?: number): string; - - getEncipheredSeed(): Uint8Array | string; - getEncipheredSeed_asU8(): Uint8Array; - getEncipheredSeed_asB64(): string; - setEncipheredSeed(value: Uint8Array | string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GenSeedResponse.AsObject; - static toObject(includeInstance: boolean, msg: GenSeedResponse): GenSeedResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: GenSeedResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GenSeedResponse; - static deserializeBinaryFromReader(message: GenSeedResponse, reader: jspb.BinaryReader): GenSeedResponse; -} - -export namespace GenSeedResponse { - export type AsObject = { - cipherSeedMnemonic: Array, - encipheredSeed: Uint8Array | string, - } -} - -export class InitWalletRequest extends jspb.Message { - getWalletPassword(): Uint8Array | string; - getWalletPassword_asU8(): Uint8Array; - getWalletPassword_asB64(): string; - setWalletPassword(value: Uint8Array | string): void; - - clearCipherSeedMnemonicList(): void; - getCipherSeedMnemonicList(): Array; - setCipherSeedMnemonicList(value: Array): void; - addCipherSeedMnemonic(value: string, index?: number): string; - - getAezeedPassphrase(): Uint8Array | string; - getAezeedPassphrase_asU8(): Uint8Array; - getAezeedPassphrase_asB64(): string; - setAezeedPassphrase(value: Uint8Array | string): void; - - getRecoveryWindow(): number; - setRecoveryWindow(value: number): void; - - hasChannelBackups(): boolean; - clearChannelBackups(): void; - getChannelBackups(): lightning_pb.ChanBackupSnapshot | undefined; - setChannelBackups(value?: lightning_pb.ChanBackupSnapshot): void; - - getStatelessInit(): boolean; - setStatelessInit(value: boolean): void; - - getExtendedMasterKey(): string; - setExtendedMasterKey(value: string): void; - - getExtendedMasterKeyBirthdayTimestamp(): number; - setExtendedMasterKeyBirthdayTimestamp(value: number): void; - - hasWatchOnly(): boolean; - clearWatchOnly(): void; - getWatchOnly(): WatchOnly | undefined; - setWatchOnly(value?: WatchOnly): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): InitWalletRequest.AsObject; - static toObject(includeInstance: boolean, msg: InitWalletRequest): InitWalletRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: InitWalletRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): InitWalletRequest; - static deserializeBinaryFromReader(message: InitWalletRequest, reader: jspb.BinaryReader): InitWalletRequest; -} - -export namespace InitWalletRequest { - export type AsObject = { - walletPassword: Uint8Array | string, - cipherSeedMnemonic: Array, - aezeedPassphrase: Uint8Array | string, - recoveryWindow: number, - channelBackups?: lightning_pb.ChanBackupSnapshot.AsObject, - statelessInit: boolean, - extendedMasterKey: string, - extendedMasterKeyBirthdayTimestamp: number, - watchOnly?: WatchOnly.AsObject, - } -} - -export class InitWalletResponse extends jspb.Message { - getAdminMacaroon(): Uint8Array | string; - getAdminMacaroon_asU8(): Uint8Array; - getAdminMacaroon_asB64(): string; - setAdminMacaroon(value: Uint8Array | string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): InitWalletResponse.AsObject; - static toObject(includeInstance: boolean, msg: InitWalletResponse): InitWalletResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: InitWalletResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): InitWalletResponse; - static deserializeBinaryFromReader(message: InitWalletResponse, reader: jspb.BinaryReader): InitWalletResponse; -} - -export namespace InitWalletResponse { - export type AsObject = { - adminMacaroon: Uint8Array | string, - } -} - -export class WatchOnly extends jspb.Message { - getMasterKeyBirthdayTimestamp(): number; - setMasterKeyBirthdayTimestamp(value: number): void; - - getMasterKeyFingerprint(): Uint8Array | string; - getMasterKeyFingerprint_asU8(): Uint8Array; - getMasterKeyFingerprint_asB64(): string; - setMasterKeyFingerprint(value: Uint8Array | string): void; - - clearAccountsList(): void; - getAccountsList(): Array; - setAccountsList(value: Array): void; - addAccounts(value?: WatchOnlyAccount, index?: number): WatchOnlyAccount; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): WatchOnly.AsObject; - static toObject(includeInstance: boolean, msg: WatchOnly): WatchOnly.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: WatchOnly, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): WatchOnly; - static deserializeBinaryFromReader(message: WatchOnly, reader: jspb.BinaryReader): WatchOnly; -} - -export namespace WatchOnly { - export type AsObject = { - masterKeyBirthdayTimestamp: number, - masterKeyFingerprint: Uint8Array | string, - accounts: Array, - } -} - -export class WatchOnlyAccount extends jspb.Message { - getPurpose(): number; - setPurpose(value: number): void; - - getCoinType(): number; - setCoinType(value: number): void; - - getAccount(): number; - setAccount(value: number): void; - - getXpub(): string; - setXpub(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): WatchOnlyAccount.AsObject; - static toObject(includeInstance: boolean, msg: WatchOnlyAccount): WatchOnlyAccount.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: WatchOnlyAccount, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): WatchOnlyAccount; - static deserializeBinaryFromReader(message: WatchOnlyAccount, reader: jspb.BinaryReader): WatchOnlyAccount; -} - -export namespace WatchOnlyAccount { - export type AsObject = { - purpose: number, - coinType: number, - account: number, - xpub: string, - } -} - -export class UnlockWalletRequest extends jspb.Message { - getWalletPassword(): Uint8Array | string; - getWalletPassword_asU8(): Uint8Array; - getWalletPassword_asB64(): string; - setWalletPassword(value: Uint8Array | string): void; - - getRecoveryWindow(): number; - setRecoveryWindow(value: number): void; - - hasChannelBackups(): boolean; - clearChannelBackups(): void; - getChannelBackups(): lightning_pb.ChanBackupSnapshot | undefined; - setChannelBackups(value?: lightning_pb.ChanBackupSnapshot): void; - - getStatelessInit(): boolean; - setStatelessInit(value: boolean): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): UnlockWalletRequest.AsObject; - static toObject(includeInstance: boolean, msg: UnlockWalletRequest): UnlockWalletRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: UnlockWalletRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): UnlockWalletRequest; - static deserializeBinaryFromReader(message: UnlockWalletRequest, reader: jspb.BinaryReader): UnlockWalletRequest; -} - -export namespace UnlockWalletRequest { - export type AsObject = { - walletPassword: Uint8Array | string, - recoveryWindow: number, - channelBackups?: lightning_pb.ChanBackupSnapshot.AsObject, - statelessInit: boolean, - } -} - -export class UnlockWalletResponse extends jspb.Message { - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): UnlockWalletResponse.AsObject; - static toObject(includeInstance: boolean, msg: UnlockWalletResponse): UnlockWalletResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: UnlockWalletResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): UnlockWalletResponse; - static deserializeBinaryFromReader(message: UnlockWalletResponse, reader: jspb.BinaryReader): UnlockWalletResponse; -} - -export namespace UnlockWalletResponse { - export type AsObject = { - } -} - -export class ChangePasswordRequest extends jspb.Message { - getCurrentPassword(): Uint8Array | string; - getCurrentPassword_asU8(): Uint8Array; - getCurrentPassword_asB64(): string; - setCurrentPassword(value: Uint8Array | string): void; - - getNewPassword(): Uint8Array | string; - getNewPassword_asU8(): Uint8Array; - getNewPassword_asB64(): string; - setNewPassword(value: Uint8Array | string): void; - - getStatelessInit(): boolean; - setStatelessInit(value: boolean): void; - - getNewMacaroonRootKey(): boolean; - setNewMacaroonRootKey(value: boolean): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ChangePasswordRequest.AsObject; - static toObject(includeInstance: boolean, msg: ChangePasswordRequest): ChangePasswordRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ChangePasswordRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ChangePasswordRequest; - static deserializeBinaryFromReader(message: ChangePasswordRequest, reader: jspb.BinaryReader): ChangePasswordRequest; -} - -export namespace ChangePasswordRequest { - export type AsObject = { - currentPassword: Uint8Array | string, - newPassword: Uint8Array | string, - statelessInit: boolean, - newMacaroonRootKey: boolean, - } -} - -export class ChangePasswordResponse extends jspb.Message { - getAdminMacaroon(): Uint8Array | string; - getAdminMacaroon_asU8(): Uint8Array; - getAdminMacaroon_asB64(): string; - setAdminMacaroon(value: Uint8Array | string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ChangePasswordResponse.AsObject; - static toObject(includeInstance: boolean, msg: ChangePasswordResponse): ChangePasswordResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ChangePasswordResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ChangePasswordResponse; - static deserializeBinaryFromReader(message: ChangePasswordResponse, reader: jspb.BinaryReader): ChangePasswordResponse; -} - -export namespace ChangePasswordResponse { - export type AsObject = { - adminMacaroon: Uint8Array | string, - } -} - diff --git a/lib/types/generated/walletunlocker_pb.js b/lib/types/generated/walletunlocker_pb.js deleted file mode 100644 index 4fcf810..0000000 --- a/lib/types/generated/walletunlocker_pb.js +++ /dev/null @@ -1,2550 +0,0 @@ -// source: walletunlocker.proto -/** - * @fileoverview - * @enhanceable - * @suppress {missingRequire} reports error on implicit type usages. - * @suppress {messageConventions} JS Compiler reports an error if a variable or - * field starts with 'MSG_' and isn't a translatable message. - * @public - */ -// GENERATED CODE -- DO NOT EDIT! -/* eslint-disable */ -// @ts-nocheck - -var jspb = require('google-protobuf'); -var goog = jspb; -var global = Function('return this')(); - -var lightning_pb = require('./lightning_pb.js'); -goog.object.extend(proto, lightning_pb); -goog.exportSymbol('proto.lnrpc.ChangePasswordRequest', null, global); -goog.exportSymbol('proto.lnrpc.ChangePasswordResponse', null, global); -goog.exportSymbol('proto.lnrpc.GenSeedRequest', null, global); -goog.exportSymbol('proto.lnrpc.GenSeedResponse', null, global); -goog.exportSymbol('proto.lnrpc.InitWalletRequest', null, global); -goog.exportSymbol('proto.lnrpc.InitWalletResponse', null, global); -goog.exportSymbol('proto.lnrpc.UnlockWalletRequest', null, global); -goog.exportSymbol('proto.lnrpc.UnlockWalletResponse', null, global); -goog.exportSymbol('proto.lnrpc.WatchOnly', null, global); -goog.exportSymbol('proto.lnrpc.WatchOnlyAccount', null, global); -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.GenSeedRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.lnrpc.GenSeedRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.GenSeedRequest.displayName = 'proto.lnrpc.GenSeedRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.GenSeedResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.lnrpc.GenSeedResponse.repeatedFields_, null); -}; -goog.inherits(proto.lnrpc.GenSeedResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.GenSeedResponse.displayName = 'proto.lnrpc.GenSeedResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.InitWalletRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.lnrpc.InitWalletRequest.repeatedFields_, null); -}; -goog.inherits(proto.lnrpc.InitWalletRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.InitWalletRequest.displayName = 'proto.lnrpc.InitWalletRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.InitWalletResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.lnrpc.InitWalletResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.InitWalletResponse.displayName = 'proto.lnrpc.InitWalletResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.WatchOnly = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.lnrpc.WatchOnly.repeatedFields_, null); -}; -goog.inherits(proto.lnrpc.WatchOnly, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.WatchOnly.displayName = 'proto.lnrpc.WatchOnly'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.WatchOnlyAccount = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.lnrpc.WatchOnlyAccount, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.WatchOnlyAccount.displayName = 'proto.lnrpc.WatchOnlyAccount'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.UnlockWalletRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.lnrpc.UnlockWalletRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.UnlockWalletRequest.displayName = 'proto.lnrpc.UnlockWalletRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.UnlockWalletResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.lnrpc.UnlockWalletResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.UnlockWalletResponse.displayName = 'proto.lnrpc.UnlockWalletResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.ChangePasswordRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.lnrpc.ChangePasswordRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.ChangePasswordRequest.displayName = 'proto.lnrpc.ChangePasswordRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.ChangePasswordResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.lnrpc.ChangePasswordResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.lnrpc.ChangePasswordResponse.displayName = 'proto.lnrpc.ChangePasswordResponse'; -} - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.GenSeedRequest.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.GenSeedRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.GenSeedRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.GenSeedRequest.toObject = function(includeInstance, msg) { - var f, obj = { - aezeedPassphrase: msg.getAezeedPassphrase_asB64(), - seedEntropy: msg.getSeedEntropy_asB64() - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.GenSeedRequest} - */ -proto.lnrpc.GenSeedRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.GenSeedRequest; - return proto.lnrpc.GenSeedRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.GenSeedRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.GenSeedRequest} - */ -proto.lnrpc.GenSeedRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setAezeedPassphrase(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setSeedEntropy(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.GenSeedRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.GenSeedRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.GenSeedRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.GenSeedRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getAezeedPassphrase_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getSeedEntropy_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } -}; - - -/** - * optional bytes aezeed_passphrase = 1; - * @return {!(string|Uint8Array)} - */ -proto.lnrpc.GenSeedRequest.prototype.getAezeedPassphrase = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes aezeed_passphrase = 1; - * This is a type-conversion wrapper around `getAezeedPassphrase()` - * @return {string} - */ -proto.lnrpc.GenSeedRequest.prototype.getAezeedPassphrase_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getAezeedPassphrase())); -}; - - -/** - * optional bytes aezeed_passphrase = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getAezeedPassphrase()` - * @return {!Uint8Array} - */ -proto.lnrpc.GenSeedRequest.prototype.getAezeedPassphrase_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getAezeedPassphrase())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.lnrpc.GenSeedRequest} returns this - */ -proto.lnrpc.GenSeedRequest.prototype.setAezeedPassphrase = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional bytes seed_entropy = 2; - * @return {!(string|Uint8Array)} - */ -proto.lnrpc.GenSeedRequest.prototype.getSeedEntropy = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes seed_entropy = 2; - * This is a type-conversion wrapper around `getSeedEntropy()` - * @return {string} - */ -proto.lnrpc.GenSeedRequest.prototype.getSeedEntropy_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getSeedEntropy())); -}; - - -/** - * optional bytes seed_entropy = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getSeedEntropy()` - * @return {!Uint8Array} - */ -proto.lnrpc.GenSeedRequest.prototype.getSeedEntropy_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getSeedEntropy())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.lnrpc.GenSeedRequest} returns this - */ -proto.lnrpc.GenSeedRequest.prototype.setSeedEntropy = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.lnrpc.GenSeedResponse.repeatedFields_ = [1]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.GenSeedResponse.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.GenSeedResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.GenSeedResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.GenSeedResponse.toObject = function(includeInstance, msg) { - var f, obj = { - cipherSeedMnemonicList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : f, - encipheredSeed: msg.getEncipheredSeed_asB64() - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.GenSeedResponse} - */ -proto.lnrpc.GenSeedResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.GenSeedResponse; - return proto.lnrpc.GenSeedResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.GenSeedResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.GenSeedResponse} - */ -proto.lnrpc.GenSeedResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.addCipherSeedMnemonic(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setEncipheredSeed(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.GenSeedResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.GenSeedResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.GenSeedResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.GenSeedResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getCipherSeedMnemonicList(); - if (f.length > 0) { - writer.writeRepeatedString( - 1, - f - ); - } - f = message.getEncipheredSeed_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } -}; - - -/** - * repeated string cipher_seed_mnemonic = 1; - * @return {!Array} - */ -proto.lnrpc.GenSeedResponse.prototype.getCipherSeedMnemonicList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); -}; - - -/** - * @param {!Array} value - * @return {!proto.lnrpc.GenSeedResponse} returns this - */ -proto.lnrpc.GenSeedResponse.prototype.setCipherSeedMnemonicList = function(value) { - return jspb.Message.setField(this, 1, value || []); -}; - - -/** - * @param {string} value - * @param {number=} opt_index - * @return {!proto.lnrpc.GenSeedResponse} returns this - */ -proto.lnrpc.GenSeedResponse.prototype.addCipherSeedMnemonic = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 1, value, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.lnrpc.GenSeedResponse} returns this - */ -proto.lnrpc.GenSeedResponse.prototype.clearCipherSeedMnemonicList = function() { - return this.setCipherSeedMnemonicList([]); -}; - - -/** - * optional bytes enciphered_seed = 2; - * @return {!(string|Uint8Array)} - */ -proto.lnrpc.GenSeedResponse.prototype.getEncipheredSeed = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes enciphered_seed = 2; - * This is a type-conversion wrapper around `getEncipheredSeed()` - * @return {string} - */ -proto.lnrpc.GenSeedResponse.prototype.getEncipheredSeed_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getEncipheredSeed())); -}; - - -/** - * optional bytes enciphered_seed = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getEncipheredSeed()` - * @return {!Uint8Array} - */ -proto.lnrpc.GenSeedResponse.prototype.getEncipheredSeed_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getEncipheredSeed())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.lnrpc.GenSeedResponse} returns this - */ -proto.lnrpc.GenSeedResponse.prototype.setEncipheredSeed = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.lnrpc.InitWalletRequest.repeatedFields_ = [2]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.InitWalletRequest.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.InitWalletRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.InitWalletRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.InitWalletRequest.toObject = function(includeInstance, msg) { - var f, obj = { - walletPassword: msg.getWalletPassword_asB64(), - cipherSeedMnemonicList: (f = jspb.Message.getRepeatedField(msg, 2)) == null ? undefined : f, - aezeedPassphrase: msg.getAezeedPassphrase_asB64(), - recoveryWindow: jspb.Message.getFieldWithDefault(msg, 4, 0), - channelBackups: (f = msg.getChannelBackups()) && lightning_pb.ChanBackupSnapshot.toObject(includeInstance, f), - statelessInit: jspb.Message.getBooleanFieldWithDefault(msg, 6, false), - extendedMasterKey: jspb.Message.getFieldWithDefault(msg, 7, ""), - extendedMasterKeyBirthdayTimestamp: jspb.Message.getFieldWithDefault(msg, 8, 0), - watchOnly: (f = msg.getWatchOnly()) && proto.lnrpc.WatchOnly.toObject(includeInstance, f) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.InitWalletRequest} - */ -proto.lnrpc.InitWalletRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.InitWalletRequest; - return proto.lnrpc.InitWalletRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.InitWalletRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.InitWalletRequest} - */ -proto.lnrpc.InitWalletRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setWalletPassword(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.addCipherSeedMnemonic(value); - break; - case 3: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setAezeedPassphrase(value); - break; - case 4: - var value = /** @type {number} */ (reader.readInt32()); - msg.setRecoveryWindow(value); - break; - case 5: - var value = new lightning_pb.ChanBackupSnapshot; - reader.readMessage(value,lightning_pb.ChanBackupSnapshot.deserializeBinaryFromReader); - msg.setChannelBackups(value); - break; - case 6: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setStatelessInit(value); - break; - case 7: - var value = /** @type {string} */ (reader.readString()); - msg.setExtendedMasterKey(value); - break; - case 8: - var value = /** @type {number} */ (reader.readUint64()); - msg.setExtendedMasterKeyBirthdayTimestamp(value); - break; - case 9: - var value = new proto.lnrpc.WatchOnly; - reader.readMessage(value,proto.lnrpc.WatchOnly.deserializeBinaryFromReader); - msg.setWatchOnly(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.InitWalletRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.InitWalletRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.InitWalletRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.InitWalletRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getWalletPassword_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getCipherSeedMnemonicList(); - if (f.length > 0) { - writer.writeRepeatedString( - 2, - f - ); - } - f = message.getAezeedPassphrase_asU8(); - if (f.length > 0) { - writer.writeBytes( - 3, - f - ); - } - f = message.getRecoveryWindow(); - if (f !== 0) { - writer.writeInt32( - 4, - f - ); - } - f = message.getChannelBackups(); - if (f != null) { - writer.writeMessage( - 5, - f, - lightning_pb.ChanBackupSnapshot.serializeBinaryToWriter - ); - } - f = message.getStatelessInit(); - if (f) { - writer.writeBool( - 6, - f - ); - } - f = message.getExtendedMasterKey(); - if (f.length > 0) { - writer.writeString( - 7, - f - ); - } - f = message.getExtendedMasterKeyBirthdayTimestamp(); - if (f !== 0) { - writer.writeUint64( - 8, - f - ); - } - f = message.getWatchOnly(); - if (f != null) { - writer.writeMessage( - 9, - f, - proto.lnrpc.WatchOnly.serializeBinaryToWriter - ); - } -}; - - -/** - * optional bytes wallet_password = 1; - * @return {!(string|Uint8Array)} - */ -proto.lnrpc.InitWalletRequest.prototype.getWalletPassword = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes wallet_password = 1; - * This is a type-conversion wrapper around `getWalletPassword()` - * @return {string} - */ -proto.lnrpc.InitWalletRequest.prototype.getWalletPassword_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getWalletPassword())); -}; - - -/** - * optional bytes wallet_password = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getWalletPassword()` - * @return {!Uint8Array} - */ -proto.lnrpc.InitWalletRequest.prototype.getWalletPassword_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getWalletPassword())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.lnrpc.InitWalletRequest} returns this - */ -proto.lnrpc.InitWalletRequest.prototype.setWalletPassword = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * repeated string cipher_seed_mnemonic = 2; - * @return {!Array} - */ -proto.lnrpc.InitWalletRequest.prototype.getCipherSeedMnemonicList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 2)); -}; - - -/** - * @param {!Array} value - * @return {!proto.lnrpc.InitWalletRequest} returns this - */ -proto.lnrpc.InitWalletRequest.prototype.setCipherSeedMnemonicList = function(value) { - return jspb.Message.setField(this, 2, value || []); -}; - - -/** - * @param {string} value - * @param {number=} opt_index - * @return {!proto.lnrpc.InitWalletRequest} returns this - */ -proto.lnrpc.InitWalletRequest.prototype.addCipherSeedMnemonic = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 2, value, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.lnrpc.InitWalletRequest} returns this - */ -proto.lnrpc.InitWalletRequest.prototype.clearCipherSeedMnemonicList = function() { - return this.setCipherSeedMnemonicList([]); -}; - - -/** - * optional bytes aezeed_passphrase = 3; - * @return {!(string|Uint8Array)} - */ -proto.lnrpc.InitWalletRequest.prototype.getAezeedPassphrase = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * optional bytes aezeed_passphrase = 3; - * This is a type-conversion wrapper around `getAezeedPassphrase()` - * @return {string} - */ -proto.lnrpc.InitWalletRequest.prototype.getAezeedPassphrase_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getAezeedPassphrase())); -}; - - -/** - * optional bytes aezeed_passphrase = 3; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getAezeedPassphrase()` - * @return {!Uint8Array} - */ -proto.lnrpc.InitWalletRequest.prototype.getAezeedPassphrase_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getAezeedPassphrase())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.lnrpc.InitWalletRequest} returns this - */ -proto.lnrpc.InitWalletRequest.prototype.setAezeedPassphrase = function(value) { - return jspb.Message.setProto3BytesField(this, 3, value); -}; - - -/** - * optional int32 recovery_window = 4; - * @return {number} - */ -proto.lnrpc.InitWalletRequest.prototype.getRecoveryWindow = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.InitWalletRequest} returns this - */ -proto.lnrpc.InitWalletRequest.prototype.setRecoveryWindow = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); -}; - - -/** - * optional ChanBackupSnapshot channel_backups = 5; - * @return {?proto.lnrpc.ChanBackupSnapshot} - */ -proto.lnrpc.InitWalletRequest.prototype.getChannelBackups = function() { - return /** @type{?proto.lnrpc.ChanBackupSnapshot} */ ( - jspb.Message.getWrapperField(this, lightning_pb.ChanBackupSnapshot, 5)); -}; - - -/** - * @param {?proto.lnrpc.ChanBackupSnapshot|undefined} value - * @return {!proto.lnrpc.InitWalletRequest} returns this -*/ -proto.lnrpc.InitWalletRequest.prototype.setChannelBackups = function(value) { - return jspb.Message.setWrapperField(this, 5, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.lnrpc.InitWalletRequest} returns this - */ -proto.lnrpc.InitWalletRequest.prototype.clearChannelBackups = function() { - return this.setChannelBackups(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.lnrpc.InitWalletRequest.prototype.hasChannelBackups = function() { - return jspb.Message.getField(this, 5) != null; -}; - - -/** - * optional bool stateless_init = 6; - * @return {boolean} - */ -proto.lnrpc.InitWalletRequest.prototype.getStatelessInit = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 6, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.lnrpc.InitWalletRequest} returns this - */ -proto.lnrpc.InitWalletRequest.prototype.setStatelessInit = function(value) { - return jspb.Message.setProto3BooleanField(this, 6, value); -}; - - -/** - * optional string extended_master_key = 7; - * @return {string} - */ -proto.lnrpc.InitWalletRequest.prototype.getExtendedMasterKey = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); -}; - - -/** - * @param {string} value - * @return {!proto.lnrpc.InitWalletRequest} returns this - */ -proto.lnrpc.InitWalletRequest.prototype.setExtendedMasterKey = function(value) { - return jspb.Message.setProto3StringField(this, 7, value); -}; - - -/** - * optional uint64 extended_master_key_birthday_timestamp = 8; - * @return {number} - */ -proto.lnrpc.InitWalletRequest.prototype.getExtendedMasterKeyBirthdayTimestamp = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.InitWalletRequest} returns this - */ -proto.lnrpc.InitWalletRequest.prototype.setExtendedMasterKeyBirthdayTimestamp = function(value) { - return jspb.Message.setProto3IntField(this, 8, value); -}; - - -/** - * optional WatchOnly watch_only = 9; - * @return {?proto.lnrpc.WatchOnly} - */ -proto.lnrpc.InitWalletRequest.prototype.getWatchOnly = function() { - return /** @type{?proto.lnrpc.WatchOnly} */ ( - jspb.Message.getWrapperField(this, proto.lnrpc.WatchOnly, 9)); -}; - - -/** - * @param {?proto.lnrpc.WatchOnly|undefined} value - * @return {!proto.lnrpc.InitWalletRequest} returns this -*/ -proto.lnrpc.InitWalletRequest.prototype.setWatchOnly = function(value) { - return jspb.Message.setWrapperField(this, 9, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.lnrpc.InitWalletRequest} returns this - */ -proto.lnrpc.InitWalletRequest.prototype.clearWatchOnly = function() { - return this.setWatchOnly(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.lnrpc.InitWalletRequest.prototype.hasWatchOnly = function() { - return jspb.Message.getField(this, 9) != null; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.InitWalletResponse.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.InitWalletResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.InitWalletResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.InitWalletResponse.toObject = function(includeInstance, msg) { - var f, obj = { - adminMacaroon: msg.getAdminMacaroon_asB64() - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.InitWalletResponse} - */ -proto.lnrpc.InitWalletResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.InitWalletResponse; - return proto.lnrpc.InitWalletResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.InitWalletResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.InitWalletResponse} - */ -proto.lnrpc.InitWalletResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setAdminMacaroon(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.InitWalletResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.InitWalletResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.InitWalletResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.InitWalletResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getAdminMacaroon_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } -}; - - -/** - * optional bytes admin_macaroon = 1; - * @return {!(string|Uint8Array)} - */ -proto.lnrpc.InitWalletResponse.prototype.getAdminMacaroon = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes admin_macaroon = 1; - * This is a type-conversion wrapper around `getAdminMacaroon()` - * @return {string} - */ -proto.lnrpc.InitWalletResponse.prototype.getAdminMacaroon_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getAdminMacaroon())); -}; - - -/** - * optional bytes admin_macaroon = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getAdminMacaroon()` - * @return {!Uint8Array} - */ -proto.lnrpc.InitWalletResponse.prototype.getAdminMacaroon_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getAdminMacaroon())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.lnrpc.InitWalletResponse} returns this - */ -proto.lnrpc.InitWalletResponse.prototype.setAdminMacaroon = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.lnrpc.WatchOnly.repeatedFields_ = [3]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.WatchOnly.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.WatchOnly.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.WatchOnly} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.WatchOnly.toObject = function(includeInstance, msg) { - var f, obj = { - masterKeyBirthdayTimestamp: jspb.Message.getFieldWithDefault(msg, 1, 0), - masterKeyFingerprint: msg.getMasterKeyFingerprint_asB64(), - accountsList: jspb.Message.toObjectList(msg.getAccountsList(), - proto.lnrpc.WatchOnlyAccount.toObject, includeInstance) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.WatchOnly} - */ -proto.lnrpc.WatchOnly.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.WatchOnly; - return proto.lnrpc.WatchOnly.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.WatchOnly} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.WatchOnly} - */ -proto.lnrpc.WatchOnly.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readUint64()); - msg.setMasterKeyBirthdayTimestamp(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setMasterKeyFingerprint(value); - break; - case 3: - var value = new proto.lnrpc.WatchOnlyAccount; - reader.readMessage(value,proto.lnrpc.WatchOnlyAccount.deserializeBinaryFromReader); - msg.addAccounts(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.WatchOnly.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.WatchOnly.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.WatchOnly} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.WatchOnly.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getMasterKeyBirthdayTimestamp(); - if (f !== 0) { - writer.writeUint64( - 1, - f - ); - } - f = message.getMasterKeyFingerprint_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } - f = message.getAccountsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 3, - f, - proto.lnrpc.WatchOnlyAccount.serializeBinaryToWriter - ); - } -}; - - -/** - * optional uint64 master_key_birthday_timestamp = 1; - * @return {number} - */ -proto.lnrpc.WatchOnly.prototype.getMasterKeyBirthdayTimestamp = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.WatchOnly} returns this - */ -proto.lnrpc.WatchOnly.prototype.setMasterKeyBirthdayTimestamp = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); -}; - - -/** - * optional bytes master_key_fingerprint = 2; - * @return {!(string|Uint8Array)} - */ -proto.lnrpc.WatchOnly.prototype.getMasterKeyFingerprint = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes master_key_fingerprint = 2; - * This is a type-conversion wrapper around `getMasterKeyFingerprint()` - * @return {string} - */ -proto.lnrpc.WatchOnly.prototype.getMasterKeyFingerprint_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getMasterKeyFingerprint())); -}; - - -/** - * optional bytes master_key_fingerprint = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getMasterKeyFingerprint()` - * @return {!Uint8Array} - */ -proto.lnrpc.WatchOnly.prototype.getMasterKeyFingerprint_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getMasterKeyFingerprint())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.lnrpc.WatchOnly} returns this - */ -proto.lnrpc.WatchOnly.prototype.setMasterKeyFingerprint = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); -}; - - -/** - * repeated WatchOnlyAccount accounts = 3; - * @return {!Array} - */ -proto.lnrpc.WatchOnly.prototype.getAccountsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.WatchOnlyAccount, 3)); -}; - - -/** - * @param {!Array} value - * @return {!proto.lnrpc.WatchOnly} returns this -*/ -proto.lnrpc.WatchOnly.prototype.setAccountsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 3, value); -}; - - -/** - * @param {!proto.lnrpc.WatchOnlyAccount=} opt_value - * @param {number=} opt_index - * @return {!proto.lnrpc.WatchOnlyAccount} - */ -proto.lnrpc.WatchOnly.prototype.addAccounts = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.lnrpc.WatchOnlyAccount, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.lnrpc.WatchOnly} returns this - */ -proto.lnrpc.WatchOnly.prototype.clearAccountsList = function() { - return this.setAccountsList([]); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.WatchOnlyAccount.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.WatchOnlyAccount.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.WatchOnlyAccount} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.WatchOnlyAccount.toObject = function(includeInstance, msg) { - var f, obj = { - purpose: jspb.Message.getFieldWithDefault(msg, 1, 0), - coinType: jspb.Message.getFieldWithDefault(msg, 2, 0), - account: jspb.Message.getFieldWithDefault(msg, 3, 0), - xpub: jspb.Message.getFieldWithDefault(msg, 4, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.WatchOnlyAccount} - */ -proto.lnrpc.WatchOnlyAccount.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.WatchOnlyAccount; - return proto.lnrpc.WatchOnlyAccount.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.WatchOnlyAccount} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.WatchOnlyAccount} - */ -proto.lnrpc.WatchOnlyAccount.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readUint32()); - msg.setPurpose(value); - break; - case 2: - var value = /** @type {number} */ (reader.readUint32()); - msg.setCoinType(value); - break; - case 3: - var value = /** @type {number} */ (reader.readUint32()); - msg.setAccount(value); - break; - case 4: - var value = /** @type {string} */ (reader.readString()); - msg.setXpub(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.WatchOnlyAccount.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.WatchOnlyAccount.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.WatchOnlyAccount} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.WatchOnlyAccount.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getPurpose(); - if (f !== 0) { - writer.writeUint32( - 1, - f - ); - } - f = message.getCoinType(); - if (f !== 0) { - writer.writeUint32( - 2, - f - ); - } - f = message.getAccount(); - if (f !== 0) { - writer.writeUint32( - 3, - f - ); - } - f = message.getXpub(); - if (f.length > 0) { - writer.writeString( - 4, - f - ); - } -}; - - -/** - * optional uint32 purpose = 1; - * @return {number} - */ -proto.lnrpc.WatchOnlyAccount.prototype.getPurpose = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.WatchOnlyAccount} returns this - */ -proto.lnrpc.WatchOnlyAccount.prototype.setPurpose = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); -}; - - -/** - * optional uint32 coin_type = 2; - * @return {number} - */ -proto.lnrpc.WatchOnlyAccount.prototype.getCoinType = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.WatchOnlyAccount} returns this - */ -proto.lnrpc.WatchOnlyAccount.prototype.setCoinType = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * optional uint32 account = 3; - * @return {number} - */ -proto.lnrpc.WatchOnlyAccount.prototype.getAccount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.WatchOnlyAccount} returns this - */ -proto.lnrpc.WatchOnlyAccount.prototype.setAccount = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - -/** - * optional string xpub = 4; - * @return {string} - */ -proto.lnrpc.WatchOnlyAccount.prototype.getXpub = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); -}; - - -/** - * @param {string} value - * @return {!proto.lnrpc.WatchOnlyAccount} returns this - */ -proto.lnrpc.WatchOnlyAccount.prototype.setXpub = function(value) { - return jspb.Message.setProto3StringField(this, 4, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.UnlockWalletRequest.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.UnlockWalletRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.UnlockWalletRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.UnlockWalletRequest.toObject = function(includeInstance, msg) { - var f, obj = { - walletPassword: msg.getWalletPassword_asB64(), - recoveryWindow: jspb.Message.getFieldWithDefault(msg, 2, 0), - channelBackups: (f = msg.getChannelBackups()) && lightning_pb.ChanBackupSnapshot.toObject(includeInstance, f), - statelessInit: jspb.Message.getBooleanFieldWithDefault(msg, 4, false) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.UnlockWalletRequest} - */ -proto.lnrpc.UnlockWalletRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.UnlockWalletRequest; - return proto.lnrpc.UnlockWalletRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.UnlockWalletRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.UnlockWalletRequest} - */ -proto.lnrpc.UnlockWalletRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setWalletPassword(value); - break; - case 2: - var value = /** @type {number} */ (reader.readInt32()); - msg.setRecoveryWindow(value); - break; - case 3: - var value = new lightning_pb.ChanBackupSnapshot; - reader.readMessage(value,lightning_pb.ChanBackupSnapshot.deserializeBinaryFromReader); - msg.setChannelBackups(value); - break; - case 4: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setStatelessInit(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.UnlockWalletRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.UnlockWalletRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.UnlockWalletRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.UnlockWalletRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getWalletPassword_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getRecoveryWindow(); - if (f !== 0) { - writer.writeInt32( - 2, - f - ); - } - f = message.getChannelBackups(); - if (f != null) { - writer.writeMessage( - 3, - f, - lightning_pb.ChanBackupSnapshot.serializeBinaryToWriter - ); - } - f = message.getStatelessInit(); - if (f) { - writer.writeBool( - 4, - f - ); - } -}; - - -/** - * optional bytes wallet_password = 1; - * @return {!(string|Uint8Array)} - */ -proto.lnrpc.UnlockWalletRequest.prototype.getWalletPassword = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes wallet_password = 1; - * This is a type-conversion wrapper around `getWalletPassword()` - * @return {string} - */ -proto.lnrpc.UnlockWalletRequest.prototype.getWalletPassword_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getWalletPassword())); -}; - - -/** - * optional bytes wallet_password = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getWalletPassword()` - * @return {!Uint8Array} - */ -proto.lnrpc.UnlockWalletRequest.prototype.getWalletPassword_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getWalletPassword())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.lnrpc.UnlockWalletRequest} returns this - */ -proto.lnrpc.UnlockWalletRequest.prototype.setWalletPassword = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional int32 recovery_window = 2; - * @return {number} - */ -proto.lnrpc.UnlockWalletRequest.prototype.getRecoveryWindow = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.UnlockWalletRequest} returns this - */ -proto.lnrpc.UnlockWalletRequest.prototype.setRecoveryWindow = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * optional ChanBackupSnapshot channel_backups = 3; - * @return {?proto.lnrpc.ChanBackupSnapshot} - */ -proto.lnrpc.UnlockWalletRequest.prototype.getChannelBackups = function() { - return /** @type{?proto.lnrpc.ChanBackupSnapshot} */ ( - jspb.Message.getWrapperField(this, lightning_pb.ChanBackupSnapshot, 3)); -}; - - -/** - * @param {?proto.lnrpc.ChanBackupSnapshot|undefined} value - * @return {!proto.lnrpc.UnlockWalletRequest} returns this -*/ -proto.lnrpc.UnlockWalletRequest.prototype.setChannelBackups = function(value) { - return jspb.Message.setWrapperField(this, 3, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.lnrpc.UnlockWalletRequest} returns this - */ -proto.lnrpc.UnlockWalletRequest.prototype.clearChannelBackups = function() { - return this.setChannelBackups(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.lnrpc.UnlockWalletRequest.prototype.hasChannelBackups = function() { - return jspb.Message.getField(this, 3) != null; -}; - - -/** - * optional bool stateless_init = 4; - * @return {boolean} - */ -proto.lnrpc.UnlockWalletRequest.prototype.getStatelessInit = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 4, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.lnrpc.UnlockWalletRequest} returns this - */ -proto.lnrpc.UnlockWalletRequest.prototype.setStatelessInit = function(value) { - return jspb.Message.setProto3BooleanField(this, 4, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.UnlockWalletResponse.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.UnlockWalletResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.UnlockWalletResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.UnlockWalletResponse.toObject = function(includeInstance, msg) { - var f, obj = { - - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.UnlockWalletResponse} - */ -proto.lnrpc.UnlockWalletResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.UnlockWalletResponse; - return proto.lnrpc.UnlockWalletResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.UnlockWalletResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.UnlockWalletResponse} - */ -proto.lnrpc.UnlockWalletResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.UnlockWalletResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.UnlockWalletResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.UnlockWalletResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.UnlockWalletResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.ChangePasswordRequest.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.ChangePasswordRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.ChangePasswordRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.ChangePasswordRequest.toObject = function(includeInstance, msg) { - var f, obj = { - currentPassword: msg.getCurrentPassword_asB64(), - newPassword: msg.getNewPassword_asB64(), - statelessInit: jspb.Message.getBooleanFieldWithDefault(msg, 3, false), - newMacaroonRootKey: jspb.Message.getBooleanFieldWithDefault(msg, 4, false) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.ChangePasswordRequest} - */ -proto.lnrpc.ChangePasswordRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.ChangePasswordRequest; - return proto.lnrpc.ChangePasswordRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.ChangePasswordRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.ChangePasswordRequest} - */ -proto.lnrpc.ChangePasswordRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setCurrentPassword(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setNewPassword(value); - break; - case 3: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setStatelessInit(value); - break; - case 4: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setNewMacaroonRootKey(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.ChangePasswordRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.ChangePasswordRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.ChangePasswordRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.ChangePasswordRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getCurrentPassword_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getNewPassword_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } - f = message.getStatelessInit(); - if (f) { - writer.writeBool( - 3, - f - ); - } - f = message.getNewMacaroonRootKey(); - if (f) { - writer.writeBool( - 4, - f - ); - } -}; - - -/** - * optional bytes current_password = 1; - * @return {!(string|Uint8Array)} - */ -proto.lnrpc.ChangePasswordRequest.prototype.getCurrentPassword = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes current_password = 1; - * This is a type-conversion wrapper around `getCurrentPassword()` - * @return {string} - */ -proto.lnrpc.ChangePasswordRequest.prototype.getCurrentPassword_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getCurrentPassword())); -}; - - -/** - * optional bytes current_password = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getCurrentPassword()` - * @return {!Uint8Array} - */ -proto.lnrpc.ChangePasswordRequest.prototype.getCurrentPassword_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getCurrentPassword())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.lnrpc.ChangePasswordRequest} returns this - */ -proto.lnrpc.ChangePasswordRequest.prototype.setCurrentPassword = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional bytes new_password = 2; - * @return {!(string|Uint8Array)} - */ -proto.lnrpc.ChangePasswordRequest.prototype.getNewPassword = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes new_password = 2; - * This is a type-conversion wrapper around `getNewPassword()` - * @return {string} - */ -proto.lnrpc.ChangePasswordRequest.prototype.getNewPassword_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getNewPassword())); -}; - - -/** - * optional bytes new_password = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getNewPassword()` - * @return {!Uint8Array} - */ -proto.lnrpc.ChangePasswordRequest.prototype.getNewPassword_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getNewPassword())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.lnrpc.ChangePasswordRequest} returns this - */ -proto.lnrpc.ChangePasswordRequest.prototype.setNewPassword = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); -}; - - -/** - * optional bool stateless_init = 3; - * @return {boolean} - */ -proto.lnrpc.ChangePasswordRequest.prototype.getStatelessInit = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.lnrpc.ChangePasswordRequest} returns this - */ -proto.lnrpc.ChangePasswordRequest.prototype.setStatelessInit = function(value) { - return jspb.Message.setProto3BooleanField(this, 3, value); -}; - - -/** - * optional bool new_macaroon_root_key = 4; - * @return {boolean} - */ -proto.lnrpc.ChangePasswordRequest.prototype.getNewMacaroonRootKey = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 4, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.lnrpc.ChangePasswordRequest} returns this - */ -proto.lnrpc.ChangePasswordRequest.prototype.setNewMacaroonRootKey = function(value) { - return jspb.Message.setProto3BooleanField(this, 4, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.ChangePasswordResponse.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.ChangePasswordResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.ChangePasswordResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.ChangePasswordResponse.toObject = function(includeInstance, msg) { - var f, obj = { - adminMacaroon: msg.getAdminMacaroon_asB64() - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.ChangePasswordResponse} - */ -proto.lnrpc.ChangePasswordResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.ChangePasswordResponse; - return proto.lnrpc.ChangePasswordResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.ChangePasswordResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.ChangePasswordResponse} - */ -proto.lnrpc.ChangePasswordResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setAdminMacaroon(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.ChangePasswordResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.ChangePasswordResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.ChangePasswordResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.ChangePasswordResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getAdminMacaroon_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } -}; - - -/** - * optional bytes admin_macaroon = 1; - * @return {!(string|Uint8Array)} - */ -proto.lnrpc.ChangePasswordResponse.prototype.getAdminMacaroon = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes admin_macaroon = 1; - * This is a type-conversion wrapper around `getAdminMacaroon()` - * @return {string} - */ -proto.lnrpc.ChangePasswordResponse.prototype.getAdminMacaroon_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getAdminMacaroon())); -}; - - -/** - * optional bytes admin_macaroon = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getAdminMacaroon()` - * @return {!Uint8Array} - */ -proto.lnrpc.ChangePasswordResponse.prototype.getAdminMacaroon_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getAdminMacaroon())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.lnrpc.ChangePasswordResponse} returns this - */ -proto.lnrpc.ChangePasswordResponse.prototype.setAdminMacaroon = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -goog.object.extend(exports, proto.lnrpc); diff --git a/lib/types/generated/walletunlocker_pb_service.d.ts b/lib/types/generated/walletunlocker_pb_service.d.ts deleted file mode 100644 index 39637f2..0000000 --- a/lib/types/generated/walletunlocker_pb_service.d.ts +++ /dev/null @@ -1,120 +0,0 @@ -// package: lnrpc -// file: walletunlocker.proto - -import * as walletunlocker_pb from "./walletunlocker_pb"; -import {grpc} from "@improbable-eng/grpc-web"; - -type WalletUnlockerGenSeed = { - readonly methodName: string; - readonly service: typeof WalletUnlocker; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof walletunlocker_pb.GenSeedRequest; - readonly responseType: typeof walletunlocker_pb.GenSeedResponse; -}; - -type WalletUnlockerInitWallet = { - readonly methodName: string; - readonly service: typeof WalletUnlocker; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof walletunlocker_pb.InitWalletRequest; - readonly responseType: typeof walletunlocker_pb.InitWalletResponse; -}; - -type WalletUnlockerUnlockWallet = { - readonly methodName: string; - readonly service: typeof WalletUnlocker; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof walletunlocker_pb.UnlockWalletRequest; - readonly responseType: typeof walletunlocker_pb.UnlockWalletResponse; -}; - -type WalletUnlockerChangePassword = { - readonly methodName: string; - readonly service: typeof WalletUnlocker; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof walletunlocker_pb.ChangePasswordRequest; - readonly responseType: typeof walletunlocker_pb.ChangePasswordResponse; -}; - -export class WalletUnlocker { - static readonly serviceName: string; - static readonly GenSeed: WalletUnlockerGenSeed; - static readonly InitWallet: WalletUnlockerInitWallet; - static readonly UnlockWallet: WalletUnlockerUnlockWallet; - static readonly ChangePassword: WalletUnlockerChangePassword; -} - -export type ServiceError = { message: string, code: number; metadata: grpc.Metadata } -export type Status = { details: string, code: number; metadata: grpc.Metadata } - -interface UnaryResponse { - cancel(): void; -} -interface ResponseStream { - cancel(): void; - on(type: 'data', handler: (message: T) => void): ResponseStream; - on(type: 'end', handler: (status?: Status) => void): ResponseStream; - on(type: 'status', handler: (status: Status) => void): ResponseStream; -} -interface RequestStream { - write(message: T): RequestStream; - end(): void; - cancel(): void; - on(type: 'end', handler: (status?: Status) => void): RequestStream; - on(type: 'status', handler: (status: Status) => void): RequestStream; -} -interface BidirectionalStream { - write(message: ReqT): BidirectionalStream; - end(): void; - cancel(): void; - on(type: 'data', handler: (message: ResT) => void): BidirectionalStream; - on(type: 'end', handler: (status?: Status) => void): BidirectionalStream; - on(type: 'status', handler: (status: Status) => void): BidirectionalStream; -} - -export class WalletUnlockerClient { - readonly serviceHost: string; - - constructor(serviceHost: string, options?: grpc.RpcOptions); - genSeed( - requestMessage: walletunlocker_pb.GenSeedRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: walletunlocker_pb.GenSeedResponse|null) => void - ): UnaryResponse; - genSeed( - requestMessage: walletunlocker_pb.GenSeedRequest, - callback: (error: ServiceError|null, responseMessage: walletunlocker_pb.GenSeedResponse|null) => void - ): UnaryResponse; - initWallet( - requestMessage: walletunlocker_pb.InitWalletRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: walletunlocker_pb.InitWalletResponse|null) => void - ): UnaryResponse; - initWallet( - requestMessage: walletunlocker_pb.InitWalletRequest, - callback: (error: ServiceError|null, responseMessage: walletunlocker_pb.InitWalletResponse|null) => void - ): UnaryResponse; - unlockWallet( - requestMessage: walletunlocker_pb.UnlockWalletRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: walletunlocker_pb.UnlockWalletResponse|null) => void - ): UnaryResponse; - unlockWallet( - requestMessage: walletunlocker_pb.UnlockWalletRequest, - callback: (error: ServiceError|null, responseMessage: walletunlocker_pb.UnlockWalletResponse|null) => void - ): UnaryResponse; - changePassword( - requestMessage: walletunlocker_pb.ChangePasswordRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: walletunlocker_pb.ChangePasswordResponse|null) => void - ): UnaryResponse; - changePassword( - requestMessage: walletunlocker_pb.ChangePasswordRequest, - callback: (error: ServiceError|null, responseMessage: walletunlocker_pb.ChangePasswordResponse|null) => void - ): UnaryResponse; -} - diff --git a/lib/types/generated/walletunlocker_pb_service.js b/lib/types/generated/walletunlocker_pb_service.js deleted file mode 100644 index 2b1aaf6..0000000 --- a/lib/types/generated/walletunlocker_pb_service.js +++ /dev/null @@ -1,181 +0,0 @@ -// package: lnrpc -// file: walletunlocker.proto - -var walletunlocker_pb = require("./walletunlocker_pb"); -var grpc = require("@improbable-eng/grpc-web").grpc; - -var WalletUnlocker = (function () { - function WalletUnlocker() {} - WalletUnlocker.serviceName = "lnrpc.WalletUnlocker"; - return WalletUnlocker; -}()); - -WalletUnlocker.GenSeed = { - methodName: "GenSeed", - service: WalletUnlocker, - requestStream: false, - responseStream: false, - requestType: walletunlocker_pb.GenSeedRequest, - responseType: walletunlocker_pb.GenSeedResponse -}; - -WalletUnlocker.InitWallet = { - methodName: "InitWallet", - service: WalletUnlocker, - requestStream: false, - responseStream: false, - requestType: walletunlocker_pb.InitWalletRequest, - responseType: walletunlocker_pb.InitWalletResponse -}; - -WalletUnlocker.UnlockWallet = { - methodName: "UnlockWallet", - service: WalletUnlocker, - requestStream: false, - responseStream: false, - requestType: walletunlocker_pb.UnlockWalletRequest, - responseType: walletunlocker_pb.UnlockWalletResponse -}; - -WalletUnlocker.ChangePassword = { - methodName: "ChangePassword", - service: WalletUnlocker, - requestStream: false, - responseStream: false, - requestType: walletunlocker_pb.ChangePasswordRequest, - responseType: walletunlocker_pb.ChangePasswordResponse -}; - -exports.WalletUnlocker = WalletUnlocker; - -function WalletUnlockerClient(serviceHost, options) { - this.serviceHost = serviceHost; - this.options = options || {}; -} - -WalletUnlockerClient.prototype.genSeed = function genSeed(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(WalletUnlocker.GenSeed, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -WalletUnlockerClient.prototype.initWallet = function initWallet(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(WalletUnlocker.InitWallet, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -WalletUnlockerClient.prototype.unlockWallet = function unlockWallet(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(WalletUnlocker.UnlockWallet, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -WalletUnlockerClient.prototype.changePassword = function changePassword(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(WalletUnlocker.ChangePassword, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -exports.WalletUnlockerClient = WalletUnlockerClient; - diff --git a/lib/types/generated/watchtowerrpc/watchtower_pb.d.ts b/lib/types/generated/watchtowerrpc/watchtower_pb.d.ts deleted file mode 100644 index 427659b..0000000 --- a/lib/types/generated/watchtowerrpc/watchtower_pb.d.ts +++ /dev/null @@ -1,55 +0,0 @@ -// package: watchtowerrpc -// file: watchtowerrpc/watchtower.proto - -import * as jspb from "google-protobuf"; - -export class GetInfoRequest extends jspb.Message { - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GetInfoRequest.AsObject; - static toObject(includeInstance: boolean, msg: GetInfoRequest): GetInfoRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: GetInfoRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GetInfoRequest; - static deserializeBinaryFromReader(message: GetInfoRequest, reader: jspb.BinaryReader): GetInfoRequest; -} - -export namespace GetInfoRequest { - export type AsObject = { - } -} - -export class GetInfoResponse extends jspb.Message { - getPubkey(): Uint8Array | string; - getPubkey_asU8(): Uint8Array; - getPubkey_asB64(): string; - setPubkey(value: Uint8Array | string): void; - - clearListenersList(): void; - getListenersList(): Array; - setListenersList(value: Array): void; - addListeners(value: string, index?: number): string; - - clearUrisList(): void; - getUrisList(): Array; - setUrisList(value: Array): void; - addUris(value: string, index?: number): string; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GetInfoResponse.AsObject; - static toObject(includeInstance: boolean, msg: GetInfoResponse): GetInfoResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: GetInfoResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GetInfoResponse; - static deserializeBinaryFromReader(message: GetInfoResponse, reader: jspb.BinaryReader): GetInfoResponse; -} - -export namespace GetInfoResponse { - export type AsObject = { - pubkey: Uint8Array | string, - listeners: Array, - uris: Array, - } -} - diff --git a/lib/types/generated/watchtowerrpc/watchtower_pb.js b/lib/types/generated/watchtowerrpc/watchtower_pb.js deleted file mode 100644 index c34253c..0000000 --- a/lib/types/generated/watchtowerrpc/watchtower_pb.js +++ /dev/null @@ -1,422 +0,0 @@ -// source: watchtowerrpc/watchtower.proto -/** - * @fileoverview - * @enhanceable - * @suppress {missingRequire} reports error on implicit type usages. - * @suppress {messageConventions} JS Compiler reports an error if a variable or - * field starts with 'MSG_' and isn't a translatable message. - * @public - */ -// GENERATED CODE -- DO NOT EDIT! -/* eslint-disable */ -// @ts-nocheck - -var jspb = require('google-protobuf'); -var goog = jspb; -var global = Function('return this')(); - -goog.exportSymbol('proto.watchtowerrpc.GetInfoRequest', null, global); -goog.exportSymbol('proto.watchtowerrpc.GetInfoResponse', null, global); -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.watchtowerrpc.GetInfoRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.watchtowerrpc.GetInfoRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.watchtowerrpc.GetInfoRequest.displayName = 'proto.watchtowerrpc.GetInfoRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.watchtowerrpc.GetInfoResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.watchtowerrpc.GetInfoResponse.repeatedFields_, null); -}; -goog.inherits(proto.watchtowerrpc.GetInfoResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.watchtowerrpc.GetInfoResponse.displayName = 'proto.watchtowerrpc.GetInfoResponse'; -} - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.watchtowerrpc.GetInfoRequest.prototype.toObject = function(opt_includeInstance) { - return proto.watchtowerrpc.GetInfoRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.watchtowerrpc.GetInfoRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.watchtowerrpc.GetInfoRequest.toObject = function(includeInstance, msg) { - var f, obj = { - - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.watchtowerrpc.GetInfoRequest} - */ -proto.watchtowerrpc.GetInfoRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.watchtowerrpc.GetInfoRequest; - return proto.watchtowerrpc.GetInfoRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.watchtowerrpc.GetInfoRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.watchtowerrpc.GetInfoRequest} - */ -proto.watchtowerrpc.GetInfoRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.watchtowerrpc.GetInfoRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.watchtowerrpc.GetInfoRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.watchtowerrpc.GetInfoRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.watchtowerrpc.GetInfoRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.watchtowerrpc.GetInfoResponse.repeatedFields_ = [2,3]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.watchtowerrpc.GetInfoResponse.prototype.toObject = function(opt_includeInstance) { - return proto.watchtowerrpc.GetInfoResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.watchtowerrpc.GetInfoResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.watchtowerrpc.GetInfoResponse.toObject = function(includeInstance, msg) { - var f, obj = { - pubkey: msg.getPubkey_asB64(), - listenersList: (f = jspb.Message.getRepeatedField(msg, 2)) == null ? undefined : f, - urisList: (f = jspb.Message.getRepeatedField(msg, 3)) == null ? undefined : f - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.watchtowerrpc.GetInfoResponse} - */ -proto.watchtowerrpc.GetInfoResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.watchtowerrpc.GetInfoResponse; - return proto.watchtowerrpc.GetInfoResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.watchtowerrpc.GetInfoResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.watchtowerrpc.GetInfoResponse} - */ -proto.watchtowerrpc.GetInfoResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setPubkey(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.addListeners(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.addUris(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.watchtowerrpc.GetInfoResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.watchtowerrpc.GetInfoResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.watchtowerrpc.GetInfoResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.watchtowerrpc.GetInfoResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getPubkey_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getListenersList(); - if (f.length > 0) { - writer.writeRepeatedString( - 2, - f - ); - } - f = message.getUrisList(); - if (f.length > 0) { - writer.writeRepeatedString( - 3, - f - ); - } -}; - - -/** - * optional bytes pubkey = 1; - * @return {!(string|Uint8Array)} - */ -proto.watchtowerrpc.GetInfoResponse.prototype.getPubkey = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes pubkey = 1; - * This is a type-conversion wrapper around `getPubkey()` - * @return {string} - */ -proto.watchtowerrpc.GetInfoResponse.prototype.getPubkey_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getPubkey())); -}; - - -/** - * optional bytes pubkey = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getPubkey()` - * @return {!Uint8Array} - */ -proto.watchtowerrpc.GetInfoResponse.prototype.getPubkey_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getPubkey())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.watchtowerrpc.GetInfoResponse} returns this - */ -proto.watchtowerrpc.GetInfoResponse.prototype.setPubkey = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * repeated string listeners = 2; - * @return {!Array} - */ -proto.watchtowerrpc.GetInfoResponse.prototype.getListenersList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 2)); -}; - - -/** - * @param {!Array} value - * @return {!proto.watchtowerrpc.GetInfoResponse} returns this - */ -proto.watchtowerrpc.GetInfoResponse.prototype.setListenersList = function(value) { - return jspb.Message.setField(this, 2, value || []); -}; - - -/** - * @param {string} value - * @param {number=} opt_index - * @return {!proto.watchtowerrpc.GetInfoResponse} returns this - */ -proto.watchtowerrpc.GetInfoResponse.prototype.addListeners = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 2, value, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.watchtowerrpc.GetInfoResponse} returns this - */ -proto.watchtowerrpc.GetInfoResponse.prototype.clearListenersList = function() { - return this.setListenersList([]); -}; - - -/** - * repeated string uris = 3; - * @return {!Array} - */ -proto.watchtowerrpc.GetInfoResponse.prototype.getUrisList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 3)); -}; - - -/** - * @param {!Array} value - * @return {!proto.watchtowerrpc.GetInfoResponse} returns this - */ -proto.watchtowerrpc.GetInfoResponse.prototype.setUrisList = function(value) { - return jspb.Message.setField(this, 3, value || []); -}; - - -/** - * @param {string} value - * @param {number=} opt_index - * @return {!proto.watchtowerrpc.GetInfoResponse} returns this - */ -proto.watchtowerrpc.GetInfoResponse.prototype.addUris = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 3, value, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.watchtowerrpc.GetInfoResponse} returns this - */ -proto.watchtowerrpc.GetInfoResponse.prototype.clearUrisList = function() { - return this.setUrisList([]); -}; - - -goog.object.extend(exports, proto.watchtowerrpc); diff --git a/lib/types/generated/watchtowerrpc/watchtower_pb_service.d.ts b/lib/types/generated/watchtowerrpc/watchtower_pb_service.d.ts deleted file mode 100644 index ad1e6b6..0000000 --- a/lib/types/generated/watchtowerrpc/watchtower_pb_service.d.ts +++ /dev/null @@ -1,63 +0,0 @@ -// package: watchtowerrpc -// file: watchtowerrpc/watchtower.proto - -import * as watchtowerrpc_watchtower_pb from "../watchtowerrpc/watchtower_pb"; -import {grpc} from "@improbable-eng/grpc-web"; - -type WatchtowerGetInfo = { - readonly methodName: string; - readonly service: typeof Watchtower; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof watchtowerrpc_watchtower_pb.GetInfoRequest; - readonly responseType: typeof watchtowerrpc_watchtower_pb.GetInfoResponse; -}; - -export class Watchtower { - static readonly serviceName: string; - static readonly GetInfo: WatchtowerGetInfo; -} - -export type ServiceError = { message: string, code: number; metadata: grpc.Metadata } -export type Status = { details: string, code: number; metadata: grpc.Metadata } - -interface UnaryResponse { - cancel(): void; -} -interface ResponseStream { - cancel(): void; - on(type: 'data', handler: (message: T) => void): ResponseStream; - on(type: 'end', handler: (status?: Status) => void): ResponseStream; - on(type: 'status', handler: (status: Status) => void): ResponseStream; -} -interface RequestStream { - write(message: T): RequestStream; - end(): void; - cancel(): void; - on(type: 'end', handler: (status?: Status) => void): RequestStream; - on(type: 'status', handler: (status: Status) => void): RequestStream; -} -interface BidirectionalStream { - write(message: ReqT): BidirectionalStream; - end(): void; - cancel(): void; - on(type: 'data', handler: (message: ResT) => void): BidirectionalStream; - on(type: 'end', handler: (status?: Status) => void): BidirectionalStream; - on(type: 'status', handler: (status: Status) => void): BidirectionalStream; -} - -export class WatchtowerClient { - readonly serviceHost: string; - - constructor(serviceHost: string, options?: grpc.RpcOptions); - getInfo( - requestMessage: watchtowerrpc_watchtower_pb.GetInfoRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: watchtowerrpc_watchtower_pb.GetInfoResponse|null) => void - ): UnaryResponse; - getInfo( - requestMessage: watchtowerrpc_watchtower_pb.GetInfoRequest, - callback: (error: ServiceError|null, responseMessage: watchtowerrpc_watchtower_pb.GetInfoResponse|null) => void - ): UnaryResponse; -} - diff --git a/lib/types/generated/watchtowerrpc/watchtower_pb_service.js b/lib/types/generated/watchtowerrpc/watchtower_pb_service.js deleted file mode 100644 index 81ab773..0000000 --- a/lib/types/generated/watchtowerrpc/watchtower_pb_service.js +++ /dev/null @@ -1,61 +0,0 @@ -// package: watchtowerrpc -// file: watchtowerrpc/watchtower.proto - -var watchtowerrpc_watchtower_pb = require("../watchtowerrpc/watchtower_pb"); -var grpc = require("@improbable-eng/grpc-web").grpc; - -var Watchtower = (function () { - function Watchtower() {} - Watchtower.serviceName = "watchtowerrpc.Watchtower"; - return Watchtower; -}()); - -Watchtower.GetInfo = { - methodName: "GetInfo", - service: Watchtower, - requestStream: false, - responseStream: false, - requestType: watchtowerrpc_watchtower_pb.GetInfoRequest, - responseType: watchtowerrpc_watchtower_pb.GetInfoResponse -}; - -exports.Watchtower = Watchtower; - -function WatchtowerClient(serviceHost, options) { - this.serviceHost = serviceHost; - this.options = options || {}; -} - -WatchtowerClient.prototype.getInfo = function getInfo(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(Watchtower.GetInfo, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -exports.WatchtowerClient = WatchtowerClient; - diff --git a/lib/types/generated/wtclientrpc/wtclient_pb.d.ts b/lib/types/generated/wtclientrpc/wtclient_pb.d.ts deleted file mode 100644 index 8fc36f1..0000000 --- a/lib/types/generated/wtclientrpc/wtclient_pb.d.ts +++ /dev/null @@ -1,342 +0,0 @@ -// package: wtclientrpc -// file: wtclientrpc/wtclient.proto - -import * as jspb from "google-protobuf"; - -export class AddTowerRequest extends jspb.Message { - getPubkey(): Uint8Array | string; - getPubkey_asU8(): Uint8Array; - getPubkey_asB64(): string; - setPubkey(value: Uint8Array | string): void; - - getAddress(): string; - setAddress(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): AddTowerRequest.AsObject; - static toObject(includeInstance: boolean, msg: AddTowerRequest): AddTowerRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: AddTowerRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): AddTowerRequest; - static deserializeBinaryFromReader(message: AddTowerRequest, reader: jspb.BinaryReader): AddTowerRequest; -} - -export namespace AddTowerRequest { - export type AsObject = { - pubkey: Uint8Array | string, - address: string, - } -} - -export class AddTowerResponse extends jspb.Message { - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): AddTowerResponse.AsObject; - static toObject(includeInstance: boolean, msg: AddTowerResponse): AddTowerResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: AddTowerResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): AddTowerResponse; - static deserializeBinaryFromReader(message: AddTowerResponse, reader: jspb.BinaryReader): AddTowerResponse; -} - -export namespace AddTowerResponse { - export type AsObject = { - } -} - -export class RemoveTowerRequest extends jspb.Message { - getPubkey(): Uint8Array | string; - getPubkey_asU8(): Uint8Array; - getPubkey_asB64(): string; - setPubkey(value: Uint8Array | string): void; - - getAddress(): string; - setAddress(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): RemoveTowerRequest.AsObject; - static toObject(includeInstance: boolean, msg: RemoveTowerRequest): RemoveTowerRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: RemoveTowerRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): RemoveTowerRequest; - static deserializeBinaryFromReader(message: RemoveTowerRequest, reader: jspb.BinaryReader): RemoveTowerRequest; -} - -export namespace RemoveTowerRequest { - export type AsObject = { - pubkey: Uint8Array | string, - address: string, - } -} - -export class RemoveTowerResponse extends jspb.Message { - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): RemoveTowerResponse.AsObject; - static toObject(includeInstance: boolean, msg: RemoveTowerResponse): RemoveTowerResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: RemoveTowerResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): RemoveTowerResponse; - static deserializeBinaryFromReader(message: RemoveTowerResponse, reader: jspb.BinaryReader): RemoveTowerResponse; -} - -export namespace RemoveTowerResponse { - export type AsObject = { - } -} - -export class GetTowerInfoRequest extends jspb.Message { - getPubkey(): Uint8Array | string; - getPubkey_asU8(): Uint8Array; - getPubkey_asB64(): string; - setPubkey(value: Uint8Array | string): void; - - getIncludeSessions(): boolean; - setIncludeSessions(value: boolean): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GetTowerInfoRequest.AsObject; - static toObject(includeInstance: boolean, msg: GetTowerInfoRequest): GetTowerInfoRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: GetTowerInfoRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GetTowerInfoRequest; - static deserializeBinaryFromReader(message: GetTowerInfoRequest, reader: jspb.BinaryReader): GetTowerInfoRequest; -} - -export namespace GetTowerInfoRequest { - export type AsObject = { - pubkey: Uint8Array | string, - includeSessions: boolean, - } -} - -export class TowerSession extends jspb.Message { - getNumBackups(): number; - setNumBackups(value: number): void; - - getNumPendingBackups(): number; - setNumPendingBackups(value: number): void; - - getMaxBackups(): number; - setMaxBackups(value: number): void; - - getSweepSatPerByte(): number; - setSweepSatPerByte(value: number): void; - - getSweepSatPerVbyte(): number; - setSweepSatPerVbyte(value: number): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): TowerSession.AsObject; - static toObject(includeInstance: boolean, msg: TowerSession): TowerSession.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: TowerSession, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): TowerSession; - static deserializeBinaryFromReader(message: TowerSession, reader: jspb.BinaryReader): TowerSession; -} - -export namespace TowerSession { - export type AsObject = { - numBackups: number, - numPendingBackups: number, - maxBackups: number, - sweepSatPerByte: number, - sweepSatPerVbyte: number, - } -} - -export class Tower extends jspb.Message { - getPubkey(): Uint8Array | string; - getPubkey_asU8(): Uint8Array; - getPubkey_asB64(): string; - setPubkey(value: Uint8Array | string): void; - - clearAddressesList(): void; - getAddressesList(): Array; - setAddressesList(value: Array): void; - addAddresses(value: string, index?: number): string; - - getActiveSessionCandidate(): boolean; - setActiveSessionCandidate(value: boolean): void; - - getNumSessions(): number; - setNumSessions(value: number): void; - - clearSessionsList(): void; - getSessionsList(): Array; - setSessionsList(value: Array): void; - addSessions(value?: TowerSession, index?: number): TowerSession; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Tower.AsObject; - static toObject(includeInstance: boolean, msg: Tower): Tower.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: Tower, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Tower; - static deserializeBinaryFromReader(message: Tower, reader: jspb.BinaryReader): Tower; -} - -export namespace Tower { - export type AsObject = { - pubkey: Uint8Array | string, - addresses: Array, - activeSessionCandidate: boolean, - numSessions: number, - sessions: Array, - } -} - -export class ListTowersRequest extends jspb.Message { - getIncludeSessions(): boolean; - setIncludeSessions(value: boolean): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ListTowersRequest.AsObject; - static toObject(includeInstance: boolean, msg: ListTowersRequest): ListTowersRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ListTowersRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ListTowersRequest; - static deserializeBinaryFromReader(message: ListTowersRequest, reader: jspb.BinaryReader): ListTowersRequest; -} - -export namespace ListTowersRequest { - export type AsObject = { - includeSessions: boolean, - } -} - -export class ListTowersResponse extends jspb.Message { - clearTowersList(): void; - getTowersList(): Array; - setTowersList(value: Array): void; - addTowers(value?: Tower, index?: number): Tower; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ListTowersResponse.AsObject; - static toObject(includeInstance: boolean, msg: ListTowersResponse): ListTowersResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ListTowersResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ListTowersResponse; - static deserializeBinaryFromReader(message: ListTowersResponse, reader: jspb.BinaryReader): ListTowersResponse; -} - -export namespace ListTowersResponse { - export type AsObject = { - towers: Array, - } -} - -export class StatsRequest extends jspb.Message { - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): StatsRequest.AsObject; - static toObject(includeInstance: boolean, msg: StatsRequest): StatsRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: StatsRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): StatsRequest; - static deserializeBinaryFromReader(message: StatsRequest, reader: jspb.BinaryReader): StatsRequest; -} - -export namespace StatsRequest { - export type AsObject = { - } -} - -export class StatsResponse extends jspb.Message { - getNumBackups(): number; - setNumBackups(value: number): void; - - getNumPendingBackups(): number; - setNumPendingBackups(value: number): void; - - getNumFailedBackups(): number; - setNumFailedBackups(value: number): void; - - getNumSessionsAcquired(): number; - setNumSessionsAcquired(value: number): void; - - getNumSessionsExhausted(): number; - setNumSessionsExhausted(value: number): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): StatsResponse.AsObject; - static toObject(includeInstance: boolean, msg: StatsResponse): StatsResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: StatsResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): StatsResponse; - static deserializeBinaryFromReader(message: StatsResponse, reader: jspb.BinaryReader): StatsResponse; -} - -export namespace StatsResponse { - export type AsObject = { - numBackups: number, - numPendingBackups: number, - numFailedBackups: number, - numSessionsAcquired: number, - numSessionsExhausted: number, - } -} - -export class PolicyRequest extends jspb.Message { - getPolicyType(): PolicyTypeMap[keyof PolicyTypeMap]; - setPolicyType(value: PolicyTypeMap[keyof PolicyTypeMap]): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): PolicyRequest.AsObject; - static toObject(includeInstance: boolean, msg: PolicyRequest): PolicyRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: PolicyRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): PolicyRequest; - static deserializeBinaryFromReader(message: PolicyRequest, reader: jspb.BinaryReader): PolicyRequest; -} - -export namespace PolicyRequest { - export type AsObject = { - policyType: PolicyTypeMap[keyof PolicyTypeMap], - } -} - -export class PolicyResponse extends jspb.Message { - getMaxUpdates(): number; - setMaxUpdates(value: number): void; - - getSweepSatPerByte(): number; - setSweepSatPerByte(value: number): void; - - getSweepSatPerVbyte(): number; - setSweepSatPerVbyte(value: number): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): PolicyResponse.AsObject; - static toObject(includeInstance: boolean, msg: PolicyResponse): PolicyResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: PolicyResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): PolicyResponse; - static deserializeBinaryFromReader(message: PolicyResponse, reader: jspb.BinaryReader): PolicyResponse; -} - -export namespace PolicyResponse { - export type AsObject = { - maxUpdates: number, - sweepSatPerByte: number, - sweepSatPerVbyte: number, - } -} - -export interface PolicyTypeMap { - LEGACY: 0; - ANCHOR: 1; -} - -export const PolicyType: PolicyTypeMap; - diff --git a/lib/types/generated/wtclientrpc/wtclient_pb.js b/lib/types/generated/wtclientrpc/wtclient_pb.js deleted file mode 100644 index 02d0020..0000000 --- a/lib/types/generated/wtclientrpc/wtclient_pb.js +++ /dev/null @@ -1,2601 +0,0 @@ -// source: wtclientrpc/wtclient.proto -/** - * @fileoverview - * @enhanceable - * @suppress {missingRequire} reports error on implicit type usages. - * @suppress {messageConventions} JS Compiler reports an error if a variable or - * field starts with 'MSG_' and isn't a translatable message. - * @public - */ -// GENERATED CODE -- DO NOT EDIT! -/* eslint-disable */ -// @ts-nocheck - -var jspb = require('google-protobuf'); -var goog = jspb; -var global = Function('return this')(); - -goog.exportSymbol('proto.wtclientrpc.AddTowerRequest', null, global); -goog.exportSymbol('proto.wtclientrpc.AddTowerResponse', null, global); -goog.exportSymbol('proto.wtclientrpc.GetTowerInfoRequest', null, global); -goog.exportSymbol('proto.wtclientrpc.ListTowersRequest', null, global); -goog.exportSymbol('proto.wtclientrpc.ListTowersResponse', null, global); -goog.exportSymbol('proto.wtclientrpc.PolicyRequest', null, global); -goog.exportSymbol('proto.wtclientrpc.PolicyResponse', null, global); -goog.exportSymbol('proto.wtclientrpc.PolicyType', null, global); -goog.exportSymbol('proto.wtclientrpc.RemoveTowerRequest', null, global); -goog.exportSymbol('proto.wtclientrpc.RemoveTowerResponse', null, global); -goog.exportSymbol('proto.wtclientrpc.StatsRequest', null, global); -goog.exportSymbol('proto.wtclientrpc.StatsResponse', null, global); -goog.exportSymbol('proto.wtclientrpc.Tower', null, global); -goog.exportSymbol('proto.wtclientrpc.TowerSession', null, global); -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.wtclientrpc.AddTowerRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.wtclientrpc.AddTowerRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.wtclientrpc.AddTowerRequest.displayName = 'proto.wtclientrpc.AddTowerRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.wtclientrpc.AddTowerResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.wtclientrpc.AddTowerResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.wtclientrpc.AddTowerResponse.displayName = 'proto.wtclientrpc.AddTowerResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.wtclientrpc.RemoveTowerRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.wtclientrpc.RemoveTowerRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.wtclientrpc.RemoveTowerRequest.displayName = 'proto.wtclientrpc.RemoveTowerRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.wtclientrpc.RemoveTowerResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.wtclientrpc.RemoveTowerResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.wtclientrpc.RemoveTowerResponse.displayName = 'proto.wtclientrpc.RemoveTowerResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.wtclientrpc.GetTowerInfoRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.wtclientrpc.GetTowerInfoRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.wtclientrpc.GetTowerInfoRequest.displayName = 'proto.wtclientrpc.GetTowerInfoRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.wtclientrpc.TowerSession = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.wtclientrpc.TowerSession, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.wtclientrpc.TowerSession.displayName = 'proto.wtclientrpc.TowerSession'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.wtclientrpc.Tower = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.wtclientrpc.Tower.repeatedFields_, null); -}; -goog.inherits(proto.wtclientrpc.Tower, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.wtclientrpc.Tower.displayName = 'proto.wtclientrpc.Tower'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.wtclientrpc.ListTowersRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.wtclientrpc.ListTowersRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.wtclientrpc.ListTowersRequest.displayName = 'proto.wtclientrpc.ListTowersRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.wtclientrpc.ListTowersResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.wtclientrpc.ListTowersResponse.repeatedFields_, null); -}; -goog.inherits(proto.wtclientrpc.ListTowersResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.wtclientrpc.ListTowersResponse.displayName = 'proto.wtclientrpc.ListTowersResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.wtclientrpc.StatsRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.wtclientrpc.StatsRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.wtclientrpc.StatsRequest.displayName = 'proto.wtclientrpc.StatsRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.wtclientrpc.StatsResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.wtclientrpc.StatsResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.wtclientrpc.StatsResponse.displayName = 'proto.wtclientrpc.StatsResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.wtclientrpc.PolicyRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.wtclientrpc.PolicyRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.wtclientrpc.PolicyRequest.displayName = 'proto.wtclientrpc.PolicyRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.wtclientrpc.PolicyResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.wtclientrpc.PolicyResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.wtclientrpc.PolicyResponse.displayName = 'proto.wtclientrpc.PolicyResponse'; -} - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.wtclientrpc.AddTowerRequest.prototype.toObject = function(opt_includeInstance) { - return proto.wtclientrpc.AddTowerRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.wtclientrpc.AddTowerRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.wtclientrpc.AddTowerRequest.toObject = function(includeInstance, msg) { - var f, obj = { - pubkey: msg.getPubkey_asB64(), - address: jspb.Message.getFieldWithDefault(msg, 2, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.wtclientrpc.AddTowerRequest} - */ -proto.wtclientrpc.AddTowerRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.wtclientrpc.AddTowerRequest; - return proto.wtclientrpc.AddTowerRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.wtclientrpc.AddTowerRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.wtclientrpc.AddTowerRequest} - */ -proto.wtclientrpc.AddTowerRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setPubkey(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setAddress(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.wtclientrpc.AddTowerRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.wtclientrpc.AddTowerRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.wtclientrpc.AddTowerRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.wtclientrpc.AddTowerRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getPubkey_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getAddress(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } -}; - - -/** - * optional bytes pubkey = 1; - * @return {!(string|Uint8Array)} - */ -proto.wtclientrpc.AddTowerRequest.prototype.getPubkey = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes pubkey = 1; - * This is a type-conversion wrapper around `getPubkey()` - * @return {string} - */ -proto.wtclientrpc.AddTowerRequest.prototype.getPubkey_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getPubkey())); -}; - - -/** - * optional bytes pubkey = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getPubkey()` - * @return {!Uint8Array} - */ -proto.wtclientrpc.AddTowerRequest.prototype.getPubkey_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getPubkey())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.wtclientrpc.AddTowerRequest} returns this - */ -proto.wtclientrpc.AddTowerRequest.prototype.setPubkey = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional string address = 2; - * @return {string} - */ -proto.wtclientrpc.AddTowerRequest.prototype.getAddress = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.wtclientrpc.AddTowerRequest} returns this - */ -proto.wtclientrpc.AddTowerRequest.prototype.setAddress = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.wtclientrpc.AddTowerResponse.prototype.toObject = function(opt_includeInstance) { - return proto.wtclientrpc.AddTowerResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.wtclientrpc.AddTowerResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.wtclientrpc.AddTowerResponse.toObject = function(includeInstance, msg) { - var f, obj = { - - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.wtclientrpc.AddTowerResponse} - */ -proto.wtclientrpc.AddTowerResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.wtclientrpc.AddTowerResponse; - return proto.wtclientrpc.AddTowerResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.wtclientrpc.AddTowerResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.wtclientrpc.AddTowerResponse} - */ -proto.wtclientrpc.AddTowerResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.wtclientrpc.AddTowerResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.wtclientrpc.AddTowerResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.wtclientrpc.AddTowerResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.wtclientrpc.AddTowerResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.wtclientrpc.RemoveTowerRequest.prototype.toObject = function(opt_includeInstance) { - return proto.wtclientrpc.RemoveTowerRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.wtclientrpc.RemoveTowerRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.wtclientrpc.RemoveTowerRequest.toObject = function(includeInstance, msg) { - var f, obj = { - pubkey: msg.getPubkey_asB64(), - address: jspb.Message.getFieldWithDefault(msg, 2, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.wtclientrpc.RemoveTowerRequest} - */ -proto.wtclientrpc.RemoveTowerRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.wtclientrpc.RemoveTowerRequest; - return proto.wtclientrpc.RemoveTowerRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.wtclientrpc.RemoveTowerRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.wtclientrpc.RemoveTowerRequest} - */ -proto.wtclientrpc.RemoveTowerRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setPubkey(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setAddress(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.wtclientrpc.RemoveTowerRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.wtclientrpc.RemoveTowerRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.wtclientrpc.RemoveTowerRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.wtclientrpc.RemoveTowerRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getPubkey_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getAddress(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } -}; - - -/** - * optional bytes pubkey = 1; - * @return {!(string|Uint8Array)} - */ -proto.wtclientrpc.RemoveTowerRequest.prototype.getPubkey = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes pubkey = 1; - * This is a type-conversion wrapper around `getPubkey()` - * @return {string} - */ -proto.wtclientrpc.RemoveTowerRequest.prototype.getPubkey_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getPubkey())); -}; - - -/** - * optional bytes pubkey = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getPubkey()` - * @return {!Uint8Array} - */ -proto.wtclientrpc.RemoveTowerRequest.prototype.getPubkey_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getPubkey())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.wtclientrpc.RemoveTowerRequest} returns this - */ -proto.wtclientrpc.RemoveTowerRequest.prototype.setPubkey = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional string address = 2; - * @return {string} - */ -proto.wtclientrpc.RemoveTowerRequest.prototype.getAddress = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.wtclientrpc.RemoveTowerRequest} returns this - */ -proto.wtclientrpc.RemoveTowerRequest.prototype.setAddress = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.wtclientrpc.RemoveTowerResponse.prototype.toObject = function(opt_includeInstance) { - return proto.wtclientrpc.RemoveTowerResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.wtclientrpc.RemoveTowerResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.wtclientrpc.RemoveTowerResponse.toObject = function(includeInstance, msg) { - var f, obj = { - - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.wtclientrpc.RemoveTowerResponse} - */ -proto.wtclientrpc.RemoveTowerResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.wtclientrpc.RemoveTowerResponse; - return proto.wtclientrpc.RemoveTowerResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.wtclientrpc.RemoveTowerResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.wtclientrpc.RemoveTowerResponse} - */ -proto.wtclientrpc.RemoveTowerResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.wtclientrpc.RemoveTowerResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.wtclientrpc.RemoveTowerResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.wtclientrpc.RemoveTowerResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.wtclientrpc.RemoveTowerResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.wtclientrpc.GetTowerInfoRequest.prototype.toObject = function(opt_includeInstance) { - return proto.wtclientrpc.GetTowerInfoRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.wtclientrpc.GetTowerInfoRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.wtclientrpc.GetTowerInfoRequest.toObject = function(includeInstance, msg) { - var f, obj = { - pubkey: msg.getPubkey_asB64(), - includeSessions: jspb.Message.getBooleanFieldWithDefault(msg, 2, false) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.wtclientrpc.GetTowerInfoRequest} - */ -proto.wtclientrpc.GetTowerInfoRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.wtclientrpc.GetTowerInfoRequest; - return proto.wtclientrpc.GetTowerInfoRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.wtclientrpc.GetTowerInfoRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.wtclientrpc.GetTowerInfoRequest} - */ -proto.wtclientrpc.GetTowerInfoRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setPubkey(value); - break; - case 2: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setIncludeSessions(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.wtclientrpc.GetTowerInfoRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.wtclientrpc.GetTowerInfoRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.wtclientrpc.GetTowerInfoRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.wtclientrpc.GetTowerInfoRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getPubkey_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getIncludeSessions(); - if (f) { - writer.writeBool( - 2, - f - ); - } -}; - - -/** - * optional bytes pubkey = 1; - * @return {!(string|Uint8Array)} - */ -proto.wtclientrpc.GetTowerInfoRequest.prototype.getPubkey = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes pubkey = 1; - * This is a type-conversion wrapper around `getPubkey()` - * @return {string} - */ -proto.wtclientrpc.GetTowerInfoRequest.prototype.getPubkey_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getPubkey())); -}; - - -/** - * optional bytes pubkey = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getPubkey()` - * @return {!Uint8Array} - */ -proto.wtclientrpc.GetTowerInfoRequest.prototype.getPubkey_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getPubkey())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.wtclientrpc.GetTowerInfoRequest} returns this - */ -proto.wtclientrpc.GetTowerInfoRequest.prototype.setPubkey = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional bool include_sessions = 2; - * @return {boolean} - */ -proto.wtclientrpc.GetTowerInfoRequest.prototype.getIncludeSessions = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.wtclientrpc.GetTowerInfoRequest} returns this - */ -proto.wtclientrpc.GetTowerInfoRequest.prototype.setIncludeSessions = function(value) { - return jspb.Message.setProto3BooleanField(this, 2, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.wtclientrpc.TowerSession.prototype.toObject = function(opt_includeInstance) { - return proto.wtclientrpc.TowerSession.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.wtclientrpc.TowerSession} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.wtclientrpc.TowerSession.toObject = function(includeInstance, msg) { - var f, obj = { - numBackups: jspb.Message.getFieldWithDefault(msg, 1, 0), - numPendingBackups: jspb.Message.getFieldWithDefault(msg, 2, 0), - maxBackups: jspb.Message.getFieldWithDefault(msg, 3, 0), - sweepSatPerByte: jspb.Message.getFieldWithDefault(msg, 4, 0), - sweepSatPerVbyte: jspb.Message.getFieldWithDefault(msg, 5, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.wtclientrpc.TowerSession} - */ -proto.wtclientrpc.TowerSession.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.wtclientrpc.TowerSession; - return proto.wtclientrpc.TowerSession.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.wtclientrpc.TowerSession} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.wtclientrpc.TowerSession} - */ -proto.wtclientrpc.TowerSession.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readUint32()); - msg.setNumBackups(value); - break; - case 2: - var value = /** @type {number} */ (reader.readUint32()); - msg.setNumPendingBackups(value); - break; - case 3: - var value = /** @type {number} */ (reader.readUint32()); - msg.setMaxBackups(value); - break; - case 4: - var value = /** @type {number} */ (reader.readUint32()); - msg.setSweepSatPerByte(value); - break; - case 5: - var value = /** @type {number} */ (reader.readUint32()); - msg.setSweepSatPerVbyte(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.wtclientrpc.TowerSession.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.wtclientrpc.TowerSession.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.wtclientrpc.TowerSession} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.wtclientrpc.TowerSession.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getNumBackups(); - if (f !== 0) { - writer.writeUint32( - 1, - f - ); - } - f = message.getNumPendingBackups(); - if (f !== 0) { - writer.writeUint32( - 2, - f - ); - } - f = message.getMaxBackups(); - if (f !== 0) { - writer.writeUint32( - 3, - f - ); - } - f = message.getSweepSatPerByte(); - if (f !== 0) { - writer.writeUint32( - 4, - f - ); - } - f = message.getSweepSatPerVbyte(); - if (f !== 0) { - writer.writeUint32( - 5, - f - ); - } -}; - - -/** - * optional uint32 num_backups = 1; - * @return {number} - */ -proto.wtclientrpc.TowerSession.prototype.getNumBackups = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.wtclientrpc.TowerSession} returns this - */ -proto.wtclientrpc.TowerSession.prototype.setNumBackups = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); -}; - - -/** - * optional uint32 num_pending_backups = 2; - * @return {number} - */ -proto.wtclientrpc.TowerSession.prototype.getNumPendingBackups = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.wtclientrpc.TowerSession} returns this - */ -proto.wtclientrpc.TowerSession.prototype.setNumPendingBackups = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * optional uint32 max_backups = 3; - * @return {number} - */ -proto.wtclientrpc.TowerSession.prototype.getMaxBackups = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.wtclientrpc.TowerSession} returns this - */ -proto.wtclientrpc.TowerSession.prototype.setMaxBackups = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - -/** - * optional uint32 sweep_sat_per_byte = 4; - * @return {number} - */ -proto.wtclientrpc.TowerSession.prototype.getSweepSatPerByte = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.wtclientrpc.TowerSession} returns this - */ -proto.wtclientrpc.TowerSession.prototype.setSweepSatPerByte = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); -}; - - -/** - * optional uint32 sweep_sat_per_vbyte = 5; - * @return {number} - */ -proto.wtclientrpc.TowerSession.prototype.getSweepSatPerVbyte = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.wtclientrpc.TowerSession} returns this - */ -proto.wtclientrpc.TowerSession.prototype.setSweepSatPerVbyte = function(value) { - return jspb.Message.setProto3IntField(this, 5, value); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.wtclientrpc.Tower.repeatedFields_ = [2,5]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.wtclientrpc.Tower.prototype.toObject = function(opt_includeInstance) { - return proto.wtclientrpc.Tower.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.wtclientrpc.Tower} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.wtclientrpc.Tower.toObject = function(includeInstance, msg) { - var f, obj = { - pubkey: msg.getPubkey_asB64(), - addressesList: (f = jspb.Message.getRepeatedField(msg, 2)) == null ? undefined : f, - activeSessionCandidate: jspb.Message.getBooleanFieldWithDefault(msg, 3, false), - numSessions: jspb.Message.getFieldWithDefault(msg, 4, 0), - sessionsList: jspb.Message.toObjectList(msg.getSessionsList(), - proto.wtclientrpc.TowerSession.toObject, includeInstance) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.wtclientrpc.Tower} - */ -proto.wtclientrpc.Tower.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.wtclientrpc.Tower; - return proto.wtclientrpc.Tower.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.wtclientrpc.Tower} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.wtclientrpc.Tower} - */ -proto.wtclientrpc.Tower.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setPubkey(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.addAddresses(value); - break; - case 3: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setActiveSessionCandidate(value); - break; - case 4: - var value = /** @type {number} */ (reader.readUint32()); - msg.setNumSessions(value); - break; - case 5: - var value = new proto.wtclientrpc.TowerSession; - reader.readMessage(value,proto.wtclientrpc.TowerSession.deserializeBinaryFromReader); - msg.addSessions(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.wtclientrpc.Tower.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.wtclientrpc.Tower.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.wtclientrpc.Tower} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.wtclientrpc.Tower.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getPubkey_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getAddressesList(); - if (f.length > 0) { - writer.writeRepeatedString( - 2, - f - ); - } - f = message.getActiveSessionCandidate(); - if (f) { - writer.writeBool( - 3, - f - ); - } - f = message.getNumSessions(); - if (f !== 0) { - writer.writeUint32( - 4, - f - ); - } - f = message.getSessionsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 5, - f, - proto.wtclientrpc.TowerSession.serializeBinaryToWriter - ); - } -}; - - -/** - * optional bytes pubkey = 1; - * @return {!(string|Uint8Array)} - */ -proto.wtclientrpc.Tower.prototype.getPubkey = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes pubkey = 1; - * This is a type-conversion wrapper around `getPubkey()` - * @return {string} - */ -proto.wtclientrpc.Tower.prototype.getPubkey_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getPubkey())); -}; - - -/** - * optional bytes pubkey = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getPubkey()` - * @return {!Uint8Array} - */ -proto.wtclientrpc.Tower.prototype.getPubkey_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getPubkey())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.wtclientrpc.Tower} returns this - */ -proto.wtclientrpc.Tower.prototype.setPubkey = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * repeated string addresses = 2; - * @return {!Array} - */ -proto.wtclientrpc.Tower.prototype.getAddressesList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 2)); -}; - - -/** - * @param {!Array} value - * @return {!proto.wtclientrpc.Tower} returns this - */ -proto.wtclientrpc.Tower.prototype.setAddressesList = function(value) { - return jspb.Message.setField(this, 2, value || []); -}; - - -/** - * @param {string} value - * @param {number=} opt_index - * @return {!proto.wtclientrpc.Tower} returns this - */ -proto.wtclientrpc.Tower.prototype.addAddresses = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 2, value, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.wtclientrpc.Tower} returns this - */ -proto.wtclientrpc.Tower.prototype.clearAddressesList = function() { - return this.setAddressesList([]); -}; - - -/** - * optional bool active_session_candidate = 3; - * @return {boolean} - */ -proto.wtclientrpc.Tower.prototype.getActiveSessionCandidate = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.wtclientrpc.Tower} returns this - */ -proto.wtclientrpc.Tower.prototype.setActiveSessionCandidate = function(value) { - return jspb.Message.setProto3BooleanField(this, 3, value); -}; - - -/** - * optional uint32 num_sessions = 4; - * @return {number} - */ -proto.wtclientrpc.Tower.prototype.getNumSessions = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.wtclientrpc.Tower} returns this - */ -proto.wtclientrpc.Tower.prototype.setNumSessions = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); -}; - - -/** - * repeated TowerSession sessions = 5; - * @return {!Array} - */ -proto.wtclientrpc.Tower.prototype.getSessionsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.wtclientrpc.TowerSession, 5)); -}; - - -/** - * @param {!Array} value - * @return {!proto.wtclientrpc.Tower} returns this -*/ -proto.wtclientrpc.Tower.prototype.setSessionsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 5, value); -}; - - -/** - * @param {!proto.wtclientrpc.TowerSession=} opt_value - * @param {number=} opt_index - * @return {!proto.wtclientrpc.TowerSession} - */ -proto.wtclientrpc.Tower.prototype.addSessions = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 5, opt_value, proto.wtclientrpc.TowerSession, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.wtclientrpc.Tower} returns this - */ -proto.wtclientrpc.Tower.prototype.clearSessionsList = function() { - return this.setSessionsList([]); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.wtclientrpc.ListTowersRequest.prototype.toObject = function(opt_includeInstance) { - return proto.wtclientrpc.ListTowersRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.wtclientrpc.ListTowersRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.wtclientrpc.ListTowersRequest.toObject = function(includeInstance, msg) { - var f, obj = { - includeSessions: jspb.Message.getBooleanFieldWithDefault(msg, 1, false) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.wtclientrpc.ListTowersRequest} - */ -proto.wtclientrpc.ListTowersRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.wtclientrpc.ListTowersRequest; - return proto.wtclientrpc.ListTowersRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.wtclientrpc.ListTowersRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.wtclientrpc.ListTowersRequest} - */ -proto.wtclientrpc.ListTowersRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setIncludeSessions(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.wtclientrpc.ListTowersRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.wtclientrpc.ListTowersRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.wtclientrpc.ListTowersRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.wtclientrpc.ListTowersRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getIncludeSessions(); - if (f) { - writer.writeBool( - 1, - f - ); - } -}; - - -/** - * optional bool include_sessions = 1; - * @return {boolean} - */ -proto.wtclientrpc.ListTowersRequest.prototype.getIncludeSessions = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.wtclientrpc.ListTowersRequest} returns this - */ -proto.wtclientrpc.ListTowersRequest.prototype.setIncludeSessions = function(value) { - return jspb.Message.setProto3BooleanField(this, 1, value); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.wtclientrpc.ListTowersResponse.repeatedFields_ = [1]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.wtclientrpc.ListTowersResponse.prototype.toObject = function(opt_includeInstance) { - return proto.wtclientrpc.ListTowersResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.wtclientrpc.ListTowersResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.wtclientrpc.ListTowersResponse.toObject = function(includeInstance, msg) { - var f, obj = { - towersList: jspb.Message.toObjectList(msg.getTowersList(), - proto.wtclientrpc.Tower.toObject, includeInstance) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.wtclientrpc.ListTowersResponse} - */ -proto.wtclientrpc.ListTowersResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.wtclientrpc.ListTowersResponse; - return proto.wtclientrpc.ListTowersResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.wtclientrpc.ListTowersResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.wtclientrpc.ListTowersResponse} - */ -proto.wtclientrpc.ListTowersResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.wtclientrpc.Tower; - reader.readMessage(value,proto.wtclientrpc.Tower.deserializeBinaryFromReader); - msg.addTowers(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.wtclientrpc.ListTowersResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.wtclientrpc.ListTowersResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.wtclientrpc.ListTowersResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.wtclientrpc.ListTowersResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getTowersList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 1, - f, - proto.wtclientrpc.Tower.serializeBinaryToWriter - ); - } -}; - - -/** - * repeated Tower towers = 1; - * @return {!Array} - */ -proto.wtclientrpc.ListTowersResponse.prototype.getTowersList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.wtclientrpc.Tower, 1)); -}; - - -/** - * @param {!Array} value - * @return {!proto.wtclientrpc.ListTowersResponse} returns this -*/ -proto.wtclientrpc.ListTowersResponse.prototype.setTowersList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); -}; - - -/** - * @param {!proto.wtclientrpc.Tower=} opt_value - * @param {number=} opt_index - * @return {!proto.wtclientrpc.Tower} - */ -proto.wtclientrpc.ListTowersResponse.prototype.addTowers = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.wtclientrpc.Tower, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.wtclientrpc.ListTowersResponse} returns this - */ -proto.wtclientrpc.ListTowersResponse.prototype.clearTowersList = function() { - return this.setTowersList([]); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.wtclientrpc.StatsRequest.prototype.toObject = function(opt_includeInstance) { - return proto.wtclientrpc.StatsRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.wtclientrpc.StatsRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.wtclientrpc.StatsRequest.toObject = function(includeInstance, msg) { - var f, obj = { - - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.wtclientrpc.StatsRequest} - */ -proto.wtclientrpc.StatsRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.wtclientrpc.StatsRequest; - return proto.wtclientrpc.StatsRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.wtclientrpc.StatsRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.wtclientrpc.StatsRequest} - */ -proto.wtclientrpc.StatsRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.wtclientrpc.StatsRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.wtclientrpc.StatsRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.wtclientrpc.StatsRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.wtclientrpc.StatsRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.wtclientrpc.StatsResponse.prototype.toObject = function(opt_includeInstance) { - return proto.wtclientrpc.StatsResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.wtclientrpc.StatsResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.wtclientrpc.StatsResponse.toObject = function(includeInstance, msg) { - var f, obj = { - numBackups: jspb.Message.getFieldWithDefault(msg, 1, 0), - numPendingBackups: jspb.Message.getFieldWithDefault(msg, 2, 0), - numFailedBackups: jspb.Message.getFieldWithDefault(msg, 3, 0), - numSessionsAcquired: jspb.Message.getFieldWithDefault(msg, 4, 0), - numSessionsExhausted: jspb.Message.getFieldWithDefault(msg, 5, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.wtclientrpc.StatsResponse} - */ -proto.wtclientrpc.StatsResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.wtclientrpc.StatsResponse; - return proto.wtclientrpc.StatsResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.wtclientrpc.StatsResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.wtclientrpc.StatsResponse} - */ -proto.wtclientrpc.StatsResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readUint32()); - msg.setNumBackups(value); - break; - case 2: - var value = /** @type {number} */ (reader.readUint32()); - msg.setNumPendingBackups(value); - break; - case 3: - var value = /** @type {number} */ (reader.readUint32()); - msg.setNumFailedBackups(value); - break; - case 4: - var value = /** @type {number} */ (reader.readUint32()); - msg.setNumSessionsAcquired(value); - break; - case 5: - var value = /** @type {number} */ (reader.readUint32()); - msg.setNumSessionsExhausted(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.wtclientrpc.StatsResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.wtclientrpc.StatsResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.wtclientrpc.StatsResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.wtclientrpc.StatsResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getNumBackups(); - if (f !== 0) { - writer.writeUint32( - 1, - f - ); - } - f = message.getNumPendingBackups(); - if (f !== 0) { - writer.writeUint32( - 2, - f - ); - } - f = message.getNumFailedBackups(); - if (f !== 0) { - writer.writeUint32( - 3, - f - ); - } - f = message.getNumSessionsAcquired(); - if (f !== 0) { - writer.writeUint32( - 4, - f - ); - } - f = message.getNumSessionsExhausted(); - if (f !== 0) { - writer.writeUint32( - 5, - f - ); - } -}; - - -/** - * optional uint32 num_backups = 1; - * @return {number} - */ -proto.wtclientrpc.StatsResponse.prototype.getNumBackups = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.wtclientrpc.StatsResponse} returns this - */ -proto.wtclientrpc.StatsResponse.prototype.setNumBackups = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); -}; - - -/** - * optional uint32 num_pending_backups = 2; - * @return {number} - */ -proto.wtclientrpc.StatsResponse.prototype.getNumPendingBackups = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.wtclientrpc.StatsResponse} returns this - */ -proto.wtclientrpc.StatsResponse.prototype.setNumPendingBackups = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * optional uint32 num_failed_backups = 3; - * @return {number} - */ -proto.wtclientrpc.StatsResponse.prototype.getNumFailedBackups = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.wtclientrpc.StatsResponse} returns this - */ -proto.wtclientrpc.StatsResponse.prototype.setNumFailedBackups = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - -/** - * optional uint32 num_sessions_acquired = 4; - * @return {number} - */ -proto.wtclientrpc.StatsResponse.prototype.getNumSessionsAcquired = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.wtclientrpc.StatsResponse} returns this - */ -proto.wtclientrpc.StatsResponse.prototype.setNumSessionsAcquired = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); -}; - - -/** - * optional uint32 num_sessions_exhausted = 5; - * @return {number} - */ -proto.wtclientrpc.StatsResponse.prototype.getNumSessionsExhausted = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.wtclientrpc.StatsResponse} returns this - */ -proto.wtclientrpc.StatsResponse.prototype.setNumSessionsExhausted = function(value) { - return jspb.Message.setProto3IntField(this, 5, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.wtclientrpc.PolicyRequest.prototype.toObject = function(opt_includeInstance) { - return proto.wtclientrpc.PolicyRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.wtclientrpc.PolicyRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.wtclientrpc.PolicyRequest.toObject = function(includeInstance, msg) { - var f, obj = { - policyType: jspb.Message.getFieldWithDefault(msg, 1, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.wtclientrpc.PolicyRequest} - */ -proto.wtclientrpc.PolicyRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.wtclientrpc.PolicyRequest; - return proto.wtclientrpc.PolicyRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.wtclientrpc.PolicyRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.wtclientrpc.PolicyRequest} - */ -proto.wtclientrpc.PolicyRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!proto.wtclientrpc.PolicyType} */ (reader.readEnum()); - msg.setPolicyType(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.wtclientrpc.PolicyRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.wtclientrpc.PolicyRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.wtclientrpc.PolicyRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.wtclientrpc.PolicyRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getPolicyType(); - if (f !== 0.0) { - writer.writeEnum( - 1, - f - ); - } -}; - - -/** - * optional PolicyType policy_type = 1; - * @return {!proto.wtclientrpc.PolicyType} - */ -proto.wtclientrpc.PolicyRequest.prototype.getPolicyType = function() { - return /** @type {!proto.wtclientrpc.PolicyType} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {!proto.wtclientrpc.PolicyType} value - * @return {!proto.wtclientrpc.PolicyRequest} returns this - */ -proto.wtclientrpc.PolicyRequest.prototype.setPolicyType = function(value) { - return jspb.Message.setProto3EnumField(this, 1, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.wtclientrpc.PolicyResponse.prototype.toObject = function(opt_includeInstance) { - return proto.wtclientrpc.PolicyResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.wtclientrpc.PolicyResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.wtclientrpc.PolicyResponse.toObject = function(includeInstance, msg) { - var f, obj = { - maxUpdates: jspb.Message.getFieldWithDefault(msg, 1, 0), - sweepSatPerByte: jspb.Message.getFieldWithDefault(msg, 2, 0), - sweepSatPerVbyte: jspb.Message.getFieldWithDefault(msg, 3, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.wtclientrpc.PolicyResponse} - */ -proto.wtclientrpc.PolicyResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.wtclientrpc.PolicyResponse; - return proto.wtclientrpc.PolicyResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.wtclientrpc.PolicyResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.wtclientrpc.PolicyResponse} - */ -proto.wtclientrpc.PolicyResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readUint32()); - msg.setMaxUpdates(value); - break; - case 2: - var value = /** @type {number} */ (reader.readUint32()); - msg.setSweepSatPerByte(value); - break; - case 3: - var value = /** @type {number} */ (reader.readUint32()); - msg.setSweepSatPerVbyte(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.wtclientrpc.PolicyResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.wtclientrpc.PolicyResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.wtclientrpc.PolicyResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.wtclientrpc.PolicyResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getMaxUpdates(); - if (f !== 0) { - writer.writeUint32( - 1, - f - ); - } - f = message.getSweepSatPerByte(); - if (f !== 0) { - writer.writeUint32( - 2, - f - ); - } - f = message.getSweepSatPerVbyte(); - if (f !== 0) { - writer.writeUint32( - 3, - f - ); - } -}; - - -/** - * optional uint32 max_updates = 1; - * @return {number} - */ -proto.wtclientrpc.PolicyResponse.prototype.getMaxUpdates = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.wtclientrpc.PolicyResponse} returns this - */ -proto.wtclientrpc.PolicyResponse.prototype.setMaxUpdates = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); -}; - - -/** - * optional uint32 sweep_sat_per_byte = 2; - * @return {number} - */ -proto.wtclientrpc.PolicyResponse.prototype.getSweepSatPerByte = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.wtclientrpc.PolicyResponse} returns this - */ -proto.wtclientrpc.PolicyResponse.prototype.setSweepSatPerByte = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * optional uint32 sweep_sat_per_vbyte = 3; - * @return {number} - */ -proto.wtclientrpc.PolicyResponse.prototype.getSweepSatPerVbyte = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.wtclientrpc.PolicyResponse} returns this - */ -proto.wtclientrpc.PolicyResponse.prototype.setSweepSatPerVbyte = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - -/** - * @enum {number} - */ -proto.wtclientrpc.PolicyType = { - LEGACY: 0, - ANCHOR: 1 -}; - -goog.object.extend(exports, proto.wtclientrpc); diff --git a/lib/types/generated/wtclientrpc/wtclient_pb_service.d.ts b/lib/types/generated/wtclientrpc/wtclient_pb_service.d.ts deleted file mode 100644 index 0874265..0000000 --- a/lib/types/generated/wtclientrpc/wtclient_pb_service.d.ts +++ /dev/null @@ -1,158 +0,0 @@ -// package: wtclientrpc -// file: wtclientrpc/wtclient.proto - -import * as wtclientrpc_wtclient_pb from "../wtclientrpc/wtclient_pb"; -import {grpc} from "@improbable-eng/grpc-web"; - -type WatchtowerClientAddTower = { - readonly methodName: string; - readonly service: typeof WatchtowerClient; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof wtclientrpc_wtclient_pb.AddTowerRequest; - readonly responseType: typeof wtclientrpc_wtclient_pb.AddTowerResponse; -}; - -type WatchtowerClientRemoveTower = { - readonly methodName: string; - readonly service: typeof WatchtowerClient; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof wtclientrpc_wtclient_pb.RemoveTowerRequest; - readonly responseType: typeof wtclientrpc_wtclient_pb.RemoveTowerResponse; -}; - -type WatchtowerClientListTowers = { - readonly methodName: string; - readonly service: typeof WatchtowerClient; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof wtclientrpc_wtclient_pb.ListTowersRequest; - readonly responseType: typeof wtclientrpc_wtclient_pb.ListTowersResponse; -}; - -type WatchtowerClientGetTowerInfo = { - readonly methodName: string; - readonly service: typeof WatchtowerClient; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof wtclientrpc_wtclient_pb.GetTowerInfoRequest; - readonly responseType: typeof wtclientrpc_wtclient_pb.Tower; -}; - -type WatchtowerClientStats = { - readonly methodName: string; - readonly service: typeof WatchtowerClient; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof wtclientrpc_wtclient_pb.StatsRequest; - readonly responseType: typeof wtclientrpc_wtclient_pb.StatsResponse; -}; - -type WatchtowerClientPolicy = { - readonly methodName: string; - readonly service: typeof WatchtowerClient; - readonly requestStream: false; - readonly responseStream: false; - readonly requestType: typeof wtclientrpc_wtclient_pb.PolicyRequest; - readonly responseType: typeof wtclientrpc_wtclient_pb.PolicyResponse; -}; - -export class WatchtowerClient { - static readonly serviceName: string; - static readonly AddTower: WatchtowerClientAddTower; - static readonly RemoveTower: WatchtowerClientRemoveTower; - static readonly ListTowers: WatchtowerClientListTowers; - static readonly GetTowerInfo: WatchtowerClientGetTowerInfo; - static readonly Stats: WatchtowerClientStats; - static readonly Policy: WatchtowerClientPolicy; -} - -export type ServiceError = { message: string, code: number; metadata: grpc.Metadata } -export type Status = { details: string, code: number; metadata: grpc.Metadata } - -interface UnaryResponse { - cancel(): void; -} -interface ResponseStream { - cancel(): void; - on(type: 'data', handler: (message: T) => void): ResponseStream; - on(type: 'end', handler: (status?: Status) => void): ResponseStream; - on(type: 'status', handler: (status: Status) => void): ResponseStream; -} -interface RequestStream { - write(message: T): RequestStream; - end(): void; - cancel(): void; - on(type: 'end', handler: (status?: Status) => void): RequestStream; - on(type: 'status', handler: (status: Status) => void): RequestStream; -} -interface BidirectionalStream { - write(message: ReqT): BidirectionalStream; - end(): void; - cancel(): void; - on(type: 'data', handler: (message: ResT) => void): BidirectionalStream; - on(type: 'end', handler: (status?: Status) => void): BidirectionalStream; - on(type: 'status', handler: (status: Status) => void): BidirectionalStream; -} - -export class WatchtowerClientClient { - readonly serviceHost: string; - - constructor(serviceHost: string, options?: grpc.RpcOptions); - addTower( - requestMessage: wtclientrpc_wtclient_pb.AddTowerRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: wtclientrpc_wtclient_pb.AddTowerResponse|null) => void - ): UnaryResponse; - addTower( - requestMessage: wtclientrpc_wtclient_pb.AddTowerRequest, - callback: (error: ServiceError|null, responseMessage: wtclientrpc_wtclient_pb.AddTowerResponse|null) => void - ): UnaryResponse; - removeTower( - requestMessage: wtclientrpc_wtclient_pb.RemoveTowerRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: wtclientrpc_wtclient_pb.RemoveTowerResponse|null) => void - ): UnaryResponse; - removeTower( - requestMessage: wtclientrpc_wtclient_pb.RemoveTowerRequest, - callback: (error: ServiceError|null, responseMessage: wtclientrpc_wtclient_pb.RemoveTowerResponse|null) => void - ): UnaryResponse; - listTowers( - requestMessage: wtclientrpc_wtclient_pb.ListTowersRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: wtclientrpc_wtclient_pb.ListTowersResponse|null) => void - ): UnaryResponse; - listTowers( - requestMessage: wtclientrpc_wtclient_pb.ListTowersRequest, - callback: (error: ServiceError|null, responseMessage: wtclientrpc_wtclient_pb.ListTowersResponse|null) => void - ): UnaryResponse; - getTowerInfo( - requestMessage: wtclientrpc_wtclient_pb.GetTowerInfoRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: wtclientrpc_wtclient_pb.Tower|null) => void - ): UnaryResponse; - getTowerInfo( - requestMessage: wtclientrpc_wtclient_pb.GetTowerInfoRequest, - callback: (error: ServiceError|null, responseMessage: wtclientrpc_wtclient_pb.Tower|null) => void - ): UnaryResponse; - stats( - requestMessage: wtclientrpc_wtclient_pb.StatsRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: wtclientrpc_wtclient_pb.StatsResponse|null) => void - ): UnaryResponse; - stats( - requestMessage: wtclientrpc_wtclient_pb.StatsRequest, - callback: (error: ServiceError|null, responseMessage: wtclientrpc_wtclient_pb.StatsResponse|null) => void - ): UnaryResponse; - policy( - requestMessage: wtclientrpc_wtclient_pb.PolicyRequest, - metadata: grpc.Metadata, - callback: (error: ServiceError|null, responseMessage: wtclientrpc_wtclient_pb.PolicyResponse|null) => void - ): UnaryResponse; - policy( - requestMessage: wtclientrpc_wtclient_pb.PolicyRequest, - callback: (error: ServiceError|null, responseMessage: wtclientrpc_wtclient_pb.PolicyResponse|null) => void - ): UnaryResponse; -} - diff --git a/lib/types/generated/wtclientrpc/wtclient_pb_service.js b/lib/types/generated/wtclientrpc/wtclient_pb_service.js deleted file mode 100644 index ce4fca0..0000000 --- a/lib/types/generated/wtclientrpc/wtclient_pb_service.js +++ /dev/null @@ -1,261 +0,0 @@ -// package: wtclientrpc -// file: wtclientrpc/wtclient.proto - -var wtclientrpc_wtclient_pb = require("../wtclientrpc/wtclient_pb"); -var grpc = require("@improbable-eng/grpc-web").grpc; - -var WatchtowerClient = (function () { - function WatchtowerClient() {} - WatchtowerClient.serviceName = "wtclientrpc.WatchtowerClient"; - return WatchtowerClient; -}()); - -WatchtowerClient.AddTower = { - methodName: "AddTower", - service: WatchtowerClient, - requestStream: false, - responseStream: false, - requestType: wtclientrpc_wtclient_pb.AddTowerRequest, - responseType: wtclientrpc_wtclient_pb.AddTowerResponse -}; - -WatchtowerClient.RemoveTower = { - methodName: "RemoveTower", - service: WatchtowerClient, - requestStream: false, - responseStream: false, - requestType: wtclientrpc_wtclient_pb.RemoveTowerRequest, - responseType: wtclientrpc_wtclient_pb.RemoveTowerResponse -}; - -WatchtowerClient.ListTowers = { - methodName: "ListTowers", - service: WatchtowerClient, - requestStream: false, - responseStream: false, - requestType: wtclientrpc_wtclient_pb.ListTowersRequest, - responseType: wtclientrpc_wtclient_pb.ListTowersResponse -}; - -WatchtowerClient.GetTowerInfo = { - methodName: "GetTowerInfo", - service: WatchtowerClient, - requestStream: false, - responseStream: false, - requestType: wtclientrpc_wtclient_pb.GetTowerInfoRequest, - responseType: wtclientrpc_wtclient_pb.Tower -}; - -WatchtowerClient.Stats = { - methodName: "Stats", - service: WatchtowerClient, - requestStream: false, - responseStream: false, - requestType: wtclientrpc_wtclient_pb.StatsRequest, - responseType: wtclientrpc_wtclient_pb.StatsResponse -}; - -WatchtowerClient.Policy = { - methodName: "Policy", - service: WatchtowerClient, - requestStream: false, - responseStream: false, - requestType: wtclientrpc_wtclient_pb.PolicyRequest, - responseType: wtclientrpc_wtclient_pb.PolicyResponse -}; - -exports.WatchtowerClient = WatchtowerClient; - -function WatchtowerClientClient(serviceHost, options) { - this.serviceHost = serviceHost; - this.options = options || {}; -} - -WatchtowerClientClient.prototype.addTower = function addTower(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(WatchtowerClient.AddTower, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -WatchtowerClientClient.prototype.removeTower = function removeTower(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(WatchtowerClient.RemoveTower, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -WatchtowerClientClient.prototype.listTowers = function listTowers(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(WatchtowerClient.ListTowers, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -WatchtowerClientClient.prototype.getTowerInfo = function getTowerInfo(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(WatchtowerClient.GetTowerInfo, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -WatchtowerClientClient.prototype.stats = function stats(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(WatchtowerClient.Stats, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -WatchtowerClientClient.prototype.policy = function policy(requestMessage, metadata, callback) { - if (arguments.length === 2) { - callback = arguments[1]; - } - var client = grpc.unary(WatchtowerClient.Policy, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (callback) { - if (response.status !== grpc.Code.OK) { - var err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - callback(err, null); - } else { - callback(null, response.message); - } - } - } - }); - return { - cancel: function () { - callback = null; - client.close(); - } - }; -}; - -exports.WatchtowerClientClient = WatchtowerClientClient; - diff --git a/lib/types/proto/autopilotrpc.ts b/lib/types/proto/autopilotrpc.ts new file mode 100644 index 0000000..f1b086d --- /dev/null +++ b/lib/types/proto/autopilotrpc.ts @@ -0,0 +1 @@ +export * from './lnd/autopilotrpc/autopilot'; diff --git a/lib/types/proto/chainrpc.ts b/lib/types/proto/chainrpc.ts new file mode 100644 index 0000000..fe61ab8 --- /dev/null +++ b/lib/types/proto/chainrpc.ts @@ -0,0 +1 @@ +export * from './lnd/chainrpc/chainnotifier'; diff --git a/lib/types/proto/faraday/faraday.ts b/lib/types/proto/faraday/faraday.ts new file mode 100644 index 0000000..209a6a2 --- /dev/null +++ b/lib/types/proto/faraday/faraday.ts @@ -0,0 +1,534 @@ +/* eslint-disable */ +/** + * Granularity describes the aggregation level at which the Bitcoin price should + * be queried. Note that setting lower levels of granularity may require more + * queries to the fiat backend. + */ +export enum Granularity { + UNKNOWN_GRANULARITY = 'UNKNOWN_GRANULARITY', + MINUTE = 'MINUTE', + FIVE_MINUTES = 'FIVE_MINUTES', + FIFTEEN_MINUTES = 'FIFTEEN_MINUTES', + THIRTY_MINUTES = 'THIRTY_MINUTES', + HOUR = 'HOUR', + SIX_HOURS = 'SIX_HOURS', + TWELVE_HOURS = 'TWELVE_HOURS', + DAY = 'DAY', + UNRECOGNIZED = 'UNRECOGNIZED' +} + +/** FiatBackend is the API endpoint to be used for any fiat related queries. */ +export enum FiatBackend { + UNKNOWN_FIATBACKEND = 'UNKNOWN_FIATBACKEND', + /** + * COINCAP - Use the CoinCap API for fiat price information. + * This API is reached through the following URL: + * https://api.coincap.io/v2/assets/bitcoin/history + */ + COINCAP = 'COINCAP', + /** + * COINDESK - Use the CoinDesk API for fiat price information. + * This API is reached through the following URL: + * https://api.coindesk.com/v1/bpi/historical/close.json + */ + COINDESK = 'COINDESK', + UNRECOGNIZED = 'UNRECOGNIZED' +} + +export enum EntryType { + UNKNOWN = 'UNKNOWN', + /** LOCAL_CHANNEL_OPEN - A channel opening transaction for a channel opened by our node. */ + LOCAL_CHANNEL_OPEN = 'LOCAL_CHANNEL_OPEN', + /** REMOTE_CHANNEL_OPEN - A channel opening transaction for a channel opened by a remote node. */ + REMOTE_CHANNEL_OPEN = 'REMOTE_CHANNEL_OPEN', + /** CHANNEL_OPEN_FEE - The on chain fee paid to open a channel. */ + CHANNEL_OPEN_FEE = 'CHANNEL_OPEN_FEE', + /** CHANNEL_CLOSE - A channel closing transaction. */ + CHANNEL_CLOSE = 'CHANNEL_CLOSE', + /** + * RECEIPT - Receipt of funds. On chain this reflects receives, off chain settlement + * of invoices. + */ + RECEIPT = 'RECEIPT', + /** + * PAYMENT - Payment of funds. On chain this reflects sends, off chain settlement + * of our payments. + */ + PAYMENT = 'PAYMENT', + /** FEE - Payment of fees. */ + FEE = 'FEE', + /** CIRCULAR_RECEIPT - Receipt of a payment to ourselves. */ + CIRCULAR_RECEIPT = 'CIRCULAR_RECEIPT', + /** FORWARD - A forward through our node. */ + FORWARD = 'FORWARD', + /** FORWARD_FEE - Fees earned from forwarding. */ + FORWARD_FEE = 'FORWARD_FEE', + /** CIRCULAR_PAYMENT - Sending of a payment to ourselves. */ + CIRCULAR_PAYMENT = 'CIRCULAR_PAYMENT', + /** CIRCULAR_FEE - The fees paid to send an off chain payment to ourselves. */ + CIRCULAR_FEE = 'CIRCULAR_FEE', + /** SWEEP - A transaction that sweeps funds back into our wallet's control. */ + SWEEP = 'SWEEP', + /** SWEEP_FEE - The amount of fees paid for a sweep transaction. */ + SWEEP_FEE = 'SWEEP_FEE', + /** CHANNEL_CLOSE_FEE - The fees paid to close a channel. */ + CHANNEL_CLOSE_FEE = 'CHANNEL_CLOSE_FEE', + UNRECOGNIZED = 'UNRECOGNIZED' +} + +export interface CloseRecommendationRequest { + /** + * The minimum amount of time in seconds that a channel should have been + * monitored by lnd to be eligible for close. This value is in place to + * protect against closing of newer channels. + */ + minimumMonitored: string; + /** + * The data point base close recommendations on. Available options are: + * Uptime: ratio of channel peer's uptime to the period they have been + * monitored to. + * Revenue: the revenue that the channel has produced per block that its + * funding transaction has been confirmed for. + */ + metric: CloseRecommendationRequest_Metric; +} + +export enum CloseRecommendationRequest_Metric { + UNKNOWN = 'UNKNOWN', + UPTIME = 'UPTIME', + REVENUE = 'REVENUE', + INCOMING_VOLUME = 'INCOMING_VOLUME', + OUTGOING_VOLUME = 'OUTGOING_VOLUME', + TOTAL_VOLUME = 'TOTAL_VOLUME', + UNRECOGNIZED = 'UNRECOGNIZED' +} + +export interface OutlierRecommendationsRequest { + /** The parameters that are common to all close recommendations. */ + recRequest: CloseRecommendationRequest | undefined; + /** + * The number of inter-quartile ranges a value needs to be beneath the lower + * quartile/ above the upper quartile to be considered a lower/upper outlier. + * Lower values will be more aggressive in recommending channel closes, and + * upper values will be more conservative. Recommended values are 1.5 for + * aggressive recommendations and 3 for conservative recommendations. + */ + outlierMultiplier: number; +} + +export interface ThresholdRecommendationsRequest { + /** The parameters that are common to all close recommendations. */ + recRequest: CloseRecommendationRequest | undefined; + /** + * The threshold that recommendations will be calculated based on. + * For uptime: ratio of uptime to observed lifetime beneath which channels + * will be recommended for closure. + * + * For revenue: revenue per block that capital has been committed to the + * channel beneath which channels will be recommended for closure. This + * value is provided per block so that channels that have been open for + * different periods of time can be compared. + * + * For incoming volume: The incoming volume per block that capital has + * been committed to the channel beneath which channels will be recommended + * for closure. This value is provided per block so that channels that have + * been open for different periods of time can be compared. + * + * For outgoing volume: The outgoing volume per block that capital has been + * committed to the channel beneath which channels will be recommended for + * closure. This value is provided per block so that channels that have been + * open for different periods of time can be compared. + * + * For total volume: The total volume per block that capital has been + * committed to the channel beneath which channels will be recommended for + * closure. This value is provided per block so that channels that have been + * open for different periods of time can be compared. + */ + thresholdValue: number; +} + +export interface CloseRecommendationsResponse { + /** + * The total number of channels, before filtering out channels that are + * not eligible for close recommendations. + */ + totalChannels: number; + /** The number of channels that were considered for close recommendations. */ + consideredChannels: number; + /** + * A set of channel close recommendations. The absence of a channel in this + * set implies that it was not considered for close because it did not meet + * the criteria for close recommendations (it is private, or has not been + * monitored for long enough). + */ + recommendations: Recommendation[]; +} + +export interface Recommendation { + /** + * The channel point [funding txid: outpoint] of the channel being considered + * for close. + */ + chanPoint: string; + /** The value of the metric that close recommendations were based on. */ + value: number; + /** A boolean indicating whether we recommend closing the channel. */ + recommendClose: boolean; +} + +export interface RevenueReportRequest { + /** + * The funding transaction outpoints for the channels to generate a revenue + * report for. If this is empty, it will be generated for all open and closed + * channels. Channel funding points should be expressed with the format + * fundingTxID:outpoint. + */ + chanPoints: string[]; + /** + * Start time is beginning of the range over which the report will be + * generated, expressed as unix epoch offset in seconds. + */ + startTime: string; + /** + * End time is end of the range over which the report will be + * generated, expressed as unix epoch offset in seconds. + */ + endTime: string; +} + +export interface RevenueReportResponse { + /** + * Reports is a set of pairwise revenue report generated for the channel(s) + * over the period specified. + */ + reports: RevenueReport[]; +} + +export interface RevenueReport { + /** + * Target channel is the channel that the report is generated for; incoming + * fields in the report mean that this channel was the incoming channel, + * and the pair as the outgoing, outgoing fields mean that this channel was + * the outgoing channel and the peer was the incoming channel. + */ + targetChannel: string; + /** + * Pair reports maps the channel point of a peer that we generated revenue + * with to a report detailing the revenue. + */ + pairReports: { [key: string]: PairReport }; +} + +export interface RevenueReport_PairReportsEntry { + key: string; + value: PairReport | undefined; +} + +export interface PairReport { + /** + * Amount outgoing msat is the amount in millisatoshis that arrived + * on the pair channel to be forwarded onwards by our channel. + */ + amountOutgoingMsat: string; + /** + * Fees outgoing is the amount of fees in millisatoshis that we + * attribute to the channel for its role as the outgoing channel in + * forwards. + */ + feesOutgoingMsat: string; + /** + * Amount incoming msat is the amount in millisatoshis that arrived + * on our channel to be forwarded onwards by the pair channel. + */ + amountIncomingMsat: string; + /** + * Fees incoming is the amount of fees in millisatoshis that we + * attribute to the channel for its role as the incoming channel in + * forwards. + */ + feesIncomingMsat: string; +} + +export interface ChannelInsightsRequest {} + +export interface ChannelInsightsResponse { + /** Insights for the set of currently open channels. */ + channelInsights: ChannelInsight[]; +} + +export interface ChannelInsight { + /** The outpoint of the channel's funding transaction. */ + chanPoint: string; + /** + * The amount of time in seconds that we have monitored the channel peer's + * uptime for. + */ + monitoredSeconds: string; + /** + * The amount of time in seconds that the channel peer has been online over + * the period it has been monitored for. + */ + uptimeSeconds: string; + /** + * The volume, in millisatoshis, that has been forwarded with this channel as + * the incoming channel. + */ + volumeIncomingMsat: string; + /** + * The volume, in millisatoshis, that has been forwarded with this channel as + * the outgoing channel. + */ + volumeOutgoingMsat: string; + /** + * The total fees earned by this channel for its participation in forwards, + * expressed in millisatoshis. Note that we attribute fees evenly across + * incoming and outgoing channels. + */ + feesEarnedMsat: string; + /** The number of confirmations the funding transaction has. */ + confirmations: number; + /** True if the channel is private. */ + private: boolean; +} + +export interface ExchangeRateRequest { + /** A set of timestamps for which we want the bitcoin price. */ + timestamps: string[]; + /** The level of granularity at which we want the bitcoin price to be quoted. */ + granularity: Granularity; + /** The api to be used for fiat related queries. */ + fiatBackend: FiatBackend; +} + +export interface ExchangeRateResponse { + /** Rates contains a set of exchange rates for the set of timestamps */ + rates: ExchangeRate[]; +} + +export interface BitcoinPrice { + /** The price of 1 BTC, expressed in USD. */ + price: string; + /** The timestamp for this price price provided. */ + priceTimestamp: string; +} + +export interface ExchangeRate { + /** timestamp is the timestamp of the original request made. */ + timestamp: string; + /** + * Price is the bitcoin price approximation for the timestamp queried. Note + * that this value has its own timestamp because we are not guaranteed to get + * price points for the exact timestamp that was queried. + */ + btcPrice: BitcoinPrice | undefined; +} + +export interface NodeAuditRequest { + /** The unix time from which to produce the report, inclusive. */ + startTime: string; + /** The unix time until which to produce the report, exclusive. */ + endTime: string; + /** + * Set to generate a report without conversion to fiat. If set, fiat values + * will display as 0. + */ + disableFiat: boolean; + /** The level of granularity at which we wish to produce fiat prices. */ + granularity: Granularity; + /** + * An optional set of custom categories which can be used to identify bespoke + * categories in the report. Each category must have a unique name, and may not + * have common identifier regexes. Transactions that are matched to these + * categories report the category name in the CustomCategory field. + */ + customCategories: CustomCategory[]; + /** The api to be used for fiat related queries. */ + fiatBackend: FiatBackend; +} + +export interface CustomCategory { + /** + * The name for the custom category which will contain all transactions that + * are labelled with a string matching one of the regexes provided in + * label identifiers. + */ + name: string; + /** + * Set to true to apply this category to on chain transactions. Can be set in + * conjunction with off_chain to apply the category to all transactions. + */ + onChain: boolean; + /** + * Set to true to apply this category to off chain transactions. Can be set in + * conjunction with on_chain to apply the category to all transactions. + */ + offChain: boolean; + /** + * A set of regular expressions which identify transactions by their label as + * belonging in this custom category. If a label matches any single regex in + * the set, it is considered to be in the category. These expressions will be + * matched against various labels that are present in lnd: on chain + * transactions will be matched against their label field, off chain receipts + * will be matched against their memo. At present, there is no way to match + * forwards or off chain payments. These expressions must be unique across + * custom categories, otherwise faraday will not be able to identify which + * custom category a transaction belongs in. + */ + labelPatterns: string[]; +} + +export interface ReportEntry { + /** The unix timestamp of the event. */ + timestamp: string; + /** Whether the entry occurred on chain or off chain. */ + onChain: boolean; + /** The amount of the entry, expressed in millisatoshis. */ + amount: string; + /** Whether the entry is a credit or a debit. */ + credit: boolean; + /** The asset affected by the entry. */ + asset: string; + /** The kind of activity that this entry represents. */ + type: EntryType; + /** + * This field will be populated for entry type custom, and represents the name + * of a custom category that the report was produced with. + */ + customCategory: string; + /** The transaction id of the entry. */ + txid: string; + /** The fiat amount of the entry's amount in USD. */ + fiat: string; + /** A unique identifier for the entry, if available. */ + reference: string; + /** An additional note for the entry, providing additional context. */ + note: string; + /** The bitcoin price and timestamp used to calcualte our fiat value. */ + btcPrice: BitcoinPrice | undefined; +} + +export interface NodeAuditResponse { + /** On chain reports for the period queried. */ + reports: ReportEntry[]; +} + +export interface CloseReportRequest { + /** + * The funding outpoint of the channel the report should be created for, + * formatted txid:outpoint. + */ + channelPoint: string; +} + +export interface CloseReportResponse { + /** The funding outpoint of the channel. */ + channelPoint: string; + /** True if we opened the channel, false if the remote peer did. */ + channelInitiator: boolean; + /** The type of close that resolved this channel. */ + closeType: string; + /** The transaction id of the close transaction that confirmed on chain. */ + closeTxid: string; + /** + * The fee we paid on chain to open this channel in satoshis, note that this + * field will be zero if the remote party paid. + */ + openFee: string; + /** + * The fee we paid on chain for the close transaction in staoshis, note that + * this field will be zero if the remote party paid. + */ + closeFee: string; +} + +export interface FaradayServer { + /** + * frcli: `outliers` + * Get close recommendations for currently open channels based on whether it is + * an outlier. + * + * Example request: + * http://localhost:8466/v1/faraday/outliers/REVENUE?rec_request.minimum_monitored=123 + */ + outlierRecommendations( + request?: DeepPartial + ): Promise; + /** + * frcli: `threshold` + * Get close recommendations for currently open channels based whether they are + * below a set threshold. + * + * Example request: + * http://localhost:8466/v1/faraday/threshold/UPTIME?rec_request.minimum_monitored=123 + */ + thresholdRecommendations( + request?: DeepPartial + ): Promise; + /** + * frcli: `revenue` + * Get a pairwise revenue report for a channel. + * + * Example request: + * http://localhost:8466/v1/faraday/revenue + */ + revenueReport( + request?: DeepPartial + ): Promise; + /** + * frcli: `insights` + * List currently open channel with routing and uptime information. + * + * Example request: + * http://localhost:8466/v1/faraday/insights + */ + channelInsights( + request?: DeepPartial + ): Promise; + /** + * frcli: + * Get fiat prices for btc. + * + * Example request: + * http://localhost:8466/v1/faraday/exchangerate + */ + exchangeRate( + request?: DeepPartial + ): Promise; + /** + * Get a report of your node's activity over a period. + * + * Example request: + * http://localhost:8466/v1/faraday/nodeaudit + */ + nodeAudit( + request?: DeepPartial + ): Promise; + /** + * Get a channel close report for a specific channel. + * + * Example request: + * http://localhost:8466/v1/faraday/closereport + */ + closeReport( + request?: DeepPartial + ): Promise; +} + +type Builtin = + | Date + | Function + | Uint8Array + | string + | number + | boolean + | undefined; + +type DeepPartial = T extends Builtin + ? T + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in keyof T]?: DeepPartial } + : Partial; diff --git a/lib/types/proto/frdrpc.ts b/lib/types/proto/frdrpc.ts new file mode 100644 index 0000000..122d07b --- /dev/null +++ b/lib/types/proto/frdrpc.ts @@ -0,0 +1 @@ +export * from './faraday/faraday'; diff --git a/lib/types/proto/index.ts b/lib/types/proto/index.ts new file mode 100644 index 0000000..4d1923b --- /dev/null +++ b/lib/types/proto/index.ts @@ -0,0 +1,26 @@ +import * as frdrpc from './frdrpc'; +import * as autopilotrpc from './autopilotrpc'; +import * as chainrpc from './chainrpc'; +import * as invoicesrpc from './invoicesrpc'; +import * as lnrpc from './lnrpc'; +import * as routerrpc from './routerrpc'; +import * as signrpc from './signrpc'; +import * as walletrpc from './walletrpc'; +import * as watchtowerrpc from './watchtowerrpc'; +import * as wtclientrpc from './wtclientrpc'; +import * as looprpc from './looprpc'; +import * as poolrpc from './poolrpc'; +export { + frdrpc, + autopilotrpc, + chainrpc, + invoicesrpc, + lnrpc, + routerrpc, + signrpc, + walletrpc, + watchtowerrpc, + wtclientrpc, + looprpc, + poolrpc +}; diff --git a/lib/types/proto/invoicesrpc.ts b/lib/types/proto/invoicesrpc.ts new file mode 100644 index 0000000..176766d --- /dev/null +++ b/lib/types/proto/invoicesrpc.ts @@ -0,0 +1 @@ +export * from './lnd/invoicesrpc/invoices'; diff --git a/lib/types/proto/lnd/autopilotrpc/autopilot.ts b/lib/types/proto/lnd/autopilotrpc/autopilot.ts new file mode 100644 index 0000000..fd9d89c --- /dev/null +++ b/lib/types/proto/lnd/autopilotrpc/autopilot.ts @@ -0,0 +1,102 @@ +/* eslint-disable */ +export interface StatusRequest {} + +export interface StatusResponse { + /** Indicates whether the autopilot is active or not. */ + active: boolean; +} + +export interface ModifyStatusRequest { + /** Whether the autopilot agent should be enabled or not. */ + enable: boolean; +} + +export interface ModifyStatusResponse {} + +export interface QueryScoresRequest { + pubkeys: string[]; + /** If set, we will ignore the local channel state when calculating scores. */ + ignoreLocalState: boolean; +} + +export interface QueryScoresResponse { + results: QueryScoresResponse_HeuristicResult[]; +} + +export interface QueryScoresResponse_HeuristicResult { + heuristic: string; + scores: { [key: string]: number }; +} + +export interface QueryScoresResponse_HeuristicResult_ScoresEntry { + key: string; + value: number; +} + +export interface SetScoresRequest { + /** The name of the heuristic to provide scores to. */ + heuristic: string; + /** + * A map from hex-encoded public keys to scores. Scores must be in the range + * [0.0, 1.0]. + */ + scores: { [key: string]: number }; +} + +export interface SetScoresRequest_ScoresEntry { + key: string; + value: number; +} + +export interface SetScoresResponse {} + +/** + * Autopilot is a service that can be used to get information about the current + * state of the daemon's autopilot agent, and also supply it with information + * that can be used when deciding where to open channels. + */ +export interface Autopilot { + /** Status returns whether the daemon's autopilot agent is active. */ + status(request?: DeepPartial): Promise; + /** + * ModifyStatus is used to modify the status of the autopilot agent, like + * enabling or disabling it. + */ + modifyStatus( + request?: DeepPartial + ): Promise; + /** + * QueryScores queries all available autopilot heuristics, in addition to any + * active combination of these heruristics, for the scores they would give to + * the given nodes. + */ + queryScores( + request?: DeepPartial + ): Promise; + /** + * SetScores attempts to set the scores used by the running autopilot agent, + * if the external scoring heuristic is enabled. + */ + setScores( + request?: DeepPartial + ): Promise; +} + +type Builtin = + | Date + | Function + | Uint8Array + | string + | number + | boolean + | undefined; + +type DeepPartial = T extends Builtin + ? T + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in keyof T]?: DeepPartial } + : Partial; diff --git a/lib/types/proto/lnd/chainrpc/chainnotifier.ts b/lib/types/proto/lnd/chainrpc/chainnotifier.ts new file mode 100644 index 0000000..dcc60d4 --- /dev/null +++ b/lib/types/proto/lnd/chainrpc/chainnotifier.ts @@ -0,0 +1,188 @@ +/* eslint-disable */ + +export interface ConfRequest { + /** + * The transaction hash for which we should request a confirmation notification + * for. If set to a hash of all zeros, then the confirmation notification will + * be requested for the script instead. + */ + txid: Uint8Array | string; + /** + * An output script within a transaction with the hash above which will be used + * by light clients to match block filters. If the transaction hash is set to a + * hash of all zeros, then a confirmation notification will be requested for + * this script instead. + */ + script: Uint8Array | string; + /** + * The number of desired confirmations the transaction/output script should + * reach before dispatching a confirmation notification. + */ + numConfs: number; + /** + * The earliest height in the chain for which the transaction/output script + * could have been included in a block. This should in most cases be set to the + * broadcast height of the transaction/output script. + */ + heightHint: number; +} + +export interface ConfDetails { + /** The raw bytes of the confirmed transaction. */ + rawTx: Uint8Array | string; + /** The hash of the block in which the confirmed transaction was included in. */ + blockHash: Uint8Array | string; + /** + * The height of the block in which the confirmed transaction was included + * in. + */ + blockHeight: number; + /** The index of the confirmed transaction within the transaction. */ + txIndex: number; +} + +/** TODO(wilmer): need to know how the client will use this first. */ +export interface Reorg {} + +export interface ConfEvent { + /** + * An event that includes the confirmation details of the request + * (txid/ouput script). + */ + conf: ConfDetails | undefined; + /** + * An event send when the transaction of the request is reorged out of the + * chain. + */ + reorg: Reorg | undefined; +} + +export interface Outpoint { + /** The hash of the transaction. */ + hash: Uint8Array | string; + /** The index of the output within the transaction. */ + index: number; +} + +export interface SpendRequest { + /** + * The outpoint for which we should request a spend notification for. If set to + * a zero outpoint, then the spend notification will be requested for the + * script instead. + */ + outpoint: Outpoint | undefined; + /** + * The output script for the outpoint above. This will be used by light clients + * to match block filters. If the outpoint is set to a zero outpoint, then a + * spend notification will be requested for this script instead. + */ + script: Uint8Array | string; + /** + * The earliest height in the chain for which the outpoint/output script could + * have been spent. This should in most cases be set to the broadcast height of + * the outpoint/output script. + */ + heightHint: number; +} + +export interface SpendDetails { + /** The outpoint was that spent. */ + spendingOutpoint: Outpoint | undefined; + /** The raw bytes of the spending transaction. */ + rawSpendingTx: Uint8Array | string; + /** The hash of the spending transaction. */ + spendingTxHash: Uint8Array | string; + /** The input of the spending transaction that fulfilled the spend request. */ + spendingInputIndex: number; + /** The height at which the spending transaction was included in a block. */ + spendingHeight: number; +} + +export interface SpendEvent { + /** + * An event that includes the details of the spending transaction of the + * request (outpoint/output script). + */ + spend: SpendDetails | undefined; + /** + * An event sent when the spending transaction of the request was + * reorged out of the chain. + */ + reorg: Reorg | undefined; +} + +export interface BlockEpoch { + /** The hash of the block. */ + hash: Uint8Array | string; + /** The height of the block. */ + height: number; +} + +/** + * ChainNotifier is a service that can be used to get information about the + * chain backend by registering notifiers for chain events. + */ +export interface ChainNotifier { + /** + * RegisterConfirmationsNtfn is a synchronous response-streaming RPC that + * registers an intent for a client to be notified once a confirmation request + * has reached its required number of confirmations on-chain. + * + * A client can specify whether the confirmation request should be for a + * particular transaction by its hash or for an output script by specifying a + * zero hash. + */ + registerConfirmationsNtfn( + request?: DeepPartial, + onMessage?: (msg: ConfEvent) => void, + onError?: (err: Error) => void + ): void; + /** + * RegisterSpendNtfn is a synchronous response-streaming RPC that registers an + * intent for a client to be notification once a spend request has been spent + * by a transaction that has confirmed on-chain. + * + * A client can specify whether the spend request should be for a particular + * outpoint or for an output script by specifying a zero outpoint. + */ + registerSpendNtfn( + request?: DeepPartial, + onMessage?: (msg: SpendEvent) => void, + onError?: (err: Error) => void + ): void; + /** + * RegisterBlockEpochNtfn is a synchronous response-streaming RPC that + * registers an intent for a client to be notified of blocks in the chain. The + * stream will return a hash and height tuple of a block for each new/stale + * block in the chain. It is the client's responsibility to determine whether + * the tuple returned is for a new or stale block in the chain. + * + * A client can also request a historical backlog of blocks from a particular + * point. This allows clients to be idempotent by ensuring that they do not + * missing processing a single block within the chain. + */ + registerBlockEpochNtfn( + request?: DeepPartial, + onMessage?: (msg: BlockEpoch) => void, + onError?: (err: Error) => void + ): void; +} + +type Builtin = + | Date + | Function + | Uint8Array + | string + | number + | boolean + | undefined; + +type DeepPartial = T extends Builtin + ? T + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in keyof T]?: DeepPartial } + : Partial; diff --git a/lib/types/proto/lnd/invoicesrpc/invoices.ts b/lib/types/proto/lnd/invoicesrpc/invoices.ts new file mode 100644 index 0000000..07f3161 --- /dev/null +++ b/lib/types/proto/lnd/invoicesrpc/invoices.ts @@ -0,0 +1,177 @@ +/* eslint-disable */ +import type { RouteHint, Invoice } from '../lightning'; + +export enum LookupModifier { + /** DEFAULT - The default look up modifier, no look up behavior is changed. */ + DEFAULT = 'DEFAULT', + /** + * HTLC_SET_ONLY - Indicates that when a look up is done based on a set_id, then only that set + * of HTLCs related to that set ID should be returned. + */ + HTLC_SET_ONLY = 'HTLC_SET_ONLY', + /** + * HTLC_SET_BLANK - Indicates that when a look up is done using a payment_addr, then no HTLCs + * related to the payment_addr should be returned. This is useful when one + * wants to be able to obtain the set of associated setIDs with a given + * invoice, then look up the sub-invoices "projected" by that set ID. + */ + HTLC_SET_BLANK = 'HTLC_SET_BLANK', + UNRECOGNIZED = 'UNRECOGNIZED' +} + +export interface CancelInvoiceMsg { + /** Hash corresponding to the (hold) invoice to cancel. */ + paymentHash: Uint8Array | string; +} + +export interface CancelInvoiceResp {} + +export interface AddHoldInvoiceRequest { + /** + * An optional memo to attach along with the invoice. Used for record keeping + * purposes for the invoice's creator, and will also be set in the description + * field of the encoded payment request if the description_hash field is not + * being used. + */ + memo: string; + /** The hash of the preimage */ + hash: Uint8Array | string; + /** + * The value of this invoice in satoshis + * + * The fields value and value_msat are mutually exclusive. + */ + value: string; + /** + * The value of this invoice in millisatoshis + * + * The fields value and value_msat are mutually exclusive. + */ + valueMsat: string; + /** + * Hash (SHA-256) of a description of the payment. Used if the description of + * payment (memo) is too long to naturally fit within the description field + * of an encoded payment request. + */ + descriptionHash: Uint8Array | string; + /** Payment request expiry time in seconds. Default is 3600 (1 hour). */ + expiry: string; + /** Fallback on-chain address. */ + fallbackAddr: string; + /** Delta to use for the time-lock of the CLTV extended to the final hop. */ + cltvExpiry: string; + /** + * Route hints that can each be individually used to assist in reaching the + * invoice's destination. + */ + routeHints: RouteHint[]; + /** Whether this invoice should include routing hints for private channels. */ + private: boolean; +} + +export interface AddHoldInvoiceResp { + /** + * A bare-bones invoice for a payment within the Lightning Network. With the + * details of the invoice, the sender has all the data necessary to send a + * payment to the recipient. + */ + paymentRequest: string; + /** + * The "add" index of this invoice. Each newly created invoice will increment + * this index making it monotonically increasing. Callers to the + * SubscribeInvoices call can use this to instantly get notified of all added + * invoices with an add_index greater than this one. + */ + addIndex: string; + /** + * The payment address of the generated invoice. This value should be used + * in all payments for this invoice as we require it for end to end + * security. + */ + paymentAddr: Uint8Array | string; +} + +export interface SettleInvoiceMsg { + /** + * Externally discovered pre-image that should be used to settle the hold + * invoice. + */ + preimage: Uint8Array | string; +} + +export interface SettleInvoiceResp {} + +export interface SubscribeSingleInvoiceRequest { + /** Hash corresponding to the (hold) invoice to subscribe to. */ + rHash: Uint8Array | string; +} + +export interface LookupInvoiceMsg { + paymentHash: Uint8Array | string | undefined; + paymentAddr: Uint8Array | string | undefined; + setId: Uint8Array | string | undefined; + lookupModifier: LookupModifier; +} + +/** + * Invoices is a service that can be used to create, accept, settle and cancel + * invoices. + */ +export interface Invoices { + /** + * SubscribeSingleInvoice returns a uni-directional stream (server -> client) + * to notify the client of state transitions of the specified invoice. + * Initially the current invoice state is always sent out. + */ + subscribeSingleInvoice( + request?: DeepPartial, + onMessage?: (msg: Invoice) => void, + onError?: (err: Error) => void + ): void; + /** + * CancelInvoice cancels a currently open invoice. If the invoice is already + * canceled, this call will succeed. If the invoice is already settled, it will + * fail. + */ + cancelInvoice( + request?: DeepPartial + ): Promise; + /** + * AddHoldInvoice creates a hold invoice. It ties the invoice to the hash + * supplied in the request. + */ + addHoldInvoice( + request?: DeepPartial + ): Promise; + /** + * SettleInvoice settles an accepted invoice. If the invoice is already + * settled, this call will succeed. + */ + settleInvoice( + request?: DeepPartial + ): Promise; + /** + * LookupInvoiceV2 attempts to look up at invoice. An invoice can be refrenced + * using either its payment hash, payment address, or set ID. + */ + lookupInvoiceV2(request?: DeepPartial): Promise; +} + +type Builtin = + | Date + | Function + | Uint8Array + | string + | number + | boolean + | undefined; + +type DeepPartial = T extends Builtin + ? T + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in keyof T]?: DeepPartial } + : Partial; diff --git a/lib/types/proto/lnd/lightning.ts b/lib/types/proto/lnd/lightning.ts new file mode 100644 index 0000000..eea6d1a --- /dev/null +++ b/lib/types/proto/lnd/lightning.ts @@ -0,0 +1,4148 @@ +/* eslint-disable */ + +/** + * `AddressType` has to be one of: + * + * - `p2wkh`: Pay to witness key hash (`WITNESS_PUBKEY_HASH` = 0) + * - `np2wkh`: Pay to nested witness key hash (`NESTED_PUBKEY_HASH` = 1) + */ +export enum AddressType { + WITNESS_PUBKEY_HASH = 'WITNESS_PUBKEY_HASH', + NESTED_PUBKEY_HASH = 'NESTED_PUBKEY_HASH', + UNUSED_WITNESS_PUBKEY_HASH = 'UNUSED_WITNESS_PUBKEY_HASH', + UNUSED_NESTED_PUBKEY_HASH = 'UNUSED_NESTED_PUBKEY_HASH', + UNRECOGNIZED = 'UNRECOGNIZED' +} + +export enum CommitmentType { + /** UNKNOWN_COMMITMENT_TYPE - Returned when the commitment type isn't known or unavailable. */ + UNKNOWN_COMMITMENT_TYPE = 'UNKNOWN_COMMITMENT_TYPE', + /** + * LEGACY - A channel using the legacy commitment format having tweaked to_remote + * keys. + */ + LEGACY = 'LEGACY', + /** + * STATIC_REMOTE_KEY - A channel that uses the modern commitment format where the key in the + * output of the remote party does not change each state. This makes back + * up and recovery easier as when the channel is closed, the funds go + * directly to that key. + */ + STATIC_REMOTE_KEY = 'STATIC_REMOTE_KEY', + /** + * ANCHORS - A channel that uses a commitment format that has anchor outputs on the + * commitments, allowing fee bumping after a force close transaction has + * been broadcast. + */ + ANCHORS = 'ANCHORS', + /** + * SCRIPT_ENFORCED_LEASE - A channel that uses a commitment type that builds upon the anchors + * commitment format, but in addition requires a CLTV clause to spend outputs + * paying to the channel initiator. This is intended for use on leased channels + * to guarantee that the channel initiator has no incentives to close a leased + * channel before its maturity date. + */ + SCRIPT_ENFORCED_LEASE = 'SCRIPT_ENFORCED_LEASE', + UNRECOGNIZED = 'UNRECOGNIZED' +} + +export enum Initiator { + INITIATOR_UNKNOWN = 'INITIATOR_UNKNOWN', + INITIATOR_LOCAL = 'INITIATOR_LOCAL', + INITIATOR_REMOTE = 'INITIATOR_REMOTE', + INITIATOR_BOTH = 'INITIATOR_BOTH', + UNRECOGNIZED = 'UNRECOGNIZED' +} + +export enum ResolutionType { + TYPE_UNKNOWN = 'TYPE_UNKNOWN', + /** ANCHOR - We resolved an anchor output. */ + ANCHOR = 'ANCHOR', + /** + * INCOMING_HTLC - We are resolving an incoming htlc on chain. This if this htlc is + * claimed, we swept the incoming htlc with the preimage. If it is timed + * out, our peer swept the timeout path. + */ + INCOMING_HTLC = 'INCOMING_HTLC', + /** + * OUTGOING_HTLC - We are resolving an outgoing htlc on chain. If this htlc is claimed, + * the remote party swept the htlc with the preimage. If it is timed out, + * we swept it with the timeout path. + */ + OUTGOING_HTLC = 'OUTGOING_HTLC', + /** COMMIT - We force closed and need to sweep our time locked commitment output. */ + COMMIT = 'COMMIT', + UNRECOGNIZED = 'UNRECOGNIZED' +} + +export enum ResolutionOutcome { + /** OUTCOME_UNKNOWN - Outcome unknown. */ + OUTCOME_UNKNOWN = 'OUTCOME_UNKNOWN', + /** CLAIMED - An output was claimed on chain. */ + CLAIMED = 'CLAIMED', + /** UNCLAIMED - An output was left unclaimed on chain. */ + UNCLAIMED = 'UNCLAIMED', + /** + * ABANDONED - ResolverOutcomeAbandoned indicates that an output that we did not + * claim on chain, for example an anchor that we did not sweep and a + * third party claimed on chain, or a htlc that we could not decode + * so left unclaimed. + */ + ABANDONED = 'ABANDONED', + /** + * FIRST_STAGE - If we force closed our channel, our htlcs need to be claimed in two + * stages. This outcome represents the broadcast of a timeout or success + * transaction for this two stage htlc claim. + */ + FIRST_STAGE = 'FIRST_STAGE', + /** TIMEOUT - A htlc was timed out on chain. */ + TIMEOUT = 'TIMEOUT', + UNRECOGNIZED = 'UNRECOGNIZED' +} + +export enum NodeMetricType { + UNKNOWN = 'UNKNOWN', + BETWEENNESS_CENTRALITY = 'BETWEENNESS_CENTRALITY', + UNRECOGNIZED = 'UNRECOGNIZED' +} + +export enum InvoiceHTLCState { + ACCEPTED = 'ACCEPTED', + SETTLED = 'SETTLED', + CANCELED = 'CANCELED', + UNRECOGNIZED = 'UNRECOGNIZED' +} + +export enum PaymentFailureReason { + /** FAILURE_REASON_NONE - Payment isn't failed (yet). */ + FAILURE_REASON_NONE = 'FAILURE_REASON_NONE', + /** FAILURE_REASON_TIMEOUT - There are more routes to try, but the payment timeout was exceeded. */ + FAILURE_REASON_TIMEOUT = 'FAILURE_REASON_TIMEOUT', + /** + * FAILURE_REASON_NO_ROUTE - All possible routes were tried and failed permanently. Or were no + * routes to the destination at all. + */ + FAILURE_REASON_NO_ROUTE = 'FAILURE_REASON_NO_ROUTE', + /** FAILURE_REASON_ERROR - A non-recoverable error has occured. */ + FAILURE_REASON_ERROR = 'FAILURE_REASON_ERROR', + /** + * FAILURE_REASON_INCORRECT_PAYMENT_DETAILS - Payment details incorrect (unknown hash, invalid amt or + * invalid final cltv delta) + */ + FAILURE_REASON_INCORRECT_PAYMENT_DETAILS = 'FAILURE_REASON_INCORRECT_PAYMENT_DETAILS', + /** FAILURE_REASON_INSUFFICIENT_BALANCE - Insufficient local balance. */ + FAILURE_REASON_INSUFFICIENT_BALANCE = 'FAILURE_REASON_INSUFFICIENT_BALANCE', + UNRECOGNIZED = 'UNRECOGNIZED' +} + +export enum FeatureBit { + DATALOSS_PROTECT_REQ = 'DATALOSS_PROTECT_REQ', + DATALOSS_PROTECT_OPT = 'DATALOSS_PROTECT_OPT', + INITIAL_ROUING_SYNC = 'INITIAL_ROUING_SYNC', + UPFRONT_SHUTDOWN_SCRIPT_REQ = 'UPFRONT_SHUTDOWN_SCRIPT_REQ', + UPFRONT_SHUTDOWN_SCRIPT_OPT = 'UPFRONT_SHUTDOWN_SCRIPT_OPT', + GOSSIP_QUERIES_REQ = 'GOSSIP_QUERIES_REQ', + GOSSIP_QUERIES_OPT = 'GOSSIP_QUERIES_OPT', + TLV_ONION_REQ = 'TLV_ONION_REQ', + TLV_ONION_OPT = 'TLV_ONION_OPT', + EXT_GOSSIP_QUERIES_REQ = 'EXT_GOSSIP_QUERIES_REQ', + EXT_GOSSIP_QUERIES_OPT = 'EXT_GOSSIP_QUERIES_OPT', + STATIC_REMOTE_KEY_REQ = 'STATIC_REMOTE_KEY_REQ', + STATIC_REMOTE_KEY_OPT = 'STATIC_REMOTE_KEY_OPT', + PAYMENT_ADDR_REQ = 'PAYMENT_ADDR_REQ', + PAYMENT_ADDR_OPT = 'PAYMENT_ADDR_OPT', + MPP_REQ = 'MPP_REQ', + MPP_OPT = 'MPP_OPT', + WUMBO_CHANNELS_REQ = 'WUMBO_CHANNELS_REQ', + WUMBO_CHANNELS_OPT = 'WUMBO_CHANNELS_OPT', + ANCHORS_REQ = 'ANCHORS_REQ', + ANCHORS_OPT = 'ANCHORS_OPT', + ANCHORS_ZERO_FEE_HTLC_REQ = 'ANCHORS_ZERO_FEE_HTLC_REQ', + ANCHORS_ZERO_FEE_HTLC_OPT = 'ANCHORS_ZERO_FEE_HTLC_OPT', + AMP_REQ = 'AMP_REQ', + AMP_OPT = 'AMP_OPT', + UNRECOGNIZED = 'UNRECOGNIZED' +} + +export enum UpdateFailure { + UPDATE_FAILURE_UNKNOWN = 'UPDATE_FAILURE_UNKNOWN', + UPDATE_FAILURE_PENDING = 'UPDATE_FAILURE_PENDING', + UPDATE_FAILURE_NOT_FOUND = 'UPDATE_FAILURE_NOT_FOUND', + UPDATE_FAILURE_INTERNAL_ERR = 'UPDATE_FAILURE_INTERNAL_ERR', + UPDATE_FAILURE_INVALID_PARAMETER = 'UPDATE_FAILURE_INVALID_PARAMETER', + UNRECOGNIZED = 'UNRECOGNIZED' +} + +export interface SubscribeCustomMessagesRequest {} + +export interface CustomMessage { + /** Peer from which the message originates */ + peer: Uint8Array | string; + /** Message type. This value will be in the custom range (>= 32768). */ + type: number; + /** Raw message data */ + data: Uint8Array | string; +} + +export interface SendCustomMessageRequest { + /** Peer to send the message to */ + peer: Uint8Array | string; + /** Message type. This value needs to be in the custom range (>= 32768). */ + type: number; + /** Raw message data. */ + data: Uint8Array | string; +} + +export interface SendCustomMessageResponse {} + +export interface Utxo { + /** The type of address */ + addressType: AddressType; + /** The address */ + address: string; + /** The value of the unspent coin in satoshis */ + amountSat: string; + /** The pkscript in hex */ + pkScript: string; + /** The outpoint in format txid:n */ + outpoint: OutPoint | undefined; + /** The number of confirmations for the Utxo */ + confirmations: string; +} + +export interface Transaction { + /** The transaction hash */ + txHash: string; + /** The transaction amount, denominated in satoshis */ + amount: string; + /** The number of confirmations */ + numConfirmations: number; + /** The hash of the block this transaction was included in */ + blockHash: string; + /** The height of the block this transaction was included in */ + blockHeight: number; + /** Timestamp of this transaction */ + timeStamp: string; + /** Fees paid for this transaction */ + totalFees: string; + /** Addresses that received funds for this transaction */ + destAddresses: string[]; + /** The raw transaction hex. */ + rawTxHex: string; + /** A label that was optionally set on transaction broadcast. */ + label: string; +} + +export interface GetTransactionsRequest { + /** + * The height from which to list transactions, inclusive. If this value is + * greater than end_height, transactions will be read in reverse. + */ + startHeight: number; + /** + * The height until which to list transactions, inclusive. To include + * unconfirmed transactions, this value should be set to -1, which will + * return transactions from start_height until the current chain tip and + * unconfirmed transactions. If no end_height is provided, the call will + * default to this option. + */ + endHeight: number; + /** An optional filter to only include transactions relevant to an account. */ + account: string; +} + +export interface TransactionDetails { + /** The list of transactions relevant to the wallet. */ + transactions: Transaction[]; +} + +export interface FeeLimit { + /** + * The fee limit expressed as a fixed amount of satoshis. + * + * The fields fixed and fixed_msat are mutually exclusive. + */ + fixed: string | undefined; + /** + * The fee limit expressed as a fixed amount of millisatoshis. + * + * The fields fixed and fixed_msat are mutually exclusive. + */ + fixedMsat: string | undefined; + /** The fee limit expressed as a percentage of the payment amount. */ + percent: string | undefined; +} + +export interface SendRequest { + /** + * The identity pubkey of the payment recipient. When using REST, this field + * must be encoded as base64. + */ + dest: Uint8Array | string; + /** + * The hex-encoded identity pubkey of the payment recipient. Deprecated now + * that the REST gateway supports base64 encoding of bytes fields. + * + * @deprecated + */ + destString: string; + /** + * The amount to send expressed in satoshis. + * + * The fields amt and amt_msat are mutually exclusive. + */ + amt: string; + /** + * The amount to send expressed in millisatoshis. + * + * The fields amt and amt_msat are mutually exclusive. + */ + amtMsat: string; + /** + * The hash to use within the payment's HTLC. When using REST, this field + * must be encoded as base64. + */ + paymentHash: Uint8Array | string; + /** + * The hex-encoded hash to use within the payment's HTLC. Deprecated now + * that the REST gateway supports base64 encoding of bytes fields. + * + * @deprecated + */ + paymentHashString: string; + /** + * A bare-bones invoice for a payment within the Lightning Network. With the + * details of the invoice, the sender has all the data necessary to send a + * payment to the recipient. + */ + paymentRequest: string; + /** + * The CLTV delta from the current height that should be used to set the + * timelock for the final hop. + */ + finalCltvDelta: number; + /** + * The maximum number of satoshis that will be paid as a fee of the payment. + * This value can be represented either as a percentage of the amount being + * sent, or as a fixed amount of the maximum fee the user is willing the pay to + * send the payment. If not specified, lnd will use a default value of 100% + * fees for small amounts (<=1k sat) or 5% fees for larger amounts. + */ + feeLimit: FeeLimit | undefined; + /** + * The channel id of the channel that must be taken to the first hop. If zero, + * any channel may be used. + */ + outgoingChanId: string; + /** The pubkey of the last hop of the route. If empty, any hop may be used. */ + lastHopPubkey: Uint8Array | string; + /** + * An optional maximum total time lock for the route. This should not exceed + * lnd's `--max-cltv-expiry` setting. If zero, then the value of + * `--max-cltv-expiry` is enforced. + */ + cltvLimit: number; + /** + * An optional field that can be used to pass an arbitrary set of TLV records + * to a peer which understands the new records. This can be used to pass + * application specific data during the payment attempt. Record types are + * required to be in the custom range >= 65536. When using REST, the values + * must be encoded as base64. + */ + destCustomRecords: { [key: string]: Uint8Array | string }; + /** If set, circular payments to self are permitted. */ + allowSelfPayment: boolean; + /** + * Features assumed to be supported by the final node. All transitive feature + * dependencies must also be set properly. For a given feature bit pair, either + * optional or remote may be set, but not both. If this field is nil or empty, + * the router will try to load destination features from the graph as a + * fallback. + */ + destFeatures: FeatureBit[]; + /** The payment address of the generated invoice. */ + paymentAddr: Uint8Array | string; +} + +export interface SendRequest_DestCustomRecordsEntry { + key: string; + value: Uint8Array | string; +} + +export interface SendResponse { + paymentError: string; + paymentPreimage: Uint8Array | string; + paymentRoute: Route | undefined; + paymentHash: Uint8Array | string; +} + +export interface SendToRouteRequest { + /** + * The payment hash to use for the HTLC. When using REST, this field must be + * encoded as base64. + */ + paymentHash: Uint8Array | string; + /** + * An optional hex-encoded payment hash to be used for the HTLC. Deprecated now + * that the REST gateway supports base64 encoding of bytes fields. + * + * @deprecated + */ + paymentHashString: string; + /** Route that should be used to attempt to complete the payment. */ + route: Route | undefined; +} + +export interface ChannelAcceptRequest { + /** The pubkey of the node that wishes to open an inbound channel. */ + nodePubkey: Uint8Array | string; + /** The hash of the genesis block that the proposed channel resides in. */ + chainHash: Uint8Array | string; + /** The pending channel id. */ + pendingChanId: Uint8Array | string; + /** + * The funding amount in satoshis that initiator wishes to use in the + * channel. + */ + fundingAmt: string; + /** The push amount of the proposed channel in millisatoshis. */ + pushAmt: string; + /** The dust limit of the initiator's commitment tx. */ + dustLimit: string; + /** + * The maximum amount of coins in millisatoshis that can be pending in this + * channel. + */ + maxValueInFlight: string; + /** + * The minimum amount of satoshis the initiator requires us to have at all + * times. + */ + channelReserve: string; + /** The smallest HTLC in millisatoshis that the initiator will accept. */ + minHtlc: string; + /** + * The initial fee rate that the initiator suggests for both commitment + * transactions. + */ + feePerKw: string; + /** + * The number of blocks to use for the relative time lock in the pay-to-self + * output of both commitment transactions. + */ + csvDelay: number; + /** The total number of incoming HTLC's that the initiator will accept. */ + maxAcceptedHtlcs: number; + /** + * A bit-field which the initiator uses to specify proposed channel + * behavior. + */ + channelFlags: number; + /** The commitment type the initiator wishes to use for the proposed channel. */ + commitmentType: CommitmentType; +} + +export interface ChannelAcceptResponse { + /** Whether or not the client accepts the channel. */ + accept: boolean; + /** The pending channel id to which this response applies. */ + pendingChanId: Uint8Array | string; + /** + * An optional error to send the initiating party to indicate why the channel + * was rejected. This field *should not* contain sensitive information, it will + * be sent to the initiating party. This field should only be set if accept is + * false, the channel will be rejected if an error is set with accept=true + * because the meaning of this response is ambiguous. Limited to 500 + * characters. + */ + error: string; + /** + * The upfront shutdown address to use if the initiating peer supports option + * upfront shutdown script (see ListPeers for the features supported). Note + * that the channel open will fail if this value is set for a peer that does + * not support this feature bit. + */ + upfrontShutdown: string; + /** The csv delay (in blocks) that we require for the remote party. */ + csvDelay: number; + /** + * The reserve amount in satoshis that we require the remote peer to adhere to. + * We require that the remote peer always have some reserve amount allocated to + * them so that there is always a disincentive to broadcast old state (if they + * hold 0 sats on their side of the channel, there is nothing to lose). + */ + reserveSat: string; + /** + * The maximum amount of funds in millisatoshis that we allow the remote peer + * to have in outstanding htlcs. + */ + inFlightMaxMsat: string; + /** The maximum number of htlcs that the remote peer can offer us. */ + maxHtlcCount: number; + /** The minimum value in millisatoshis for incoming htlcs on the channel. */ + minHtlcIn: string; + /** The number of confirmations we require before we consider the channel open. */ + minAcceptDepth: number; +} + +export interface ChannelPoint { + /** + * Txid of the funding transaction. When using REST, this field must be + * encoded as base64. + */ + fundingTxidBytes: Uint8Array | string | undefined; + /** + * Hex-encoded string representing the byte-reversed hash of the funding + * transaction. + */ + fundingTxidStr: string | undefined; + /** The index of the output of the funding transaction */ + outputIndex: number; +} + +export interface OutPoint { + /** Raw bytes representing the transaction id. */ + txidBytes: Uint8Array | string; + /** Reversed, hex-encoded string representing the transaction id. */ + txidStr: string; + /** The index of the output on the transaction. */ + outputIndex: number; +} + +export interface LightningAddress { + /** The identity pubkey of the Lightning node */ + pubkey: string; + /** + * The network location of the lightning node, e.g. `69.69.69.69:1337` or + * `localhost:10011` + */ + host: string; +} + +export interface EstimateFeeRequest { + /** The map from addresses to amounts for the transaction. */ + AddrToAmount: { [key: string]: string }; + /** + * The target number of blocks that this transaction should be confirmed + * by. + */ + targetConf: number; + /** + * The minimum number of confirmations each one of your outputs used for + * the transaction must satisfy. + */ + minConfs: number; + /** Whether unconfirmed outputs should be used as inputs for the transaction. */ + spendUnconfirmed: boolean; +} + +export interface EstimateFeeRequest_AddrToAmountEntry { + key: string; + value: string; +} + +export interface EstimateFeeResponse { + /** The total fee in satoshis. */ + feeSat: string; + /** + * Deprecated, use sat_per_vbyte. + * The fee rate in satoshi/vbyte. + * + * @deprecated + */ + feerateSatPerByte: string; + /** The fee rate in satoshi/vbyte. */ + satPerVbyte: string; +} + +export interface SendManyRequest { + /** The map from addresses to amounts */ + AddrToAmount: { [key: string]: string }; + /** + * The target number of blocks that this transaction should be confirmed + * by. + */ + targetConf: number; + /** + * A manual fee rate set in sat/vbyte that should be used when crafting the + * transaction. + */ + satPerVbyte: string; + /** + * Deprecated, use sat_per_vbyte. + * A manual fee rate set in sat/vbyte that should be used when crafting the + * transaction. + * + * @deprecated + */ + satPerByte: string; + /** An optional label for the transaction, limited to 500 characters. */ + label: string; + /** + * The minimum number of confirmations each one of your outputs used for + * the transaction must satisfy. + */ + minConfs: number; + /** Whether unconfirmed outputs should be used as inputs for the transaction. */ + spendUnconfirmed: boolean; +} + +export interface SendManyRequest_AddrToAmountEntry { + key: string; + value: string; +} + +export interface SendManyResponse { + /** The id of the transaction */ + txid: string; +} + +export interface SendCoinsRequest { + /** The address to send coins to */ + addr: string; + /** The amount in satoshis to send */ + amount: string; + /** + * The target number of blocks that this transaction should be confirmed + * by. + */ + targetConf: number; + /** + * A manual fee rate set in sat/vbyte that should be used when crafting the + * transaction. + */ + satPerVbyte: string; + /** + * Deprecated, use sat_per_vbyte. + * A manual fee rate set in sat/vbyte that should be used when crafting the + * transaction. + * + * @deprecated + */ + satPerByte: string; + /** + * If set, then the amount field will be ignored, and lnd will attempt to + * send all the coins under control of the internal wallet to the specified + * address. + */ + sendAll: boolean; + /** An optional label for the transaction, limited to 500 characters. */ + label: string; + /** + * The minimum number of confirmations each one of your outputs used for + * the transaction must satisfy. + */ + minConfs: number; + /** Whether unconfirmed outputs should be used as inputs for the transaction. */ + spendUnconfirmed: boolean; +} + +export interface SendCoinsResponse { + /** The transaction ID of the transaction */ + txid: string; +} + +export interface ListUnspentRequest { + /** The minimum number of confirmations to be included. */ + minConfs: number; + /** The maximum number of confirmations to be included. */ + maxConfs: number; + /** An optional filter to only include outputs belonging to an account. */ + account: string; +} + +export interface ListUnspentResponse { + /** A list of utxos */ + utxos: Utxo[]; +} + +export interface NewAddressRequest { + /** The type of address to generate. */ + type: AddressType; + /** + * The name of the account to generate a new address for. If empty, the + * default wallet account is used. + */ + account: string; +} + +export interface NewAddressResponse { + /** The newly generated wallet address */ + address: string; +} + +export interface SignMessageRequest { + /** + * The message to be signed. When using REST, this field must be encoded as + * base64. + */ + msg: Uint8Array | string; + /** + * Instead of the default double-SHA256 hashing of the message before signing, + * only use one round of hashing instead. + */ + singleHash: boolean; +} + +export interface SignMessageResponse { + /** The signature for the given message */ + signature: string; +} + +export interface VerifyMessageRequest { + /** + * The message over which the signature is to be verified. When using REST, + * this field must be encoded as base64. + */ + msg: Uint8Array | string; + /** The signature to be verified over the given message */ + signature: string; +} + +export interface VerifyMessageResponse { + /** Whether the signature was valid over the given message */ + valid: boolean; + /** The pubkey recovered from the signature */ + pubkey: string; +} + +export interface ConnectPeerRequest { + /** Lightning address of the peer, in the format `@host` */ + addr: LightningAddress | undefined; + /** + * If set, the daemon will attempt to persistently connect to the target + * peer. Otherwise, the call will be synchronous. + */ + perm: boolean; + /** + * The connection timeout value (in seconds) for this request. It won't affect + * other requests. + */ + timeout: string; +} + +export interface ConnectPeerResponse {} + +export interface DisconnectPeerRequest { + /** The pubkey of the node to disconnect from */ + pubKey: string; +} + +export interface DisconnectPeerResponse {} + +export interface HTLC { + incoming: boolean; + amount: string; + hashLock: Uint8Array | string; + expirationHeight: number; + /** Index identifying the htlc on the channel. */ + htlcIndex: string; + /** + * If this HTLC is involved in a forwarding operation, this field indicates + * the forwarding channel. For an outgoing htlc, it is the incoming channel. + * For an incoming htlc, it is the outgoing channel. When the htlc + * originates from this node or this node is the final destination, + * forwarding_channel will be zero. The forwarding channel will also be zero + * for htlcs that need to be forwarded but don't have a forwarding decision + * persisted yet. + */ + forwardingChannel: string; + /** Index identifying the htlc on the forwarding channel. */ + forwardingHtlcIndex: string; +} + +export interface ChannelConstraints { + /** + * The CSV delay expressed in relative blocks. If the channel is force closed, + * we will need to wait for this many blocks before we can regain our funds. + */ + csvDelay: number; + /** The minimum satoshis this node is required to reserve in its balance. */ + chanReserveSat: string; + /** The dust limit (in satoshis) of the initiator's commitment tx. */ + dustLimitSat: string; + /** + * The maximum amount of coins in millisatoshis that can be pending in this + * channel. + */ + maxPendingAmtMsat: string; + /** The smallest HTLC in millisatoshis that the initiator will accept. */ + minHtlcMsat: string; + /** The total number of incoming HTLC's that the initiator will accept. */ + maxAcceptedHtlcs: number; +} + +export interface Channel { + /** Whether this channel is active or not */ + active: boolean; + /** The identity pubkey of the remote node */ + remotePubkey: string; + /** + * The outpoint (txid:index) of the funding transaction. With this value, Bob + * will be able to generate a signature for Alice's version of the commitment + * transaction. + */ + channelPoint: string; + /** + * The unique channel ID for the channel. The first 3 bytes are the block + * height, the next 3 the index within the block, and the last 2 bytes are the + * output index for the channel. + */ + chanId: string; + /** The total amount of funds held in this channel */ + capacity: string; + /** This node's current balance in this channel */ + localBalance: string; + /** The counterparty's current balance in this channel */ + remoteBalance: string; + /** + * The amount calculated to be paid in fees for the current set of commitment + * transactions. The fee amount is persisted with the channel in order to + * allow the fee amount to be removed and recalculated with each channel state + * update, including updates that happen after a system restart. + */ + commitFee: string; + /** The weight of the commitment transaction */ + commitWeight: string; + /** + * The required number of satoshis per kilo-weight that the requester will pay + * at all times, for both the funding transaction and commitment transaction. + * This value can later be updated once the channel is open. + */ + feePerKw: string; + /** The unsettled balance in this channel */ + unsettledBalance: string; + /** The total number of satoshis we've sent within this channel. */ + totalSatoshisSent: string; + /** The total number of satoshis we've received within this channel. */ + totalSatoshisReceived: string; + /** The total number of updates conducted within this channel. */ + numUpdates: string; + /** The list of active, uncleared HTLCs currently pending within the channel. */ + pendingHtlcs: HTLC[]; + /** + * Deprecated. The CSV delay expressed in relative blocks. If the channel is + * force closed, we will need to wait for this many blocks before we can regain + * our funds. + * + * @deprecated + */ + csvDelay: number; + /** Whether this channel is advertised to the network or not. */ + private: boolean; + /** True if we were the ones that created the channel. */ + initiator: boolean; + /** A set of flags showing the current state of the channel. */ + chanStatusFlags: string; + /** + * Deprecated. The minimum satoshis this node is required to reserve in its + * balance. + * + * @deprecated + */ + localChanReserveSat: string; + /** + * Deprecated. The minimum satoshis the other node is required to reserve in + * its balance. + * + * @deprecated + */ + remoteChanReserveSat: string; + /** + * Deprecated. Use commitment_type. + * + * @deprecated + */ + staticRemoteKey: boolean; + /** The commitment type used by this channel. */ + commitmentType: CommitmentType; + /** + * The number of seconds that the channel has been monitored by the channel + * scoring system. Scores are currently not persisted, so this value may be + * less than the lifetime of the channel [EXPERIMENTAL]. + */ + lifetime: string; + /** + * The number of seconds that the remote peer has been observed as being online + * by the channel scoring system over the lifetime of the channel + * [EXPERIMENTAL]. + */ + uptime: string; + /** + * Close address is the address that we will enforce payout to on cooperative + * close if the channel was opened utilizing option upfront shutdown. This + * value can be set on channel open by setting close_address in an open channel + * request. If this value is not set, you can still choose a payout address by + * cooperatively closing with the delivery_address field set. + */ + closeAddress: string; + /** + * The amount that the initiator of the channel optionally pushed to the remote + * party on channel open. This amount will be zero if the channel initiator did + * not push any funds to the remote peer. If the initiator field is true, we + * pushed this amount to our peer, if it is false, the remote peer pushed this + * amount to us. + */ + pushAmountSat: string; + /** + * This uint32 indicates if this channel is to be considered 'frozen'. A + * frozen channel doest not allow a cooperative channel close by the + * initiator. The thaw_height is the height that this restriction stops + * applying to the channel. This field is optional, not setting it or using a + * value of zero will mean the channel has no additional restrictions. The + * height can be interpreted in two ways: as a relative height if the value is + * less than 500,000, or as an absolute height otherwise. + */ + thawHeight: number; + /** List constraints for the local node. */ + localConstraints: ChannelConstraints | undefined; + /** List constraints for the remote node. */ + remoteConstraints: ChannelConstraints | undefined; +} + +export interface ListChannelsRequest { + activeOnly: boolean; + inactiveOnly: boolean; + publicOnly: boolean; + privateOnly: boolean; + /** + * Filters the response for channels with a target peer's pubkey. If peer is + * empty, all channels will be returned. + */ + peer: Uint8Array | string; +} + +export interface ListChannelsResponse { + /** The list of active channels */ + channels: Channel[]; +} + +export interface ChannelCloseSummary { + /** The outpoint (txid:index) of the funding transaction. */ + channelPoint: string; + /** The unique channel ID for the channel. */ + chanId: string; + /** The hash of the genesis block that this channel resides within. */ + chainHash: string; + /** The txid of the transaction which ultimately closed this channel. */ + closingTxHash: string; + /** Public key of the remote peer that we formerly had a channel with. */ + remotePubkey: string; + /** Total capacity of the channel. */ + capacity: string; + /** Height at which the funding transaction was spent. */ + closeHeight: number; + /** Settled balance at the time of channel closure */ + settledBalance: string; + /** The sum of all the time-locked outputs at the time of channel closure */ + timeLockedBalance: string; + /** Details on how the channel was closed. */ + closeType: ChannelCloseSummary_ClosureType; + /** + * Open initiator is the party that initiated opening the channel. Note that + * this value may be unknown if the channel was closed before we migrated to + * store open channel information after close. + */ + openInitiator: Initiator; + /** + * Close initiator indicates which party initiated the close. This value will + * be unknown for channels that were cooperatively closed before we started + * tracking cooperative close initiators. Note that this indicates which party + * initiated a close, and it is possible for both to initiate cooperative or + * force closes, although only one party's close will be confirmed on chain. + */ + closeInitiator: Initiator; + resolutions: Resolution[]; +} + +export enum ChannelCloseSummary_ClosureType { + COOPERATIVE_CLOSE = 'COOPERATIVE_CLOSE', + LOCAL_FORCE_CLOSE = 'LOCAL_FORCE_CLOSE', + REMOTE_FORCE_CLOSE = 'REMOTE_FORCE_CLOSE', + BREACH_CLOSE = 'BREACH_CLOSE', + FUNDING_CANCELED = 'FUNDING_CANCELED', + ABANDONED = 'ABANDONED', + UNRECOGNIZED = 'UNRECOGNIZED' +} + +export interface Resolution { + /** The type of output we are resolving. */ + resolutionType: ResolutionType; + /** The outcome of our on chain action that resolved the outpoint. */ + outcome: ResolutionOutcome; + /** The outpoint that was spent by the resolution. */ + outpoint: OutPoint | undefined; + /** The amount that was claimed by the resolution. */ + amountSat: string; + /** + * The hex-encoded transaction ID of the sweep transaction that spent the + * output. + */ + sweepTxid: string; +} + +export interface ClosedChannelsRequest { + cooperative: boolean; + localForce: boolean; + remoteForce: boolean; + breach: boolean; + fundingCanceled: boolean; + abandoned: boolean; +} + +export interface ClosedChannelsResponse { + channels: ChannelCloseSummary[]; +} + +export interface Peer { + /** The identity pubkey of the peer */ + pubKey: string; + /** Network address of the peer; eg `127.0.0.1:10011` */ + address: string; + /** Bytes of data transmitted to this peer */ + bytesSent: string; + /** Bytes of data transmitted from this peer */ + bytesRecv: string; + /** Satoshis sent to this peer */ + satSent: string; + /** Satoshis received from this peer */ + satRecv: string; + /** A channel is inbound if the counterparty initiated the channel */ + inbound: boolean; + /** Ping time to this peer */ + pingTime: string; + /** The type of sync we are currently performing with this peer. */ + syncType: Peer_SyncType; + /** Features advertised by the remote peer in their init message. */ + features: { [key: number]: Feature }; + /** + * The latest errors received from our peer with timestamps, limited to the 10 + * most recent errors. These errors are tracked across peer connections, but + * are not persisted across lnd restarts. Note that these errors are only + * stored for peers that we have channels open with, to prevent peers from + * spamming us with errors at no cost. + */ + errors: TimestampedError[]; + /** + * The number of times we have recorded this peer going offline or coming + * online, recorded across restarts. Note that this value is decreased over + * time if the peer has not recently flapped, so that we can forgive peers + * with historically high flap counts. + */ + flapCount: number; + /** + * The timestamp of the last flap we observed for this peer. If this value is + * zero, we have not observed any flaps for this peer. + */ + lastFlapNs: string; + /** The last ping payload the peer has sent to us. */ + lastPingPayload: Uint8Array | string; +} + +export enum Peer_SyncType { + /** UNKNOWN_SYNC - Denotes that we cannot determine the peer's current sync type. */ + UNKNOWN_SYNC = 'UNKNOWN_SYNC', + /** ACTIVE_SYNC - Denotes that we are actively receiving new graph updates from the peer. */ + ACTIVE_SYNC = 'ACTIVE_SYNC', + /** PASSIVE_SYNC - Denotes that we are not receiving new graph updates from the peer. */ + PASSIVE_SYNC = 'PASSIVE_SYNC', + /** PINNED_SYNC - Denotes that this peer is pinned into an active sync. */ + PINNED_SYNC = 'PINNED_SYNC', + UNRECOGNIZED = 'UNRECOGNIZED' +} + +export interface Peer_FeaturesEntry { + key: number; + value: Feature | undefined; +} + +export interface TimestampedError { + /** The unix timestamp in seconds when the error occurred. */ + timestamp: string; + /** The string representation of the error sent by our peer. */ + error: string; +} + +export interface ListPeersRequest { + /** + * If true, only the last error that our peer sent us will be returned with + * the peer's information, rather than the full set of historic errors we have + * stored. + */ + latestError: boolean; +} + +export interface ListPeersResponse { + /** The list of currently connected peers */ + peers: Peer[]; +} + +export interface PeerEventSubscription {} + +export interface PeerEvent { + /** The identity pubkey of the peer. */ + pubKey: string; + type: PeerEvent_EventType; +} + +export enum PeerEvent_EventType { + PEER_ONLINE = 'PEER_ONLINE', + PEER_OFFLINE = 'PEER_OFFLINE', + UNRECOGNIZED = 'UNRECOGNIZED' +} + +export interface GetInfoRequest {} + +export interface GetInfoResponse { + /** The version of the LND software that the node is running. */ + version: string; + /** The SHA1 commit hash that the daemon is compiled with. */ + commitHash: string; + /** The identity pubkey of the current node. */ + identityPubkey: string; + /** If applicable, the alias of the current node, e.g. "bob" */ + alias: string; + /** The color of the current node in hex code format */ + color: string; + /** Number of pending channels */ + numPendingChannels: number; + /** Number of active channels */ + numActiveChannels: number; + /** Number of inactive channels */ + numInactiveChannels: number; + /** Number of peers */ + numPeers: number; + /** The node's current view of the height of the best block */ + blockHeight: number; + /** The node's current view of the hash of the best block */ + blockHash: string; + /** Timestamp of the block best known to the wallet */ + bestHeaderTimestamp: string; + /** Whether the wallet's view is synced to the main chain */ + syncedToChain: boolean; + /** Whether we consider ourselves synced with the public channel graph. */ + syncedToGraph: boolean; + /** + * Whether the current node is connected to testnet. This field is + * deprecated and the network field should be used instead + * + * @deprecated + */ + testnet: boolean; + /** A list of active chains the node is connected to */ + chains: Chain[]; + /** The URIs of the current node. */ + uris: string[]; + /** + * Features that our node has advertised in our init message, node + * announcements and invoices. + */ + features: { [key: number]: Feature }; +} + +export interface GetInfoResponse_FeaturesEntry { + key: number; + value: Feature | undefined; +} + +export interface GetRecoveryInfoRequest {} + +export interface GetRecoveryInfoResponse { + /** Whether the wallet is in recovery mode */ + recoveryMode: boolean; + /** Whether the wallet recovery progress is finished */ + recoveryFinished: boolean; + /** The recovery progress, ranging from 0 to 1. */ + progress: number; +} + +export interface Chain { + /** The blockchain the node is on (eg bitcoin, litecoin) */ + chain: string; + /** The network the node is on (eg regtest, testnet, mainnet) */ + network: string; +} + +export interface ConfirmationUpdate { + blockSha: Uint8Array | string; + blockHeight: number; + numConfsLeft: number; +} + +export interface ChannelOpenUpdate { + channelPoint: ChannelPoint | undefined; +} + +export interface ChannelCloseUpdate { + closingTxid: Uint8Array | string; + success: boolean; +} + +export interface CloseChannelRequest { + /** + * The outpoint (txid:index) of the funding transaction. With this value, Bob + * will be able to generate a signature for Alice's version of the commitment + * transaction. + */ + channelPoint: ChannelPoint | undefined; + /** + * If true, then the channel will be closed forcibly. This means the + * current commitment transaction will be signed and broadcast. + */ + force: boolean; + /** + * The target number of blocks that the closure transaction should be + * confirmed by. + */ + targetConf: number; + /** + * Deprecated, use sat_per_vbyte. + * A manual fee rate set in sat/vbyte that should be used when crafting the + * closure transaction. + * + * @deprecated + */ + satPerByte: string; + /** + * An optional address to send funds to in the case of a cooperative close. + * If the channel was opened with an upfront shutdown script and this field + * is set, the request to close will fail because the channel must pay out + * to the upfront shutdown addresss. + */ + deliveryAddress: string; + /** + * A manual fee rate set in sat/vbyte that should be used when crafting the + * closure transaction. + */ + satPerVbyte: string; +} + +export interface CloseStatusUpdate { + closePending: PendingUpdate | undefined; + chanClose: ChannelCloseUpdate | undefined; +} + +export interface PendingUpdate { + txid: Uint8Array | string; + outputIndex: number; +} + +export interface ReadyForPsbtFunding { + /** + * The P2WSH address of the channel funding multisig address that the below + * specified amount in satoshis needs to be sent to. + */ + fundingAddress: string; + /** + * The exact amount in satoshis that needs to be sent to the above address to + * fund the pending channel. + */ + fundingAmount: string; + /** + * A raw PSBT that contains the pending channel output. If a base PSBT was + * provided in the PsbtShim, this is the base PSBT with one additional output. + * If no base PSBT was specified, this is an otherwise empty PSBT with exactly + * one output. + */ + psbt: Uint8Array | string; +} + +export interface BatchOpenChannelRequest { + /** The list of channels to open. */ + channels: BatchOpenChannel[]; + /** + * The target number of blocks that the funding transaction should be + * confirmed by. + */ + targetConf: number; + /** + * A manual fee rate set in sat/vByte that should be used when crafting the + * funding transaction. + */ + satPerVbyte: string; + /** + * The minimum number of confirmations each one of your outputs used for + * the funding transaction must satisfy. + */ + minConfs: number; + /** + * Whether unconfirmed outputs should be used as inputs for the funding + * transaction. + */ + spendUnconfirmed: boolean; + /** An optional label for the batch transaction, limited to 500 characters. */ + label: string; +} + +export interface BatchOpenChannel { + /** + * The pubkey of the node to open a channel with. When using REST, this + * field must be encoded as base64. + */ + nodePubkey: Uint8Array | string; + /** The number of satoshis the wallet should commit to the channel. */ + localFundingAmount: string; + /** + * The number of satoshis to push to the remote side as part of the initial + * commitment state. + */ + pushSat: string; + /** + * Whether this channel should be private, not announced to the greater + * network. + */ + private: boolean; + /** + * The minimum value in millisatoshi we will require for incoming HTLCs on + * the channel. + */ + minHtlcMsat: string; + /** + * The delay we require on the remote's commitment transaction. If this is + * not set, it will be scaled automatically with the channel size. + */ + remoteCsvDelay: number; + /** + * Close address is an optional address which specifies the address to which + * funds should be paid out to upon cooperative close. This field may only be + * set if the peer supports the option upfront feature bit (call listpeers + * to check). The remote peer will only accept cooperative closes to this + * address if it is set. + * + * Note: If this value is set on channel creation, you will *not* be able to + * cooperatively close out to a different address. + */ + closeAddress: string; + /** + * An optional, unique identifier of 32 random bytes that will be used as the + * pending channel ID to identify the channel while it is in the pre-pending + * state. + */ + pendingChanId: Uint8Array | string; + /** + * The explicit commitment type to use. Note this field will only be used if + * the remote peer supports explicit channel negotiation. + */ + commitmentType: CommitmentType; +} + +export interface BatchOpenChannelResponse { + pendingChannels: PendingUpdate[]; +} + +export interface OpenChannelRequest { + /** + * A manual fee rate set in sat/vbyte that should be used when crafting the + * funding transaction. + */ + satPerVbyte: string; + /** + * The pubkey of the node to open a channel with. When using REST, this field + * must be encoded as base64. + */ + nodePubkey: Uint8Array | string; + /** + * The hex encoded pubkey of the node to open a channel with. Deprecated now + * that the REST gateway supports base64 encoding of bytes fields. + * + * @deprecated + */ + nodePubkeyString: string; + /** The number of satoshis the wallet should commit to the channel */ + localFundingAmount: string; + /** + * The number of satoshis to push to the remote side as part of the initial + * commitment state + */ + pushSat: string; + /** + * The target number of blocks that the funding transaction should be + * confirmed by. + */ + targetConf: number; + /** + * Deprecated, use sat_per_vbyte. + * A manual fee rate set in sat/vbyte that should be used when crafting the + * funding transaction. + * + * @deprecated + */ + satPerByte: string; + /** + * Whether this channel should be private, not announced to the greater + * network. + */ + private: boolean; + /** + * The minimum value in millisatoshi we will require for incoming HTLCs on + * the channel. + */ + minHtlcMsat: string; + /** + * The delay we require on the remote's commitment transaction. If this is + * not set, it will be scaled automatically with the channel size. + */ + remoteCsvDelay: number; + /** + * The minimum number of confirmations each one of your outputs used for + * the funding transaction must satisfy. + */ + minConfs: number; + /** + * Whether unconfirmed outputs should be used as inputs for the funding + * transaction. + */ + spendUnconfirmed: boolean; + /** + * Close address is an optional address which specifies the address to which + * funds should be paid out to upon cooperative close. This field may only be + * set if the peer supports the option upfront feature bit (call listpeers + * to check). The remote peer will only accept cooperative closes to this + * address if it is set. + * + * Note: If this value is set on channel creation, you will *not* be able to + * cooperatively close out to a different address. + */ + closeAddress: string; + /** + * Funding shims are an optional argument that allow the caller to intercept + * certain funding functionality. For example, a shim can be provided to use a + * particular key for the commitment key (ideally cold) rather than use one + * that is generated by the wallet as normal, or signal that signing will be + * carried out in an interactive manner (PSBT based). + */ + fundingShim: FundingShim | undefined; + /** + * The maximum amount of coins in millisatoshi that can be pending within + * the channel. It only applies to the remote party. + */ + remoteMaxValueInFlightMsat: string; + /** + * The maximum number of concurrent HTLCs we will allow the remote party to add + * to the commitment transaction. + */ + remoteMaxHtlcs: number; + /** + * Max local csv is the maximum csv delay we will allow for our own commitment + * transaction. + */ + maxLocalCsv: number; + /** + * The explicit commitment type to use. Note this field will only be used if + * the remote peer supports explicit channel negotiation. + */ + commitmentType: CommitmentType; +} + +export interface OpenStatusUpdate { + /** + * Signals that the channel is now fully negotiated and the funding + * transaction published. + */ + chanPending: PendingUpdate | undefined; + /** + * Signals that the channel's funding transaction has now reached the + * required number of confirmations on chain and can be used. + */ + chanOpen: ChannelOpenUpdate | undefined; + /** + * Signals that the funding process has been suspended and the construction + * of a PSBT that funds the channel PK script is now required. + */ + psbtFund: ReadyForPsbtFunding | undefined; + /** + * The pending channel ID of the created channel. This value may be used to + * further the funding flow manually via the FundingStateStep method. + */ + pendingChanId: Uint8Array | string; +} + +export interface KeyLocator { + /** The family of key being identified. */ + keyFamily: number; + /** The precise index of the key being identified. */ + keyIndex: number; +} + +export interface KeyDescriptor { + /** The raw bytes of the key being identified. */ + rawKeyBytes: Uint8Array | string; + /** The key locator that identifies which key to use for signing. */ + keyLoc: KeyLocator | undefined; +} + +export interface ChanPointShim { + /** + * The size of the pre-crafted output to be used as the channel point for this + * channel funding. + */ + amt: string; + /** The target channel point to refrence in created commitment transactions. */ + chanPoint: ChannelPoint | undefined; + /** Our local key to use when creating the multi-sig output. */ + localKey: KeyDescriptor | undefined; + /** The key of the remote party to use when creating the multi-sig output. */ + remoteKey: Uint8Array | string; + /** + * If non-zero, then this will be used as the pending channel ID on the wire + * protocol to initate the funding request. This is an optional field, and + * should only be set if the responder is already expecting a specific pending + * channel ID. + */ + pendingChanId: Uint8Array | string; + /** + * This uint32 indicates if this channel is to be considered 'frozen'. A frozen + * channel does not allow a cooperative channel close by the initiator. The + * thaw_height is the height that this restriction stops applying to the + * channel. The height can be interpreted in two ways: as a relative height if + * the value is less than 500,000, or as an absolute height otherwise. + */ + thawHeight: number; +} + +export interface PsbtShim { + /** + * A unique identifier of 32 random bytes that will be used as the pending + * channel ID to identify the PSBT state machine when interacting with it and + * on the wire protocol to initiate the funding request. + */ + pendingChanId: Uint8Array | string; + /** + * An optional base PSBT the new channel output will be added to. If this is + * non-empty, it must be a binary serialized PSBT. + */ + basePsbt: Uint8Array | string; + /** + * If a channel should be part of a batch (multiple channel openings in one + * transaction), it can be dangerous if the whole batch transaction is + * published too early before all channel opening negotiations are completed. + * This flag prevents this particular channel from broadcasting the transaction + * after the negotiation with the remote peer. In a batch of channel openings + * this flag should be set to true for every channel but the very last. + */ + noPublish: boolean; +} + +export interface FundingShim { + /** + * A channel shim where the channel point was fully constructed outside + * of lnd's wallet and the transaction might already be published. + */ + chanPointShim: ChanPointShim | undefined; + /** + * A channel shim that uses a PSBT to fund and sign the channel funding + * transaction. + */ + psbtShim: PsbtShim | undefined; +} + +export interface FundingShimCancel { + /** The pending channel ID of the channel to cancel the funding shim for. */ + pendingChanId: Uint8Array | string; +} + +export interface FundingPsbtVerify { + /** + * The funded but not yet signed PSBT that sends the exact channel capacity + * amount to the PK script returned in the open channel message in a previous + * step. + */ + fundedPsbt: Uint8Array | string; + /** The pending channel ID of the channel to get the PSBT for. */ + pendingChanId: Uint8Array | string; + /** + * Can only be used if the no_publish flag was set to true in the OpenChannel + * call meaning that the caller is solely responsible for publishing the final + * funding transaction. If skip_finalize is set to true then lnd will not wait + * for a FundingPsbtFinalize state step and instead assumes that a transaction + * with the same TXID as the passed in PSBT will eventually confirm. + * IT IS ABSOLUTELY IMPERATIVE that the TXID of the transaction that is + * eventually published does have the _same TXID_ as the verified PSBT. That + * means no inputs or outputs can change, only signatures can be added. If the + * TXID changes between this call and the publish step then the channel will + * never be created and the funds will be in limbo. + */ + skipFinalize: boolean; +} + +export interface FundingPsbtFinalize { + /** + * The funded PSBT that contains all witness data to send the exact channel + * capacity amount to the PK script returned in the open channel message in a + * previous step. Cannot be set at the same time as final_raw_tx. + */ + signedPsbt: Uint8Array | string; + /** The pending channel ID of the channel to get the PSBT for. */ + pendingChanId: Uint8Array | string; + /** + * As an alternative to the signed PSBT with all witness data, the final raw + * wire format transaction can also be specified directly. Cannot be set at the + * same time as signed_psbt. + */ + finalRawTx: Uint8Array | string; +} + +export interface FundingTransitionMsg { + /** + * The funding shim to register. This should be used before any + * channel funding has began by the remote party, as it is intended as a + * preparatory step for the full channel funding. + */ + shimRegister: FundingShim | undefined; + /** Used to cancel an existing registered funding shim. */ + shimCancel: FundingShimCancel | undefined; + /** + * Used to continue a funding flow that was initiated to be executed + * through a PSBT. This step verifies that the PSBT contains the correct + * outputs to fund the channel. + */ + psbtVerify: FundingPsbtVerify | undefined; + /** + * Used to continue a funding flow that was initiated to be executed + * through a PSBT. This step finalizes the funded and signed PSBT, finishes + * negotiation with the peer and finally publishes the resulting funding + * transaction. + */ + psbtFinalize: FundingPsbtFinalize | undefined; +} + +export interface FundingStateStepResp {} + +export interface PendingHTLC { + /** The direction within the channel that the htlc was sent */ + incoming: boolean; + /** The total value of the htlc */ + amount: string; + /** The final output to be swept back to the user's wallet */ + outpoint: string; + /** The next block height at which we can spend the current stage */ + maturityHeight: number; + /** + * The number of blocks remaining until the current stage can be swept. + * Negative values indicate how many blocks have passed since becoming + * mature. + */ + blocksTilMaturity: number; + /** Indicates whether the htlc is in its first or second stage of recovery */ + stage: number; +} + +export interface PendingChannelsRequest {} + +export interface PendingChannelsResponse { + /** The balance in satoshis encumbered in pending channels */ + totalLimboBalance: string; + /** Channels pending opening */ + pendingOpenChannels: PendingChannelsResponse_PendingOpenChannel[]; + /** + * Deprecated: Channels pending closing previously contained cooperatively + * closed channels with a single confirmation. These channels are now + * considered closed from the time we see them on chain. + * + * @deprecated + */ + pendingClosingChannels: PendingChannelsResponse_ClosedChannel[]; + /** Channels pending force closing */ + pendingForceClosingChannels: PendingChannelsResponse_ForceClosedChannel[]; + /** Channels waiting for closing tx to confirm */ + waitingCloseChannels: PendingChannelsResponse_WaitingCloseChannel[]; +} + +export interface PendingChannelsResponse_PendingChannel { + remoteNodePub: string; + channelPoint: string; + capacity: string; + localBalance: string; + remoteBalance: string; + /** + * The minimum satoshis this node is required to reserve in its + * balance. + */ + localChanReserveSat: string; + /** + * The minimum satoshis the other node is required to reserve in its + * balance. + */ + remoteChanReserveSat: string; + /** The party that initiated opening the channel. */ + initiator: Initiator; + /** The commitment type used by this channel. */ + commitmentType: CommitmentType; + /** Total number of forwarding packages created in this channel. */ + numForwardingPackages: string; + /** A set of flags showing the current state of the channel. */ + chanStatusFlags: string; +} + +export interface PendingChannelsResponse_PendingOpenChannel { + /** The pending channel */ + channel: PendingChannelsResponse_PendingChannel | undefined; + /** The height at which this channel will be confirmed */ + confirmationHeight: number; + /** + * The amount calculated to be paid in fees for the current set of + * commitment transactions. The fee amount is persisted with the channel + * in order to allow the fee amount to be removed and recalculated with + * each channel state update, including updates that happen after a system + * restart. + */ + commitFee: string; + /** The weight of the commitment transaction */ + commitWeight: string; + /** + * The required number of satoshis per kilo-weight that the requester will + * pay at all times, for both the funding transaction and commitment + * transaction. This value can later be updated once the channel is open. + */ + feePerKw: string; +} + +export interface PendingChannelsResponse_WaitingCloseChannel { + /** The pending channel waiting for closing tx to confirm */ + channel: PendingChannelsResponse_PendingChannel | undefined; + /** The balance in satoshis encumbered in this channel */ + limboBalance: string; + /** + * A list of valid commitment transactions. Any of these can confirm at + * this point. + */ + commitments: PendingChannelsResponse_Commitments | undefined; + /** The transaction id of the closing transaction */ + closingTxid: string; +} + +export interface PendingChannelsResponse_Commitments { + /** Hash of the local version of the commitment tx. */ + localTxid: string; + /** Hash of the remote version of the commitment tx. */ + remoteTxid: string; + /** Hash of the remote pending version of the commitment tx. */ + remotePendingTxid: string; + /** + * The amount in satoshis calculated to be paid in fees for the local + * commitment. + */ + localCommitFeeSat: string; + /** + * The amount in satoshis calculated to be paid in fees for the remote + * commitment. + */ + remoteCommitFeeSat: string; + /** + * The amount in satoshis calculated to be paid in fees for the remote + * pending commitment. + */ + remotePendingCommitFeeSat: string; +} + +export interface PendingChannelsResponse_ClosedChannel { + /** The pending channel to be closed */ + channel: PendingChannelsResponse_PendingChannel | undefined; + /** The transaction id of the closing transaction */ + closingTxid: string; +} + +export interface PendingChannelsResponse_ForceClosedChannel { + /** The pending channel to be force closed */ + channel: PendingChannelsResponse_PendingChannel | undefined; + /** The transaction id of the closing transaction */ + closingTxid: string; + /** The balance in satoshis encumbered in this pending channel */ + limboBalance: string; + /** The height at which funds can be swept into the wallet */ + maturityHeight: number; + /** + * Remaining # of blocks until the commitment output can be swept. + * Negative values indicate how many blocks have passed since becoming + * mature. + */ + blocksTilMaturity: number; + /** The total value of funds successfully recovered from this channel */ + recoveredBalance: string; + pendingHtlcs: PendingHTLC[]; + anchor: PendingChannelsResponse_ForceClosedChannel_AnchorState; +} + +export enum PendingChannelsResponse_ForceClosedChannel_AnchorState { + LIMBO = 'LIMBO', + RECOVERED = 'RECOVERED', + LOST = 'LOST', + UNRECOGNIZED = 'UNRECOGNIZED' +} + +export interface ChannelEventSubscription {} + +export interface ChannelEventUpdate { + openChannel: Channel | undefined; + closedChannel: ChannelCloseSummary | undefined; + activeChannel: ChannelPoint | undefined; + inactiveChannel: ChannelPoint | undefined; + pendingOpenChannel: PendingUpdate | undefined; + fullyResolvedChannel: ChannelPoint | undefined; + type: ChannelEventUpdate_UpdateType; +} + +export enum ChannelEventUpdate_UpdateType { + OPEN_CHANNEL = 'OPEN_CHANNEL', + CLOSED_CHANNEL = 'CLOSED_CHANNEL', + ACTIVE_CHANNEL = 'ACTIVE_CHANNEL', + INACTIVE_CHANNEL = 'INACTIVE_CHANNEL', + PENDING_OPEN_CHANNEL = 'PENDING_OPEN_CHANNEL', + FULLY_RESOLVED_CHANNEL = 'FULLY_RESOLVED_CHANNEL', + UNRECOGNIZED = 'UNRECOGNIZED' +} + +export interface WalletAccountBalance { + /** The confirmed balance of the account (with >= 1 confirmations). */ + confirmedBalance: string; + /** The unconfirmed balance of the account (with 0 confirmations). */ + unconfirmedBalance: string; +} + +export interface WalletBalanceRequest {} + +export interface WalletBalanceResponse { + /** The balance of the wallet */ + totalBalance: string; + /** The confirmed balance of a wallet(with >= 1 confirmations) */ + confirmedBalance: string; + /** The unconfirmed balance of a wallet(with 0 confirmations) */ + unconfirmedBalance: string; + /** + * The total amount of wallet UTXOs held in outputs that are locked for + * other usage. + */ + lockedBalance: string; + /** A mapping of each wallet account's name to its balance. */ + accountBalance: { [key: string]: WalletAccountBalance }; +} + +export interface WalletBalanceResponse_AccountBalanceEntry { + key: string; + value: WalletAccountBalance | undefined; +} + +export interface Amount { + /** Value denominated in satoshis. */ + sat: string; + /** Value denominated in milli-satoshis. */ + msat: string; +} + +export interface ChannelBalanceRequest {} + +export interface ChannelBalanceResponse { + /** + * Deprecated. Sum of channels balances denominated in satoshis + * + * @deprecated + */ + balance: string; + /** + * Deprecated. Sum of channels pending balances denominated in satoshis + * + * @deprecated + */ + pendingOpenBalance: string; + /** Sum of channels local balances. */ + localBalance: Amount | undefined; + /** Sum of channels remote balances. */ + remoteBalance: Amount | undefined; + /** Sum of channels local unsettled balances. */ + unsettledLocalBalance: Amount | undefined; + /** Sum of channels remote unsettled balances. */ + unsettledRemoteBalance: Amount | undefined; + /** Sum of channels pending local balances. */ + pendingOpenLocalBalance: Amount | undefined; + /** Sum of channels pending remote balances. */ + pendingOpenRemoteBalance: Amount | undefined; +} + +export interface QueryRoutesRequest { + /** The 33-byte hex-encoded public key for the payment destination */ + pubKey: string; + /** + * The amount to send expressed in satoshis. + * + * The fields amt and amt_msat are mutually exclusive. + */ + amt: string; + /** + * The amount to send expressed in millisatoshis. + * + * The fields amt and amt_msat are mutually exclusive. + */ + amtMsat: string; + /** + * An optional CLTV delta from the current height that should be used for the + * timelock of the final hop. Note that unlike SendPayment, QueryRoutes does + * not add any additional block padding on top of final_ctlv_delta. This + * padding of a few blocks needs to be added manually or otherwise failures may + * happen when a block comes in while the payment is in flight. + */ + finalCltvDelta: number; + /** + * The maximum number of satoshis that will be paid as a fee of the payment. + * This value can be represented either as a percentage of the amount being + * sent, or as a fixed amount of the maximum fee the user is willing the pay to + * send the payment. If not specified, lnd will use a default value of 100% + * fees for small amounts (<=1k sat) or 5% fees for larger amounts. + */ + feeLimit: FeeLimit | undefined; + /** + * A list of nodes to ignore during path finding. When using REST, these fields + * must be encoded as base64. + */ + ignoredNodes: Uint8Array | string[]; + /** + * Deprecated. A list of edges to ignore during path finding. + * + * @deprecated + */ + ignoredEdges: EdgeLocator[]; + /** + * The source node where the request route should originated from. If empty, + * self is assumed. + */ + sourcePubKey: string; + /** + * If set to true, edge probabilities from mission control will be used to get + * the optimal route. + */ + useMissionControl: boolean; + /** A list of directed node pairs that will be ignored during path finding. */ + ignoredPairs: NodePair[]; + /** + * An optional maximum total time lock for the route. If the source is empty or + * ourselves, this should not exceed lnd's `--max-cltv-expiry` setting. If + * zero, then the value of `--max-cltv-expiry` is used as the limit. + */ + cltvLimit: number; + /** + * An optional field that can be used to pass an arbitrary set of TLV records + * to a peer which understands the new records. This can be used to pass + * application specific data during the payment attempt. If the destination + * does not support the specified records, an error will be returned. + * Record types are required to be in the custom range >= 65536. When using + * REST, the values must be encoded as base64. + */ + destCustomRecords: { [key: string]: Uint8Array | string }; + /** + * The channel id of the channel that must be taken to the first hop. If zero, + * any channel may be used. + */ + outgoingChanId: string; + /** The pubkey of the last hop of the route. If empty, any hop may be used. */ + lastHopPubkey: Uint8Array | string; + /** Optional route hints to reach the destination through private channels. */ + routeHints: RouteHint[]; + /** + * Features assumed to be supported by the final node. All transitive feature + * dependencies must also be set properly. For a given feature bit pair, either + * optional or remote may be set, but not both. If this field is nil or empty, + * the router will try to load destination features from the graph as a + * fallback. + */ + destFeatures: FeatureBit[]; +} + +export interface QueryRoutesRequest_DestCustomRecordsEntry { + key: string; + value: Uint8Array | string; +} + +export interface NodePair { + /** + * The sending node of the pair. When using REST, this field must be encoded as + * base64. + */ + from: Uint8Array | string; + /** + * The receiving node of the pair. When using REST, this field must be encoded + * as base64. + */ + to: Uint8Array | string; +} + +export interface EdgeLocator { + /** The short channel id of this edge. */ + channelId: string; + /** + * The direction of this edge. If direction_reverse is false, the direction + * of this edge is from the channel endpoint with the lexicographically smaller + * pub key to the endpoint with the larger pub key. If direction_reverse is + * is true, the edge goes the other way. + */ + directionReverse: boolean; +} + +export interface QueryRoutesResponse { + /** + * The route that results from the path finding operation. This is still a + * repeated field to retain backwards compatibility. + */ + routes: Route[]; + /** + * The success probability of the returned route based on the current mission + * control state. [EXPERIMENTAL] + */ + successProb: number; +} + +export interface Hop { + /** + * The unique channel ID for the channel. The first 3 bytes are the block + * height, the next 3 the index within the block, and the last 2 bytes are the + * output index for the channel. + */ + chanId: string; + /** @deprecated */ + chanCapacity: string; + /** @deprecated */ + amtToForward: string; + /** @deprecated */ + fee: string; + expiry: number; + amtToForwardMsat: string; + feeMsat: string; + /** + * An optional public key of the hop. If the public key is given, the payment + * can be executed without relying on a copy of the channel graph. + */ + pubKey: string; + /** + * If set to true, then this hop will be encoded using the new variable length + * TLV format. Note that if any custom tlv_records below are specified, then + * this field MUST be set to true for them to be encoded properly. + * + * @deprecated + */ + tlvPayload: boolean; + /** + * An optional TLV record that signals the use of an MPP payment. If present, + * the receiver will enforce that the same mpp_record is included in the final + * hop payload of all non-zero payments in the HTLC set. If empty, a regular + * single-shot payment is or was attempted. + */ + mppRecord: MPPRecord | undefined; + /** + * An optional TLV record that signals the use of an AMP payment. If present, + * the receiver will treat all received payments including the same + * (payment_addr, set_id) pair as being part of one logical payment. The + * payment will be settled by XORing the root_share's together and deriving the + * child hashes and preimages according to BOLT XX. Must be used in conjunction + * with mpp_record. + */ + ampRecord: AMPRecord | undefined; + /** + * An optional set of key-value TLV records. This is useful within the context + * of the SendToRoute call as it allows callers to specify arbitrary K-V pairs + * to drop off at each hop within the onion. + */ + customRecords: { [key: string]: Uint8Array | string }; +} + +export interface Hop_CustomRecordsEntry { + key: string; + value: Uint8Array | string; +} + +export interface MPPRecord { + /** + * A unique, random identifier used to authenticate the sender as the intended + * payer of a multi-path payment. The payment_addr must be the same for all + * subpayments, and match the payment_addr provided in the receiver's invoice. + * The same payment_addr must be used on all subpayments. + */ + paymentAddr: Uint8Array | string; + /** + * The total amount in milli-satoshis being sent as part of a larger multi-path + * payment. The caller is responsible for ensuring subpayments to the same node + * and payment_hash sum exactly to total_amt_msat. The same + * total_amt_msat must be used on all subpayments. + */ + totalAmtMsat: string; +} + +export interface AMPRecord { + rootShare: Uint8Array | string; + setId: Uint8Array | string; + childIndex: number; +} + +/** + * A path through the channel graph which runs over one or more channels in + * succession. This struct carries all the information required to craft the + * Sphinx onion packet, and send the payment along the first hop in the path. A + * route is only selected as valid if all the channels have sufficient capacity to + * carry the initial payment amount after fees are accounted for. + */ +export interface Route { + /** + * The cumulative (final) time lock across the entire route. This is the CLTV + * value that should be extended to the first hop in the route. All other hops + * will decrement the time-lock as advertised, leaving enough time for all + * hops to wait for or present the payment preimage to complete the payment. + */ + totalTimeLock: number; + /** + * The sum of the fees paid at each hop within the final route. In the case + * of a one-hop payment, this value will be zero as we don't need to pay a fee + * to ourselves. + * + * @deprecated + */ + totalFees: string; + /** + * The total amount of funds required to complete a payment over this route. + * This value includes the cumulative fees at each hop. As a result, the HTLC + * extended to the first-hop in the route will need to have at least this many + * satoshis, otherwise the route will fail at an intermediate node due to an + * insufficient amount of fees. + * + * @deprecated + */ + totalAmt: string; + /** Contains details concerning the specific forwarding details at each hop. */ + hops: Hop[]; + /** The total fees in millisatoshis. */ + totalFeesMsat: string; + /** The total amount in millisatoshis. */ + totalAmtMsat: string; +} + +export interface NodeInfoRequest { + /** The 33-byte hex-encoded compressed public of the target node */ + pubKey: string; + /** If true, will include all known channels associated with the node. */ + includeChannels: boolean; +} + +export interface NodeInfo { + /** + * An individual vertex/node within the channel graph. A node is + * connected to other nodes by one or more channel edges emanating from it. As + * the graph is directed, a node will also have an incoming edge attached to + * it for each outgoing edge. + */ + node: LightningNode | undefined; + /** The total number of channels for the node. */ + numChannels: number; + /** The sum of all channels capacity for the node, denominated in satoshis. */ + totalCapacity: string; + /** A list of all public channels for the node. */ + channels: ChannelEdge[]; +} + +/** + * An individual vertex/node within the channel graph. A node is + * connected to other nodes by one or more channel edges emanating from it. As the + * graph is directed, a node will also have an incoming edge attached to it for + * each outgoing edge. + */ +export interface LightningNode { + lastUpdate: number; + pubKey: string; + alias: string; + addresses: NodeAddress[]; + color: string; + features: { [key: number]: Feature }; +} + +export interface LightningNode_FeaturesEntry { + key: number; + value: Feature | undefined; +} + +export interface NodeAddress { + network: string; + addr: string; +} + +export interface RoutingPolicy { + timeLockDelta: number; + minHtlc: string; + feeBaseMsat: string; + feeRateMilliMsat: string; + disabled: boolean; + maxHtlcMsat: string; + lastUpdate: number; +} + +/** + * A fully authenticated channel along with all its unique attributes. + * Once an authenticated channel announcement has been processed on the network, + * then an instance of ChannelEdgeInfo encapsulating the channels attributes is + * stored. The other portions relevant to routing policy of a channel are stored + * within a ChannelEdgePolicy for each direction of the channel. + */ +export interface ChannelEdge { + /** + * The unique channel ID for the channel. The first 3 bytes are the block + * height, the next 3 the index within the block, and the last 2 bytes are the + * output index for the channel. + */ + channelId: string; + chanPoint: string; + /** @deprecated */ + lastUpdate: number; + node1Pub: string; + node2Pub: string; + capacity: string; + node1Policy: RoutingPolicy | undefined; + node2Policy: RoutingPolicy | undefined; +} + +export interface ChannelGraphRequest { + /** + * Whether unannounced channels are included in the response or not. If set, + * unannounced channels are included. Unannounced channels are both private + * channels, and public channels that are not yet announced to the network. + */ + includeUnannounced: boolean; +} + +/** Returns a new instance of the directed channel graph. */ +export interface ChannelGraph { + /** The list of `LightningNode`s in this channel graph */ + nodes: LightningNode[]; + /** The list of `ChannelEdge`s in this channel graph */ + edges: ChannelEdge[]; +} + +export interface NodeMetricsRequest { + /** The requested node metrics. */ + types: NodeMetricType[]; +} + +export interface NodeMetricsResponse { + /** + * Betweenness centrality is the sum of the ratio of shortest paths that pass + * through the node for each pair of nodes in the graph (not counting paths + * starting or ending at this node). + * Map of node pubkey to betweenness centrality of the node. Normalized + * values are in the [0,1] closed interval. + */ + betweennessCentrality: { [key: string]: FloatMetric }; +} + +export interface NodeMetricsResponse_BetweennessCentralityEntry { + key: string; + value: FloatMetric | undefined; +} + +export interface FloatMetric { + /** Arbitrary float value. */ + value: number; + /** The value normalized to [0,1] or [-1,1]. */ + normalizedValue: number; +} + +export interface ChanInfoRequest { + /** + * The unique channel ID for the channel. The first 3 bytes are the block + * height, the next 3 the index within the block, and the last 2 bytes are the + * output index for the channel. + */ + chanId: string; +} + +export interface NetworkInfoRequest {} + +export interface NetworkInfo { + graphDiameter: number; + avgOutDegree: number; + maxOutDegree: number; + numNodes: number; + numChannels: number; + totalNetworkCapacity: string; + avgChannelSize: number; + minChannelSize: string; + maxChannelSize: string; + medianChannelSizeSat: string; + /** The number of edges marked as zombies. */ + numZombieChans: string; +} + +export interface StopRequest {} + +export interface StopResponse {} + +export interface GraphTopologySubscription {} + +export interface GraphTopologyUpdate { + nodeUpdates: NodeUpdate[]; + channelUpdates: ChannelEdgeUpdate[]; + closedChans: ClosedChannelUpdate[]; +} + +export interface NodeUpdate { + /** + * Deprecated, use node_addresses. + * + * @deprecated + */ + addresses: string[]; + identityKey: string; + /** + * Deprecated, use features. + * + * @deprecated + */ + globalFeatures: Uint8Array | string; + alias: string; + color: string; + nodeAddresses: NodeAddress[]; + /** + * Features that the node has advertised in the init message, node + * announcements and invoices. + */ + features: { [key: number]: Feature }; +} + +export interface NodeUpdate_FeaturesEntry { + key: number; + value: Feature | undefined; +} + +export interface ChannelEdgeUpdate { + /** + * The unique channel ID for the channel. The first 3 bytes are the block + * height, the next 3 the index within the block, and the last 2 bytes are the + * output index for the channel. + */ + chanId: string; + chanPoint: ChannelPoint | undefined; + capacity: string; + routingPolicy: RoutingPolicy | undefined; + advertisingNode: string; + connectingNode: string; +} + +export interface ClosedChannelUpdate { + /** + * The unique channel ID for the channel. The first 3 bytes are the block + * height, the next 3 the index within the block, and the last 2 bytes are the + * output index for the channel. + */ + chanId: string; + capacity: string; + closedHeight: number; + chanPoint: ChannelPoint | undefined; +} + +export interface HopHint { + /** The public key of the node at the start of the channel. */ + nodeId: string; + /** The unique identifier of the channel. */ + chanId: string; + /** The base fee of the channel denominated in millisatoshis. */ + feeBaseMsat: number; + /** + * The fee rate of the channel for sending one satoshi across it denominated in + * millionths of a satoshi. + */ + feeProportionalMillionths: number; + /** The time-lock delta of the channel. */ + cltvExpiryDelta: number; +} + +export interface SetID { + setId: Uint8Array | string; +} + +export interface RouteHint { + /** + * A list of hop hints that when chained together can assist in reaching a + * specific destination. + */ + hopHints: HopHint[]; +} + +export interface AMPInvoiceState { + /** The state the HTLCs associated with this setID are in. */ + state: InvoiceHTLCState; + /** The settle index of this HTLC set, if the invoice state is settled. */ + settleIndex: string; + /** The time this HTLC set was settled expressed in unix epoch. */ + settleTime: string; + /** The total amount paid for the sub-invoice expressed in milli satoshis. */ + amtPaidMsat: string; +} + +export interface Invoice { + /** + * An optional memo to attach along with the invoice. Used for record keeping + * purposes for the invoice's creator, and will also be set in the description + * field of the encoded payment request if the description_hash field is not + * being used. + */ + memo: string; + /** + * The hex-encoded preimage (32 byte) which will allow settling an incoming + * HTLC payable to this preimage. When using REST, this field must be encoded + * as base64. + */ + rPreimage: Uint8Array | string; + /** + * The hash of the preimage. When using REST, this field must be encoded as + * base64. + */ + rHash: Uint8Array | string; + /** + * The value of this invoice in satoshis + * + * The fields value and value_msat are mutually exclusive. + */ + value: string; + /** + * The value of this invoice in millisatoshis + * + * The fields value and value_msat are mutually exclusive. + */ + valueMsat: string; + /** + * Whether this invoice has been fulfilled + * + * @deprecated + */ + settled: boolean; + /** When this invoice was created */ + creationDate: string; + /** When this invoice was settled */ + settleDate: string; + /** + * A bare-bones invoice for a payment within the Lightning Network. With the + * details of the invoice, the sender has all the data necessary to send a + * payment to the recipient. + */ + paymentRequest: string; + /** + * Hash (SHA-256) of a description of the payment. Used if the description of + * payment (memo) is too long to naturally fit within the description field + * of an encoded payment request. When using REST, this field must be encoded + * as base64. + */ + descriptionHash: Uint8Array | string; + /** Payment request expiry time in seconds. Default is 3600 (1 hour). */ + expiry: string; + /** Fallback on-chain address. */ + fallbackAddr: string; + /** Delta to use for the time-lock of the CLTV extended to the final hop. */ + cltvExpiry: string; + /** + * Route hints that can each be individually used to assist in reaching the + * invoice's destination. + */ + routeHints: RouteHint[]; + /** Whether this invoice should include routing hints for private channels. */ + private: boolean; + /** + * The "add" index of this invoice. Each newly created invoice will increment + * this index making it monotonically increasing. Callers to the + * SubscribeInvoices call can use this to instantly get notified of all added + * invoices with an add_index greater than this one. + */ + addIndex: string; + /** + * The "settle" index of this invoice. Each newly settled invoice will + * increment this index making it monotonically increasing. Callers to the + * SubscribeInvoices call can use this to instantly get notified of all + * settled invoices with an settle_index greater than this one. + */ + settleIndex: string; + /** + * Deprecated, use amt_paid_sat or amt_paid_msat. + * + * @deprecated + */ + amtPaid: string; + /** + * The amount that was accepted for this invoice, in satoshis. This will ONLY + * be set if this invoice has been settled. We provide this field as if the + * invoice was created with a zero value, then we need to record what amount + * was ultimately accepted. Additionally, it's possible that the sender paid + * MORE that was specified in the original invoice. So we'll record that here + * as well. + */ + amtPaidSat: string; + /** + * The amount that was accepted for this invoice, in millisatoshis. This will + * ONLY be set if this invoice has been settled. We provide this field as if + * the invoice was created with a zero value, then we need to record what + * amount was ultimately accepted. Additionally, it's possible that the sender + * paid MORE that was specified in the original invoice. So we'll record that + * here as well. + */ + amtPaidMsat: string; + /** The state the invoice is in. */ + state: Invoice_InvoiceState; + /** List of HTLCs paying to this invoice [EXPERIMENTAL]. */ + htlcs: InvoiceHTLC[]; + /** List of features advertised on the invoice. */ + features: { [key: number]: Feature }; + /** + * Indicates if this invoice was a spontaneous payment that arrived via keysend + * [EXPERIMENTAL]. + */ + isKeysend: boolean; + /** + * The payment address of this invoice. This value will be used in MPP + * payments, and also for newer invoices that always require the MPP payload + * for added end-to-end security. + */ + paymentAddr: Uint8Array | string; + /** Signals whether or not this is an AMP invoice. */ + isAmp: boolean; + /** + * [EXPERIMENTAL]: + * + * Maps a 32-byte hex-encoded set ID to the sub-invoice AMP state for the + * given set ID. This field is always populated for AMP invoices, and can be + * used along side LookupInvoice to obtain the HTLC information related to a + * given sub-invoice. + */ + ampInvoiceState: { [key: string]: AMPInvoiceState }; +} + +export enum Invoice_InvoiceState { + OPEN = 'OPEN', + SETTLED = 'SETTLED', + CANCELED = 'CANCELED', + ACCEPTED = 'ACCEPTED', + UNRECOGNIZED = 'UNRECOGNIZED' +} + +export interface Invoice_FeaturesEntry { + key: number; + value: Feature | undefined; +} + +export interface Invoice_AmpInvoiceStateEntry { + key: string; + value: AMPInvoiceState | undefined; +} + +/** Details of an HTLC that paid to an invoice */ +export interface InvoiceHTLC { + /** Short channel id over which the htlc was received. */ + chanId: string; + /** Index identifying the htlc on the channel. */ + htlcIndex: string; + /** The amount of the htlc in msat. */ + amtMsat: string; + /** Block height at which this htlc was accepted. */ + acceptHeight: number; + /** Time at which this htlc was accepted. */ + acceptTime: string; + /** Time at which this htlc was settled or canceled. */ + resolveTime: string; + /** Block height at which this htlc expires. */ + expiryHeight: number; + /** Current state the htlc is in. */ + state: InvoiceHTLCState; + /** Custom tlv records. */ + customRecords: { [key: string]: Uint8Array | string }; + /** The total amount of the mpp payment in msat. */ + mppTotalAmtMsat: string; + /** Details relevant to AMP HTLCs, only populated if this is an AMP HTLC. */ + amp: AMP | undefined; +} + +export interface InvoiceHTLC_CustomRecordsEntry { + key: string; + value: Uint8Array | string; +} + +/** Details specific to AMP HTLCs. */ +export interface AMP { + /** + * An n-of-n secret share of the root seed from which child payment hashes + * and preimages are derived. + */ + rootShare: Uint8Array | string; + /** An identifier for the HTLC set that this HTLC belongs to. */ + setId: Uint8Array | string; + /** + * A nonce used to randomize the child preimage and child hash from a given + * root_share. + */ + childIndex: number; + /** The payment hash of the AMP HTLC. */ + hash: Uint8Array | string; + /** + * The preimage used to settle this AMP htlc. This field will only be + * populated if the invoice is in InvoiceState_ACCEPTED or + * InvoiceState_SETTLED. + */ + preimage: Uint8Array | string; +} + +export interface AddInvoiceResponse { + rHash: Uint8Array | string; + /** + * A bare-bones invoice for a payment within the Lightning Network. With the + * details of the invoice, the sender has all the data necessary to send a + * payment to the recipient. + */ + paymentRequest: string; + /** + * The "add" index of this invoice. Each newly created invoice will increment + * this index making it monotonically increasing. Callers to the + * SubscribeInvoices call can use this to instantly get notified of all added + * invoices with an add_index greater than this one. + */ + addIndex: string; + /** + * The payment address of the generated invoice. This value should be used + * in all payments for this invoice as we require it for end to end + * security. + */ + paymentAddr: Uint8Array | string; +} + +export interface PaymentHash { + /** + * The hex-encoded payment hash of the invoice to be looked up. The passed + * payment hash must be exactly 32 bytes, otherwise an error is returned. + * Deprecated now that the REST gateway supports base64 encoding of bytes + * fields. + * + * @deprecated + */ + rHashStr: string; + /** + * The payment hash of the invoice to be looked up. When using REST, this field + * must be encoded as base64. + */ + rHash: Uint8Array | string; +} + +export interface ListInvoiceRequest { + /** + * If set, only invoices that are not settled and not canceled will be returned + * in the response. + */ + pendingOnly: boolean; + /** + * The index of an invoice that will be used as either the start or end of a + * query to determine which invoices should be returned in the response. + */ + indexOffset: string; + /** The max number of invoices to return in the response to this query. */ + numMaxInvoices: string; + /** + * If set, the invoices returned will result from seeking backwards from the + * specified index offset. This can be used to paginate backwards. + */ + reversed: boolean; +} + +export interface ListInvoiceResponse { + /** + * A list of invoices from the time slice of the time series specified in the + * request. + */ + invoices: Invoice[]; + /** + * The index of the last item in the set of returned invoices. This can be used + * to seek further, pagination style. + */ + lastIndexOffset: string; + /** + * The index of the last item in the set of returned invoices. This can be used + * to seek backwards, pagination style. + */ + firstIndexOffset: string; +} + +export interface InvoiceSubscription { + /** + * If specified (non-zero), then we'll first start by sending out + * notifications for all added indexes with an add_index greater than this + * value. This allows callers to catch up on any events they missed while they + * weren't connected to the streaming RPC. + */ + addIndex: string; + /** + * If specified (non-zero), then we'll first start by sending out + * notifications for all settled indexes with an settle_index greater than + * this value. This allows callers to catch up on any events they missed while + * they weren't connected to the streaming RPC. + */ + settleIndex: string; +} + +export interface Payment { + /** The payment hash */ + paymentHash: string; + /** + * Deprecated, use value_sat or value_msat. + * + * @deprecated + */ + value: string; + /** + * Deprecated, use creation_time_ns + * + * @deprecated + */ + creationDate: string; + /** + * Deprecated, use fee_sat or fee_msat. + * + * @deprecated + */ + fee: string; + /** The payment preimage */ + paymentPreimage: string; + /** The value of the payment in satoshis */ + valueSat: string; + /** The value of the payment in milli-satoshis */ + valueMsat: string; + /** The optional payment request being fulfilled. */ + paymentRequest: string; + /** The status of the payment. */ + status: Payment_PaymentStatus; + /** The fee paid for this payment in satoshis */ + feeSat: string; + /** The fee paid for this payment in milli-satoshis */ + feeMsat: string; + /** The time in UNIX nanoseconds at which the payment was created. */ + creationTimeNs: string; + /** The HTLCs made in attempt to settle the payment. */ + htlcs: HTLCAttempt[]; + /** + * The creation index of this payment. Each payment can be uniquely identified + * by this index, which may not strictly increment by 1 for payments made in + * older versions of lnd. + */ + paymentIndex: string; + failureReason: PaymentFailureReason; +} + +export enum Payment_PaymentStatus { + UNKNOWN = 'UNKNOWN', + IN_FLIGHT = 'IN_FLIGHT', + SUCCEEDED = 'SUCCEEDED', + FAILED = 'FAILED', + UNRECOGNIZED = 'UNRECOGNIZED' +} + +export interface HTLCAttempt { + /** The unique ID that is used for this attempt. */ + attemptId: string; + /** The status of the HTLC. */ + status: HTLCAttempt_HTLCStatus; + /** The route taken by this HTLC. */ + route: Route | undefined; + /** The time in UNIX nanoseconds at which this HTLC was sent. */ + attemptTimeNs: string; + /** + * The time in UNIX nanoseconds at which this HTLC was settled or failed. + * This value will not be set if the HTLC is still IN_FLIGHT. + */ + resolveTimeNs: string; + /** Detailed htlc failure info. */ + failure: Failure | undefined; + /** The preimage that was used to settle the HTLC. */ + preimage: Uint8Array | string; +} + +export enum HTLCAttempt_HTLCStatus { + IN_FLIGHT = 'IN_FLIGHT', + SUCCEEDED = 'SUCCEEDED', + FAILED = 'FAILED', + UNRECOGNIZED = 'UNRECOGNIZED' +} + +export interface ListPaymentsRequest { + /** + * If true, then return payments that have not yet fully completed. This means + * that pending payments, as well as failed payments will show up if this + * field is set to true. This flag doesn't change the meaning of the indices, + * which are tied to individual payments. + */ + includeIncomplete: boolean; + /** + * The index of a payment that will be used as either the start or end of a + * query to determine which payments should be returned in the response. The + * index_offset is exclusive. In the case of a zero index_offset, the query + * will start with the oldest payment when paginating forwards, or will end + * with the most recent payment when paginating backwards. + */ + indexOffset: string; + /** The maximal number of payments returned in the response to this query. */ + maxPayments: string; + /** + * If set, the payments returned will result from seeking backwards from the + * specified index offset. This can be used to paginate backwards. The order + * of the returned payments is always oldest first (ascending index order). + */ + reversed: boolean; +} + +export interface ListPaymentsResponse { + /** The list of payments */ + payments: Payment[]; + /** + * The index of the first item in the set of returned payments. This can be + * used as the index_offset to continue seeking backwards in the next request. + */ + firstIndexOffset: string; + /** + * The index of the last item in the set of returned payments. This can be used + * as the index_offset to continue seeking forwards in the next request. + */ + lastIndexOffset: string; +} + +export interface DeletePaymentRequest { + /** Payment hash to delete. */ + paymentHash: Uint8Array | string; + /** Only delete failed HTLCs from the payment, not the payment itself. */ + failedHtlcsOnly: boolean; +} + +export interface DeleteAllPaymentsRequest { + /** Only delete failed payments. */ + failedPaymentsOnly: boolean; + /** Only delete failed HTLCs from payments, not the payment itself. */ + failedHtlcsOnly: boolean; +} + +export interface DeletePaymentResponse {} + +export interface DeleteAllPaymentsResponse {} + +export interface AbandonChannelRequest { + channelPoint: ChannelPoint | undefined; + pendingFundingShimOnly: boolean; + /** + * Override the requirement for being in dev mode by setting this to true and + * confirming the user knows what they are doing and this is a potential foot + * gun to lose funds if used on active channels. + */ + iKnowWhatIAmDoing: boolean; +} + +export interface AbandonChannelResponse {} + +export interface DebugLevelRequest { + show: boolean; + levelSpec: string; +} + +export interface DebugLevelResponse { + subSystems: string; +} + +export interface PayReqString { + /** The payment request string to be decoded */ + payReq: string; +} + +export interface PayReq { + destination: string; + paymentHash: string; + numSatoshis: string; + timestamp: string; + expiry: string; + description: string; + descriptionHash: string; + fallbackAddr: string; + cltvExpiry: string; + routeHints: RouteHint[]; + paymentAddr: Uint8Array | string; + numMsat: string; + features: { [key: number]: Feature }; +} + +export interface PayReq_FeaturesEntry { + key: number; + value: Feature | undefined; +} + +export interface Feature { + name: string; + isRequired: boolean; + isKnown: boolean; +} + +export interface FeeReportRequest {} + +export interface ChannelFeeReport { + /** The short channel id that this fee report belongs to. */ + chanId: string; + /** The channel that this fee report belongs to. */ + channelPoint: string; + /** The base fee charged regardless of the number of milli-satoshis sent. */ + baseFeeMsat: string; + /** + * The amount charged per milli-satoshis transferred expressed in + * millionths of a satoshi. + */ + feePerMil: string; + /** + * The effective fee rate in milli-satoshis. Computed by dividing the + * fee_per_mil value by 1 million. + */ + feeRate: number; +} + +export interface FeeReportResponse { + /** + * An array of channel fee reports which describes the current fee schedule + * for each channel. + */ + channelFees: ChannelFeeReport[]; + /** + * The total amount of fee revenue (in satoshis) the switch has collected + * over the past 24 hrs. + */ + dayFeeSum: string; + /** + * The total amount of fee revenue (in satoshis) the switch has collected + * over the past 1 week. + */ + weekFeeSum: string; + /** + * The total amount of fee revenue (in satoshis) the switch has collected + * over the past 1 month. + */ + monthFeeSum: string; +} + +export interface PolicyUpdateRequest { + /** If set, then this update applies to all currently active channels. */ + global: boolean | undefined; + /** If set, this update will target a specific channel. */ + chanPoint: ChannelPoint | undefined; + /** The base fee charged regardless of the number of milli-satoshis sent. */ + baseFeeMsat: string; + /** + * The effective fee rate in milli-satoshis. The precision of this value + * goes up to 6 decimal places, so 1e-6. + */ + feeRate: number; + /** The effective fee rate in micro-satoshis (parts per million). */ + feeRatePpm: number; + /** The required timelock delta for HTLCs forwarded over the channel. */ + timeLockDelta: number; + /** + * If set, the maximum HTLC size in milli-satoshis. If unset, the maximum + * HTLC will be unchanged. + */ + maxHtlcMsat: string; + /** + * The minimum HTLC size in milli-satoshis. Only applied if + * min_htlc_msat_specified is true. + */ + minHtlcMsat: string; + /** If true, min_htlc_msat is applied. */ + minHtlcMsatSpecified: boolean; +} + +export interface FailedUpdate { + /** The outpoint in format txid:n */ + outpoint: OutPoint | undefined; + /** Reason for the policy update failure. */ + reason: UpdateFailure; + /** A string representation of the policy update error. */ + updateError: string; +} + +export interface PolicyUpdateResponse { + /** List of failed policy updates. */ + failedUpdates: FailedUpdate[]; +} + +export interface ForwardingHistoryRequest { + /** + * Start time is the starting point of the forwarding history request. All + * records beyond this point will be included, respecting the end time, and + * the index offset. + */ + startTime: string; + /** + * End time is the end point of the forwarding history request. The + * response will carry at most 50k records between the start time and the + * end time. The index offset can be used to implement pagination. + */ + endTime: string; + /** + * Index offset is the offset in the time series to start at. As each + * response can only contain 50k records, callers can use this to skip + * around within a packed time series. + */ + indexOffset: number; + /** The max number of events to return in the response to this query. */ + numMaxEvents: number; +} + +export interface ForwardingEvent { + /** + * Timestamp is the time (unix epoch offset) that this circuit was + * completed. Deprecated by timestamp_ns. + * + * @deprecated + */ + timestamp: string; + /** The incoming channel ID that carried the HTLC that created the circuit. */ + chanIdIn: string; + /** + * The outgoing channel ID that carried the preimage that completed the + * circuit. + */ + chanIdOut: string; + /** + * The total amount (in satoshis) of the incoming HTLC that created half + * the circuit. + */ + amtIn: string; + /** + * The total amount (in satoshis) of the outgoing HTLC that created the + * second half of the circuit. + */ + amtOut: string; + /** The total fee (in satoshis) that this payment circuit carried. */ + fee: string; + /** The total fee (in milli-satoshis) that this payment circuit carried. */ + feeMsat: string; + /** + * The total amount (in milli-satoshis) of the incoming HTLC that created + * half the circuit. + */ + amtInMsat: string; + /** + * The total amount (in milli-satoshis) of the outgoing HTLC that created + * the second half of the circuit. + */ + amtOutMsat: string; + /** + * The number of nanoseconds elapsed since January 1, 1970 UTC when this + * circuit was completed. + */ + timestampNs: string; +} + +export interface ForwardingHistoryResponse { + /** + * A list of forwarding events from the time slice of the time series + * specified in the request. + */ + forwardingEvents: ForwardingEvent[]; + /** + * The index of the last time in the set of returned forwarding events. Can + * be used to seek further, pagination style. + */ + lastOffsetIndex: number; +} + +export interface ExportChannelBackupRequest { + /** The target channel point to obtain a back up for. */ + chanPoint: ChannelPoint | undefined; +} + +export interface ChannelBackup { + /** Identifies the channel that this backup belongs to. */ + chanPoint: ChannelPoint | undefined; + /** + * Is an encrypted single-chan backup. this can be passed to + * RestoreChannelBackups, or the WalletUnlocker Init and Unlock methods in + * order to trigger the recovery protocol. When using REST, this field must be + * encoded as base64. + */ + chanBackup: Uint8Array | string; +} + +export interface MultiChanBackup { + /** Is the set of all channels that are included in this multi-channel backup. */ + chanPoints: ChannelPoint[]; + /** + * A single encrypted blob containing all the static channel backups of the + * channel listed above. This can be stored as a single file or blob, and + * safely be replaced with any prior/future versions. When using REST, this + * field must be encoded as base64. + */ + multiChanBackup: Uint8Array | string; +} + +export interface ChanBackupExportRequest {} + +export interface ChanBackupSnapshot { + /** + * The set of new channels that have been added since the last channel backup + * snapshot was requested. + */ + singleChanBackups: ChannelBackups | undefined; + /** + * A multi-channel backup that covers all open channels currently known to + * lnd. + */ + multiChanBackup: MultiChanBackup | undefined; +} + +export interface ChannelBackups { + /** A set of single-chan static channel backups. */ + chanBackups: ChannelBackup[]; +} + +export interface RestoreChanBackupRequest { + /** The channels to restore as a list of channel/backup pairs. */ + chanBackups: ChannelBackups | undefined; + /** + * The channels to restore in the packed multi backup format. When using + * REST, this field must be encoded as base64. + */ + multiChanBackup: Uint8Array | string | undefined; +} + +export interface RestoreBackupResponse {} + +export interface ChannelBackupSubscription {} + +export interface VerifyChanBackupResponse {} + +export interface MacaroonPermission { + /** The entity a permission grants access to. */ + entity: string; + /** The action that is granted. */ + action: string; +} + +export interface BakeMacaroonRequest { + /** The list of permissions the new macaroon should grant. */ + permissions: MacaroonPermission[]; + /** The root key ID used to create the macaroon, must be a positive integer. */ + rootKeyId: string; + /** + * Informs the RPC on whether to allow external permissions that LND is not + * aware of. + */ + allowExternalPermissions: boolean; +} + +export interface BakeMacaroonResponse { + /** The hex encoded macaroon, serialized in binary format. */ + macaroon: string; +} + +export interface ListMacaroonIDsRequest {} + +export interface ListMacaroonIDsResponse { + /** The list of root key IDs that are in use. */ + rootKeyIds: string[]; +} + +export interface DeleteMacaroonIDRequest { + /** The root key ID to be removed. */ + rootKeyId: string; +} + +export interface DeleteMacaroonIDResponse { + /** A boolean indicates that the deletion is successful. */ + deleted: boolean; +} + +export interface MacaroonPermissionList { + /** A list of macaroon permissions. */ + permissions: MacaroonPermission[]; +} + +export interface ListPermissionsRequest {} + +export interface ListPermissionsResponse { + /** + * A map between all RPC method URIs and their required macaroon permissions to + * access them. + */ + methodPermissions: { [key: string]: MacaroonPermissionList }; +} + +export interface ListPermissionsResponse_MethodPermissionsEntry { + key: string; + value: MacaroonPermissionList | undefined; +} + +export interface Failure { + /** Failure code as defined in the Lightning spec */ + code: Failure_FailureCode; + /** An optional channel update message. */ + channelUpdate: ChannelUpdate | undefined; + /** A failure type-dependent htlc value. */ + htlcMsat: string; + /** The sha256 sum of the onion payload. */ + onionSha256: Uint8Array | string; + /** A failure type-dependent cltv expiry value. */ + cltvExpiry: number; + /** A failure type-dependent flags value. */ + flags: number; + /** + * The position in the path of the intermediate or final node that generated + * the failure message. Position zero is the sender node. + */ + failureSourceIndex: number; + /** A failure type-dependent block height. */ + height: number; +} + +export enum Failure_FailureCode { + /** + * RESERVED - The numbers assigned in this enumeration match the failure codes as + * defined in BOLT #4. Because protobuf 3 requires enums to start with 0, + * a RESERVED value is added. + */ + RESERVED = 'RESERVED', + INCORRECT_OR_UNKNOWN_PAYMENT_DETAILS = 'INCORRECT_OR_UNKNOWN_PAYMENT_DETAILS', + INCORRECT_PAYMENT_AMOUNT = 'INCORRECT_PAYMENT_AMOUNT', + FINAL_INCORRECT_CLTV_EXPIRY = 'FINAL_INCORRECT_CLTV_EXPIRY', + FINAL_INCORRECT_HTLC_AMOUNT = 'FINAL_INCORRECT_HTLC_AMOUNT', + FINAL_EXPIRY_TOO_SOON = 'FINAL_EXPIRY_TOO_SOON', + INVALID_REALM = 'INVALID_REALM', + EXPIRY_TOO_SOON = 'EXPIRY_TOO_SOON', + INVALID_ONION_VERSION = 'INVALID_ONION_VERSION', + INVALID_ONION_HMAC = 'INVALID_ONION_HMAC', + INVALID_ONION_KEY = 'INVALID_ONION_KEY', + AMOUNT_BELOW_MINIMUM = 'AMOUNT_BELOW_MINIMUM', + FEE_INSUFFICIENT = 'FEE_INSUFFICIENT', + INCORRECT_CLTV_EXPIRY = 'INCORRECT_CLTV_EXPIRY', + CHANNEL_DISABLED = 'CHANNEL_DISABLED', + TEMPORARY_CHANNEL_FAILURE = 'TEMPORARY_CHANNEL_FAILURE', + REQUIRED_NODE_FEATURE_MISSING = 'REQUIRED_NODE_FEATURE_MISSING', + REQUIRED_CHANNEL_FEATURE_MISSING = 'REQUIRED_CHANNEL_FEATURE_MISSING', + UNKNOWN_NEXT_PEER = 'UNKNOWN_NEXT_PEER', + TEMPORARY_NODE_FAILURE = 'TEMPORARY_NODE_FAILURE', + PERMANENT_NODE_FAILURE = 'PERMANENT_NODE_FAILURE', + PERMANENT_CHANNEL_FAILURE = 'PERMANENT_CHANNEL_FAILURE', + EXPIRY_TOO_FAR = 'EXPIRY_TOO_FAR', + MPP_TIMEOUT = 'MPP_TIMEOUT', + INVALID_ONION_PAYLOAD = 'INVALID_ONION_PAYLOAD', + /** INTERNAL_FAILURE - An internal error occurred. */ + INTERNAL_FAILURE = 'INTERNAL_FAILURE', + /** UNKNOWN_FAILURE - The error source is known, but the failure itself couldn't be decoded. */ + UNKNOWN_FAILURE = 'UNKNOWN_FAILURE', + /** + * UNREADABLE_FAILURE - An unreadable failure result is returned if the received failure message + * cannot be decrypted. In that case the error source is unknown. + */ + UNREADABLE_FAILURE = 'UNREADABLE_FAILURE', + UNRECOGNIZED = 'UNRECOGNIZED' +} + +export interface ChannelUpdate { + /** + * The signature that validates the announced data and proves the ownership + * of node id. + */ + signature: Uint8Array | string; + /** + * The target chain that this channel was opened within. This value + * should be the genesis hash of the target chain. Along with the short + * channel ID, this uniquely identifies the channel globally in a + * blockchain. + */ + chainHash: Uint8Array | string; + /** The unique description of the funding transaction. */ + chanId: string; + /** + * A timestamp that allows ordering in the case of multiple announcements. + * We should ignore the message if timestamp is not greater than the + * last-received. + */ + timestamp: number; + /** + * The bitfield that describes whether optional fields are present in this + * update. Currently, the least-significant bit must be set to 1 if the + * optional field MaxHtlc is present. + */ + messageFlags: number; + /** + * The bitfield that describes additional meta-data concerning how the + * update is to be interpreted. Currently, the least-significant bit must be + * set to 0 if the creating node corresponds to the first node in the + * previously sent channel announcement and 1 otherwise. If the second bit + * is set, then the channel is set to be disabled. + */ + channelFlags: number; + /** + * The minimum number of blocks this node requires to be added to the expiry + * of HTLCs. This is a security parameter determined by the node operator. + * This value represents the required gap between the time locks of the + * incoming and outgoing HTLC's set to this node. + */ + timeLockDelta: number; + /** The minimum HTLC value which will be accepted. */ + htlcMinimumMsat: string; + /** + * The base fee that must be used for incoming HTLC's to this particular + * channel. This value will be tacked onto the required for a payment + * independent of the size of the payment. + */ + baseFee: number; + /** The fee rate that will be charged per millionth of a satoshi. */ + feeRate: number; + /** The maximum HTLC value which will be accepted. */ + htlcMaximumMsat: string; + /** + * The set of data that was appended to this message, some of which we may + * not actually know how to iterate or parse. By holding onto this data, we + * ensure that we're able to properly validate the set of signatures that + * cover these new fields, and ensure we're able to make upgrades to the + * network in a forwards compatible manner. + */ + extraOpaqueData: Uint8Array | string; +} + +export interface MacaroonId { + nonce: Uint8Array | string; + storageId: Uint8Array | string; + ops: Op[]; +} + +export interface Op { + entity: string; + actions: string[]; +} + +export interface CheckMacPermRequest { + macaroon: Uint8Array | string; + permissions: MacaroonPermission[]; + fullMethod: string; +} + +export interface CheckMacPermResponse { + valid: boolean; +} + +export interface RPCMiddlewareRequest { + /** + * The unique ID of the intercepted original gRPC request. Useful for mapping + * request to response when implementing full duplex message interception. For + * streaming requests, this will be the same ID for all incoming and outgoing + * middleware intercept messages of the _same_ stream. + */ + requestId: string; + /** + * The raw bytes of the complete macaroon as sent by the gRPC client in the + * original request. This might be empty for a request that doesn't require + * macaroons such as the wallet unlocker RPCs. + */ + rawMacaroon: Uint8Array | string; + /** + * The parsed condition of the macaroon's custom caveat for convenient access. + * This field only contains the value of the custom caveat that the handling + * middleware has registered itself for. The condition _must_ be validated for + * messages of intercept_type stream_auth and request! + */ + customCaveatCondition: string; + /** + * Intercept stream authentication: each new streaming RPC call that is + * initiated against lnd and contains the middleware's custom macaroon + * caveat can be approved or denied based upon the macaroon in the stream + * header. This message will only be sent for streaming RPCs, unary RPCs + * must handle the macaroon authentication in the request interception to + * avoid an additional message round trip between lnd and the middleware. + */ + streamAuth: StreamAuth | undefined; + /** + * Intercept incoming gRPC client request message: all incoming messages, + * both on streaming and unary RPCs, are forwarded to the middleware for + * inspection. For unary RPC messages the middleware is also expected to + * validate the custom macaroon caveat of the request. + */ + request: RPCMessage | undefined; + /** + * Intercept outgoing gRPC response message: all outgoing messages, both on + * streaming and unary RPCs, are forwarded to the middleware for inspection + * and amendment. The response in this message is the original response as + * it was generated by the main RPC server. It can either be accepted + * (=forwarded to the client), replaced/overwritten with a new message of + * the same type, or replaced by an error message. + */ + response: RPCMessage | undefined; + /** + * The unique message ID of this middleware intercept message. There can be + * multiple middleware intercept messages per single gRPC request (one for the + * incoming request and one for the outgoing response) or gRPC stream (one for + * each incoming message and one for each outgoing response). This message ID + * must be referenced when responding (accepting/rejecting/modifying) to an + * intercept message. + */ + msgId: string; +} + +export interface StreamAuth { + /** + * The full URI (in the format /./MethodName, for + * example /lnrpc.Lightning/GetInfo) of the streaming RPC method that was just + * established. + */ + methodFullUri: string; +} + +export interface RPCMessage { + /** + * The full URI (in the format /./MethodName, for + * example /lnrpc.Lightning/GetInfo) of the RPC method the message was sent + * to/from. + */ + methodFullUri: string; + /** Indicates whether the message was sent over a streaming RPC method or not. */ + streamRpc: boolean; + /** + * The full canonical gRPC name of the message type (in the format + * .TypeName, for example lnrpc.GetInfoRequest). + */ + typeName: string; + /** + * The full content of the gRPC message, serialized in the binary protobuf + * format. + */ + serialized: Uint8Array | string; +} + +export interface RPCMiddlewareResponse { + /** + * The request message ID this response refers to. Must always be set when + * giving feedback to an intercept but is ignored for the initial registration + * message. + */ + refMsgId: string; + /** + * The registration message identifies the middleware that's being + * registered in lnd. The registration message must be sent immediately + * after initiating the RegisterRpcMiddleware stream, otherwise lnd will + * time out the attempt and terminate the request. NOTE: The middleware + * will only receive interception messages for requests that contain a + * macaroon with the custom caveat that the middleware declares it is + * responsible for handling in the registration message! As a security + * measure, _no_ middleware can intercept requests made with _unencumbered_ + * macaroons! + */ + register: MiddlewareRegistration | undefined; + /** + * The middleware received an interception request and gives feedback to + * it. The request_id indicates what message the feedback refers to. + */ + feedback: InterceptFeedback | undefined; +} + +export interface MiddlewareRegistration { + /** + * The name of the middleware to register. The name should be as informative + * as possible and is logged on registration. + */ + middlewareName: string; + /** + * The name of the custom macaroon caveat that this middleware is responsible + * for. Only requests/responses that contain a macaroon with the registered + * custom caveat are forwarded for interception to the middleware. The + * exception being the read-only mode: All requests/responses are forwarded to + * a middleware that requests read-only access but such a middleware won't be + * allowed to _alter_ responses. As a security measure, _no_ middleware can + * change responses to requests made with _unencumbered_ macaroons! + * NOTE: Cannot be used at the same time as read_only_mode. + */ + customMacaroonCaveatName: string; + /** + * Instead of defining a custom macaroon caveat name a middleware can register + * itself for read-only access only. In that mode all requests/responses are + * forwarded to the middleware but the middleware isn't allowed to alter any of + * the responses. + * NOTE: Cannot be used at the same time as custom_macaroon_caveat_name. + */ + readOnlyMode: boolean; +} + +export interface InterceptFeedback { + /** + * The error to return to the user. If this is non-empty, the incoming gRPC + * stream/request is aborted and the error is returned to the gRPC client. If + * this value is empty, it means the middleware accepts the stream/request/ + * response and the processing of it can continue. + */ + error: string; + /** + * A boolean indicating that the gRPC response should be replaced/overwritten. + * As its name suggests, this can only be used as a feedback to an intercepted + * response RPC message and is ignored for feedback on any other message. This + * boolean is needed because in protobuf an empty message is serialized as a + * 0-length or nil byte slice and we wouldn't be able to distinguish between + * an empty replacement message and the "don't replace anything" case. + */ + replaceResponse: boolean; + /** + * If the replace_response field is set to true, this field must contain the + * binary serialized gRPC response message in the protobuf format. + */ + replacementSerialized: Uint8Array | string; +} + +/** Lightning is the main RPC server of the daemon. */ +export interface Lightning { + /** + * lncli: `walletbalance` + * WalletBalance returns total unspent outputs(confirmed and unconfirmed), all + * confirmed unspent outputs and all unconfirmed unspent outputs under control + * of the wallet. + */ + walletBalance( + request?: DeepPartial + ): Promise; + /** + * lncli: `channelbalance` + * ChannelBalance returns a report on the total funds across all open channels, + * categorized in local/remote, pending local/remote and unsettled local/remote + * balances. + */ + channelBalance( + request?: DeepPartial + ): Promise; + /** + * lncli: `listchaintxns` + * GetTransactions returns a list describing all the known transactions + * relevant to the wallet. + */ + getTransactions( + request?: DeepPartial + ): Promise; + /** + * lncli: `estimatefee` + * EstimateFee asks the chain backend to estimate the fee rate and total fees + * for a transaction that pays to multiple specified outputs. + * + * When using REST, the `AddrToAmount` map type can be set by appending + * `&AddrToAmount[
]=` to the URL. Unfortunately this + * map type doesn't appear in the REST API documentation because of a bug in + * the grpc-gateway library. + */ + estimateFee( + request?: DeepPartial + ): Promise; + /** + * lncli: `sendcoins` + * SendCoins executes a request to send coins to a particular address. Unlike + * SendMany, this RPC call only allows creating a single output at a time. If + * neither target_conf, or sat_per_vbyte are set, then the internal wallet will + * consult its fee model to determine a fee for the default confirmation + * target. + */ + sendCoins( + request?: DeepPartial + ): Promise; + /** + * lncli: `listunspent` + * Deprecated, use walletrpc.ListUnspent instead. + * + * ListUnspent returns a list of all utxos spendable by the wallet with a + * number of confirmations between the specified minimum and maximum. + */ + listUnspent( + request?: DeepPartial + ): Promise; + /** + * SubscribeTransactions creates a uni-directional stream from the server to + * the client in which any newly discovered transactions relevant to the + * wallet are sent over. + */ + subscribeTransactions( + request?: DeepPartial, + onMessage?: (msg: Transaction) => void, + onError?: (err: Error) => void + ): void; + /** + * lncli: `sendmany` + * SendMany handles a request for a transaction that creates multiple specified + * outputs in parallel. If neither target_conf, or sat_per_vbyte are set, then + * the internal wallet will consult its fee model to determine a fee for the + * default confirmation target. + */ + sendMany(request?: DeepPartial): Promise; + /** + * lncli: `newaddress` + * NewAddress creates a new address under control of the local wallet. + */ + newAddress( + request?: DeepPartial + ): Promise; + /** + * lncli: `signmessage` + * SignMessage signs a message with this node's private key. The returned + * signature string is `zbase32` encoded and pubkey recoverable, meaning that + * only the message digest and signature are needed for verification. + */ + signMessage( + request?: DeepPartial + ): Promise; + /** + * lncli: `verifymessage` + * VerifyMessage verifies a signature over a msg. The signature must be + * zbase32 encoded and signed by an active node in the resident node's + * channel database. In addition to returning the validity of the signature, + * VerifyMessage also returns the recovered pubkey from the signature. + */ + verifyMessage( + request?: DeepPartial + ): Promise; + /** + * lncli: `connect` + * ConnectPeer attempts to establish a connection to a remote peer. This is at + * the networking level, and is used for communication between nodes. This is + * distinct from establishing a channel with a peer. + */ + connectPeer( + request?: DeepPartial + ): Promise; + /** + * lncli: `disconnect` + * DisconnectPeer attempts to disconnect one peer from another identified by a + * given pubKey. In the case that we currently have a pending or active channel + * with the target peer, then this action will be not be allowed. + */ + disconnectPeer( + request?: DeepPartial + ): Promise; + /** + * lncli: `listpeers` + * ListPeers returns a verbose listing of all currently active peers. + */ + listPeers( + request?: DeepPartial + ): Promise; + /** + * SubscribePeerEvents creates a uni-directional stream from the server to + * the client in which any events relevant to the state of peers are sent + * over. Events include peers going online and offline. + */ + subscribePeerEvents( + request?: DeepPartial, + onMessage?: (msg: PeerEvent) => void, + onError?: (err: Error) => void + ): void; + /** + * lncli: `getinfo` + * GetInfo returns general information concerning the lightning node including + * it's identity pubkey, alias, the chains it is connected to, and information + * concerning the number of open+pending channels. + */ + getInfo(request?: DeepPartial): Promise; + /** + * lncli: `getrecoveryinfo` + * GetRecoveryInfo returns information concerning the recovery mode including + * whether it's in a recovery mode, whether the recovery is finished, and the + * progress made so far. + */ + getRecoveryInfo( + request?: DeepPartial + ): Promise; + /** + * lncli: `pendingchannels` + * PendingChannels returns a list of all the channels that are currently + * considered "pending". A channel is pending if it has finished the funding + * workflow and is waiting for confirmations for the funding txn, or is in the + * process of closure, either initiated cooperatively or non-cooperatively. + */ + pendingChannels( + request?: DeepPartial + ): Promise; + /** + * lncli: `listchannels` + * ListChannels returns a description of all the open channels that this node + * is a participant in. + */ + listChannels( + request?: DeepPartial + ): Promise; + /** + * SubscribeChannelEvents creates a uni-directional stream from the server to + * the client in which any updates relevant to the state of the channels are + * sent over. Events include new active channels, inactive channels, and closed + * channels. + */ + subscribeChannelEvents( + request?: DeepPartial, + onMessage?: (msg: ChannelEventUpdate) => void, + onError?: (err: Error) => void + ): void; + /** + * lncli: `closedchannels` + * ClosedChannels returns a description of all the closed channels that + * this node was a participant in. + */ + closedChannels( + request?: DeepPartial + ): Promise; + /** + * OpenChannelSync is a synchronous version of the OpenChannel RPC call. This + * call is meant to be consumed by clients to the REST proxy. As with all + * other sync calls, all byte slices are intended to be populated as hex + * encoded strings. + */ + openChannelSync( + request?: DeepPartial + ): Promise; + /** + * lncli: `openchannel` + * OpenChannel attempts to open a singly funded channel specified in the + * request to a remote peer. Users are able to specify a target number of + * blocks that the funding transaction should be confirmed in, or a manual fee + * rate to us for the funding transaction. If neither are specified, then a + * lax block confirmation target is used. Each OpenStatusUpdate will return + * the pending channel ID of the in-progress channel. Depending on the + * arguments specified in the OpenChannelRequest, this pending channel ID can + * then be used to manually progress the channel funding flow. + */ + openChannel( + request?: DeepPartial, + onMessage?: (msg: OpenStatusUpdate) => void, + onError?: (err: Error) => void + ): void; + /** + * lncli: `batchopenchannel` + * BatchOpenChannel attempts to open multiple single-funded channels in a + * single transaction in an atomic way. This means either all channel open + * requests succeed at once or all attempts are aborted if any of them fail. + * This is the safer variant of using PSBTs to manually fund a batch of + * channels through the OpenChannel RPC. + */ + batchOpenChannel( + request?: DeepPartial + ): Promise; + /** + * FundingStateStep is an advanced funding related call that allows the caller + * to either execute some preparatory steps for a funding workflow, or + * manually progress a funding workflow. The primary way a funding flow is + * identified is via its pending channel ID. As an example, this method can be + * used to specify that we're expecting a funding flow for a particular + * pending channel ID, for which we need to use specific parameters. + * Alternatively, this can be used to interactively drive PSBT signing for + * funding for partially complete funding transactions. + */ + fundingStateStep( + request?: DeepPartial + ): Promise; + /** + * ChannelAcceptor dispatches a bi-directional streaming RPC in which + * OpenChannel requests are sent to the client and the client responds with + * a boolean that tells LND whether or not to accept the channel. This allows + * node operators to specify their own criteria for accepting inbound channels + * through a single persistent connection. + */ + channelAcceptor( + request?: DeepPartial, + onMessage?: (msg: ChannelAcceptRequest) => void, + onError?: (err: Error) => void + ): void; + /** + * lncli: `closechannel` + * CloseChannel attempts to close an active channel identified by its channel + * outpoint (ChannelPoint). The actions of this method can additionally be + * augmented to attempt a force close after a timeout period in the case of an + * inactive peer. If a non-force close (cooperative closure) is requested, + * then the user can specify either a target number of blocks until the + * closure transaction is confirmed, or a manual fee rate. If neither are + * specified, then a default lax, block confirmation target is used. + */ + closeChannel( + request?: DeepPartial, + onMessage?: (msg: CloseStatusUpdate) => void, + onError?: (err: Error) => void + ): void; + /** + * lncli: `abandonchannel` + * AbandonChannel removes all channel state from the database except for a + * close summary. This method can be used to get rid of permanently unusable + * channels due to bugs fixed in newer versions of lnd. This method can also be + * used to remove externally funded channels where the funding transaction was + * never broadcast. Only available for non-externally funded channels in dev + * build. + */ + abandonChannel( + request?: DeepPartial + ): Promise; + /** + * lncli: `sendpayment` + * Deprecated, use routerrpc.SendPaymentV2. SendPayment dispatches a + * bi-directional streaming RPC for sending payments through the Lightning + * Network. A single RPC invocation creates a persistent bi-directional + * stream allowing clients to rapidly send payments through the Lightning + * Network with a single persistent connection. + * + * @deprecated + */ + sendPayment( + request?: DeepPartial, + onMessage?: (msg: SendResponse) => void, + onError?: (err: Error) => void + ): void; + /** + * SendPaymentSync is the synchronous non-streaming version of SendPayment. + * This RPC is intended to be consumed by clients of the REST proxy. + * Additionally, this RPC expects the destination's public key and the payment + * hash (if any) to be encoded as hex strings. + */ + sendPaymentSync(request?: DeepPartial): Promise; + /** + * lncli: `sendtoroute` + * Deprecated, use routerrpc.SendToRouteV2. SendToRoute is a bi-directional + * streaming RPC for sending payment through the Lightning Network. This + * method differs from SendPayment in that it allows users to specify a full + * route manually. This can be used for things like rebalancing, and atomic + * swaps. + * + * @deprecated + */ + sendToRoute( + request?: DeepPartial, + onMessage?: (msg: SendResponse) => void, + onError?: (err: Error) => void + ): void; + /** + * SendToRouteSync is a synchronous version of SendToRoute. It Will block + * until the payment either fails or succeeds. + */ + sendToRouteSync( + request?: DeepPartial + ): Promise; + /** + * lncli: `addinvoice` + * AddInvoice attempts to add a new invoice to the invoice database. Any + * duplicated invoices are rejected, therefore all invoices *must* have a + * unique payment preimage. + */ + addInvoice(request?: DeepPartial): Promise; + /** + * lncli: `listinvoices` + * ListInvoices returns a list of all the invoices currently stored within the + * database. Any active debug invoices are ignored. It has full support for + * paginated responses, allowing users to query for specific invoices through + * their add_index. This can be done by using either the first_index_offset or + * last_index_offset fields included in the response as the index_offset of the + * next request. By default, the first 100 invoices created will be returned. + * Backwards pagination is also supported through the Reversed flag. + */ + listInvoices( + request?: DeepPartial + ): Promise; + /** + * lncli: `lookupinvoice` + * LookupInvoice attempts to look up an invoice according to its payment hash. + * The passed payment hash *must* be exactly 32 bytes, if not, an error is + * returned. + */ + lookupInvoice(request?: DeepPartial): Promise; + /** + * SubscribeInvoices returns a uni-directional stream (server -> client) for + * notifying the client of newly added/settled invoices. The caller can + * optionally specify the add_index and/or the settle_index. If the add_index + * is specified, then we'll first start by sending add invoice events for all + * invoices with an add_index greater than the specified value. If the + * settle_index is specified, the next, we'll send out all settle events for + * invoices with a settle_index greater than the specified value. One or both + * of these fields can be set. If no fields are set, then we'll only send out + * the latest add/settle events. + */ + subscribeInvoices( + request?: DeepPartial, + onMessage?: (msg: Invoice) => void, + onError?: (err: Error) => void + ): void; + /** + * lncli: `decodepayreq` + * DecodePayReq takes an encoded payment request string and attempts to decode + * it, returning a full description of the conditions encoded within the + * payment request. + */ + decodePayReq(request?: DeepPartial): Promise; + /** + * lncli: `listpayments` + * ListPayments returns a list of all outgoing payments. + */ + listPayments( + request?: DeepPartial + ): Promise; + /** + * DeletePayment deletes an outgoing payment from DB. Note that it will not + * attempt to delete an In-Flight payment, since that would be unsafe. + */ + deletePayment( + request?: DeepPartial + ): Promise; + /** + * DeleteAllPayments deletes all outgoing payments from DB. Note that it will + * not attempt to delete In-Flight payments, since that would be unsafe. + */ + deleteAllPayments( + request?: DeepPartial + ): Promise; + /** + * lncli: `describegraph` + * DescribeGraph returns a description of the latest graph state from the + * point of view of the node. The graph information is partitioned into two + * components: all the nodes/vertexes, and all the edges that connect the + * vertexes themselves. As this is a directed graph, the edges also contain + * the node directional specific routing policy which includes: the time lock + * delta, fee information, etc. + */ + describeGraph( + request?: DeepPartial + ): Promise; + /** + * lncli: `getnodemetrics` + * GetNodeMetrics returns node metrics calculated from the graph. Currently + * the only supported metric is betweenness centrality of individual nodes. + */ + getNodeMetrics( + request?: DeepPartial + ): Promise; + /** + * lncli: `getchaninfo` + * GetChanInfo returns the latest authenticated network announcement for the + * given channel identified by its channel ID: an 8-byte integer which + * uniquely identifies the location of transaction's funding output within the + * blockchain. + */ + getChanInfo(request?: DeepPartial): Promise; + /** + * lncli: `getnodeinfo` + * GetNodeInfo returns the latest advertised, aggregated, and authenticated + * channel information for the specified node identified by its public key. + */ + getNodeInfo(request?: DeepPartial): Promise; + /** + * lncli: `queryroutes` + * QueryRoutes attempts to query the daemon's Channel Router for a possible + * route to a target destination capable of carrying a specific amount of + * satoshis. The returned route contains the full details required to craft and + * send an HTLC, also including the necessary information that should be + * present within the Sphinx packet encapsulated within the HTLC. + * + * When using REST, the `dest_custom_records` map type can be set by appending + * `&dest_custom_records[]=` + * to the URL. Unfortunately this map type doesn't appear in the REST API + * documentation because of a bug in the grpc-gateway library. + */ + queryRoutes( + request?: DeepPartial + ): Promise; + /** + * lncli: `getnetworkinfo` + * GetNetworkInfo returns some basic stats about the known channel graph from + * the point of view of the node. + */ + getNetworkInfo( + request?: DeepPartial + ): Promise; + /** + * lncli: `stop` + * StopDaemon will send a shutdown request to the interrupt handler, triggering + * a graceful shutdown of the daemon. + */ + stopDaemon(request?: DeepPartial): Promise; + /** + * SubscribeChannelGraph launches a streaming RPC that allows the caller to + * receive notifications upon any changes to the channel graph topology from + * the point of view of the responding node. Events notified include: new + * nodes coming online, nodes updating their authenticated attributes, new + * channels being advertised, updates in the routing policy for a directional + * channel edge, and when channels are closed on-chain. + */ + subscribeChannelGraph( + request?: DeepPartial, + onMessage?: (msg: GraphTopologyUpdate) => void, + onError?: (err: Error) => void + ): void; + /** + * lncli: `debuglevel` + * DebugLevel allows a caller to programmatically set the logging verbosity of + * lnd. The logging can be targeted according to a coarse daemon-wide logging + * level, or in a granular fashion to specify the logging for a target + * sub-system. + */ + debugLevel( + request?: DeepPartial + ): Promise; + /** + * lncli: `feereport` + * FeeReport allows the caller to obtain a report detailing the current fee + * schedule enforced by the node globally for each channel. + */ + feeReport( + request?: DeepPartial + ): Promise; + /** + * lncli: `updatechanpolicy` + * UpdateChannelPolicy allows the caller to update the fee schedule and + * channel policies for all channels globally, or a particular channel. + */ + updateChannelPolicy( + request?: DeepPartial + ): Promise; + /** + * lncli: `fwdinghistory` + * ForwardingHistory allows the caller to query the htlcswitch for a record of + * all HTLCs forwarded within the target time range, and integer offset + * within that time range, for a maximum number of events. If no maximum number + * of events is specified, up to 100 events will be returned. If no time-range + * is specified, then events will be returned in the order that they occured. + * + * A list of forwarding events are returned. The size of each forwarding event + * is 40 bytes, and the max message size able to be returned in gRPC is 4 MiB. + * As a result each message can only contain 50k entries. Each response has + * the index offset of the last entry. The index offset can be provided to the + * request to allow the caller to skip a series of records. + */ + forwardingHistory( + request?: DeepPartial + ): Promise; + /** + * lncli: `exportchanbackup` + * ExportChannelBackup attempts to return an encrypted static channel backup + * for the target channel identified by it channel point. The backup is + * encrypted with a key generated from the aezeed seed of the user. The + * returned backup can either be restored using the RestoreChannelBackup + * method once lnd is running, or via the InitWallet and UnlockWallet methods + * from the WalletUnlocker service. + */ + exportChannelBackup( + request?: DeepPartial + ): Promise; + /** + * ExportAllChannelBackups returns static channel backups for all existing + * channels known to lnd. A set of regular singular static channel backups for + * each channel are returned. Additionally, a multi-channel backup is returned + * as well, which contains a single encrypted blob containing the backups of + * each channel. + */ + exportAllChannelBackups( + request?: DeepPartial + ): Promise; + /** + * VerifyChanBackup allows a caller to verify the integrity of a channel backup + * snapshot. This method will accept either a packed Single or a packed Multi. + * Specifying both will result in an error. + */ + verifyChanBackup( + request?: DeepPartial + ): Promise; + /** + * lncli: `restorechanbackup` + * RestoreChannelBackups accepts a set of singular channel backups, or a + * single encrypted multi-chan backup and attempts to recover any funds + * remaining within the channel. If we are able to unpack the backup, then the + * new channel will be shown under listchannels, as well as pending channels. + */ + restoreChannelBackups( + request?: DeepPartial + ): Promise; + /** + * SubscribeChannelBackups allows a client to sub-subscribe to the most up to + * date information concerning the state of all channel backups. Each time a + * new channel is added, we return the new set of channels, along with a + * multi-chan backup containing the backup info for all channels. Each time a + * channel is closed, we send a new update, which contains new new chan back + * ups, but the updated set of encrypted multi-chan backups with the closed + * channel(s) removed. + */ + subscribeChannelBackups( + request?: DeepPartial, + onMessage?: (msg: ChanBackupSnapshot) => void, + onError?: (err: Error) => void + ): void; + /** + * lncli: `bakemacaroon` + * BakeMacaroon allows the creation of a new macaroon with custom read and + * write permissions. No first-party caveats are added since this can be done + * offline. + */ + bakeMacaroon( + request?: DeepPartial + ): Promise; + /** + * lncli: `listmacaroonids` + * ListMacaroonIDs returns all root key IDs that are in use. + */ + listMacaroonIDs( + request?: DeepPartial + ): Promise; + /** + * lncli: `deletemacaroonid` + * DeleteMacaroonID deletes the specified macaroon ID and invalidates all + * macaroons derived from that ID. + */ + deleteMacaroonID( + request?: DeepPartial + ): Promise; + /** + * lncli: `listpermissions` + * ListPermissions lists all RPC method URIs and their required macaroon + * permissions to access them. + */ + listPermissions( + request?: DeepPartial + ): Promise; + /** + * CheckMacaroonPermissions checks whether a request follows the constraints + * imposed on the macaroon and that the macaroon is authorized to follow the + * provided permissions. + */ + checkMacaroonPermissions( + request?: DeepPartial + ): Promise; + /** + * RegisterRPCMiddleware adds a new gRPC middleware to the interceptor chain. A + * gRPC middleware is software component external to lnd that aims to add + * additional business logic to lnd by observing/intercepting/validating + * incoming gRPC client requests and (if needed) replacing/overwriting outgoing + * messages before they're sent to the client. When registering the middleware + * must identify itself and indicate what custom macaroon caveats it wants to + * be responsible for. Only requests that contain a macaroon with that specific + * custom caveat are then sent to the middleware for inspection. The other + * option is to register for the read-only mode in which all requests/responses + * are forwarded for interception to the middleware but the middleware is not + * allowed to modify any responses. As a security measure, _no_ middleware can + * modify responses for requests made with _unencumbered_ macaroons! + */ + registerRPCMiddleware( + request?: DeepPartial, + onMessage?: (msg: RPCMiddlewareRequest) => void, + onError?: (err: Error) => void + ): void; + /** + * lncli: `sendcustom` + * SendCustomMessage sends a custom peer message. + */ + sendCustomMessage( + request?: DeepPartial + ): Promise; + /** + * lncli: `subscribecustom` + * SubscribeCustomMessages subscribes to a stream of incoming custom peer + * messages. + */ + subscribeCustomMessages( + request?: DeepPartial, + onMessage?: (msg: CustomMessage) => void, + onError?: (err: Error) => void + ): void; +} + +type Builtin = + | Date + | Function + | Uint8Array + | string + | number + | boolean + | undefined; + +type DeepPartial = T extends Builtin + ? T + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in keyof T]?: DeepPartial } + : Partial; diff --git a/lib/types/proto/lnd/routerrpc/router.ts b/lib/types/proto/lnd/routerrpc/router.ts new file mode 100644 index 0000000..9ffd894 --- /dev/null +++ b/lib/types/proto/lnd/routerrpc/router.ts @@ -0,0 +1,742 @@ +/* eslint-disable */ +import type { + Failure_FailureCode, + RouteHint, + FeatureBit, + Route, + Failure, + HTLCAttempt, + ChannelPoint, + Payment +} from '../lightning'; + +export enum FailureDetail { + UNKNOWN = 'UNKNOWN', + NO_DETAIL = 'NO_DETAIL', + ONION_DECODE = 'ONION_DECODE', + LINK_NOT_ELIGIBLE = 'LINK_NOT_ELIGIBLE', + ON_CHAIN_TIMEOUT = 'ON_CHAIN_TIMEOUT', + HTLC_EXCEEDS_MAX = 'HTLC_EXCEEDS_MAX', + INSUFFICIENT_BALANCE = 'INSUFFICIENT_BALANCE', + INCOMPLETE_FORWARD = 'INCOMPLETE_FORWARD', + HTLC_ADD_FAILED = 'HTLC_ADD_FAILED', + FORWARDS_DISABLED = 'FORWARDS_DISABLED', + INVOICE_CANCELED = 'INVOICE_CANCELED', + INVOICE_UNDERPAID = 'INVOICE_UNDERPAID', + INVOICE_EXPIRY_TOO_SOON = 'INVOICE_EXPIRY_TOO_SOON', + INVOICE_NOT_OPEN = 'INVOICE_NOT_OPEN', + MPP_INVOICE_TIMEOUT = 'MPP_INVOICE_TIMEOUT', + ADDRESS_MISMATCH = 'ADDRESS_MISMATCH', + SET_TOTAL_MISMATCH = 'SET_TOTAL_MISMATCH', + SET_TOTAL_TOO_LOW = 'SET_TOTAL_TOO_LOW', + SET_OVERPAID = 'SET_OVERPAID', + UNKNOWN_INVOICE = 'UNKNOWN_INVOICE', + INVALID_KEYSEND = 'INVALID_KEYSEND', + MPP_IN_PROGRESS = 'MPP_IN_PROGRESS', + CIRCULAR_ROUTE = 'CIRCULAR_ROUTE', + UNRECOGNIZED = 'UNRECOGNIZED' +} + +export enum PaymentState { + /** IN_FLIGHT - Payment is still in flight. */ + IN_FLIGHT = 'IN_FLIGHT', + /** SUCCEEDED - Payment completed successfully. */ + SUCCEEDED = 'SUCCEEDED', + /** FAILED_TIMEOUT - There are more routes to try, but the payment timeout was exceeded. */ + FAILED_TIMEOUT = 'FAILED_TIMEOUT', + /** + * FAILED_NO_ROUTE - All possible routes were tried and failed permanently. Or were no + * routes to the destination at all. + */ + FAILED_NO_ROUTE = 'FAILED_NO_ROUTE', + /** FAILED_ERROR - A non-recoverable error has occured. */ + FAILED_ERROR = 'FAILED_ERROR', + /** + * FAILED_INCORRECT_PAYMENT_DETAILS - Payment details incorrect (unknown hash, invalid amt or + * invalid final cltv delta) + */ + FAILED_INCORRECT_PAYMENT_DETAILS = 'FAILED_INCORRECT_PAYMENT_DETAILS', + /** FAILED_INSUFFICIENT_BALANCE - Insufficient local balance. */ + FAILED_INSUFFICIENT_BALANCE = 'FAILED_INSUFFICIENT_BALANCE', + UNRECOGNIZED = 'UNRECOGNIZED' +} + +export enum ResolveHoldForwardAction { + SETTLE = 'SETTLE', + FAIL = 'FAIL', + RESUME = 'RESUME', + UNRECOGNIZED = 'UNRECOGNIZED' +} + +export enum ChanStatusAction { + ENABLE = 'ENABLE', + DISABLE = 'DISABLE', + AUTO = 'AUTO', + UNRECOGNIZED = 'UNRECOGNIZED' +} + +export interface SendPaymentRequest { + /** The identity pubkey of the payment recipient */ + dest: Uint8Array | string; + /** + * Number of satoshis to send. + * + * The fields amt and amt_msat are mutually exclusive. + */ + amt: string; + /** + * Number of millisatoshis to send. + * + * The fields amt and amt_msat are mutually exclusive. + */ + amtMsat: string; + /** The hash to use within the payment's HTLC */ + paymentHash: Uint8Array | string; + /** + * The CLTV delta from the current height that should be used to set the + * timelock for the final hop. + */ + finalCltvDelta: number; + /** An optional payment addr to be included within the last hop of the route. */ + paymentAddr: Uint8Array | string; + /** + * A bare-bones invoice for a payment within the Lightning Network. With the + * details of the invoice, the sender has all the data necessary to send a + * payment to the recipient. The amount in the payment request may be zero. In + * that case it is required to set the amt field as well. If no payment request + * is specified, the following fields are required: dest, amt and payment_hash. + */ + paymentRequest: string; + /** + * An upper limit on the amount of time we should spend when attempting to + * fulfill the payment. This is expressed in seconds. If we cannot make a + * successful payment within this time frame, an error will be returned. + * This field must be non-zero. + */ + timeoutSeconds: number; + /** + * The maximum number of satoshis that will be paid as a fee of the payment. + * If this field is left to the default value of 0, only zero-fee routes will + * be considered. This usually means single hop routes connecting directly to + * the destination. To send the payment without a fee limit, use max int here. + * + * The fields fee_limit_sat and fee_limit_msat are mutually exclusive. + */ + feeLimitSat: string; + /** + * The maximum number of millisatoshis that will be paid as a fee of the + * payment. If this field is left to the default value of 0, only zero-fee + * routes will be considered. This usually means single hop routes connecting + * directly to the destination. To send the payment without a fee limit, use + * max int here. + * + * The fields fee_limit_sat and fee_limit_msat are mutually exclusive. + */ + feeLimitMsat: string; + /** + * Deprecated, use outgoing_chan_ids. The channel id of the channel that must + * be taken to the first hop. If zero, any channel may be used (unless + * outgoing_chan_ids are set). + * + * @deprecated + */ + outgoingChanId: string; + /** + * The channel ids of the channels are allowed for the first hop. If empty, + * any channel may be used. + */ + outgoingChanIds: string[]; + /** The pubkey of the last hop of the route. If empty, any hop may be used. */ + lastHopPubkey: Uint8Array | string; + /** + * An optional maximum total time lock for the route. This should not exceed + * lnd's `--max-cltv-expiry` setting. If zero, then the value of + * `--max-cltv-expiry` is enforced. + */ + cltvLimit: number; + /** Optional route hints to reach the destination through private channels. */ + routeHints: RouteHint[]; + /** + * An optional field that can be used to pass an arbitrary set of TLV records + * to a peer which understands the new records. This can be used to pass + * application specific data during the payment attempt. Record types are + * required to be in the custom range >= 65536. When using REST, the values + * must be encoded as base64. + */ + destCustomRecords: { [key: string]: Uint8Array | string }; + /** If set, circular payments to self are permitted. */ + allowSelfPayment: boolean; + /** + * Features assumed to be supported by the final node. All transitive feature + * dependencies must also be set properly. For a given feature bit pair, either + * optional or remote may be set, but not both. If this field is nil or empty, + * the router will try to load destination features from the graph as a + * fallback. + */ + destFeatures: FeatureBit[]; + /** + * The maximum number of partial payments that may be use to complete the full + * amount. + */ + maxParts: number; + /** + * If set, only the final payment update is streamed back. Intermediate updates + * that show which htlcs are still in flight are suppressed. + */ + noInflightUpdates: boolean; + /** + * The largest payment split that should be attempted when making a payment if + * splitting is necessary. Setting this value will effectively cause lnd to + * split more aggressively, vs only when it thinks it needs to. Note that this + * value is in milli-satoshis. + */ + maxShardSizeMsat: string; + /** If set, an AMP-payment will be attempted. */ + amp: boolean; +} + +export interface SendPaymentRequest_DestCustomRecordsEntry { + key: string; + value: Uint8Array | string; +} + +export interface TrackPaymentRequest { + /** The hash of the payment to look up. */ + paymentHash: Uint8Array | string; + /** + * If set, only the final payment update is streamed back. Intermediate updates + * that show which htlcs are still in flight are suppressed. + */ + noInflightUpdates: boolean; +} + +export interface RouteFeeRequest { + /** The destination once wishes to obtain a routing fee quote to. */ + dest: Uint8Array | string; + /** The amount one wishes to send to the target destination. */ + amtSat: string; +} + +export interface RouteFeeResponse { + /** + * A lower bound of the estimated fee to the target destination within the + * network, expressed in milli-satoshis. + */ + routingFeeMsat: string; + /** + * An estimate of the worst case time delay that can occur. Note that callers + * will still need to factor in the final CLTV delta of the last hop into this + * value. + */ + timeLockDelay: string; +} + +export interface SendToRouteRequest { + /** The payment hash to use for the HTLC. */ + paymentHash: Uint8Array | string; + /** Route that should be used to attempt to complete the payment. */ + route: Route | undefined; +} + +export interface SendToRouteResponse { + /** The preimage obtained by making the payment. */ + preimage: Uint8Array | string; + /** The failure message in case the payment failed. */ + failure: Failure | undefined; +} + +export interface ResetMissionControlRequest {} + +export interface ResetMissionControlResponse {} + +export interface QueryMissionControlRequest {} + +/** QueryMissionControlResponse contains mission control state. */ +export interface QueryMissionControlResponse { + /** Node pair-level mission control state. */ + pairs: PairHistory[]; +} + +export interface XImportMissionControlRequest { + /** Node pair-level mission control state to be imported. */ + pairs: PairHistory[]; + /** + * Whether to force override MC pair history. Note that even with force + * override the failure pair is imported before the success pair and both + * still clamp existing failure/success amounts. + */ + force: boolean; +} + +export interface XImportMissionControlResponse {} + +/** PairHistory contains the mission control state for a particular node pair. */ +export interface PairHistory { + /** The source node pubkey of the pair. */ + nodeFrom: Uint8Array | string; + /** The destination node pubkey of the pair. */ + nodeTo: Uint8Array | string; + history: PairData | undefined; +} + +export interface PairData { + /** Time of last failure. */ + failTime: string; + /** + * Lowest amount that failed to forward rounded to whole sats. This may be + * set to zero if the failure is independent of amount. + */ + failAmtSat: string; + /** + * Lowest amount that failed to forward in millisats. This may be + * set to zero if the failure is independent of amount. + */ + failAmtMsat: string; + /** Time of last success. */ + successTime: string; + /** Highest amount that we could successfully forward rounded to whole sats. */ + successAmtSat: string; + /** Highest amount that we could successfully forward in millisats. */ + successAmtMsat: string; +} + +export interface GetMissionControlConfigRequest {} + +export interface GetMissionControlConfigResponse { + /** Mission control's currently active config. */ + config: MissionControlConfig | undefined; +} + +export interface SetMissionControlConfigRequest { + /** + * The config to set for mission control. Note that all values *must* be set, + * because the full config will be applied. + */ + config: MissionControlConfig | undefined; +} + +export interface SetMissionControlConfigResponse {} + +export interface MissionControlConfig { + /** + * The amount of time mission control will take to restore a penalized node + * or channel back to 50% success probability, expressed in seconds. Setting + * this value to a higher value will penalize failures for longer, making + * mission control less likely to route through nodes and channels that we + * have previously recorded failures for. + */ + halfLifeSeconds: string; + /** + * The probability of success mission control should assign to hop in a route + * where it has no other information available. Higher values will make mission + * control more willing to try hops that we have no information about, lower + * values will discourage trying these hops. + */ + hopProbability: number; + /** + * The importance that mission control should place on historical results, + * expressed as a value in [0;1]. Setting this value to 1 will ignore all + * historical payments and just use the hop probability to assess the + * probability of success for each hop. A zero value ignores hop probability + * completely and relies entirely on historical results, unless none are + * available. + */ + weight: number; + /** The maximum number of payment results that mission control will store. */ + maximumPaymentResults: number; + /** + * The minimum time that must have passed since the previously recorded failure + * before we raise the failure amount. + */ + minimumFailureRelaxInterval: string; +} + +export interface QueryProbabilityRequest { + /** The source node pubkey of the pair. */ + fromNode: Uint8Array | string; + /** The destination node pubkey of the pair. */ + toNode: Uint8Array | string; + /** The amount for which to calculate a probability. */ + amtMsat: string; +} + +export interface QueryProbabilityResponse { + /** The success probability for the requested pair. */ + probability: number; + /** The historical data for the requested pair. */ + history: PairData | undefined; +} + +export interface BuildRouteRequest { + /** + * The amount to send expressed in msat. If set to zero, the minimum routable + * amount is used. + */ + amtMsat: string; + /** + * CLTV delta from the current height that should be used for the timelock + * of the final hop + */ + finalCltvDelta: number; + /** + * The channel id of the channel that must be taken to the first hop. If zero, + * any channel may be used. + */ + outgoingChanId: string; + /** + * A list of hops that defines the route. This does not include the source hop + * pubkey. + */ + hopPubkeys: Uint8Array | string[]; + /** An optional payment addr to be included within the last hop of the route. */ + paymentAddr: Uint8Array | string; +} + +export interface BuildRouteResponse { + /** Fully specified route that can be used to execute the payment. */ + route: Route | undefined; +} + +export interface SubscribeHtlcEventsRequest {} + +/** + * HtlcEvent contains the htlc event that was processed. These are served on a + * best-effort basis; events are not persisted, delivery is not guaranteed + * (in the event of a crash in the switch, forward events may be lost) and + * some events may be replayed upon restart. Events consumed from this package + * should be de-duplicated by the htlc's unique combination of incoming and + * outgoing channel id and htlc id. [EXPERIMENTAL] + */ +export interface HtlcEvent { + /** + * The short channel id that the incoming htlc arrived at our node on. This + * value is zero for sends. + */ + incomingChannelId: string; + /** + * The short channel id that the outgoing htlc left our node on. This value + * is zero for receives. + */ + outgoingChannelId: string; + /** + * Incoming id is the index of the incoming htlc in the incoming channel. + * This value is zero for sends. + */ + incomingHtlcId: string; + /** + * Outgoing id is the index of the outgoing htlc in the outgoing channel. + * This value is zero for receives. + */ + outgoingHtlcId: string; + /** The time in unix nanoseconds that the event occurred. */ + timestampNs: string; + /** + * The event type indicates whether the htlc was part of a send, receive or + * forward. + */ + eventType: HtlcEvent_EventType; + forwardEvent: ForwardEvent | undefined; + forwardFailEvent: ForwardFailEvent | undefined; + settleEvent: SettleEvent | undefined; + linkFailEvent: LinkFailEvent | undefined; +} + +export enum HtlcEvent_EventType { + UNKNOWN = 'UNKNOWN', + SEND = 'SEND', + RECEIVE = 'RECEIVE', + FORWARD = 'FORWARD', + UNRECOGNIZED = 'UNRECOGNIZED' +} + +export interface HtlcInfo { + /** The timelock on the incoming htlc. */ + incomingTimelock: number; + /** The timelock on the outgoing htlc. */ + outgoingTimelock: number; + /** The amount of the incoming htlc. */ + incomingAmtMsat: string; + /** The amount of the outgoing htlc. */ + outgoingAmtMsat: string; +} + +export interface ForwardEvent { + /** Info contains details about the htlc that was forwarded. */ + info: HtlcInfo | undefined; +} + +export interface ForwardFailEvent {} + +export interface SettleEvent { + /** The revealed preimage. */ + preimage: Uint8Array | string; +} + +export interface LinkFailEvent { + /** Info contains details about the htlc that we failed. */ + info: HtlcInfo | undefined; + /** FailureCode is the BOLT error code for the failure. */ + wireFailure: Failure_FailureCode; + /** + * FailureDetail provides additional information about the reason for the + * failure. This detail enriches the information provided by the wire message + * and may be 'no detail' if the wire message requires no additional metadata. + */ + failureDetail: FailureDetail; + /** A string representation of the link failure. */ + failureString: string; +} + +export interface PaymentStatus { + /** Current state the payment is in. */ + state: PaymentState; + /** The pre-image of the payment when state is SUCCEEDED. */ + preimage: Uint8Array | string; + /** The HTLCs made in attempt to settle the payment [EXPERIMENTAL]. */ + htlcs: HTLCAttempt[]; +} + +export interface CircuitKey { + /** / The id of the channel that the is part of this circuit. */ + chanId: string; + /** / The index of the incoming htlc in the incoming channel. */ + htlcId: string; +} + +export interface ForwardHtlcInterceptRequest { + /** + * The key of this forwarded htlc. It defines the incoming channel id and + * the index in this channel. + */ + incomingCircuitKey: CircuitKey | undefined; + /** The incoming htlc amount. */ + incomingAmountMsat: string; + /** The incoming htlc expiry. */ + incomingExpiry: number; + /** + * The htlc payment hash. This value is not guaranteed to be unique per + * request. + */ + paymentHash: Uint8Array | string; + /** + * The requested outgoing channel id for this forwarded htlc. Because of + * non-strict forwarding, this isn't necessarily the channel over which the + * packet will be forwarded eventually. A different channel to the same peer + * may be selected as well. + */ + outgoingRequestedChanId: string; + /** The outgoing htlc amount. */ + outgoingAmountMsat: string; + /** The outgoing htlc expiry. */ + outgoingExpiry: number; + /** Any custom records that were present in the payload. */ + customRecords: { [key: string]: Uint8Array | string }; + /** The onion blob for the next hop */ + onionBlob: Uint8Array | string; +} + +export interface ForwardHtlcInterceptRequest_CustomRecordsEntry { + key: string; + value: Uint8Array | string; +} + +/** + * ForwardHtlcInterceptResponse enables the caller to resolve a previously hold + * forward. The caller can choose either to: + * - `Resume`: Execute the default behavior (usually forward). + * - `Reject`: Fail the htlc backwards. + * - `Settle`: Settle this htlc with a given preimage. + */ +export interface ForwardHtlcInterceptResponse { + /** + * The key of this forwarded htlc. It defines the incoming channel id and + * the index in this channel. + */ + incomingCircuitKey: CircuitKey | undefined; + /** The resolve action for this intercepted htlc. */ + action: ResolveHoldForwardAction; + /** The preimage in case the resolve action is Settle. */ + preimage: Uint8Array | string; +} + +export interface UpdateChanStatusRequest { + chanPoint: ChannelPoint | undefined; + action: ChanStatusAction; +} + +export interface UpdateChanStatusResponse {} + +/** + * Router is a service that offers advanced interaction with the router + * subsystem of the daemon. + */ +export interface Router { + /** + * SendPaymentV2 attempts to route a payment described by the passed + * PaymentRequest to the final destination. The call returns a stream of + * payment updates. + */ + sendPaymentV2( + request?: DeepPartial, + onMessage?: (msg: Payment) => void, + onError?: (err: Error) => void + ): void; + /** + * TrackPaymentV2 returns an update stream for the payment identified by the + * payment hash. + */ + trackPaymentV2( + request?: DeepPartial, + onMessage?: (msg: Payment) => void, + onError?: (err: Error) => void + ): void; + /** + * EstimateRouteFee allows callers to obtain a lower bound w.r.t how much it + * may cost to send an HTLC to the target end destination. + */ + estimateRouteFee( + request?: DeepPartial + ): Promise; + /** + * Deprecated, use SendToRouteV2. SendToRoute attempts to make a payment via + * the specified route. This method differs from SendPayment in that it + * allows users to specify a full route manually. This can be used for + * things like rebalancing, and atomic swaps. It differs from the newer + * SendToRouteV2 in that it doesn't return the full HTLC information. + * + * @deprecated + */ + sendToRoute( + request?: DeepPartial + ): Promise; + /** + * SendToRouteV2 attempts to make a payment via the specified route. This + * method differs from SendPayment in that it allows users to specify a full + * route manually. This can be used for things like rebalancing, and atomic + * swaps. + */ + sendToRouteV2( + request?: DeepPartial + ): Promise; + /** + * ResetMissionControl clears all mission control state and starts with a clean + * slate. + */ + resetMissionControl( + request?: DeepPartial + ): Promise; + /** + * QueryMissionControl exposes the internal mission control state to callers. + * It is a development feature. + */ + queryMissionControl( + request?: DeepPartial + ): Promise; + /** + * XImportMissionControl is an experimental API that imports the state provided + * to the internal mission control's state, using all results which are more + * recent than our existing values. These values will only be imported + * in-memory, and will not be persisted across restarts. + */ + xImportMissionControl( + request?: DeepPartial + ): Promise; + /** GetMissionControlConfig returns mission control's current config. */ + getMissionControlConfig( + request?: DeepPartial + ): Promise; + /** + * SetMissionControlConfig will set mission control's config, if the config + * provided is valid. + */ + setMissionControlConfig( + request?: DeepPartial + ): Promise; + /** + * QueryProbability returns the current success probability estimate for a + * given node pair and amount. + */ + queryProbability( + request?: DeepPartial + ): Promise; + /** + * BuildRoute builds a fully specified route based on a list of hop public + * keys. It retrieves the relevant channel policies from the graph in order to + * calculate the correct fees and time locks. + */ + buildRoute( + request?: DeepPartial + ): Promise; + /** + * SubscribeHtlcEvents creates a uni-directional stream from the server to + * the client which delivers a stream of htlc events. + */ + subscribeHtlcEvents( + request?: DeepPartial, + onMessage?: (msg: HtlcEvent) => void, + onError?: (err: Error) => void + ): void; + /** + * Deprecated, use SendPaymentV2. SendPayment attempts to route a payment + * described by the passed PaymentRequest to the final destination. The call + * returns a stream of payment status updates. + * + * @deprecated + */ + sendPayment( + request?: DeepPartial, + onMessage?: (msg: PaymentStatus) => void, + onError?: (err: Error) => void + ): void; + /** + * Deprecated, use TrackPaymentV2. TrackPayment returns an update stream for + * the payment identified by the payment hash. + * + * @deprecated + */ + trackPayment( + request?: DeepPartial, + onMessage?: (msg: PaymentStatus) => void, + onError?: (err: Error) => void + ): void; + /** + * HtlcInterceptor dispatches a bi-directional streaming RPC in which + * Forwarded HTLC requests are sent to the client and the client responds with + * a boolean that tells LND if this htlc should be intercepted. + * In case of interception, the htlc can be either settled, cancelled or + * resumed later by using the ResolveHoldForward endpoint. + */ + htlcInterceptor( + request?: DeepPartial, + onMessage?: (msg: ForwardHtlcInterceptRequest) => void, + onError?: (err: Error) => void + ): void; + /** + * UpdateChanStatus attempts to manually set the state of a channel + * (enabled, disabled, or auto). A manual "disable" request will cause the + * channel to stay disabled until a subsequent manual request of either + * "enable" or "auto". + */ + updateChanStatus( + request?: DeepPartial + ): Promise; +} + +type Builtin = + | Date + | Function + | Uint8Array + | string + | number + | boolean + | undefined; + +type DeepPartial = T extends Builtin + ? T + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in keyof T]?: DeepPartial } + : Partial; diff --git a/lib/types/proto/lnd/signrpc/signer.ts b/lib/types/proto/lnd/signrpc/signer.ts new file mode 100644 index 0000000..9702d5c --- /dev/null +++ b/lib/types/proto/lnd/signrpc/signer.ts @@ -0,0 +1,252 @@ +/* eslint-disable */ +export interface KeyLocator { + /** The family of key being identified. */ + keyFamily: number; + /** The precise index of the key being identified. */ + keyIndex: number; +} + +export interface KeyDescriptor { + /** + * The raw bytes of the public key in the key pair being identified. Either + * this or the KeyLocator must be specified. + */ + rawKeyBytes: Uint8Array | string; + /** + * The key locator that identifies which private key to use for signing. + * Either this or the raw bytes of the target public key must be specified. + */ + keyLoc: KeyLocator | undefined; +} + +export interface TxOut { + /** The value of the output being spent. */ + value: string; + /** The script of the output being spent. */ + pkScript: Uint8Array | string; +} + +export interface SignDescriptor { + /** + * A descriptor that precisely describes *which* key to use for signing. This + * may provide the raw public key directly, or require the Signer to re-derive + * the key according to the populated derivation path. + * + * Note that if the key descriptor was obtained through walletrpc.DeriveKey, + * then the key locator MUST always be provided, since the derived keys are not + * persisted unlike with DeriveNextKey. + */ + keyDesc: KeyDescriptor | undefined; + /** + * A scalar value that will be added to the private key corresponding to the + * above public key to obtain the private key to be used to sign this input. + * This value is typically derived via the following computation: + * + * derivedKey = privkey + sha256(perCommitmentPoint || pubKey) mod N + */ + singleTweak: Uint8Array | string; + /** + * A private key that will be used in combination with its corresponding + * private key to derive the private key that is to be used to sign the target + * input. Within the Lightning protocol, this value is typically the + * commitment secret from a previously revoked commitment transaction. This + * value is in combination with two hash values, and the original private key + * to derive the private key to be used when signing. + * + * k = (privKey*sha256(pubKey || tweakPub) + + * tweakPriv*sha256(tweakPub || pubKey)) mod N + */ + doubleTweak: Uint8Array | string; + /** + * The full script required to properly redeem the output. This field will + * only be populated if a p2wsh or a p2sh output is being signed. + */ + witnessScript: Uint8Array | string; + /** + * A description of the output being spent. The value and script MUST be + * provided. + */ + output: TxOut | undefined; + /** + * The target sighash type that should be used when generating the final + * sighash, and signature. + */ + sighash: number; + /** The target input within the transaction that should be signed. */ + inputIndex: number; +} + +export interface SignReq { + /** The raw bytes of the transaction to be signed. */ + rawTxBytes: Uint8Array | string; + /** A set of sign descriptors, for each input to be signed. */ + signDescs: SignDescriptor[]; +} + +export interface SignResp { + /** + * A set of signatures realized in a fixed 64-byte format ordered in ascending + * input order. + */ + rawSigs: Uint8Array | string[]; +} + +export interface InputScript { + /** The serializes witness stack for the specified input. */ + witness: Uint8Array | string[]; + /** + * The optional sig script for the specified witness that will only be set if + * the input specified is a nested p2sh witness program. + */ + sigScript: Uint8Array | string; +} + +export interface InputScriptResp { + /** The set of fully valid input scripts requested. */ + inputScripts: InputScript[]; +} + +export interface SignMessageReq { + /** The message to be signed. */ + msg: Uint8Array | string; + /** The key locator that identifies which key to use for signing. */ + keyLoc: KeyLocator | undefined; + /** Double-SHA256 hash instead of just the default single round. */ + doubleHash: boolean; + /** + * Use the compact (pubkey recoverable) format instead of the raw lnwire + * format. + */ + compactSig: boolean; +} + +export interface SignMessageResp { + /** The signature for the given message in the fixed-size LN wire format. */ + signature: Uint8Array | string; +} + +export interface VerifyMessageReq { + /** The message over which the signature is to be verified. */ + msg: Uint8Array | string; + /** + * The fixed-size LN wire encoded signature to be verified over the given + * message. + */ + signature: Uint8Array | string; + /** The public key the signature has to be valid for. */ + pubkey: Uint8Array | string; +} + +export interface VerifyMessageResp { + /** Whether the signature was valid over the given message. */ + valid: boolean; +} + +export interface SharedKeyRequest { + /** The ephemeral public key to use for the DH key derivation. */ + ephemeralPubkey: Uint8Array | string; + /** + * Deprecated. The optional key locator of the local key that should be used. + * If this parameter is not set then the node's identity private key will be + * used. + * + * @deprecated + */ + keyLoc: KeyLocator | undefined; + /** + * A key descriptor describes the key used for performing ECDH. Either a key + * locator or a raw public key is expected, if neither is supplied, defaults to + * the node's identity private key. + */ + keyDesc: KeyDescriptor | undefined; +} + +export interface SharedKeyResponse { + /** The shared public key, hashed with sha256. */ + sharedKey: Uint8Array | string; +} + +/** + * Signer is a service that gives access to the signing functionality of the + * daemon's wallet. + */ +export interface Signer { + /** + * SignOutputRaw is a method that can be used to generated a signature for a + * set of inputs/outputs to a transaction. Each request specifies details + * concerning how the outputs should be signed, which keys they should be + * signed with, and also any optional tweaks. The return value is a fixed + * 64-byte signature (the same format as we use on the wire in Lightning). + * + * If we are unable to sign using the specified keys, then an error will be + * returned. + */ + signOutputRaw(request?: DeepPartial): Promise; + /** + * ComputeInputScript generates a complete InputIndex for the passed + * transaction with the signature as defined within the passed SignDescriptor. + * This method should be capable of generating the proper input script for + * both regular p2wkh output and p2wkh outputs nested within a regular p2sh + * output. + * + * Note that when using this method to sign inputs belonging to the wallet, + * the only items of the SignDescriptor that need to be populated are pkScript + * in the TxOut field, the value in that same field, and finally the input + * index. + */ + computeInputScript( + request?: DeepPartial + ): Promise; + /** + * SignMessage signs a message with the key specified in the key locator. The + * returned signature is fixed-size LN wire format encoded. + * + * The main difference to SignMessage in the main RPC is that a specific key is + * used to sign the message instead of the node identity private key. + */ + signMessage( + request?: DeepPartial + ): Promise; + /** + * VerifyMessage verifies a signature over a message using the public key + * provided. The signature must be fixed-size LN wire format encoded. + * + * The main difference to VerifyMessage in the main RPC is that the public key + * used to sign the message does not have to be a node known to the network. + */ + verifyMessage( + request?: DeepPartial + ): Promise; + /** + * DeriveSharedKey returns a shared secret key by performing Diffie-Hellman key + * derivation between the ephemeral public key in the request and the node's + * key specified in the key_desc parameter. Either a key locator or a raw + * public key is expected in the key_desc, if neither is supplied, defaults to + * the node's identity private key: + * P_shared = privKeyNode * ephemeralPubkey + * The resulting shared public key is serialized in the compressed format and + * hashed with sha256, resulting in the final key length of 256bit. + */ + deriveSharedKey( + request?: DeepPartial + ): Promise; +} + +type Builtin = + | Date + | Function + | Uint8Array + | string + | number + | boolean + | undefined; + +type DeepPartial = T extends Builtin + ? T + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in keyof T]?: DeepPartial } + : Partial; diff --git a/lib/types/proto/lnd/walletrpc/walletkit.ts b/lib/types/proto/lnd/walletrpc/walletkit.ts new file mode 100644 index 0000000..26d7e02 --- /dev/null +++ b/lib/types/proto/lnd/walletrpc/walletkit.ts @@ -0,0 +1,814 @@ +/* eslint-disable */ +import type { Utxo, OutPoint, TransactionDetails } from '../lightning'; +import type { TxOut, KeyDescriptor, KeyLocator } from '../signrpc/signer'; + +export enum AddressType { + UNKNOWN = 'UNKNOWN', + WITNESS_PUBKEY_HASH = 'WITNESS_PUBKEY_HASH', + NESTED_WITNESS_PUBKEY_HASH = 'NESTED_WITNESS_PUBKEY_HASH', + HYBRID_NESTED_WITNESS_PUBKEY_HASH = 'HYBRID_NESTED_WITNESS_PUBKEY_HASH', + UNRECOGNIZED = 'UNRECOGNIZED' +} + +export enum WitnessType { + UNKNOWN_WITNESS = 'UNKNOWN_WITNESS', + /** + * COMMITMENT_TIME_LOCK - A witness that allows us to spend the output of a commitment transaction + * after a relative lock-time lockout. + */ + COMMITMENT_TIME_LOCK = 'COMMITMENT_TIME_LOCK', + /** + * COMMITMENT_NO_DELAY - A witness that allows us to spend a settled no-delay output immediately on a + * counterparty's commitment transaction. + */ + COMMITMENT_NO_DELAY = 'COMMITMENT_NO_DELAY', + /** + * COMMITMENT_REVOKE - A witness that allows us to sweep the settled output of a malicious + * counterparty's who broadcasts a revoked commitment transaction. + */ + COMMITMENT_REVOKE = 'COMMITMENT_REVOKE', + /** + * HTLC_OFFERED_REVOKE - A witness that allows us to sweep an HTLC which we offered to the remote + * party in the case that they broadcast a revoked commitment state. + */ + HTLC_OFFERED_REVOKE = 'HTLC_OFFERED_REVOKE', + /** + * HTLC_ACCEPTED_REVOKE - A witness that allows us to sweep an HTLC output sent to us in the case that + * the remote party broadcasts a revoked commitment state. + */ + HTLC_ACCEPTED_REVOKE = 'HTLC_ACCEPTED_REVOKE', + /** + * HTLC_OFFERED_TIMEOUT_SECOND_LEVEL - A witness that allows us to sweep an HTLC output that we extended to a + * party, but was never fulfilled. This HTLC output isn't directly on the + * commitment transaction, but is the result of a confirmed second-level HTLC + * transaction. As a result, we can only spend this after a CSV delay. + */ + HTLC_OFFERED_TIMEOUT_SECOND_LEVEL = 'HTLC_OFFERED_TIMEOUT_SECOND_LEVEL', + /** + * HTLC_ACCEPTED_SUCCESS_SECOND_LEVEL - A witness that allows us to sweep an HTLC output that was offered to us, and + * for which we have a payment preimage. This HTLC output isn't directly on our + * commitment transaction, but is the result of confirmed second-level HTLC + * transaction. As a result, we can only spend this after a CSV delay. + */ + HTLC_ACCEPTED_SUCCESS_SECOND_LEVEL = 'HTLC_ACCEPTED_SUCCESS_SECOND_LEVEL', + /** + * HTLC_OFFERED_REMOTE_TIMEOUT - A witness that allows us to sweep an HTLC that we offered to the remote + * party which lies in the commitment transaction of the remote party. We can + * spend this output after the absolute CLTV timeout of the HTLC as passed. + */ + HTLC_OFFERED_REMOTE_TIMEOUT = 'HTLC_OFFERED_REMOTE_TIMEOUT', + /** + * HTLC_ACCEPTED_REMOTE_SUCCESS - A witness that allows us to sweep an HTLC that was offered to us by the + * remote party. We use this witness in the case that the remote party goes to + * chain, and we know the pre-image to the HTLC. We can sweep this without any + * additional timeout. + */ + HTLC_ACCEPTED_REMOTE_SUCCESS = 'HTLC_ACCEPTED_REMOTE_SUCCESS', + /** + * HTLC_SECOND_LEVEL_REVOKE - A witness that allows us to sweep an HTLC from the remote party's commitment + * transaction in the case that the broadcast a revoked commitment, but then + * also immediately attempt to go to the second level to claim the HTLC. + */ + HTLC_SECOND_LEVEL_REVOKE = 'HTLC_SECOND_LEVEL_REVOKE', + /** + * WITNESS_KEY_HASH - A witness type that allows us to spend a regular p2wkh output that's sent to + * an output which is under complete control of the backing wallet. + */ + WITNESS_KEY_HASH = 'WITNESS_KEY_HASH', + /** + * NESTED_WITNESS_KEY_HASH - A witness type that allows us to sweep an output that sends to a nested P2SH + * script that pays to a key solely under our control. + */ + NESTED_WITNESS_KEY_HASH = 'NESTED_WITNESS_KEY_HASH', + /** + * COMMITMENT_ANCHOR - A witness type that allows us to spend our anchor on the commitment + * transaction. + */ + COMMITMENT_ANCHOR = 'COMMITMENT_ANCHOR', + UNRECOGNIZED = 'UNRECOGNIZED' +} + +export interface ListUnspentRequest { + /** The minimum number of confirmations to be included. */ + minConfs: number; + /** The maximum number of confirmations to be included. */ + maxConfs: number; + /** An optional filter to only include outputs belonging to an account. */ + account: string; +} + +export interface ListUnspentResponse { + /** A list of utxos satisfying the specified number of confirmations. */ + utxos: Utxo[]; +} + +export interface LeaseOutputRequest { + /** + * An ID of 32 random bytes that must be unique for each distinct application + * using this RPC which will be used to bound the output lease to. + */ + id: Uint8Array | string; + /** The identifying outpoint of the output being leased. */ + outpoint: OutPoint | undefined; + /** + * The time in seconds before the lock expires. If set to zero, the default + * lock duration is used. + */ + expirationSeconds: string; +} + +export interface LeaseOutputResponse { + /** The absolute expiration of the output lease represented as a unix timestamp. */ + expiration: string; +} + +export interface ReleaseOutputRequest { + /** The unique ID that was used to lock the output. */ + id: Uint8Array | string; + /** The identifying outpoint of the output being released. */ + outpoint: OutPoint | undefined; +} + +export interface ReleaseOutputResponse {} + +export interface KeyReq { + /** + * Is the key finger print of the root pubkey that this request is targeting. + * This allows the WalletKit to possibly serve out keys for multiple HD chains + * via public derivation. + */ + keyFingerPrint: number; + /** + * The target key family to derive a key from. In other contexts, this is + * known as the "account". + */ + keyFamily: number; +} + +export interface AddrRequest { + /** + * The name of the account to retrieve the next address of. If empty, the + * default wallet account is used. + */ + account: string; + /** The type of address to derive. */ + type: AddressType; + /** Whether a change address should be derived. */ + change: boolean; +} + +export interface AddrResponse { + /** The address encoded using a bech32 format. */ + addr: string; +} + +export interface Account { + /** The name used to identify the account. */ + name: string; + /** + * The type of addresses the account supports. + * AddressType | External Branch | Internal Branch + * --------------------------------------------------------------------- + * WITNESS_PUBKEY_HASH | P2WPKH | P2WPKH + * NESTED_WITNESS_PUBKEY_HASH | NP2WPKH | NP2WPKH + * HYBRID_NESTED_WITNESS_PUBKEY_HASH | NP2WPKH | P2WPKH + */ + addressType: AddressType; + /** + * The public key backing the account that all keys are derived from + * represented as an extended key. This will always be empty for the default + * imported account in which single public keys are imported into. + */ + extendedPublicKey: string; + /** + * The fingerprint of the root key from which the account public key was + * derived from. This will always be zero for the default imported account in + * which single public keys are imported into. The bytes are in big-endian + * order. + */ + masterKeyFingerprint: Uint8Array | string; + /** + * The derivation path corresponding to the account public key. This will + * always be empty for the default imported account in which single public keys + * are imported into. + */ + derivationPath: string; + /** + * The number of keys derived from the external branch of the account public + * key. This will always be zero for the default imported account in which + * single public keys are imported into. + */ + externalKeyCount: number; + /** + * The number of keys derived from the internal branch of the account public + * key. This will always be zero for the default imported account in which + * single public keys are imported into. + */ + internalKeyCount: number; + /** Whether the wallet stores private keys for the account. */ + watchOnly: boolean; +} + +export interface ListAccountsRequest { + /** An optional filter to only return accounts matching this name. */ + name: string; + /** An optional filter to only return accounts matching this address type. */ + addressType: AddressType; +} + +export interface ListAccountsResponse { + accounts: Account[]; +} + +export interface ImportAccountRequest { + /** A name to identify the account with. */ + name: string; + /** + * A public key that corresponds to a wallet account represented as an extended + * key. It must conform to a derivation path of the form + * m/purpose'/coin_type'/account'. + */ + extendedPublicKey: string; + /** + * The fingerprint of the root key (also known as the key with derivation path + * m/) from which the account public key was derived from. This may be required + * by some hardware wallets for proper identification and signing. The bytes + * must be in big-endian order. + */ + masterKeyFingerprint: Uint8Array | string; + /** + * An address type is only required when the extended account public key has a + * legacy version (xpub, tpub, etc.), such that the wallet cannot detect what + * address scheme it belongs to. + */ + addressType: AddressType; + /** + * Whether a dry run should be attempted when importing the account. This + * serves as a way to confirm whether the account is being imported correctly + * by returning the first N addresses for the external and internal branches of + * the account. If these addresses match as expected, then it should be safe to + * import the account as is. + */ + dryRun: boolean; +} + +export interface ImportAccountResponse { + /** The details of the imported account. */ + account: Account | undefined; + /** + * The first N addresses that belong to the external branch of the account. + * The external branch is typically used for external non-change addresses. + * These are only returned if a dry run was specified within the request. + */ + dryRunExternalAddrs: string[]; + /** + * The first N addresses that belong to the internal branch of the account. + * The internal branch is typically used for change addresses. These are only + * returned if a dry run was specified within the request. + */ + dryRunInternalAddrs: string[]; +} + +export interface ImportPublicKeyRequest { + /** A compressed public key represented as raw bytes. */ + publicKey: Uint8Array | string; + /** The type of address that will be generated from the public key. */ + addressType: AddressType; +} + +export interface ImportPublicKeyResponse {} + +export interface Transaction { + /** The raw serialized transaction. */ + txHex: Uint8Array | string; + /** An optional label to save with the transaction. Limited to 500 characters. */ + label: string; +} + +export interface PublishResponse { + /** + * If blank, then no error occurred and the transaction was successfully + * published. If not the empty string, then a string representation of the + * broadcast error. + * + * TODO(roasbeef): map to a proper enum type + */ + publishError: string; +} + +export interface SendOutputsRequest { + /** + * The number of satoshis per kilo weight that should be used when crafting + * this transaction. + */ + satPerKw: string; + /** A slice of the outputs that should be created in the transaction produced. */ + outputs: TxOut[]; + /** An optional label for the transaction, limited to 500 characters. */ + label: string; + /** + * The minimum number of confirmations each one of your outputs used for + * the transaction must satisfy. + */ + minConfs: number; + /** Whether unconfirmed outputs should be used as inputs for the transaction. */ + spendUnconfirmed: boolean; +} + +export interface SendOutputsResponse { + /** The serialized transaction sent out on the network. */ + rawTx: Uint8Array | string; +} + +export interface EstimateFeeRequest { + /** The number of confirmations to shoot for when estimating the fee. */ + confTarget: number; +} + +export interface EstimateFeeResponse { + /** + * The amount of satoshis per kw that should be used in order to reach the + * confirmation target in the request. + */ + satPerKw: string; +} + +export interface PendingSweep { + /** The outpoint of the output we're attempting to sweep. */ + outpoint: OutPoint | undefined; + /** The witness type of the output we're attempting to sweep. */ + witnessType: WitnessType; + /** The value of the output we're attempting to sweep. */ + amountSat: number; + /** + * Deprecated, use sat_per_vbyte. + * The fee rate we'll use to sweep the output, expressed in sat/vbyte. The fee + * rate is only determined once a sweeping transaction for the output is + * created, so it's possible for this to be 0 before this. + * + * @deprecated + */ + satPerByte: number; + /** The number of broadcast attempts we've made to sweep the output. */ + broadcastAttempts: number; + /** + * The next height of the chain at which we'll attempt to broadcast the + * sweep transaction of the output. + */ + nextBroadcastHeight: number; + /** The requested confirmation target for this output. */ + requestedConfTarget: number; + /** + * Deprecated, use requested_sat_per_vbyte. + * The requested fee rate, expressed in sat/vbyte, for this output. + * + * @deprecated + */ + requestedSatPerByte: number; + /** + * The fee rate we'll use to sweep the output, expressed in sat/vbyte. The fee + * rate is only determined once a sweeping transaction for the output is + * created, so it's possible for this to be 0 before this. + */ + satPerVbyte: string; + /** The requested fee rate, expressed in sat/vbyte, for this output. */ + requestedSatPerVbyte: string; + /** + * Whether this input must be force-swept. This means that it is swept even + * if it has a negative yield. + */ + force: boolean; +} + +export interface PendingSweepsRequest {} + +export interface PendingSweepsResponse { + /** The set of outputs currently being swept by lnd's central batching engine. */ + pendingSweeps: PendingSweep[]; +} + +export interface BumpFeeRequest { + /** The input we're attempting to bump the fee of. */ + outpoint: OutPoint | undefined; + /** The target number of blocks that the input should be spent within. */ + targetConf: number; + /** + * Deprecated, use sat_per_vbyte. + * The fee rate, expressed in sat/vbyte, that should be used to spend the input + * with. + * + * @deprecated + */ + satPerByte: number; + /** + * Whether this input must be force-swept. This means that it is swept even + * if it has a negative yield. + */ + force: boolean; + /** + * The fee rate, expressed in sat/vbyte, that should be used to spend the input + * with. + */ + satPerVbyte: string; +} + +export interface BumpFeeResponse {} + +export interface ListSweepsRequest { + /** + * Retrieve the full sweep transaction details. If false, only the sweep txids + * will be returned. Note that some sweeps that LND publishes will have been + * replaced-by-fee, so will not be included in this output. + */ + verbose: boolean; +} + +export interface ListSweepsResponse { + transactionDetails: TransactionDetails | undefined; + transactionIds: ListSweepsResponse_TransactionIDs | undefined; +} + +export interface ListSweepsResponse_TransactionIDs { + /** + * Reversed, hex-encoded string representing the transaction ids of the + * sweeps that our node has broadcast. Note that these transactions may + * not have confirmed yet, we record sweeps on broadcast, not confirmation. + */ + transactionIds: string[]; +} + +export interface LabelTransactionRequest { + /** The txid of the transaction to label. */ + txid: Uint8Array | string; + /** The label to add to the transaction, limited to 500 characters. */ + label: string; + /** Whether to overwrite the existing label, if it is present. */ + overwrite: boolean; +} + +export interface LabelTransactionResponse {} + +export interface FundPsbtRequest { + /** + * Use an existing PSBT packet as the template for the funded PSBT. + * + * The packet must contain at least one non-dust output. If one or more + * inputs are specified, no coin selection is performed. In that case every + * input must be an UTXO known to the wallet that has not been locked + * before. The sum of all inputs must be sufficiently greater than the sum + * of all outputs to pay a miner fee with the specified fee rate. A change + * output is added to the PSBT if necessary. + */ + psbt: Uint8Array | string | undefined; + /** Use the outputs and optional inputs from this raw template. */ + raw: TxTemplate | undefined; + /** The target number of blocks that the transaction should be confirmed in. */ + targetConf: number | undefined; + /** + * The fee rate, expressed in sat/vbyte, that should be used to spend the + * input with. + */ + satPerVbyte: string | undefined; + /** + * The name of the account to fund the PSBT with. If empty, the default wallet + * account is used. + */ + account: string; + /** + * The minimum number of confirmations each one of your outputs used for + * the transaction must satisfy. + */ + minConfs: number; + /** Whether unconfirmed outputs should be used as inputs for the transaction. */ + spendUnconfirmed: boolean; +} + +export interface FundPsbtResponse { + /** The funded but not yet signed PSBT packet. */ + fundedPsbt: Uint8Array | string; + /** The index of the added change output or -1 if no change was left over. */ + changeOutputIndex: number; + /** + * The list of lock leases that were acquired for the inputs in the funded PSBT + * packet. + */ + lockedUtxos: UtxoLease[]; +} + +export interface TxTemplate { + /** + * An optional list of inputs to use. Every input must be an UTXO known to the + * wallet that has not been locked before. The sum of all inputs must be + * sufficiently greater than the sum of all outputs to pay a miner fee with the + * fee rate specified in the parent message. + * + * If no inputs are specified, coin selection will be performed instead and + * inputs of sufficient value will be added to the resulting PSBT. + */ + inputs: OutPoint[]; + /** A map of all addresses and the amounts to send to in the funded PSBT. */ + outputs: { [key: string]: string }; +} + +export interface TxTemplate_OutputsEntry { + key: string; + value: string; +} + +export interface UtxoLease { + /** A 32 byte random ID that identifies the lease. */ + id: Uint8Array | string; + /** The identifying outpoint of the output being leased. */ + outpoint: OutPoint | undefined; + /** The absolute expiration of the output lease represented as a unix timestamp. */ + expiration: string; +} + +export interface SignPsbtRequest { + /** + * The PSBT that should be signed. The PSBT must contain all required inputs, + * outputs, UTXO data and custom fields required to identify the signing key. + */ + fundedPsbt: Uint8Array | string; +} + +export interface SignPsbtResponse { + /** The signed transaction in PSBT format. */ + signedPsbt: Uint8Array | string; +} + +export interface FinalizePsbtRequest { + /** + * A PSBT that should be signed and finalized. The PSBT must contain all + * required inputs, outputs, UTXO data and partial signatures of all other + * signers. + */ + fundedPsbt: Uint8Array | string; + /** + * The name of the account to finalize the PSBT with. If empty, the default + * wallet account is used. + */ + account: string; +} + +export interface FinalizePsbtResponse { + /** The fully signed and finalized transaction in PSBT format. */ + signedPsbt: Uint8Array | string; + /** The fully signed and finalized transaction in the raw wire format. */ + rawFinalTx: Uint8Array | string; +} + +export interface ListLeasesRequest {} + +export interface ListLeasesResponse { + /** The list of currently leased utxos. */ + lockedUtxos: UtxoLease[]; +} + +/** + * WalletKit is a service that gives access to the core functionalities of the + * daemon's wallet. + */ +export interface WalletKit { + /** + * ListUnspent returns a list of all utxos spendable by the wallet with a + * number of confirmations between the specified minimum and maximum. + */ + listUnspent( + request?: DeepPartial + ): Promise; + /** + * LeaseOutput locks an output to the given ID, preventing it from being + * available for any future coin selection attempts. The absolute time of the + * lock's expiration is returned. The expiration of the lock can be extended by + * successive invocations of this RPC. Outputs can be unlocked before their + * expiration through `ReleaseOutput`. + */ + leaseOutput( + request?: DeepPartial + ): Promise; + /** + * ReleaseOutput unlocks an output, allowing it to be available for coin + * selection if it remains unspent. The ID should match the one used to + * originally lock the output. + */ + releaseOutput( + request?: DeepPartial + ): Promise; + /** ListLeases lists all currently locked utxos. */ + listLeases( + request?: DeepPartial + ): Promise; + /** + * DeriveNextKey attempts to derive the *next* key within the key family + * (account in BIP43) specified. This method should return the next external + * child within this branch. + */ + deriveNextKey(request?: DeepPartial): Promise; + /** + * DeriveKey attempts to derive an arbitrary key specified by the passed + * KeyLocator. + */ + deriveKey(request?: DeepPartial): Promise; + /** NextAddr returns the next unused address within the wallet. */ + nextAddr(request?: DeepPartial): Promise; + /** + * ListAccounts retrieves all accounts belonging to the wallet by default. A + * name and key scope filter can be provided to filter through all of the + * wallet accounts and return only those matching. + */ + listAccounts( + request?: DeepPartial + ): Promise; + /** + * ImportAccount imports an account backed by an account extended public key. + * The master key fingerprint denotes the fingerprint of the root key + * corresponding to the account public key (also known as the key with + * derivation path m/). This may be required by some hardware wallets for + * proper identification and signing. + * + * The address type can usually be inferred from the key's version, but may be + * required for certain keys to map them into the proper scope. + * + * For BIP-0044 keys, an address type must be specified as we intend to not + * support importing BIP-0044 keys into the wallet using the legacy + * pay-to-pubkey-hash (P2PKH) scheme. A nested witness address type will force + * the standard BIP-0049 derivation scheme, while a witness address type will + * force the standard BIP-0084 derivation scheme. + * + * For BIP-0049 keys, an address type must also be specified to make a + * distinction between the standard BIP-0049 address schema (nested witness + * pubkeys everywhere) and our own BIP-0049Plus address schema (nested pubkeys + * externally, witness pubkeys internally). + * + * NOTE: Events (deposits/spends) for keys derived from an account will only be + * detected by lnd if they happen after the import. Rescans to detect past + * events will be supported later on. + */ + importAccount( + request?: DeepPartial + ): Promise; + /** + * ImportPublicKey imports a public key as watch-only into the wallet. + * + * NOTE: Events (deposits/spends) for a key will only be detected by lnd if + * they happen after the import. Rescans to detect past events will be + * supported later on. + */ + importPublicKey( + request?: DeepPartial + ): Promise; + /** + * PublishTransaction attempts to publish the passed transaction to the + * network. Once this returns without an error, the wallet will continually + * attempt to re-broadcast the transaction on start up, until it enters the + * chain. + */ + publishTransaction( + request?: DeepPartial + ): Promise; + /** + * SendOutputs is similar to the existing sendmany call in Bitcoind, and + * allows the caller to create a transaction that sends to several outputs at + * once. This is ideal when wanting to batch create a set of transactions. + */ + sendOutputs( + request?: DeepPartial + ): Promise; + /** + * EstimateFee attempts to query the internal fee estimator of the wallet to + * determine the fee (in sat/kw) to attach to a transaction in order to + * achieve the confirmation target. + */ + estimateFee( + request?: DeepPartial + ): Promise; + /** + * PendingSweeps returns lists of on-chain outputs that lnd is currently + * attempting to sweep within its central batching engine. Outputs with similar + * fee rates are batched together in order to sweep them within a single + * transaction. + * + * NOTE: Some of the fields within PendingSweepsRequest are not guaranteed to + * remain supported. This is an advanced API that depends on the internals of + * the UtxoSweeper, so things may change. + */ + pendingSweeps( + request?: DeepPartial + ): Promise; + /** + * BumpFee bumps the fee of an arbitrary input within a transaction. This RPC + * takes a different approach than bitcoind's bumpfee command. lnd has a + * central batching engine in which inputs with similar fee rates are batched + * together to save on transaction fees. Due to this, we cannot rely on + * bumping the fee on a specific transaction, since transactions can change at + * any point with the addition of new inputs. The list of inputs that + * currently exist within lnd's central batching engine can be retrieved + * through the PendingSweeps RPC. + * + * When bumping the fee of an input that currently exists within lnd's central + * batching engine, a higher fee transaction will be created that replaces the + * lower fee transaction through the Replace-By-Fee (RBF) policy. If it + * + * This RPC also serves useful when wanting to perform a Child-Pays-For-Parent + * (CPFP), where the child transaction pays for its parent's fee. This can be + * done by specifying an outpoint within the low fee transaction that is under + * the control of the wallet. + * + * The fee preference can be expressed either as a specific fee rate or a delta + * of blocks in which the output should be swept on-chain within. If a fee + * preference is not explicitly specified, then an error is returned. + * + * Note that this RPC currently doesn't perform any validation checks on the + * fee preference being provided. For now, the responsibility of ensuring that + * the new fee preference is sufficient is delegated to the user. + */ + bumpFee(request?: DeepPartial): Promise; + /** + * ListSweeps returns a list of the sweep transactions our node has produced. + * Note that these sweeps may not be confirmed yet, as we record sweeps on + * broadcast, not confirmation. + */ + listSweeps( + request?: DeepPartial + ): Promise; + /** + * LabelTransaction adds a label to a transaction. If the transaction already + * has a label the call will fail unless the overwrite bool is set. This will + * overwrite the exiting transaction label. Labels must not be empty, and + * cannot exceed 500 characters. + */ + labelTransaction( + request?: DeepPartial + ): Promise; + /** + * FundPsbt creates a fully populated PSBT that contains enough inputs to fund + * the outputs specified in the template. There are two ways of specifying a + * template: Either by passing in a PSBT with at least one output declared or + * by passing in a raw TxTemplate message. + * + * If there are no inputs specified in the template, coin selection is + * performed automatically. If the template does contain any inputs, it is + * assumed that full coin selection happened externally and no additional + * inputs are added. If the specified inputs aren't enough to fund the outputs + * with the given fee rate, an error is returned. + * + * After either selecting or verifying the inputs, all input UTXOs are locked + * with an internal app ID. + * + * NOTE: If this method returns without an error, it is the caller's + * responsibility to either spend the locked UTXOs (by finalizing and then + * publishing the transaction) or to unlock/release the locked UTXOs in case of + * an error on the caller's side. + */ + fundPsbt(request?: DeepPartial): Promise; + /** + * SignPsbt expects a partial transaction with all inputs and outputs fully + * declared and tries to sign all unsigned inputs that have all required fields + * (UTXO information, BIP32 derivation information, witness or sig scripts) + * set. + * If no error is returned, the PSBT is ready to be given to the next signer or + * to be finalized if lnd was the last signer. + * + * NOTE: This RPC only signs inputs (and only those it can sign), it does not + * perform any other tasks (such as coin selection, UTXO locking or + * input/output/fee value validation, PSBT finalization). Any input that is + * incomplete will be skipped. + */ + signPsbt(request?: DeepPartial): Promise; + /** + * FinalizePsbt expects a partial transaction with all inputs and outputs fully + * declared and tries to sign all inputs that belong to the wallet. Lnd must be + * the last signer of the transaction. That means, if there are any unsigned + * non-witness inputs or inputs without UTXO information attached or inputs + * without witness data that do not belong to lnd's wallet, this method will + * fail. If no error is returned, the PSBT is ready to be extracted and the + * final TX within to be broadcast. + * + * NOTE: This method does NOT publish the transaction once finalized. It is the + * caller's responsibility to either publish the transaction on success or + * unlock/release any locked UTXOs in case of an error in this method. + */ + finalizePsbt( + request?: DeepPartial + ): Promise; +} + +type Builtin = + | Date + | Function + | Uint8Array + | string + | number + | boolean + | undefined; + +type DeepPartial = T extends Builtin + ? T + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in keyof T]?: DeepPartial } + : Partial; diff --git a/lib/types/proto/lnd/walletunlocker.ts b/lib/types/proto/lnd/walletunlocker.ts new file mode 100644 index 0000000..5a21661 --- /dev/null +++ b/lib/types/proto/lnd/walletunlocker.ts @@ -0,0 +1,314 @@ +/* eslint-disable */ +import type { ChanBackupSnapshot } from './lightning'; + +export interface GenSeedRequest { + /** + * aezeed_passphrase is an optional user provided passphrase that will be used + * to encrypt the generated aezeed cipher seed. When using REST, this field + * must be encoded as base64. + */ + aezeedPassphrase: Uint8Array | string; + /** + * seed_entropy is an optional 16-bytes generated via CSPRNG. If not + * specified, then a fresh set of randomness will be used to create the seed. + * When using REST, this field must be encoded as base64. + */ + seedEntropy: Uint8Array | string; +} + +export interface GenSeedResponse { + /** + * cipher_seed_mnemonic is a 24-word mnemonic that encodes a prior aezeed + * cipher seed obtained by the user. This field is optional, as if not + * provided, then the daemon will generate a new cipher seed for the user. + * Otherwise, then the daemon will attempt to recover the wallet state linked + * to this cipher seed. + */ + cipherSeedMnemonic: string[]; + /** + * enciphered_seed are the raw aezeed cipher seed bytes. This is the raw + * cipher text before run through our mnemonic encoding scheme. + */ + encipheredSeed: Uint8Array | string; +} + +export interface InitWalletRequest { + /** + * wallet_password is the passphrase that should be used to encrypt the + * wallet. This MUST be at least 8 chars in length. After creation, this + * password is required to unlock the daemon. When using REST, this field + * must be encoded as base64. + */ + walletPassword: Uint8Array | string; + /** + * cipher_seed_mnemonic is a 24-word mnemonic that encodes a prior aezeed + * cipher seed obtained by the user. This may have been generated by the + * GenSeed method, or be an existing seed. + */ + cipherSeedMnemonic: string[]; + /** + * aezeed_passphrase is an optional user provided passphrase that will be used + * to encrypt the generated aezeed cipher seed. When using REST, this field + * must be encoded as base64. + */ + aezeedPassphrase: Uint8Array | string; + /** + * recovery_window is an optional argument specifying the address lookahead + * when restoring a wallet seed. The recovery window applies to each + * individual branch of the BIP44 derivation paths. Supplying a recovery + * window of zero indicates that no addresses should be recovered, such after + * the first initialization of the wallet. + */ + recoveryWindow: number; + /** + * channel_backups is an optional argument that allows clients to recover the + * settled funds within a set of channels. This should be populated if the + * user was unable to close out all channels and sweep funds before partial or + * total data loss occurred. If specified, then after on-chain recovery of + * funds, lnd begin to carry out the data loss recovery protocol in order to + * recover the funds in each channel from a remote force closed transaction. + */ + channelBackups: ChanBackupSnapshot | undefined; + /** + * stateless_init is an optional argument instructing the daemon NOT to create + * any *.macaroon files in its filesystem. If this parameter is set, then the + * admin macaroon returned in the response MUST be stored by the caller of the + * RPC as otherwise all access to the daemon will be lost! + */ + statelessInit: boolean; + /** + * extended_master_key is an alternative to specifying cipher_seed_mnemonic and + * aezeed_passphrase. Instead of deriving the master root key from the entropy + * of an aezeed cipher seed, the given extended master root key is used + * directly as the wallet's master key. This allows users to import/use a + * master key from another wallet. When doing so, lnd still uses its default + * SegWit only (BIP49/84) derivation paths and funds from custom/non-default + * derivation paths will not automatically appear in the on-chain wallet. Using + * an 'xprv' instead of an aezeed also has the disadvantage that the wallet's + * birthday is not known as that is an information that's only encoded in the + * aezeed, not the xprv. Therefore a birthday needs to be specified in + * extended_master_key_birthday_timestamp or a "safe" default value will be + * used. + */ + extendedMasterKey: string; + /** + * extended_master_key_birthday_timestamp is the optional unix timestamp in + * seconds to use as the wallet's birthday when using an extended master key + * to restore the wallet. lnd will only start scanning for funds in blocks that + * are after the birthday which can speed up the process significantly. If the + * birthday is not known, this should be left at its default value of 0 in + * which case lnd will start scanning from the first SegWit block (481824 on + * mainnet). + */ + extendedMasterKeyBirthdayTimestamp: string; + /** + * watch_only is the third option of initializing a wallet: by importing + * account xpubs only and therefore creating a watch-only wallet that does not + * contain any private keys. That means the wallet won't be able to sign for + * any of the keys and _needs_ to be run with a remote signer that has the + * corresponding private keys and can serve signing RPC requests. + */ + watchOnly: WatchOnly | undefined; +} + +export interface InitWalletResponse { + /** + * The binary serialized admin macaroon that can be used to access the daemon + * after creating the wallet. If the stateless_init parameter was set to true, + * this is the ONLY copy of the macaroon and MUST be stored safely by the + * caller. Otherwise a copy of this macaroon is also persisted on disk by the + * daemon, together with other macaroon files. + */ + adminMacaroon: Uint8Array | string; +} + +export interface WatchOnly { + /** + * The unix timestamp in seconds of when the master key was created. lnd will + * only start scanning for funds in blocks that are after the birthday which + * can speed up the process significantly. If the birthday is not known, this + * should be left at its default value of 0 in which case lnd will start + * scanning from the first SegWit block (481824 on mainnet). + */ + masterKeyBirthdayTimestamp: string; + /** + * The fingerprint of the root key (also known as the key with derivation path + * m/) from which the account public keys were derived from. This may be + * required by some hardware wallets for proper identification and signing. The + * bytes must be in big-endian order. + */ + masterKeyFingerprint: Uint8Array | string; + /** + * The list of accounts to import. There _must_ be an account for all of lnd's + * main key scopes: BIP49/BIP84 (m/49'/0'/0', m/84'/0'/0', note that the + * coin type is always 0, even for testnet/regtest) and lnd's internal key + * scope (m/1017'/'/'), where account is the key family as + * defined in `keychain/derivation.go` (currently indices 0 to 9). + */ + accounts: WatchOnlyAccount[]; +} + +export interface WatchOnlyAccount { + /** + * Purpose is the first number in the derivation path, must be either 49, 84 + * or 1017. + */ + purpose: number; + /** + * Coin type is the second number in the derivation path, this is _always_ 0 + * for purposes 49 and 84. It only needs to be set to 1 for purpose 1017 on + * testnet or regtest. + */ + coinType: number; + /** + * Account is the third number in the derivation path. For purposes 49 and 84 + * at least the default account (index 0) needs to be created but optional + * additional accounts are allowed. For purpose 1017 there needs to be exactly + * one account for each of the key families defined in `keychain/derivation.go` + * (currently indices 0 to 9) + */ + account: number; + /** The extended public key at depth 3 for the given account. */ + xpub: string; +} + +export interface UnlockWalletRequest { + /** + * wallet_password should be the current valid passphrase for the daemon. This + * will be required to decrypt on-disk material that the daemon requires to + * function properly. When using REST, this field must be encoded as base64. + */ + walletPassword: Uint8Array | string; + /** + * recovery_window is an optional argument specifying the address lookahead + * when restoring a wallet seed. The recovery window applies to each + * individual branch of the BIP44 derivation paths. Supplying a recovery + * window of zero indicates that no addresses should be recovered, such after + * the first initialization of the wallet. + */ + recoveryWindow: number; + /** + * channel_backups is an optional argument that allows clients to recover the + * settled funds within a set of channels. This should be populated if the + * user was unable to close out all channels and sweep funds before partial or + * total data loss occurred. If specified, then after on-chain recovery of + * funds, lnd begin to carry out the data loss recovery protocol in order to + * recover the funds in each channel from a remote force closed transaction. + */ + channelBackups: ChanBackupSnapshot | undefined; + /** + * stateless_init is an optional argument instructing the daemon NOT to create + * any *.macaroon files in its file system. + */ + statelessInit: boolean; +} + +export interface UnlockWalletResponse {} + +export interface ChangePasswordRequest { + /** + * current_password should be the current valid passphrase used to unlock the + * daemon. When using REST, this field must be encoded as base64. + */ + currentPassword: Uint8Array | string; + /** + * new_password should be the new passphrase that will be needed to unlock the + * daemon. When using REST, this field must be encoded as base64. + */ + newPassword: Uint8Array | string; + /** + * stateless_init is an optional argument instructing the daemon NOT to create + * any *.macaroon files in its filesystem. If this parameter is set, then the + * admin macaroon returned in the response MUST be stored by the caller of the + * RPC as otherwise all access to the daemon will be lost! + */ + statelessInit: boolean; + /** + * new_macaroon_root_key is an optional argument instructing the daemon to + * rotate the macaroon root key when set to true. This will invalidate all + * previously generated macaroons. + */ + newMacaroonRootKey: boolean; +} + +export interface ChangePasswordResponse { + /** + * The binary serialized admin macaroon that can be used to access the daemon + * after rotating the macaroon root key. If both the stateless_init and + * new_macaroon_root_key parameter were set to true, this is the ONLY copy of + * the macaroon that was created from the new root key and MUST be stored + * safely by the caller. Otherwise a copy of this macaroon is also persisted on + * disk by the daemon, together with other macaroon files. + */ + adminMacaroon: Uint8Array | string; +} + +/** + * WalletUnlocker is a service that is used to set up a wallet password for + * lnd at first startup, and unlock a previously set up wallet. + */ +export interface WalletUnlocker { + /** + * GenSeed is the first method that should be used to instantiate a new lnd + * instance. This method allows a caller to generate a new aezeed cipher seed + * given an optional passphrase. If provided, the passphrase will be necessary + * to decrypt the cipherseed to expose the internal wallet seed. + * + * Once the cipherseed is obtained and verified by the user, the InitWallet + * method should be used to commit the newly generated seed, and create the + * wallet. + */ + genSeed(request?: DeepPartial): Promise; + /** + * InitWallet is used when lnd is starting up for the first time to fully + * initialize the daemon and its internal wallet. At the very least a wallet + * password must be provided. This will be used to encrypt sensitive material + * on disk. + * + * In the case of a recovery scenario, the user can also specify their aezeed + * mnemonic and passphrase. If set, then the daemon will use this prior state + * to initialize its internal wallet. + * + * Alternatively, this can be used along with the GenSeed RPC to obtain a + * seed, then present it to the user. Once it has been verified by the user, + * the seed can be fed into this RPC in order to commit the new wallet. + */ + initWallet( + request?: DeepPartial + ): Promise; + /** + * lncli: `unlock` + * UnlockWallet is used at startup of lnd to provide a password to unlock + * the wallet database. + */ + unlockWallet( + request?: DeepPartial + ): Promise; + /** + * lncli: `changepassword` + * ChangePassword changes the password of the encrypted wallet. This will + * automatically unlock the wallet database if successful. + */ + changePassword( + request?: DeepPartial + ): Promise; +} + +type Builtin = + | Date + | Function + | Uint8Array + | string + | number + | boolean + | undefined; + +type DeepPartial = T extends Builtin + ? T + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in keyof T]?: DeepPartial } + : Partial; diff --git a/lib/types/proto/lnd/watchtowerrpc/watchtower.ts b/lib/types/proto/lnd/watchtowerrpc/watchtower.ts new file mode 100644 index 0000000..c076d93 --- /dev/null +++ b/lib/types/proto/lnd/watchtowerrpc/watchtower.ts @@ -0,0 +1,44 @@ +/* eslint-disable */ +export interface GetInfoRequest {} + +export interface GetInfoResponse { + /** The public key of the watchtower. */ + pubkey: Uint8Array | string; + /** The listening addresses of the watchtower. */ + listeners: string[]; + /** The URIs of the watchtower. */ + uris: string[]; +} + +/** + * Watchtower is a service that grants access to the watchtower server + * functionality of the daemon. + */ +export interface Watchtower { + /** + * lncli: tower info + * GetInfo returns general information concerning the companion watchtower + * including its public key and URIs where the server is currently + * listening for clients. + */ + getInfo(request?: DeepPartial): Promise; +} + +type Builtin = + | Date + | Function + | Uint8Array + | string + | number + | boolean + | undefined; + +type DeepPartial = T extends Builtin + ? T + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in keyof T]?: DeepPartial } + : Partial; diff --git a/lib/types/proto/lnd/wtclientrpc/wtclient.ts b/lib/types/proto/lnd/wtclientrpc/wtclient.ts new file mode 100644 index 0000000..d72443d --- /dev/null +++ b/lib/types/proto/lnd/wtclientrpc/wtclient.ts @@ -0,0 +1,190 @@ +/* eslint-disable */ +export enum PolicyType { + /** LEGACY - Selects the policy from the legacy tower client. */ + LEGACY = 'LEGACY', + /** ANCHOR - Selects the policy from the anchor tower client. */ + ANCHOR = 'ANCHOR', + UNRECOGNIZED = 'UNRECOGNIZED' +} + +export interface AddTowerRequest { + /** The identifying public key of the watchtower to add. */ + pubkey: Uint8Array | string; + /** A network address the watchtower is reachable over. */ + address: string; +} + +export interface AddTowerResponse {} + +export interface RemoveTowerRequest { + /** The identifying public key of the watchtower to remove. */ + pubkey: Uint8Array | string; + /** + * If set, then the record for this address will be removed, indicating that is + * is stale. Otherwise, the watchtower will no longer be used for future + * session negotiations and backups. + */ + address: string; +} + +export interface RemoveTowerResponse {} + +export interface GetTowerInfoRequest { + /** The identifying public key of the watchtower to retrieve information for. */ + pubkey: Uint8Array | string; + /** Whether we should include sessions with the watchtower in the response. */ + includeSessions: boolean; +} + +export interface TowerSession { + /** + * The total number of successful backups that have been made to the + * watchtower session. + */ + numBackups: number; + /** + * The total number of backups in the session that are currently pending to be + * acknowledged by the watchtower. + */ + numPendingBackups: number; + /** The maximum number of backups allowed by the watchtower session. */ + maxBackups: number; + /** + * Deprecated, use sweep_sat_per_vbyte. + * The fee rate, in satoshis per vbyte, that will be used by the watchtower for + * the justice transaction in the event of a channel breach. + * + * @deprecated + */ + sweepSatPerByte: number; + /** + * The fee rate, in satoshis per vbyte, that will be used by the watchtower for + * the justice transaction in the event of a channel breach. + */ + sweepSatPerVbyte: number; +} + +export interface Tower { + /** The identifying public key of the watchtower. */ + pubkey: Uint8Array | string; + /** The list of addresses the watchtower is reachable over. */ + addresses: string[]; + /** Whether the watchtower is currently a candidate for new sessions. */ + activeSessionCandidate: boolean; + /** The number of sessions that have been negotiated with the watchtower. */ + numSessions: number; + /** The list of sessions that have been negotiated with the watchtower. */ + sessions: TowerSession[]; +} + +export interface ListTowersRequest { + /** Whether we should include sessions with the watchtower in the response. */ + includeSessions: boolean; +} + +export interface ListTowersResponse { + /** The list of watchtowers available for new backups. */ + towers: Tower[]; +} + +export interface StatsRequest {} + +export interface StatsResponse { + /** + * The total number of backups made to all active and exhausted watchtower + * sessions. + */ + numBackups: number; + /** + * The total number of backups that are pending to be acknowledged by all + * active and exhausted watchtower sessions. + */ + numPendingBackups: number; + /** + * The total number of backups that all active and exhausted watchtower + * sessions have failed to acknowledge. + */ + numFailedBackups: number; + /** The total number of new sessions made to watchtowers. */ + numSessionsAcquired: number; + /** The total number of watchtower sessions that have been exhausted. */ + numSessionsExhausted: number; +} + +export interface PolicyRequest { + /** The client type from which to retrieve the active offering policy. */ + policyType: PolicyType; +} + +export interface PolicyResponse { + /** + * The maximum number of updates each session we negotiate with watchtowers + * should allow. + */ + maxUpdates: number; + /** + * Deprecated, use sweep_sat_per_vbyte. + * The fee rate, in satoshis per vbyte, that will be used by watchtowers for + * justice transactions in response to channel breaches. + * + * @deprecated + */ + sweepSatPerByte: number; + /** + * The fee rate, in satoshis per vbyte, that will be used by watchtowers for + * justice transactions in response to channel breaches. + */ + sweepSatPerVbyte: number; +} + +/** + * WatchtowerClient is a service that grants access to the watchtower client + * functionality of the daemon. + */ +export interface WatchtowerClient { + /** + * AddTower adds a new watchtower reachable at the given address and + * considers it for new sessions. If the watchtower already exists, then + * any new addresses included will be considered when dialing it for + * session negotiations and backups. + */ + addTower(request?: DeepPartial): Promise; + /** + * RemoveTower removes a watchtower from being considered for future session + * negotiations and from being used for any subsequent backups until it's added + * again. If an address is provided, then this RPC only serves as a way of + * removing the address from the watchtower instead. + */ + removeTower( + request?: DeepPartial + ): Promise; + /** ListTowers returns the list of watchtowers registered with the client. */ + listTowers( + request?: DeepPartial + ): Promise; + /** GetTowerInfo retrieves information for a registered watchtower. */ + getTowerInfo(request?: DeepPartial): Promise; + /** Stats returns the in-memory statistics of the client since startup. */ + stats(request?: DeepPartial): Promise; + /** Policy returns the active watchtower client policy configuration. */ + policy(request?: DeepPartial): Promise; +} + +type Builtin = + | Date + | Function + | Uint8Array + | string + | number + | boolean + | undefined; + +type DeepPartial = T extends Builtin + ? T + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in keyof T]?: DeepPartial } + : Partial; diff --git a/lib/types/proto/lnrpc.ts b/lib/types/proto/lnrpc.ts new file mode 100644 index 0000000..730b051 --- /dev/null +++ b/lib/types/proto/lnrpc.ts @@ -0,0 +1,2 @@ +export * from './lnd/lightning'; +export * from './lnd/walletunlocker'; diff --git a/lib/types/proto/loop/client.ts b/lib/types/proto/loop/client.ts new file mode 100644 index 0000000..f01f372 --- /dev/null +++ b/lib/types/proto/loop/client.ts @@ -0,0 +1,861 @@ +/* eslint-disable */ +import type { RouteHint } from './swapserverrpc/common'; + +export enum SwapType { + /** LOOP_OUT - LOOP_OUT indicates an loop out swap (off-chain to on-chain) */ + LOOP_OUT = 'LOOP_OUT', + /** LOOP_IN - LOOP_IN indicates a loop in swap (on-chain to off-chain) */ + LOOP_IN = 'LOOP_IN', + UNRECOGNIZED = 'UNRECOGNIZED' +} + +export enum SwapState { + /** + * INITIATED - INITIATED is the initial state of a swap. At that point, the initiation + * call to the server has been made and the payment process has been started + * for the swap and prepayment invoices. + */ + INITIATED = 'INITIATED', + /** + * PREIMAGE_REVEALED - PREIMAGE_REVEALED is reached when the sweep tx publication is first + * attempted. From that point on, we should consider the preimage to no + * longer be secret and we need to do all we can to get the sweep confirmed. + * This state will mostly coalesce with StateHtlcConfirmed, except in the + * case where we wait for fees to come down before we sweep. + */ + PREIMAGE_REVEALED = 'PREIMAGE_REVEALED', + /** + * HTLC_PUBLISHED - HTLC_PUBLISHED is reached when the htlc tx has been published in a loop in + * swap. + */ + HTLC_PUBLISHED = 'HTLC_PUBLISHED', + /** + * SUCCESS - SUCCESS is the final swap state that is reached when the sweep tx has + * the required confirmation depth. + */ + SUCCESS = 'SUCCESS', + /** + * FAILED - FAILED is the final swap state for a failed swap with or without loss of + * the swap amount. + */ + FAILED = 'FAILED', + /** + * INVOICE_SETTLED - INVOICE_SETTLED is reached when the swap invoice in a loop in swap has been + * paid, but we are still waiting for the htlc spend to confirm. + */ + INVOICE_SETTLED = 'INVOICE_SETTLED', + UNRECOGNIZED = 'UNRECOGNIZED' +} + +export enum FailureReason { + /** + * FAILURE_REASON_NONE - FAILURE_REASON_NONE is set when the swap did not fail, it is either in + * progress or succeeded. + */ + FAILURE_REASON_NONE = 'FAILURE_REASON_NONE', + /** + * FAILURE_REASON_OFFCHAIN - FAILURE_REASON_OFFCHAIN indicates that a loop out failed because it wasn't + * possible to find a route for one or both off chain payments that met the fee + * and timelock limits required. + */ + FAILURE_REASON_OFFCHAIN = 'FAILURE_REASON_OFFCHAIN', + /** + * FAILURE_REASON_TIMEOUT - FAILURE_REASON_TIMEOUT indicates that the swap failed because on chain htlc + * did not confirm before its expiry, or it confirmed too late for us to reveal + * our preimage and claim. + */ + FAILURE_REASON_TIMEOUT = 'FAILURE_REASON_TIMEOUT', + /** + * FAILURE_REASON_SWEEP_TIMEOUT - FAILURE_REASON_SWEEP_TIMEOUT indicates that a loop out permanently failed + * because the on chain htlc wasn't swept before the server revoked the + * htlc. + */ + FAILURE_REASON_SWEEP_TIMEOUT = 'FAILURE_REASON_SWEEP_TIMEOUT', + /** + * FAILURE_REASON_INSUFFICIENT_VALUE - FAILURE_REASON_INSUFFICIENT_VALUE indicates that a loop out has failed + * because the on chain htlc had a lower value than requested. + */ + FAILURE_REASON_INSUFFICIENT_VALUE = 'FAILURE_REASON_INSUFFICIENT_VALUE', + /** + * FAILURE_REASON_TEMPORARY - FAILURE_REASON_TEMPORARY indicates that a swap cannot continue due to an + * internal error. Manual intervention such as a restart is required. + */ + FAILURE_REASON_TEMPORARY = 'FAILURE_REASON_TEMPORARY', + /** + * FAILURE_REASON_INCORRECT_AMOUNT - FAILURE_REASON_INCORRECT_AMOUNT indicates that a loop in permanently failed + * because the amount extended by an external loop in htlc is insufficient. + */ + FAILURE_REASON_INCORRECT_AMOUNT = 'FAILURE_REASON_INCORRECT_AMOUNT', + UNRECOGNIZED = 'UNRECOGNIZED' +} + +export enum LiquidityRuleType { + UNKNOWN = 'UNKNOWN', + THRESHOLD = 'THRESHOLD', + UNRECOGNIZED = 'UNRECOGNIZED' +} + +export enum AutoReason { + AUTO_REASON_UNKNOWN = 'AUTO_REASON_UNKNOWN', + /** + * AUTO_REASON_BUDGET_NOT_STARTED - Budget not started indicates that we do not recommend any swaps because + * the start time for our budget has not arrived yet. + */ + AUTO_REASON_BUDGET_NOT_STARTED = 'AUTO_REASON_BUDGET_NOT_STARTED', + /** + * AUTO_REASON_SWEEP_FEES - Sweep fees indicates that the estimated fees to sweep swaps are too high + * right now. + */ + AUTO_REASON_SWEEP_FEES = 'AUTO_REASON_SWEEP_FEES', + /** + * AUTO_REASON_BUDGET_ELAPSED - Budget elapsed indicates that the autoloop budget for the period has been + * elapsed. + */ + AUTO_REASON_BUDGET_ELAPSED = 'AUTO_REASON_BUDGET_ELAPSED', + /** + * AUTO_REASON_IN_FLIGHT - In flight indicates that the limit on in-flight automatically dispatched + * swaps has already been reached. + */ + AUTO_REASON_IN_FLIGHT = 'AUTO_REASON_IN_FLIGHT', + /** AUTO_REASON_SWAP_FEE - Swap fee indicates that the server fee for a specific swap is too high. */ + AUTO_REASON_SWAP_FEE = 'AUTO_REASON_SWAP_FEE', + /** AUTO_REASON_MINER_FEE - Miner fee indicates that the miner fee for a specific swap is to high. */ + AUTO_REASON_MINER_FEE = 'AUTO_REASON_MINER_FEE', + /** AUTO_REASON_PREPAY - Prepay indicates that the prepay fee for a specific swap is too high. */ + AUTO_REASON_PREPAY = 'AUTO_REASON_PREPAY', + /** + * AUTO_REASON_FAILURE_BACKOFF - Failure backoff indicates that a swap has recently failed for this target, + * and the backoff period has not yet passed. + */ + AUTO_REASON_FAILURE_BACKOFF = 'AUTO_REASON_FAILURE_BACKOFF', + /** + * AUTO_REASON_LOOP_OUT - Loop out indicates that a loop out swap is currently utilizing the channel, + * so it is not eligible. + */ + AUTO_REASON_LOOP_OUT = 'AUTO_REASON_LOOP_OUT', + /** + * AUTO_REASON_LOOP_IN - Loop In indicates that a loop in swap is currently in flight for the peer, + * so it is not eligible. + */ + AUTO_REASON_LOOP_IN = 'AUTO_REASON_LOOP_IN', + /** + * AUTO_REASON_LIQUIDITY_OK - Liquidity ok indicates that a target meets the liquidity balance expressed + * in its rule, so no swap is needed. + */ + AUTO_REASON_LIQUIDITY_OK = 'AUTO_REASON_LIQUIDITY_OK', + /** + * AUTO_REASON_BUDGET_INSUFFICIENT - Budget insufficient indicates that we cannot perform a swap because we do + * not have enough pending budget available. This differs from budget elapsed, + * because we still have some budget available, but we have allocated it to + * other swaps. + */ + AUTO_REASON_BUDGET_INSUFFICIENT = 'AUTO_REASON_BUDGET_INSUFFICIENT', + /** + * AUTO_REASON_FEE_INSUFFICIENT - Fee insufficient indicates that the fee estimate for a swap is higher than + * the portion of total swap amount that we allow fees to consume. + */ + AUTO_REASON_FEE_INSUFFICIENT = 'AUTO_REASON_FEE_INSUFFICIENT', + UNRECOGNIZED = 'UNRECOGNIZED' +} + +export interface LoopOutRequest { + /** Requested swap amount in sat. This does not include the swap and miner fee. */ + amt: string; + /** Base58 encoded destination address for the swap. */ + dest: string; + /** + * Maximum off-chain fee in sat that may be paid for swap payment to the + * server. This limit is applied during path finding. Typically this value is + * taken from the response of the GetQuote call. + */ + maxSwapRoutingFee: string; + /** + * Maximum off-chain fee in sat that may be paid for the prepay to the server. + * This limit is applied during path finding. Typically this value is taken + * from the response of the GetQuote call. + */ + maxPrepayRoutingFee: string; + /** + * Maximum we are willing to pay the server for the swap. This value is not + * disclosed in the swap initiation call, but if the server asks for a + * higher fee, we abort the swap. Typically this value is taken from the + * response of the GetQuote call. It includes the prepay amount. + */ + maxSwapFee: string; + /** Maximum amount of the swap fee that may be charged as a prepayment. */ + maxPrepayAmt: string; + /** + * Maximum in on-chain fees that we are willing to spend. If we want to + * sweep the on-chain htlc and the fee estimate turns out higher than this + * value, we cancel the swap. If the fee estimate is lower, we publish the + * sweep tx. + * + * If the sweep tx is not confirmed, we are forced to ratchet up fees until it + * is swept. Possibly even exceeding max_miner_fee if we get close to the htlc + * timeout. Because the initial publication revealed the preimage, we have no + * other choice. The server may already have pulled the off-chain htlc. Only + * when the fee becomes higher than the swap amount, we can only wait for fees + * to come down and hope - if we are past the timeout - that the server is not + * publishing the revocation. + * + * max_miner_fee is typically taken from the response of the GetQuote call. + */ + maxMinerFee: string; + /** + * Deprecated, use outgoing_chan_set. The channel to loop out, the channel + * to loop out is selected based on the lowest routing fee for the swap + * payment to the server. + * + * @deprecated + */ + loopOutChannel: string; + /** + * A restriction on the channel set that may be used to loop out. The actual + * channel(s) that will be used are selected based on the lowest routing fee + * for the swap payment to the server. + */ + outgoingChanSet: string[]; + /** + * The number of blocks from the on-chain HTLC's confirmation height that it + * should be swept within. + */ + sweepConfTarget: number; + /** + * The number of confirmations that we require for the on chain htlc that will + * be published by the server before we reveal the preimage. + */ + htlcConfirmations: number; + /** + * The latest time (in unix seconds) we allow the server to wait before + * publishing the HTLC on chain. Setting this to a larger value will give the + * server the opportunity to batch multiple swaps together, and wait for + * low-fee periods before publishing the HTLC, potentially resulting in a + * lower total swap fee. + */ + swapPublicationDeadline: string; + /** + * An optional label for this swap. This field is limited to 500 characters + * and may not start with the prefix [reserved], which is used to tag labels + * produced by the daemon. + */ + label: string; + /** + * An optional identification string that will be appended to the user agent + * string sent to the server to give information about the usage of loop. This + * initiator part is meant for user interfaces to add their name to give the + * full picture of the binary used (loopd, LiT) and the method used for + * triggering the swap (loop CLI, autolooper, LiT UI, other 3rd party UI). + */ + initiator: string; +} + +export interface LoopInRequest { + /** + * Requested swap amount in sat. This does not include the swap and miner + * fee. + */ + amt: string; + /** + * Maximum we are willing to pay the server for the swap. This value is not + * disclosed in the swap initiation call, but if the server asks for a + * higher fee, we abort the swap. Typically this value is taken from the + * response of the GetQuote call. + */ + maxSwapFee: string; + /** + * Maximum in on-chain fees that we are willing to spend. If we want to + * publish the on-chain htlc and the fee estimate turns out higher than this + * value, we cancel the swap. + * + * max_miner_fee is typically taken from the response of the GetQuote call. + */ + maxMinerFee: string; + /** + * The last hop to use for the loop in swap. If empty, the last hop is selected + * based on the lowest routing fee for the swap payment from the server. + */ + lastHop: Uint8Array | string; + /** + * If external_htlc is true, we expect the htlc to be published by an external + * actor. + */ + externalHtlc: boolean; + /** The number of blocks that the on chain htlc should confirm within. */ + htlcConfTarget: number; + /** + * An optional label for this swap. This field is limited to 500 characters + * and may not be one of the reserved values in loop/labels Reserved list. + */ + label: string; + /** + * An optional identification string that will be appended to the user agent + * string sent to the server to give information about the usage of loop. This + * initiator part is meant for user interfaces to add their name to give the + * full picture of the binary used (loopd, LiT) and the method used for + * triggering the swap (loop CLI, autolooper, LiT UI, other 3rd party UI). + */ + initiator: string; + /** Optional route hints to reach the destination through private channels. */ + routeHints: RouteHint[]; + /** + * Private indicates whether the destination node should be considered + * private. In which case, loop will generate hophints to assist with + * probing and payment. + */ + private: boolean; +} + +export interface SwapResponse { + /** + * Swap identifier to track status in the update stream that is returned from + * the Start() call. Currently this is the hash that locks the htlcs. + * DEPRECATED: To make the API more consistent, this field is deprecated in + * favor of id_bytes and will be removed in a future release. + * + * @deprecated + */ + id: string; + /** + * Swap identifier to track status in the update stream that is returned from + * the Start() call. Currently this is the hash that locks the htlcs. + */ + idBytes: Uint8Array | string; + /** + * DEPRECATED. This field stores the address of the onchain htlc, but + * depending on the request, the semantics are different. + * - For internal loop-in htlc_address contains the address of the + * native segwit (P2WSH) htlc. + * - For external loop-in htlc_address contains the address of the + * nested segwit (NP2WSH) htlc. + * - For loop-out htlc_address always contains the native segwit (P2WSH) + * htlc address. + * + * @deprecated + */ + htlcAddress: string; + /** + * The nested segwit address of the on-chain htlc. + * This field remains empty for loop-out. + */ + htlcAddressNp2wsh: string; + /** + * The native segwit address of the on-chain htlc. + * Used for both loop-in and loop-out. + */ + htlcAddressP2wsh: string; + /** A human-readable message received from the loop server. */ + serverMessage: string; +} + +export interface MonitorRequest {} + +export interface SwapStatus { + /** + * Requested swap amount in sat. This does not include the swap and miner + * fee. + */ + amt: string; + /** + * Swap identifier to track status in the update stream that is returned from + * the Start() call. Currently this is the hash that locks the htlcs. + * DEPRECATED: To make the API more consistent, this field is deprecated in + * favor of id_bytes and will be removed in a future release. + * + * @deprecated + */ + id: string; + /** + * Swap identifier to track status in the update stream that is returned from + * the Start() call. Currently this is the hash that locks the htlcs. + */ + idBytes: Uint8Array | string; + /** The type of the swap. */ + type: SwapType; + /** State the swap is currently in, see State enum. */ + state: SwapState; + /** A failure reason for the swap, only set if the swap has failed. */ + failureReason: FailureReason; + /** Initiation time of the swap. */ + initiationTime: string; + /** Initiation time of the swap. */ + lastUpdateTime: string; + /** + * DEPRECATED: This field stores the address of the onchain htlc. + * - For internal loop-in htlc_address contains the address of the + * native segwit (P2WSH) htlc. + * - For external loop-in htlc_address contains the nested segwit (NP2WSH) + * address. + * - For loop-out htlc_address always contains the native segwit (P2WSH) + * htlc address. + * + * @deprecated + */ + htlcAddress: string; + /** HTLC address (native segwit), used in loop-in and loop-out swaps. */ + htlcAddressP2wsh: string; + /** HTLC address (nested segwit), used in loop-in swaps only. */ + htlcAddressNp2wsh: string; + /** Swap server cost */ + costServer: string; + /** On-chain transaction cost */ + costOnchain: string; + /** Off-chain routing fees */ + costOffchain: string; + /** Optional last hop if provided in the loop in request. */ + lastHop: Uint8Array | string; + /** Optional outgoing channel set if provided in the loop out request. */ + outgoingChanSet: string[]; + /** An optional label given to the swap on creation. */ + label: string; +} + +export interface ListSwapsRequest {} + +export interface ListSwapsResponse { + /** The list of all currently known swaps and their status. */ + swaps: SwapStatus[]; +} + +export interface SwapInfoRequest { + /** + * The swap identifier which currently is the hash that locks the HTLCs. When + * using REST, this field must be encoded as URL safe base64. + */ + id: Uint8Array | string; +} + +export interface TermsRequest {} + +export interface InTermsResponse { + /** Minimum swap amount (sat) */ + minSwapAmount: string; + /** Maximum swap amount (sat) */ + maxSwapAmount: string; +} + +export interface OutTermsResponse { + /** Minimum swap amount (sat) */ + minSwapAmount: string; + /** Maximum swap amount (sat) */ + maxSwapAmount: string; + /** The minimally accepted cltv delta of the on-chain htlc. */ + minCltvDelta: number; + /** The maximally accepted cltv delta of the on-chain htlc. */ + maxCltvDelta: number; +} + +export interface QuoteRequest { + /** The amount to swap in satoshis. */ + amt: string; + /** + * The confirmation target that should be used either for the sweep of the + * on-chain HTLC broadcast by the swap server in the case of a Loop Out, or for + * the confirmation of the on-chain HTLC broadcast by the swap client in the + * case of a Loop In. + */ + confTarget: number; + /** + * If external_htlc is true, we expect the htlc to be published by an external + * actor. + */ + externalHtlc: boolean; + /** + * The latest time (in unix seconds) we allow the server to wait before + * publishing the HTLC on chain. Setting this to a larger value will give the + * server the opportunity to batch multiple swaps together, and wait for + * low-fee periods before publishing the HTLC, potentially resulting in a + * lower total swap fee. This only has an effect on loop out quotes. + */ + swapPublicationDeadline: string; + /** + * Optionally the client can specify the last hop pubkey when requesting a + * loop-in quote. This is useful to get better off-chain routing fee from the + * server. + */ + loopInLastHop: Uint8Array | string; + /** Optional route hints to reach the destination through private channels. */ + loopInRouteHints: RouteHint[]; + /** + * Private indicates whether the destination node should be considered + * private. In which case, loop will generate hophints to assist with + * probing and payment. + */ + private: boolean; +} + +export interface InQuoteResponse { + /** The fee that the swap server is charging for the swap. */ + swapFeeSat: string; + /** + * An estimate of the on-chain fee that needs to be paid to publish the HTLC + * If a miner fee of 0 is returned, it means the external_htlc flag was set for + * a loop in and the fee estimation was skipped. If a miner fee of -1 is + * returned, it means lnd's wallet tried to estimate the fee but was unable to + * create a sample estimation transaction because not enough funds are + * available. An information message should be shown to the user in this case. + */ + htlcPublishFeeSat: string; + /** On-chain cltv expiry delta */ + cltvDelta: number; + /** The confirmation target to be used to publish the on-chain HTLC. */ + confTarget: number; +} + +export interface OutQuoteResponse { + /** The fee that the swap server is charging for the swap. */ + swapFeeSat: string; + /** The part of the swap fee that is requested as a prepayment. */ + prepayAmtSat: string; + /** + * An estimate of the on-chain fee that needs to be paid to sweep the HTLC for + * a loop out. + */ + htlcSweepFeeSat: string; + /** + * The node pubkey where the swap payment needs to be paid + * to. This can be used to test connectivity before initiating the swap. + */ + swapPaymentDest: Uint8Array | string; + /** On-chain cltv expiry delta */ + cltvDelta: number; + /** The confirmation target to be used for the sweep of the on-chain HTLC. */ + confTarget: number; +} + +export interface ProbeRequest { + /** The amount to probe. */ + amt: string; + /** Optional last hop of the route to probe. */ + lastHop: Uint8Array | string; + /** Optional route hints to reach the destination through private channels. */ + routeHints: RouteHint[]; +} + +export interface ProbeResponse {} + +export interface TokensRequest {} + +export interface TokensResponse { + /** List of all tokens the daemon knows of, including old/expired tokens. */ + tokens: LsatToken[]; +} + +export interface LsatToken { + /** The base macaroon that was baked by the auth server. */ + baseMacaroon: Uint8Array | string; + /** The payment hash of the payment that was paid to obtain the token. */ + paymentHash: Uint8Array | string; + /** + * The preimage of the payment hash, knowledge of this is proof that the + * payment has been paid. If the preimage is set to all zeros, this means the + * payment is still pending and the token is not yet fully valid. + */ + paymentPreimage: Uint8Array | string; + /** The amount of millisatoshis that was paid to get the token. */ + amountPaidMsat: string; + /** The amount of millisatoshis paid in routing fee to pay for the token. */ + routingFeePaidMsat: string; + /** The creation time of the token as UNIX timestamp in seconds. */ + timeCreated: string; + /** Indicates whether the token is expired or still valid. */ + expired: boolean; + /** + * Identifying attribute of this token in the store. Currently represents the + * file name of the token where it's stored on the file system. + */ + storageName: string; +} + +export interface GetLiquidityParamsRequest {} + +export interface LiquidityParameters { + /** A set of liquidity rules that describe the desired liquidity balance. */ + rules: LiquidityRule[]; + /** + * The parts per million of swap amount that is allowed to be allocated to swap + * fees. This value is applied across swap categories and may not be set in + * conjunction with sweep fee rate, swap fee ppm, routing fee ppm, prepay + * routing, max prepay and max miner fee. + */ + feePpm: string; + /** + * The limit we place on our estimated sweep cost for a swap in sat/vByte. If + * the estimated fee for our sweep transaction within the specified + * confirmation target is above this value, we will not suggest any swaps. + */ + sweepFeeRateSatPerVbyte: string; + /** + * The maximum fee paid to the server for facilitating the swap, expressed + * as parts per million of the swap volume. + */ + maxSwapFeePpm: string; + /** + * The maximum fee paid to route the swap invoice off chain, expressed as + * parts per million of the volume being routed. + */ + maxRoutingFeePpm: string; + /** + * The maximum fee paid to route the prepay invoice off chain, expressed as + * parts per million of the volume being routed. + */ + maxPrepayRoutingFeePpm: string; + /** The maximum no-show penalty in satoshis paid for a swap. */ + maxPrepaySat: string; + /** + * The maximum miner fee we will pay to sweep the swap on chain. Note that we + * will not suggest a swap if the estimate is above the sweep limit set by + * these parameters, and we use the current fee estimate to sweep on chain so + * this value is only a cap placed on the amount we spend on fees in the case + * where the swap needs to be claimed on chain, but fees have suddenly spiked. + */ + maxMinerFeeSat: string; + /** + * The number of blocks from the on-chain HTLC's confirmation height that it + * should be swept within. + */ + sweepConfTarget: number; + /** + * The amount of time we require pass since a channel was part of a failed + * swap due to off chain payment failure until it will be considered for swap + * suggestions again, expressed in seconds. + */ + failureBackoffSec: string; + /** + * Set to true to enable automatic dispatch of swaps. All swaps will be limited + * to the fee categories set by these parameters, and total expenditure will + * be limited to the autoloop budget. + */ + autoloop: boolean; + /** + * The total budget for automatically dispatched swaps since the budget start + * time, expressed in satoshis. + */ + autoloopBudgetSat: string; + /** + * The start time for autoloop budget, expressed as a unix timestamp in + * seconds. If this value is 0, the budget will be applied for all + * automatically dispatched swaps. Swaps that were completed before this date + * will not be included in budget calculations. + */ + autoloopBudgetStartSec: string; + /** + * The maximum number of automatically dispatched swaps that we allow to be in + * flight at any point in time. + */ + autoMaxInFlight: string; + /** + * The minimum amount, expressed in satoshis, that the autoloop client will + * dispatch a swap for. This value is subject to the server-side limits + * specified by the LoopOutTerms endpoint. + */ + minSwapAmount: string; + /** + * The maximum amount, expressed in satoshis, that the autoloop client will + * dispatch a swap for. This value is subject to the server-side limits + * specified by the LoopOutTerms endpoint. + */ + maxSwapAmount: string; + /** The confirmation target for loop in on-chain htlcs. */ + htlcConfTarget: number; +} + +export interface LiquidityRule { + /** + * The short channel ID of the channel that this rule should be applied to. + * This field may not be set when the pubkey field is set. + */ + channelId: string; + /** The type of swap that will be dispatched for this rule. */ + swapType: SwapType; + /** + * The public key of the peer that this rule should be applied to. This field + * may not be set when the channel id field is set. + */ + pubkey: Uint8Array | string; + /** + * Type indicates the type of rule that this message rule represents. Setting + * this value will determine which fields are used in the message. The comments + * on each field in this message will be prefixed with the LiquidityRuleType + * they belong to. + */ + type: LiquidityRuleType; + /** + * THRESHOLD: The percentage of total capacity that incoming capacity should + * not drop beneath. + */ + incomingThreshold: number; + /** + * THRESHOLD: The percentage of total capacity that outgoing capacity should + * not drop beneath. + */ + outgoingThreshold: number; +} + +export interface SetLiquidityParamsRequest { + /** + * Parameters is the desired new set of parameters for the liquidity management + * subsystem. Note that the current set of parameters will be completely + * overwritten by the parameters provided (if they are valid), so the full set + * of parameters should be provided for each call. + */ + parameters: LiquidityParameters | undefined; +} + +export interface SetLiquidityParamsResponse {} + +export interface SuggestSwapsRequest {} + +export interface Disqualified { + /** The short channel ID of the channel that was excluded from our suggestions. */ + channelId: string; + /** The public key of the peer that was excluded from our suggestions. */ + pubkey: Uint8Array | string; + /** The reason that we excluded the channel from the our suggestions. */ + reason: AutoReason; +} + +export interface SuggestSwapsResponse { + /** The set of recommended loop outs. */ + loopOut: LoopOutRequest[]; + /** The set of recommended loop in swaps */ + loopIn: LoopInRequest[]; + /** + * Disqualified contains the set of channels that swaps are not recommended + * for. + */ + disqualified: Disqualified[]; +} + +/** + * SwapClient is a service that handles the client side process of onchain/offchain + * swaps. The service is designed for a single client. + */ +export interface SwapClient { + /** + * loop: `out` + * LoopOut initiates an loop out swap with the given parameters. The call + * returns after the swap has been set up with the swap server. From that + * point onwards, progress can be tracked via the SwapStatus stream that is + * returned from Monitor(). + */ + loopOut(request?: DeepPartial): Promise; + /** + * loop: `in` + * LoopIn initiates a loop in swap with the given parameters. The call + * returns after the swap has been set up with the swap server. From that + * point onwards, progress can be tracked via the SwapStatus stream + * that is returned from Monitor(). + */ + loopIn(request?: DeepPartial): Promise; + /** + * loop: `monitor` + * Monitor will return a stream of swap updates for currently active swaps. + */ + monitor( + request?: DeepPartial, + onMessage?: (msg: SwapStatus) => void, + onError?: (err: Error) => void + ): void; + /** + * loop: `listswaps` + * ListSwaps returns a list of all currently known swaps and their current + * status. + */ + listSwaps( + request?: DeepPartial + ): Promise; + /** + * loop: `swapinfo` + * SwapInfo returns all known details about a single swap. + */ + swapInfo(request?: DeepPartial): Promise; + /** + * loop: `terms` + * LoopOutTerms returns the terms that the server enforces for a loop out swap. + */ + loopOutTerms( + request?: DeepPartial + ): Promise; + /** + * loop: `quote` + * LoopOutQuote returns a quote for a loop out swap with the provided + * parameters. + */ + loopOutQuote( + request?: DeepPartial + ): Promise; + /** + * loop: `terms` + * GetTerms returns the terms that the server enforces for swaps. + */ + getLoopInTerms( + request?: DeepPartial + ): Promise; + /** + * loop: `quote` + * GetQuote returns a quote for a swap with the provided parameters. + */ + getLoopInQuote( + request?: DeepPartial + ): Promise; + /** + * Probe asks he sever to probe the route to us to have a better upfront + * estimate about routing fees when loopin-in. + */ + probe(request?: DeepPartial): Promise; + /** + * loop: `listauth` + * GetLsatTokens returns all LSAT tokens the daemon ever paid for. + */ + getLsatTokens( + request?: DeepPartial + ): Promise; + /** + * loop: `getparams` + * GetLiquidityParams gets the parameters that the daemon's liquidity manager + * is currently configured with. This may be nil if nothing is configured. + * [EXPERIMENTAL]: endpoint is subject to change. + */ + getLiquidityParams( + request?: DeepPartial + ): Promise; + /** + * loop: `setparams` + * SetLiquidityParams sets a new set of parameters for the daemon's liquidity + * manager. Note that the full set of parameters must be provided, because + * this call fully overwrites our existing parameters. + * [EXPERIMENTAL]: endpoint is subject to change. + */ + setLiquidityParams( + request?: DeepPartial + ): Promise; + /** + * loop: `suggestswaps` + * SuggestSwaps returns a list of recommended swaps based on the current + * state of your node's channels and it's liquidity manager parameters. + * Note that only loop out suggestions are currently supported. + * [EXPERIMENTAL]: endpoint is subject to change. + */ + suggestSwaps( + request?: DeepPartial + ): Promise; +} + +type Builtin = + | Date + | Function + | Uint8Array + | string + | number + | boolean + | undefined; + +type DeepPartial = T extends Builtin + ? T + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in keyof T]?: DeepPartial } + : Partial; diff --git a/lib/types/proto/loop/debug.ts b/lib/types/proto/loop/debug.ts new file mode 100644 index 0000000..b113616 --- /dev/null +++ b/lib/types/proto/loop/debug.ts @@ -0,0 +1,39 @@ +/* eslint-disable */ +export interface ForceAutoLoopRequest {} + +export interface ForceAutoLoopResponse {} + +/** + * Debug is a service that exposes endpoints intended for testing purposes. These + * endpoints should not operate on mainnet, and should only be included if loop is + * built with the dev build tag. + */ +export interface Debug { + /** + * ForceAutoLoop is intended for *testing purposes only* and will not work on + * mainnet. This endpoint ticks our autoloop timer, triggering automated + * dispatch of a swap if one is suggested. + */ + forceAutoLoop( + request?: DeepPartial + ): Promise; +} + +type Builtin = + | Date + | Function + | Uint8Array + | string + | number + | boolean + | undefined; + +type DeepPartial = T extends Builtin + ? T + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in keyof T]?: DeepPartial } + : Partial; diff --git a/lib/types/proto/loop/swapserverrpc/common.ts b/lib/types/proto/loop/swapserverrpc/common.ts new file mode 100644 index 0000000..f88ae7e --- /dev/null +++ b/lib/types/proto/loop/swapserverrpc/common.ts @@ -0,0 +1,43 @@ +/* eslint-disable */ +export interface HopHint { + /** The public key of the node at the start of the channel. */ + nodeId: string; + /** The unique identifier of the channel. */ + chanId: string; + /** The base fee of the channel denominated in millisatoshis. */ + feeBaseMsat: number; + /** + * The fee rate of the channel for sending one satoshi across it denominated in + * millionths of a satoshi. + */ + feeProportionalMillionths: number; + /** The time-lock delta of the channel. */ + cltvExpiryDelta: number; +} + +export interface RouteHint { + /** + * A list of hop hints that when chained together can assist in reaching a + * specific destination. + */ + hopHints: HopHint[]; +} + +type Builtin = + | Date + | Function + | Uint8Array + | string + | number + | boolean + | undefined; + +type DeepPartial = T extends Builtin + ? T + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in keyof T]?: DeepPartial } + : Partial; diff --git a/lib/types/proto/looprpc.ts b/lib/types/proto/looprpc.ts new file mode 100644 index 0000000..531d541 --- /dev/null +++ b/lib/types/proto/looprpc.ts @@ -0,0 +1,2 @@ +export * from './loop/client'; +export * from './loop/debug'; diff --git a/lib/types/proto/pool/auctioneerrpc/auctioneer.ts b/lib/types/proto/pool/auctioneerrpc/auctioneer.ts new file mode 100644 index 0000000..cb55146 --- /dev/null +++ b/lib/types/proto/pool/auctioneerrpc/auctioneer.ts @@ -0,0 +1,1219 @@ +/* eslint-disable */ + +export enum ChannelType { + /** TWEAKLESS - The channel supports static to_remote keys. */ + TWEAKLESS = 'TWEAKLESS', + /** ANCHORS - The channel uses an anchor-based commitment. */ + ANCHORS = 'ANCHORS', + /** + * SCRIPT_ENFORCED_LEASE - The channel build upon the anchor-based commitment and requires an + * additional CLTV of the channel lease maturity on any commitment and HTLC + * outputs that pay directly to the channel initiator (the seller). + */ + SCRIPT_ENFORCED_LEASE = 'SCRIPT_ENFORCED_LEASE', + UNRECOGNIZED = 'UNRECOGNIZED' +} + +export enum AuctionAccountState { + /** STATE_PENDING_OPEN - The account's funding transaction is not yet confirmed on-chain. */ + STATE_PENDING_OPEN = 'STATE_PENDING_OPEN', + /** STATE_OPEN - The account is fully open and confirmed on-chain. */ + STATE_OPEN = 'STATE_OPEN', + /** + * STATE_EXPIRED - The account is still open but the CLTV expiry has passed and the trader can + * close it without the auctioneer's key. Orders for accounts in this state + * won't be accepted. + */ + STATE_EXPIRED = 'STATE_EXPIRED', + /** + * STATE_PENDING_UPDATE - The account was modified by a deposit or withdrawal and is currently waiting + * for the modifying transaction to confirm. + */ + STATE_PENDING_UPDATE = 'STATE_PENDING_UPDATE', + /** + * STATE_CLOSED - The account is closed. The auctioneer doesn't track whether the closing + * transaction is already confirmed on-chain or not. + */ + STATE_CLOSED = 'STATE_CLOSED', + /** STATE_PENDING_BATCH - The account has recently participated in a batch and is not yet confirmed. */ + STATE_PENDING_BATCH = 'STATE_PENDING_BATCH', + UNRECOGNIZED = 'UNRECOGNIZED' +} + +export enum OrderChannelType { + /** ORDER_CHANNEL_TYPE_UNKNOWN - Used to set defaults when a trader doesn't specify a channel type. */ + ORDER_CHANNEL_TYPE_UNKNOWN = 'ORDER_CHANNEL_TYPE_UNKNOWN', + /** + * ORDER_CHANNEL_TYPE_PEER_DEPENDENT - The channel type will vary per matched channel based on the features shared + * between its participants. + */ + ORDER_CHANNEL_TYPE_PEER_DEPENDENT = 'ORDER_CHANNEL_TYPE_PEER_DEPENDENT', + /** + * ORDER_CHANNEL_TYPE_SCRIPT_ENFORCED - A channel type that builds upon the anchors commitment format to enforce + * channel lease maturities in the commitment and HTLC outputs that pay to the + * channel initiator/seller. + */ + ORDER_CHANNEL_TYPE_SCRIPT_ENFORCED = 'ORDER_CHANNEL_TYPE_SCRIPT_ENFORCED', + UNRECOGNIZED = 'UNRECOGNIZED' +} + +export enum NodeTier { + /** + * TIER_DEFAULT - The default node tier. This value will be determined at run-time by the + * current order version. + */ + TIER_DEFAULT = 'TIER_DEFAULT', + /** + * TIER_0 - Tier 0, bid with this tier are opting out of the smaller "higher + * quality" pool of nodes to match their bids. Nodes in this tier are + * considered to have "no rating". + */ + TIER_0 = 'TIER_0', + /** + * TIER_1 - Tier 1, the "base" node tier. Nodes in this tier are shown to have a + * higher degree of up time and route-ability compared to the rest of the + * nodes in the network. This is the current default node tier when + * submitting bid orders. + */ + TIER_1 = 'TIER_1', + UNRECOGNIZED = 'UNRECOGNIZED' +} + +export enum OrderState { + ORDER_SUBMITTED = 'ORDER_SUBMITTED', + ORDER_CLEARED = 'ORDER_CLEARED', + ORDER_PARTIALLY_FILLED = 'ORDER_PARTIALLY_FILLED', + ORDER_EXECUTED = 'ORDER_EXECUTED', + ORDER_CANCELED = 'ORDER_CANCELED', + ORDER_EXPIRED = 'ORDER_EXPIRED', + ORDER_FAILED = 'ORDER_FAILED', + UNRECOGNIZED = 'UNRECOGNIZED' +} + +export enum DurationBucketState { + /** + * NO_MARKET - NO_MARKET indicates that this bucket doesn't actually exist, in that no + * market is present for this market. + */ + NO_MARKET = 'NO_MARKET', + /** + * MARKET_CLOSED - MARKET_CLOSED indicates that this market exists, but that it isn't currently + * running. + */ + MARKET_CLOSED = 'MARKET_CLOSED', + /** + * ACCEPTING_ORDERS - ACCEPTING_ORDERS indicates that we're accepting orders for this bucket, but + * not yet clearing for this duration. + */ + ACCEPTING_ORDERS = 'ACCEPTING_ORDERS', + /** + * MARKET_OPEN - MARKET_OPEN indicates that we're accepting orders, and fully clearing the + * market for this duration. + */ + MARKET_OPEN = 'MARKET_OPEN', + UNRECOGNIZED = 'UNRECOGNIZED' +} + +export interface ReserveAccountRequest { + /** The desired value of the account in satoshis. */ + accountValue: string; + /** The block height at which the account should expire. */ + accountExpiry: number; + /** The trader's account key. */ + traderKey: Uint8Array | string; +} + +export interface ReserveAccountResponse { + /** + * The base key of the auctioneer. This key should be tweaked with the trader's + * per-batch tweaked key to obtain the corresponding per-batch tweaked + * auctioneer key. + */ + auctioneerKey: Uint8Array | string; + /** + * The initial per-batch key to be used for the account. For every cleared + * batch that the account participates in, this key will be incremented by the + * base point of its curve, resulting in a new key for both the trader and + * auctioneer in every batch. + */ + initialBatchKey: Uint8Array | string; +} + +export interface ServerInitAccountRequest { + /** + * Transaction output of the account. Has to be unspent and be a P2WSH of + * the account script below. The amount must also exactly correspond to the + * account value below. + */ + accountPoint: OutPoint | undefined; + /** The script used to create the account point. */ + accountScript: Uint8Array | string; + /** + * The value of the account in satoshis. Must match the amount of the + * account_point output. + */ + accountValue: string; + /** The block height at which the account should expire. */ + accountExpiry: number; + /** The trader's account key. */ + traderKey: Uint8Array | string; + /** + * The user agent string that identifies the software running on the user's + * side. This can be changed in the user's client software but it _SHOULD_ + * conform to the following pattern and use less than 256 characters: + * Agent-Name/semver-version(/additional-info) + * Examples: + * poold/v0.4.2-beta/commit=3b635821,initiator=pool-cli + * litd/v0.4.0-alpha/commit=326d754,initiator=lit-ui + */ + userAgent: string; +} + +export interface ServerInitAccountResponse {} + +export interface ServerSubmitOrderRequest { + /** Submit an ask order. */ + ask: ServerAsk | undefined; + /** Submit a bid order. */ + bid: ServerBid | undefined; + /** + * The user agent string that identifies the software running on the user's + * side. This can be changed in the user's client software but it _SHOULD_ + * conform to the following pattern and use less than 256 characters: + * Agent-Name/semver-version(/additional-info) + * Examples: + * poold/v0.4.2-beta/commit=3b635821,initiator=pool-cli + * litd/v0.4.0-alpha/commit=326d754,initiator=lit-ui + */ + userAgent: string; +} + +export interface ServerSubmitOrderResponse { + /** Order failed with the given reason. */ + invalidOrder: InvalidOrder | undefined; + /** Order was accepted. */ + accepted: boolean | undefined; +} + +export interface ServerCancelOrderRequest { + /** The preimage to the order's unique nonce. */ + orderNoncePreimage: Uint8Array | string; +} + +export interface ServerCancelOrderResponse {} + +export interface ClientAuctionMessage { + /** + * Signal the intent to receive updates about a certain account and start + * by sending the commitment part of the authentication handshake. This is + * step 1 of the 3-way handshake. + */ + commit: AccountCommitment | undefined; + /** + * Subscribe to update and interactive order execution events for account + * given and all its orders. Contains the final signature and is step 3 of + * the 3-way authentication handshake. + */ + subscribe: AccountSubscription | undefined; + /** Accept the orders to be matched. */ + accept: OrderMatchAccept | undefined; + /** Reject a whole batch. */ + reject: OrderMatchReject | undefined; + /** + * The channel funding negotiations with the matched peer were successful + * and the inputs to spend from the accounts are now signed. + */ + sign: OrderMatchSign | undefined; + /** + * The trader has lost its database and is trying to recover their + * accounts. This message can be sent after the successful completion of + * the 3-way authentication handshake where it will be established if the + * account exists on the auctioneer's side. This message must only be sent + * if the auctioneer knows of the account, otherwise it will regard it as a + * critical error and terminate the connection. + */ + recover: AccountRecovery | undefined; +} + +export interface AccountCommitment { + /** + * The SHA256 hash of the trader's account key and a 32 byte random nonce. + * commit_hash = SHA256(accountPubKey || nonce) + */ + commitHash: Uint8Array | string; + /** + * The batch verification protocol version the client is using. Clients that + * don't use the latest version will be declined to connect and participate in + * an auction. The user should then be informed that a software update is + * required. + */ + batchVersion: number; +} + +export interface AccountSubscription { + /** The trader's account key of the account to subscribe to. */ + traderKey: Uint8Array | string; + /** The random 32 byte nonce the trader used to create the commitment hash. */ + commitNonce: Uint8Array | string; + /** + * The signature over the auth_hash which is the hash of the commitment and + * challenge. The signature is created with the trader's account key they + * committed to. + * auth_hash = SHA256(SHA256(accountPubKey || nonce) || challenge) + */ + authSig: Uint8Array | string; +} + +export interface OrderMatchAccept { + /** + * The batch ID this acceptance message refers to. Must be set to avoid out-of- + * order responses from disrupting the batching process. + */ + batchId: Uint8Array | string; +} + +export interface OrderMatchReject { + /** The ID of the batch to reject. */ + batchId: Uint8Array | string; + /** The reason/error string for the rejection. */ + reason: string; + /** The reason as a code. */ + reasonCode: OrderMatchReject_RejectReason; + /** + * The map of order nonces the trader was matched with but doesn't accept. The + * map contains the _other_ trader's order nonces and the reason for rejecting + * them. This can be a subset of the whole list of orders presented as matches + * if the trader only wants to reject some of them. This map is only + * considered by the auctioneer if the main reason_code is set to + * PARTIAL_REJECT. Otherwise it is assumed that the whole batch was faulty for + * some reason and that the trader rejects all orders contained. The auctioneer + * will only accept a certain number of these partial rejects before a trader's + * account is removed completely from the current batch. Abusing this + * functionality can also lead to a ban of the trader. + * + * The order nonces are hex encoded strings because the protobuf map doesn't + * allow raw bytes to be the map key type. + */ + rejectedOrders: { [key: string]: OrderReject }; +} + +export enum OrderMatchReject_RejectReason { + /** UNKNOWN - The reason cannot be mapped to a specific code. */ + UNKNOWN = 'UNKNOWN', + /** + * SERVER_MISBEHAVIOR - The client didn't come up with the same result as the server and is + * rejecting the batch because of that. + */ + SERVER_MISBEHAVIOR = 'SERVER_MISBEHAVIOR', + /** + * BATCH_VERSION_MISMATCH - The client doesn't support the current batch verification version the + * server is using. + */ + BATCH_VERSION_MISMATCH = 'BATCH_VERSION_MISMATCH', + /** + * PARTIAL_REJECT - The client rejects some of the orders, not the full batch. When this + * code is set, the rejected_orders map must be set. + */ + PARTIAL_REJECT = 'PARTIAL_REJECT', + UNRECOGNIZED = 'UNRECOGNIZED' +} + +export interface OrderMatchReject_RejectedOrdersEntry { + key: string; + value: OrderReject | undefined; +} + +export interface OrderReject { + /** The reason/error string for the rejection. */ + reason: string; + /** The reason as a code. */ + reasonCode: OrderReject_OrderRejectReason; +} + +export enum OrderReject_OrderRejectReason { + /** + * DUPLICATE_PEER - The trader's client has a preference to only match orders with peers it + * doesn't already have channels with. The order that is rejected with this + * reason type comes from a peer that the trader already has channels with. + */ + DUPLICATE_PEER = 'DUPLICATE_PEER', + /** + * CHANNEL_FUNDING_FAILED - The trader's client couldn't connect to the remote node of the matched + * order or the channel funding could not be initialized for another + * reason. This could also be the rejecting node's fault if their + * connection is not stable. Using this code can have a negative impact on + * the reputation score of both nodes, depending on the number of errors + * recorded. + */ + CHANNEL_FUNDING_FAILED = 'CHANNEL_FUNDING_FAILED', + UNRECOGNIZED = 'UNRECOGNIZED' +} + +export interface ChannelInfo { + /** The identifying type of the channel. */ + type: ChannelType; + /** The node's identifying public key. */ + localNodeKey: Uint8Array | string; + /** The remote node's identifying public key. */ + remoteNodeKey: Uint8Array | string; + /** + * The node's base public key used within the non-delayed pay-to-self output on + * the commitment transaction. + */ + localPaymentBasePoint: Uint8Array | string; + /** + * RemotePaymentBasePoint is the remote node's base public key used within the + * non-delayed pay-to-self output on the commitment transaction. + */ + remotePaymentBasePoint: Uint8Array | string; +} + +export interface OrderMatchSign { + /** The ID of the batch that the signatures are meant for. */ + batchId: Uint8Array | string; + /** + * A map with the signatures to spend the accounts being spent in a batch + * transaction. The map key corresponds to the trader's account key of the + * account in the batch transaction. The account key/ID has to be hex encoded + * into a string because protobuf doesn't allow bytes as a map key data type. + */ + accountSigs: { [key: string]: Uint8Array | string }; + /** + * The information for each channel created as part of a batch that's submitted + * to the auctioneer to ensure they can properly enforce a channel's service + * lifetime. Entries are indexed by the string representation of a channel's + * outpoint. + */ + channelInfos: { [key: string]: ChannelInfo }; +} + +export interface OrderMatchSign_AccountSigsEntry { + key: string; + value: Uint8Array | string; +} + +export interface OrderMatchSign_ChannelInfosEntry { + key: string; + value: ChannelInfo | undefined; +} + +export interface AccountRecovery { + /** The trader's account key of the account to recover. */ + traderKey: Uint8Array | string; +} + +export interface ServerAuctionMessage { + /** + * Step 2 of the 3-way authentication handshake. Contains the + * authentication challenge. Subscriptions sent by the trader must sign + * the message SHA256(SHA256(accountPubKey || nonce) || challenge) + * with their account key to prove ownership of said key. + */ + challenge: ServerChallenge | undefined; + /** + * The trader has subscribed to account updates successfully, the 3-way + * authentication handshake completed normally. + */ + success: SubscribeSuccess | undefined; + /** + * An error occurred during any part of the communication. The trader + * should inspect the error code and act accordingly. + */ + error: SubscribeError | undefined; + /** + * The auctioneer has matched a set of orders into a batch and now + * instructs the traders to validate the batch and prepare for order + * execution. Because traders have the possibility of backing out of a + * batch, multiple of these messages with the SAME batch_id can be sent. + */ + prepare: OrderMatchPrepare | undefined; + /** + * This message is sent after all traders send back an OrderMatchAccept + * method. It signals that the traders should execute their local funding + * protocol, then send signatures for their account inputs. + */ + sign: OrderMatchSignBegin | undefined; + /** + * All traders have accepted and signed the batch and the final transaction + * was broadcast. + */ + finalize: OrderMatchFinalize | undefined; + /** + * The answer to a trader's request for account recovery. This message + * contains all information that is needed to restore the account to + * working order on the trader side. + */ + account: AuctionAccount | undefined; +} + +export interface ServerChallenge { + /** + * The unique challenge for each stream that has to be signed with the trader's + * account key for each account subscription. + */ + challenge: Uint8Array | string; + /** The commit hash the challenge was created for. */ + commitHash: Uint8Array | string; +} + +export interface SubscribeSuccess { + /** The trader's account key this message is referring to. */ + traderKey: Uint8Array | string; +} + +export interface MatchedMarket { + /** + * Maps a user's own order_nonce to the opposite order type they were matched + * with. The order_nonce is a 32 byte hex encoded string because bytes is not + * allowed as a map key data type in protobuf. + */ + matchedOrders: { [key: string]: MatchedOrder }; + /** + * The uniform clearing price rate in parts per billion that was used for this + * batch. + */ + clearingPriceRate: number; +} + +export interface MatchedMarket_MatchedOrdersEntry { + key: string; + value: MatchedOrder | undefined; +} + +export interface OrderMatchPrepare { + /** + * Deprecated, use matched_markets. + * + * @deprecated + */ + matchedOrders: { [key: string]: MatchedOrder }; + /** + * Deprecated, use matched_markets. + * + * @deprecated + */ + clearingPriceRate: number; + /** + * A list of the user's own accounts that are being spent by the matched + * orders. The list contains the differences that would be applied by the + * server when executing the orders. + */ + chargedAccounts: AccountDiff[]; + /** The fee parameters used to calculate the execution fees. */ + executionFee: ExecutionFee | undefined; + /** The batch transaction with all non-witness data. */ + batchTransaction: Uint8Array | string; + /** + * Fee rate of the batch transaction, expressed in satoshis per 1000 weight + * units (sat/kW). + */ + feeRateSatPerKw: string; + /** + * Fee rebate in satoshis, offered if another batch participant wants to pay + * more fees for a faster confirmation. + */ + feeRebateSat: string; + /** The 32 byte unique identifier of this batch. */ + batchId: Uint8Array | string; + /** + * The batch verification protocol version the server is using. Clients that + * don't support this version MUST return an `OrderMatchAccept` message with + * an empty list of orders so the batch can continue. The user should then be + * informed that a software update is required. + */ + batchVersion: number; + /** + * Maps the distinct lease duration markets to the orders that were matched + * within and the discovered market clearing price. + */ + matchedMarkets: { [key: number]: MatchedMarket }; + /** + * The earliest absolute height in the chain in which the batch transaction can + * be found within. This will be used by traders to base off their absolute + * channel lease maturity height. + */ + batchHeightHint: number; +} + +export interface OrderMatchPrepare_MatchedOrdersEntry { + key: string; + value: MatchedOrder | undefined; +} + +export interface OrderMatchPrepare_MatchedMarketsEntry { + key: number; + value: MatchedMarket | undefined; +} + +export interface OrderMatchSignBegin { + /** The 32 byte unique identifier of this batch. */ + batchId: Uint8Array | string; +} + +export interface OrderMatchFinalize { + /** The unique identifier of the finalized batch. */ + batchId: Uint8Array | string; + /** The final transaction ID of the published batch transaction. */ + batchTxid: Uint8Array | string; +} + +export interface SubscribeError { + /** The string representation of the subscription error. */ + error: string; + /** The error code of the subscription error. */ + errorCode: SubscribeError_Error; + /** + * The trader's account key this error is referring to. This is not set if + * the error code is SERVER_SHUTDOWN as that error is only sent once per + * connection and not per individual subscription. + */ + traderKey: Uint8Array | string; + /** + * The auctioneer's partial account information as it was stored when creating + * the reservation. This is only set if the error code is + * INCOMPLETE_ACCOUNT_RESERVATION. Only the fields value, expiry, trader_key, + * auctioneer_key, batch_key and height_hint will be set in that + * case. + */ + accountReservation: AuctionAccount | undefined; +} + +export enum SubscribeError_Error { + /** UNKNOWN - The error cannot be mapped to a specific code. */ + UNKNOWN = 'UNKNOWN', + /** + * SERVER_SHUTDOWN - The server is shutting down for maintenance. Traders should close the + * long-lived stream/connection and try to connect again after some time. + */ + SERVER_SHUTDOWN = 'SERVER_SHUTDOWN', + /** + * ACCOUNT_DOES_NOT_EXIST - The account the trader tried to subscribe to does not exist in the + * auctioneer's database. + */ + ACCOUNT_DOES_NOT_EXIST = 'ACCOUNT_DOES_NOT_EXIST', + /** + * INCOMPLETE_ACCOUNT_RESERVATION - The account the trader tried to subscribe to was never completed and a + * reservation for it is still pending. + */ + INCOMPLETE_ACCOUNT_RESERVATION = 'INCOMPLETE_ACCOUNT_RESERVATION', + UNRECOGNIZED = 'UNRECOGNIZED' +} + +export interface AuctionAccount { + /** + * The value of the account in satoshis. Must match the amount of the + * account_point output. + */ + value: string; + /** The block height at which the account should expire. */ + expiry: number; + /** The trader's account key. */ + traderKey: Uint8Array | string; + /** The long term auctioneer's account key. */ + auctioneerKey: Uint8Array | string; + /** The current batch key used to create the account output. */ + batchKey: Uint8Array | string; + /** The current state of the account as the auctioneer sees it. */ + state: AuctionAccountState; + /** + * The block height of the last change to the account's output. Can be used to + * scan the chain for the output's spend state more efficiently. + */ + heightHint: number; + /** + * Transaction output of the account. Depending on the state of the account, + * this output might have been spent. + */ + outpoint: OutPoint | undefined; + /** + * The latest transaction of an account. This is only known by the auctioneer + * after the account has met its initial funding confirmation. + */ + latestTx: Uint8Array | string; +} + +export interface MatchedOrder { + /** + * The bids the trader's own order was matched against. This list is empty if + * the trader's order was a bid order itself. + */ + matchedBids: MatchedBid[]; + /** + * The asks the trader's own order was matched against. This list is empty if + * the trader's order was an ask order itself. + */ + matchedAsks: MatchedAsk[]; +} + +export interface MatchedAsk { + /** The ask order that was matched against. */ + ask: ServerAsk | undefined; + /** The number of units that were filled from/by this matched order. */ + unitsFilled: number; +} + +export interface MatchedBid { + /** The ask order that was matched against. */ + bid: ServerBid | undefined; + /** The number of units that were filled from/by this matched order. */ + unitsFilled: number; +} + +export interface AccountDiff { + /** The final balance of the account after the executed batch. */ + endingBalance: string; + /** + * Depending on the amount of the final balance of the account, the remainder + * is either sent to a new on-chain output, extended off-chain or fully + * consumed by the batch and its fees. + */ + endingState: AccountDiff_AccountState; + /** + * If the account was re-created on-chain then the new account's index in the + * transaction is set here. If the account was fully spent or the remainder was + * extended off-chain then no new account outpoint is created and -1 is + * returned here. + */ + outpointIndex: number; + /** The trader's account key this diff is referring to. */ + traderKey: Uint8Array | string; + /** + * The new account expiry height used to verify the batch. If the batch is + * successfully executed the account must update its expiry height to this + * value. + */ + newExpiry: number; +} + +export enum AccountDiff_AccountState { + OUTPUT_RECREATED = 'OUTPUT_RECREATED', + OUTPUT_DUST_EXTENDED_OFFCHAIN = 'OUTPUT_DUST_EXTENDED_OFFCHAIN', + OUTPUT_DUST_ADDED_TO_FEES = 'OUTPUT_DUST_ADDED_TO_FEES', + OUTPUT_FULLY_SPENT = 'OUTPUT_FULLY_SPENT', + UNRECOGNIZED = 'UNRECOGNIZED' +} + +export interface ServerOrder { + /** The trader's account key of the account to use for the order. */ + traderKey: Uint8Array | string; + /** Fixed order rate in parts per billion. */ + rateFixed: number; + /** Order amount in satoshis. */ + amt: string; + minChanAmt: string; + /** Order nonce of 32 byte length, acts as unique order identifier. */ + orderNonce: Uint8Array | string; + /** + * Signature of the order's digest, signed with the user's account key. The + * signature must be fixed-size LN wire format encoded. Version 0 includes the + * fields version, rate_fixed, amt, max_batch_fee_rate_sat_per_kw and + * lease_duration_blocks in the order digest. + */ + orderSig: Uint8Array | string; + /** + * The multi signature key of the node creating the order, will be used for the + * target channel's funding TX 2-of-2 multi signature output. + */ + multiSigKey: Uint8Array | string; + /** The pubkey of the node creating the order. */ + nodePub: Uint8Array | string; + /** The network addresses of the node creating the order. */ + nodeAddr: NodeAddress[]; + /** The type of the channel that should be opened. */ + channelType: OrderChannelType; + /** + * Maximum fee rate the trader is willing to pay for the batch transaction, + * expressed in satoshis per 1000 weight units (sat/kW). + */ + maxBatchFeeRateSatPerKw: string; +} + +export interface ServerBid { + /** The common fields shared between both ask and bid order types. */ + details: ServerOrder | undefined; + /** + * Required number of blocks that a channel opened as a result of this bid + * should be kept open. + */ + leaseDurationBlocks: number; + /** + * The version of the order format that is used. Will be increased once new + * features are added. + */ + version: number; + /** + * The minimum node tier this order should be matched with. Only asks backed by + * a node this tier or higher will be eligible for matching with this bid. + */ + minNodeTier: NodeTier; + /** + * Give the incoming channel that results from this bid being matched an + * initial outbound balance by adding additional funds from the taker's account + * into the channel. As a simplification for the execution protocol and the + * channel reserve calculations, the self_chan_balance can be at most the same + * as the order amount and the min_chan_amt must be set to the full order + * amount. + */ + selfChanBalance: string; + /** + * If this bid order is meant to lease a channel for another node (which is + * dubbed a "sidecar channel") then this boolean needs to be set to true. The + * multi_sig_key, node_pub and node_addr fields of the order details must then + * correspond to the recipient node's details. + */ + isSidecarChannel: boolean; +} + +export interface ServerAsk { + /** The common fields shared between both ask and bid order types. */ + details: ServerOrder | undefined; + /** + * The number of blocks the liquidity provider is willing to provide the + * channel funds for. + */ + leaseDurationBlocks: number; + /** + * The version of the order format that is used. Will be increased once new + * features are added. + */ + version: number; +} + +export interface CancelOrder { + orderNonce: Uint8Array | string; +} + +export interface InvalidOrder { + orderNonce: Uint8Array | string; + failReason: InvalidOrder_FailReason; + failString: string; +} + +export enum InvalidOrder_FailReason { + INVALID_AMT = 'INVALID_AMT', + UNRECOGNIZED = 'UNRECOGNIZED' +} + +export interface ServerInput { + /** The outpoint that the input corresponds to. */ + outpoint: OutPoint | undefined; + /** + * The signature script required by the input. This only applies to NP2WKH + * inputs. + */ + sigScript: Uint8Array | string; +} + +export interface ServerOutput { + /** The value, in satoshis, of the output. */ + value: string; + /** The script of the output to send the value to. */ + script: Uint8Array | string; +} + +export interface ServerModifyAccountRequest { + /** The trader's account key of the account to be modified. */ + traderKey: Uint8Array | string; + /** + * An additional set of inputs that can be included in the spending transaction + * of an account. These can be used to deposit more funds into an account. + * These must be under control of the backing lnd node's wallet. + */ + newInputs: ServerInput[]; + /** + * An additional set of outputs that can be included in the spending + * transaction of an account. These can be used to withdraw funds from an + * account. + */ + newOutputs: ServerOutput[]; + /** The new parameters to apply for the account. */ + newParams: ServerModifyAccountRequest_NewAccountParameters | undefined; +} + +export interface ServerModifyAccountRequest_NewAccountParameters { + /** The new value of the account. */ + value: string; + /** The new expiry of the account as an absolute height. */ + expiry: number; +} + +export interface ServerModifyAccountResponse { + /** + * The auctioneer's signature that allows a trader to broadcast a transaction + * spending from an account output. + */ + accountSig: Uint8Array | string; +} + +export interface ServerOrderStateRequest { + orderNonce: Uint8Array | string; +} + +export interface ServerOrderStateResponse { + /** The state the order currently is in. */ + state: OrderState; + /** + * The number of currently unfilled units of this order. This will be equal to + * the total amount of units until the order has reached the state PARTIAL_FILL + * or EXECUTED. + */ + unitsUnfulfilled: number; +} + +export interface TermsRequest {} + +export interface TermsResponse { + /** The maximum account size in satoshis currently allowed by the auctioneer. */ + maxAccountValue: string; + /** + * Deprecated, use explicit order duration from lease_duration_buckets. + * + * @deprecated + */ + maxOrderDurationBlocks: number; + /** The execution fee charged per matched order. */ + executionFee: ExecutionFee | undefined; + /** + * Deprecated, use lease_duration_buckets. + * + * @deprecated + */ + leaseDurations: { [key: number]: boolean }; + /** The confirmation target to use for fee estimation of the next batch. */ + nextBatchConfTarget: number; + /** + * The fee rate, in satoshis per kiloweight, estimated to use for the next + * batch. + */ + nextBatchFeeRateSatPerKw: string; + /** + * The absolute unix timestamp at which the auctioneer will attempt to clear + * the next batch. + */ + nextBatchClearTimestamp: string; + /** + * The set of lease durations the market is currently accepting and the state + * the duration buckets currently are in. + */ + leaseDurationBuckets: { [key: number]: DurationBucketState }; + /** + * The value used by the auctioneer to determine if an account expiry height + * needs to be extended after participating in a batch and for how long. + */ + autoRenewExtensionBlocks: number; +} + +export interface TermsResponse_LeaseDurationsEntry { + key: number; + value: boolean; +} + +export interface TermsResponse_LeaseDurationBucketsEntry { + key: number; + value: DurationBucketState; +} + +export interface RelevantBatchRequest { + /** The unique identifier of the batch. */ + id: Uint8Array | string; + /** + * The set of accounts the trader is interested in retrieving information + * for within the batch. Each account is identified by its trader key. + */ + accounts: Uint8Array | string[]; +} + +export interface RelevantBatch { + /** The version of the batch. */ + version: number; + /** The unique identifier of the batch. */ + id: Uint8Array | string; + /** + * The set of modifications that should be applied to the requested accounts as + * a result of this batch. + */ + chargedAccounts: AccountDiff[]; + /** + * Deprecated, use matched_markets. + * + * @deprecated + */ + matchedOrders: { [key: string]: MatchedOrder }; + /** + * Deprecated, use matched_markets. + * + * @deprecated + */ + clearingPriceRate: number; + /** The fee parameters used to calculate the execution fees. */ + executionFee: ExecutionFee | undefined; + /** The batch transaction including all witness data. */ + transaction: Uint8Array | string; + /** + * Fee rate of the batch transaction, expressed in satoshis per 1000 weight + * units (sat/kW). + */ + feeRateSatPerKw: string; + /** The unix timestamp in nanoseconds the batch was made. */ + creationTimestampNs: string; + /** + * Maps the distinct lease duration markets to the orders that were matched + * within and the discovered market clearing price. + */ + matchedMarkets: { [key: number]: MatchedMarket }; +} + +export interface RelevantBatch_MatchedOrdersEntry { + key: string; + value: MatchedOrder | undefined; +} + +export interface RelevantBatch_MatchedMarketsEntry { + key: number; + value: MatchedMarket | undefined; +} + +export interface ExecutionFee { + /** The base fee in satoshis charged per order, regardless of the matched size. */ + baseFee: string; + /** The fee rate in parts per million. */ + feeRate: string; +} + +export interface NodeAddress { + network: string; + addr: string; +} + +export interface OutPoint { + /** Raw bytes representing the transaction id. */ + txid: Uint8Array | string; + /** The index of the output on the transaction. */ + outputIndex: number; +} + +export interface AskSnapshot { + /** The version of the order. */ + version: number; + /** The period of time the channel will survive for. */ + leaseDurationBlocks: number; + /** The true bid price of the order in parts per billion. */ + rateFixed: number; + /** The channel type to be created. */ + chanType: OrderChannelType; +} + +export interface BidSnapshot { + /** The version of the order. */ + version: number; + /** The period of time the matched channel should be allocated for. */ + leaseDurationBlocks: number; + /** The true bid price of the order in parts per billion. */ + rateFixed: number; + /** The channel type to be created. */ + chanType: OrderChannelType; +} + +export interface MatchedOrderSnapshot { + /** The full ask order that was matched. */ + ask: AskSnapshot | undefined; + /** The full bid order that was matched. */ + bid: BidSnapshot | undefined; + /** The fixed rate premium that was matched, expressed in parts-ber-billion. */ + matchingRate: number; + /** The total number of satoshis that were bought. */ + totalSatsCleared: string; + /** The total number of units that were matched. */ + unitsMatched: number; +} + +export interface BatchSnapshotRequest { + /** The unique identifier of the batch encoded as a compressed pubkey. */ + batchId: Uint8Array | string; +} + +export interface MatchedMarketSnapshot { + /** The set of all orders matched in the batch. */ + matchedOrders: MatchedOrderSnapshot[]; + /** + * The uniform clearing price rate in parts per billion that was used for this + * batch. + */ + clearingPriceRate: number; +} + +export interface BatchSnapshotResponse { + /** The version of the batch. */ + version: number; + /** The unique identifier of the batch. */ + batchId: Uint8Array | string; + /** The unique identifier of the prior batch. */ + prevBatchId: Uint8Array | string; + /** + * Deprecated, use matched_markets. + * + * @deprecated + */ + clearingPriceRate: number; + /** + * Deprecated, use matched_markets. + * + * @deprecated + */ + matchedOrders: MatchedOrderSnapshot[]; + /** The txid of the batch transaction. */ + batchTxId: string; + /** The batch transaction including all witness data. */ + batchTx: Uint8Array | string; + /** The fee rate, in satoshis per kiloweight, of the batch transaction. */ + batchTxFeeRateSatPerKw: string; + /** The unix timestamp in nanoseconds the batch was made. */ + creationTimestampNs: string; + /** + * Maps the distinct lease duration markets to the orders that were matched + * within and the discovered market clearing price. + */ + matchedMarkets: { [key: number]: MatchedMarketSnapshot }; +} + +export interface BatchSnapshotResponse_MatchedMarketsEntry { + key: number; + value: MatchedMarketSnapshot | undefined; +} + +export interface ServerNodeRatingRequest { + /** The target node to obtain ratings information for. */ + nodePubkeys: Uint8Array | string[]; +} + +export interface NodeRating { + /** The pubkey for the node these ratings belong to. */ + nodePubkey: Uint8Array | string; + /** The tier of the target node. */ + nodeTier: NodeTier; +} + +export interface ServerNodeRatingResponse { + /** A series of node ratings for each of the queried nodes. */ + nodeRatings: NodeRating[]; +} + +export interface BatchSnapshotsRequest { + /** + * The unique identifier of the first batch to return, encoded as a compressed + * pubkey. This represents the newest/most current batch to fetch. If this is + * empty or a zero batch ID, the most recent finalized batch is used as the + * starting point to go back from. + */ + startBatchId: Uint8Array | string; + /** The number of batches to return at most, including the start batch. */ + numBatchesBack: number; +} + +export interface BatchSnapshotsResponse { + /** The list of batches requested. */ + batches: BatchSnapshotResponse[]; +} + +export interface MarketInfoRequest {} + +export interface MarketInfo { + /** The number of open/pending ask orders per node tier. */ + numAsks: MarketInfo_TierValue[]; + /** The number of open/pending bid orders per node tier. */ + numBids: MarketInfo_TierValue[]; + /** + * The total number of open/unmatched units in open/pending ask orders per node + * tier. + */ + askOpenInterestUnits: MarketInfo_TierValue[]; + /** + * The total number of open/unmatched units in open/pending bid orders per node + * tier. + */ + bidOpenInterestUnits: MarketInfo_TierValue[]; +} + +export interface MarketInfo_TierValue { + tier: NodeTier; + value: number; +} + +export interface MarketInfoResponse { + /** + * A map of all markets identified by their lease duration and the current + * set of statistics. + */ + markets: { [key: number]: MarketInfo }; +} + +export interface MarketInfoResponse_MarketsEntry { + key: number; + value: MarketInfo | undefined; +} + +export interface ChannelAuctioneer { + reserveAccount( + request?: DeepPartial + ): Promise; + initAccount( + request?: DeepPartial + ): Promise; + modifyAccount( + request?: DeepPartial + ): Promise; + submitOrder( + request?: DeepPartial + ): Promise; + cancelOrder( + request?: DeepPartial + ): Promise; + orderState( + request?: DeepPartial + ): Promise; + subscribeBatchAuction( + request?: DeepPartial, + onMessage?: (msg: ServerAuctionMessage) => void, + onError?: (err: Error) => void + ): void; + subscribeSidecar( + request?: DeepPartial, + onMessage?: (msg: ServerAuctionMessage) => void, + onError?: (err: Error) => void + ): void; + terms(request?: DeepPartial): Promise; + relevantBatchSnapshot( + request?: DeepPartial + ): Promise; + batchSnapshot( + request?: DeepPartial + ): Promise; + nodeRating( + request?: DeepPartial + ): Promise; + batchSnapshots( + request?: DeepPartial + ): Promise; + marketInfo( + request?: DeepPartial + ): Promise; +} + +type Builtin = + | Date + | Function + | Uint8Array + | string + | number + | boolean + | undefined; + +type DeepPartial = T extends Builtin + ? T + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in keyof T]?: DeepPartial } + : Partial; diff --git a/lib/types/proto/pool/auctioneerrpc/hashmail.ts b/lib/types/proto/pool/auctioneerrpc/hashmail.ts new file mode 100644 index 0000000..b7764fa --- /dev/null +++ b/lib/types/proto/pool/auctioneerrpc/hashmail.ts @@ -0,0 +1,121 @@ +/* eslint-disable */ + +export interface PoolAccountAuth { + /** The account key being used to authenticate. */ + acctKey: Uint8Array | string; + /** A valid signature over the stream ID being used. */ + streamSig: Uint8Array | string; +} + +export interface SidecarAuth { + /** + * A valid sidecar ticket that has been signed (offered) by a Pool account in + * the active state. + */ + ticket: string; +} + +export interface CipherBoxAuth { + /** A description of the stream one is attempting to initialize. */ + desc: CipherBoxDesc | undefined; + acctAuth: PoolAccountAuth | undefined; + sidecarAuth: SidecarAuth | undefined; +} + +export interface DelCipherBoxResp {} + +/** TODO(roasbeef): payment request, node key, etc, etc */ +export interface CipherChallenge {} + +export interface CipherError {} + +export interface CipherSuccess { + desc: CipherBoxDesc | undefined; +} + +export interface CipherInitResp { + /** + * CipherSuccess is returned if the initialization of the cipher box was + * successful. + */ + success: CipherSuccess | undefined; + /** + * CipherChallenge is returned if the authentication mechanism was revoked + * or needs to be refreshed. + */ + challenge: CipherChallenge | undefined; + /** + * CipherError is returned if the authentication mechanism failed to + * validate. + */ + error: CipherError | undefined; +} + +export interface CipherBoxDesc { + streamId: Uint8Array | string; +} + +export interface CipherBox { + desc: CipherBoxDesc | undefined; + msg: Uint8Array | string; +} + +/** + * HashMail exposes a simple synchronous network stream that can be used for + * various types of synchronization and coordination. The service allows + * authenticated users to create a simplex stream call a cipher box. Once the + * stream is created, any user that knows of the stream ID can read/write from + * the stream, but only a single user can be on either side at a time. + */ +export interface HashMail { + /** + * NewCipherBox creates a new cipher box pipe/stream given a valid + * authentication mechanism. If the authentication mechanism has been revoked, + * or needs to be changed, then a CipherChallenge message is returned. + * Otherwise the method will either be accepted or rejected. + */ + newCipherBox(request?: DeepPartial): Promise; + /** + * DelCipherBox attempts to tear down an existing cipher box pipe. The same + * authentication mechanism used to initially create the stream MUST be + * specified. + */ + delCipherBox( + request?: DeepPartial + ): Promise; + /** + * SendStream opens up the write side of the passed CipherBox pipe. Writes + * will be non-blocking up to the buffer size of the pipe. Beyond that writes + * will block until completed. + */ + sendStream(request?: DeepPartial): Promise; + /** + * RecvStream opens up the read side of the passed CipherBox pipe. This method + * will block until a full message has been read as this is a message based + * pipe/stream abstraction. + */ + recvStream( + request?: DeepPartial, + onMessage?: (msg: CipherBox) => void, + onError?: (err: Error) => void + ): void; +} + +type Builtin = + | Date + | Function + | Uint8Array + | string + | number + | boolean + | undefined; + +type DeepPartial = T extends Builtin + ? T + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in keyof T]?: DeepPartial } + : Partial; diff --git a/lib/types/proto/pool/trader.ts b/lib/types/proto/pool/trader.ts new file mode 100644 index 0000000..d3f29b5 --- /dev/null +++ b/lib/types/proto/pool/trader.ts @@ -0,0 +1,1213 @@ +/* eslint-disable */ +import type { + OrderState, + OrderChannelType, + NodeTier, + DurationBucketState, + OutPoint, + InvalidOrder, + ExecutionFee, + NodeRating, + MarketInfo, + BatchSnapshotResponse, + BatchSnapshotsResponse, + BatchSnapshotRequest, + BatchSnapshotsRequest +} from './auctioneerrpc/auctioneer'; + +export enum AccountState { + /** PENDING_OPEN - The state of an account when it is pending its confirmation on-chain. */ + PENDING_OPEN = 'PENDING_OPEN', + /** + * PENDING_UPDATE - The state of an account when it has undergone an update on-chain either as + * part of a matched order or a trader modification and it is pending its + * confirmation on-chain. + */ + PENDING_UPDATE = 'PENDING_UPDATE', + /** OPEN - The state of an account once it has confirmed on-chain. */ + OPEN = 'OPEN', + /** + * EXPIRED - The state of an account once its expiration has been reached and its closing + * transaction has confirmed. + */ + EXPIRED = 'EXPIRED', + /** + * PENDING_CLOSED - The state of an account when we're waiting for the closing transaction of + * an account to confirm that required cooperation with the auctioneer. + */ + PENDING_CLOSED = 'PENDING_CLOSED', + /** CLOSED - The state of an account once its closing transaction has confirmed. */ + CLOSED = 'CLOSED', + /** + * RECOVERY_FAILED - The state of an account that indicates that the account was attempted to be + * recovered but failed because the opening transaction wasn't found by lnd. + * This could be because it was never published or it never confirmed. Then the + * funds are SAFU and the account can be considered to never have been opened + * in the first place. + */ + RECOVERY_FAILED = 'RECOVERY_FAILED', + /** PENDING_BATCH - The account has recently participated in a batch and is not yet confirmed. */ + PENDING_BATCH = 'PENDING_BATCH', + UNRECOGNIZED = 'UNRECOGNIZED' +} + +export enum MatchState { + /** PREPARE - The OrderMatchPrepare message from the auctioneer was received initially. */ + PREPARE = 'PREPARE', + /** + * ACCEPTED - The OrderMatchPrepare message from the auctioneer was processed successfully + * and the batch was accepted. + */ + ACCEPTED = 'ACCEPTED', + /** + * REJECTED - The order was rejected by the trader daemon, either as an answer to a + * OrderMatchSignBegin or OrderMatchFinalize message from the auctioneer. + */ + REJECTED = 'REJECTED', + /** + * SIGNED - The OrderMatchSignBegin message from the auctioneer was processed + * successfully. + */ + SIGNED = 'SIGNED', + /** + * FINALIZED - The OrderMatchFinalize message from the auctioneer was processed + * successfully. + */ + FINALIZED = 'FINALIZED', + UNRECOGNIZED = 'UNRECOGNIZED' +} + +export enum MatchRejectReason { + /** NONE - No reject occurred, this is the default value. */ + NONE = 'NONE', + /** + * SERVER_MISBEHAVIOR - The client didn't come up with the same result as the server and is + * rejecting the batch because of that. + */ + SERVER_MISBEHAVIOR = 'SERVER_MISBEHAVIOR', + /** + * BATCH_VERSION_MISMATCH - The client doesn't support the current batch verification version the + * server is using. + */ + BATCH_VERSION_MISMATCH = 'BATCH_VERSION_MISMATCH', + /** + * PARTIAL_REJECT_COLLATERAL - The client rejects some of the orders, not the full batch. This reason is + * set on matches for orders that were in the same batch as partial reject ones + * but were not themselves rejected. + */ + PARTIAL_REJECT_COLLATERAL = 'PARTIAL_REJECT_COLLATERAL', + /** + * PARTIAL_REJECT_DUPLICATE_PEER - The trader's client has a preference to only match orders with peers it + * doesn't already have channels with. The order that is rejected with this + * reason type comes from a peer that the trader already has channels with. + */ + PARTIAL_REJECT_DUPLICATE_PEER = 'PARTIAL_REJECT_DUPLICATE_PEER', + /** + * PARTIAL_REJECT_CHANNEL_FUNDING_FAILED - The trader's client couldn't connect to the remote node of the matched + * order or the channel funding could not be initialized for another + * reason. This could also be the rejecting node's fault if their + * connection is not stable. Using this code can have a negative impact on + * the reputation score of both nodes, depending on the number of errors + * recorded. + */ + PARTIAL_REJECT_CHANNEL_FUNDING_FAILED = 'PARTIAL_REJECT_CHANNEL_FUNDING_FAILED', + UNRECOGNIZED = 'UNRECOGNIZED' +} + +export interface InitAccountRequest { + accountValue: string; + absoluteHeight: number | undefined; + relativeHeight: number | undefined; + /** The target number of blocks that the transaction should be confirmed in. */ + confTarget: number | undefined; + /** + * The fee rate, in satoshis per kw, to use for the initial funding + * transaction. + */ + feeRateSatPerKw: string | undefined; + /** + * An optional identification string that will be appended to the user agent + * string sent to the server to give information about the usage of pool. This + * initiator part is meant for user interfaces to add their name to give the + * full picture of the binary used (poold, LiT) and the method used for opening + * the account (pool CLI, LiT UI, other 3rd party UI). + */ + initiator: string; +} + +export interface QuoteAccountRequest { + accountValue: string; + /** The target number of blocks that the transaction should be confirmed in. */ + confTarget: number | undefined; +} + +export interface QuoteAccountResponse { + minerFeeRateSatPerKw: string; + minerFeeTotal: string; +} + +export interface ListAccountsRequest { + /** Only list accounts that are still active. */ + activeOnly: boolean; +} + +export interface ListAccountsResponse { + accounts: Account[]; +} + +export interface Output { + /** The value, in satoshis, of the output. */ + valueSat: string; + /** The address corresponding to the output. */ + address: string; +} + +export interface OutputWithFee { + /** The address corresponding to the output. */ + address: string; + /** The target number of blocks that the transaction should be confirmed in. */ + confTarget: number | undefined; + /** The fee rate, in satoshis per kw, to use for the withdrawal transaction. */ + feeRateSatPerKw: string | undefined; +} + +export interface OutputsWithImplicitFee { + outputs: Output[]; +} + +export interface CloseAccountRequest { + /** The trader key associated with the account that will be closed. */ + traderKey: Uint8Array | string; + /** + * A single output/address to which the remaining funds of the account will + * be sent to at the specified fee. If an address is not specified, then + * the funds are sent to an address the backing lnd node controls. + */ + outputWithFee: OutputWithFee | undefined; + /** + * The outputs to which the remaining funds of the account will be sent to. + * This should only be used when wanting to create two or more outputs, + * otherwise OutputWithFee should be used instead. The fee of the account's + * closing transaction is implicitly defined by the combined value of all + * outputs. + */ + outputs: OutputsWithImplicitFee | undefined; +} + +export interface CloseAccountResponse { + /** The hash of the closing transaction. */ + closeTxid: Uint8Array | string; +} + +export interface WithdrawAccountRequest { + /** + * The trader key associated with the account that funds will be withdrawed + * from. + */ + traderKey: Uint8Array | string; + /** The outputs we'll withdraw funds from the account into. */ + outputs: Output[]; + /** The fee rate, in satoshis per kw, to use for the withdrawal transaction. */ + feeRateSatPerKw: string; + /** The new absolute expiration height of the account. */ + absoluteExpiry: number | undefined; + /** The new relative expiration height of the account. */ + relativeExpiry: number | undefined; +} + +export interface WithdrawAccountResponse { + /** The state of the account after processing the withdrawal. */ + account: Account | undefined; + /** The transaction used to withdraw funds from the account. */ + withdrawTxid: Uint8Array | string; +} + +export interface DepositAccountRequest { + /** + * The trader key associated with the account that funds will be deposited + * into. + */ + traderKey: Uint8Array | string; + /** The amount in satoshis to deposit into the account. */ + amountSat: string; + /** The fee rate, in satoshis per kw, to use for the deposit transaction. */ + feeRateSatPerKw: string; + /** The new absolute expiration height of the account. */ + absoluteExpiry: number | undefined; + /** The new relative expiration height of the account. */ + relativeExpiry: number | undefined; +} + +export interface DepositAccountResponse { + /** The state of the account after processing the deposit. */ + account: Account | undefined; + /** The transaction used to deposit funds into the account. */ + depositTxid: Uint8Array | string; +} + +export interface RenewAccountRequest { + /** The key associated with the account to renew. */ + accountKey: Uint8Array | string; + /** The new absolute expiration height of the account. */ + absoluteExpiry: number | undefined; + /** The new relative expiration height of the account. */ + relativeExpiry: number | undefined; + /** The fee rate, in satoshis per kw, to use for the renewal transaction. */ + feeRateSatPerKw: string; +} + +export interface RenewAccountResponse { + /** The state of the account after processing the renewal. */ + account: Account | undefined; + /** The transaction used to renew the expiration of the account. */ + renewalTxid: Uint8Array | string; +} + +export interface BumpAccountFeeRequest { + /** The trader key associated with the account that will have its fee bumped. */ + traderKey: Uint8Array | string; + /** + * The new fee rate, in satoshis per kw, to use for the child of the account + * transaction. + */ + feeRateSatPerKw: string; +} + +export interface BumpAccountFeeResponse {} + +export interface Account { + /** + * The identifying component of an account. This is the key used for the trader + * in the 2-of-2 multi-sig construction of an account with an auctioneer. + */ + traderKey: Uint8Array | string; + /** + * The current outpoint associated with the account. This will change every + * time the account has been updated. + */ + outpoint: OutPoint | undefined; + /** The current total amount of satoshis in the account. */ + value: string; + /** + * The amount of satoshis in the account that is available, meaning not + * allocated to any oustanding orders. + */ + availableBalance: string; + /** The height at which the account will expire. */ + expirationHeight: number; + /** The current state of the account. */ + state: AccountState; + /** The hash of the account's latest transaction. */ + latestTxid: Uint8Array | string; +} + +export interface SubmitOrderRequest { + ask: Ask | undefined; + bid: Bid | undefined; + /** + * An optional identification string that will be appended to the user agent + * string sent to the server to give information about the usage of pool. This + * initiator part is meant for user interfaces to add their name to give the + * full picture of the binary used (poold, LiT) and the method used for + * submitting the order (pool CLI, LiT UI, other 3rd party UI). + */ + initiator: string; +} + +export interface SubmitOrderResponse { + /** Order failed with the given reason. */ + invalidOrder: InvalidOrder | undefined; + /** The order nonce of the accepted order. */ + acceptedOrderNonce: Uint8Array | string | undefined; + /** + * In case a bid order was submitted for a sidecar ticket, that ticket is + * updated with the new state and bid order nonce. + */ + updatedSidecarTicket: string; +} + +export interface ListOrdersRequest { + /** + * Can be set to true to list the orders including all events, which can be + * very verbose. + */ + verbose: boolean; + /** Only list orders that are still active. */ + activeOnly: boolean; +} + +export interface ListOrdersResponse { + asks: Ask[]; + bids: Bid[]; +} + +export interface CancelOrderRequest { + orderNonce: Uint8Array | string; +} + +export interface CancelOrderResponse {} + +export interface Order { + /** The trader's account key of the account that is used for the order. */ + traderKey: Uint8Array | string; + /** Fixed order rate in parts per billion. */ + rateFixed: number; + /** Order amount in satoshis. */ + amt: string; + /** + * Maximum fee rate the trader is willing to pay for the batch transaction, + * expressed in satoshis per 1000 weight units (sat/KW). + */ + maxBatchFeeRateSatPerKw: string; + /** Order nonce, acts as unique order identifier. */ + orderNonce: Uint8Array | string; + /** The state the order currently is in. */ + state: OrderState; + /** The number of order units the amount corresponds to. */ + units: number; + /** + * The number of currently unfilled units of this order. This will be equal to + * the total amount of units until the order has reached the state PARTIAL_FILL + * or EXECUTED. + */ + unitsUnfulfilled: number; + /** + * The value reserved from the account by this order to ensure the account + * can pay execution and chain fees in case it gets matched. + */ + reservedValueSat: string; + /** The unix timestamp in nanoseconds the order was first created/submitted. */ + creationTimestampNs: string; + /** + * A list of events that were emitted for this order. This field is only set + * when the verbose flag is set to true in the request. + */ + events: OrderEvent[]; + /** The minimum number of order units that must be matched per order pair. */ + minUnitsMatch: number; + /** The channel type to use for the resulting matched channels. */ + channelType: OrderChannelType; +} + +export interface Bid { + /** The common fields shared between both ask and bid order types. */ + details: Order | undefined; + /** + * Required number of blocks that a channel opened as a result of this bid + * should be kept open. + */ + leaseDurationBlocks: number; + /** + * The version of the order format that is used. Will be increased once new + * features are added. + */ + version: number; + /** + * The minimum node tier this order should be matched with. Only asks backed by + * a node this tier or higher will be eligible for matching with this bid. + */ + minNodeTier: NodeTier; + /** + * Give the incoming channel that results from this bid being matched an + * initial outbound balance by adding additional funds from the taker's account + * into the channel. As a simplification for the execution protocol and the + * channel reserve calculations, the self_chan_balance can be at most the same + * as the order amount and the min_chan_amt must be set to the full order + * amount. + */ + selfChanBalance: string; + /** + * If this bid order is meant to lease a channel for another node (which is + * dubbed a "sidecar channel") then this ticket contains all information + * required for setting up that sidecar channel. The ticket is expected to be + * the base58 encoded ticket, including the prefix and the checksum. + */ + sidecarTicket: string; +} + +export interface Ask { + /** The common fields shared between both ask and bid order types. */ + details: Order | undefined; + /** + * The number of blocks the liquidity provider is willing to provide the + * channel funds for. + */ + leaseDurationBlocks: number; + /** + * The version of the order format that is used. Will be increased once new + * features are added. + */ + version: number; +} + +export interface QuoteOrderRequest { + /** Order amount in satoshis. */ + amt: string; + /** Fixed order rate in parts per billion. */ + rateFixed: number; + /** + * Required number of blocks that a channel opened as a result of this bid + * should be kept open. + */ + leaseDurationBlocks: number; + /** + * Maximum fee rate the trader is willing to pay for the batch transaction, + * expressed in satoshis per 1000 weight units (sat/KW). + */ + maxBatchFeeRateSatPerKw: string; + /** The minimum number of order units that must be matched per order pair. */ + minUnitsMatch: number; +} + +export interface QuoteOrderResponse { + /** + * The total order premium in satoshis for filling the entire order. This + * represents the interest amount paid to the maker by the taker excluding any + * execution or chain fees. + */ + totalPremiumSat: string; + /** The fixed order rate expressed as a fraction instead of parts per billion. */ + ratePerBlock: number; + /** The fixed order rate expressed as a percentage instead of parts per billion. */ + ratePercent: number; + /** + * The total execution fee in satoshis that needs to be paid to the auctioneer + * for executing the entire order. + */ + totalExecutionFeeSat: string; + /** + * The worst case chain fees that need to be paid if fee rates spike up to the + * max_batch_fee_rate_sat_per_kw value specified in the request. This value is + * highly dependent on the min_units_match parameter as well since the + * calculation assumes chain fees for the chain footprint of opening + * amt/min_units_match channels (hence worst case calculation). + */ + worstCaseChainFeeSat: string; +} + +export interface OrderEvent { + /** + * The unix timestamp in nanoseconds the event was emitted at. This is the + * primary key of the event and is unique across the database. + */ + timestampNs: string; + /** The human readable representation of the event. */ + eventStr: string; + /** The order was updated in the database. */ + stateChange: UpdatedEvent | undefined; + /** The order was involved in a match making attempt. */ + matched: MatchEvent | undefined; +} + +export interface UpdatedEvent { + /** + * The state of the order previous to the change. This is what the state + * changed from. + */ + previousState: OrderState; + /** + * The new state of the order after the change. This is what the state changed + * to. + */ + newState: OrderState; + /** The units that were filled at the time of the event. */ + unitsFilled: number; +} + +export interface MatchEvent { + /** The state of the match making process the order went through. */ + matchState: MatchState; + /** The number of units that would be (or were) filled with this match. */ + unitsFilled: number; + /** The nonce of the order we were matched to. */ + matchedOrder: Uint8Array | string; + /** + * The reason why the trader daemon rejected the order. Is only set if + * match_state is set to REJECTED. + */ + rejectReason: MatchRejectReason; +} + +export interface RecoverAccountsRequest { + /** + * Recover the latest account states without interacting with the + * Lightning Labs server. + */ + fullClient: boolean; + /** + * Number of accounts that we are trying to recover. Used during the + * full_client recovery process. + */ + accountTarget: number; + /** + * Auctioneer's public key. Used during the full_client recovery process. + * This field should be left empty for testnet/mainnet, its value is already + * hardcoded in our codebase. + */ + auctioneerKey: string; + /** + * Initial block height. We won't try to look for any account with an expiry + * height smaller than this value. Used during the full_client recovery + * process. + */ + heightHint: number; + /** + * bitcoind/btcd instance address. Used during the full_client recovery + * process. + */ + bitcoinHost: string; + /** + * bitcoind/btcd user name. Used during the full_client recovery + * process. + */ + bitcoinUser: string; + /** + * bitcoind/btcd password. Used during the full_client recovery + * process. + */ + bitcoinPassword: string; + /** + * Use HTTP POST mode? bitcoind only supports this mode. Used during the + * full_client recovery process. + */ + bitcoinHttppostmode: boolean; + /** + * Use TLS to connect? bitcoind only supports non-TLS connections. Used + * during the full_client recovery process. + */ + bitcoinUsetls: boolean; + /** + * Path to btcd's TLS certificate, if TLS is enabled. Used during the + * full_client recovery process. + */ + bitcoinTlspath: string; +} + +export interface RecoverAccountsResponse { + /** The number of accounts that were recovered. */ + numRecoveredAccounts: number; +} + +export interface AuctionFeeRequest {} + +export interface AuctionFeeResponse { + /** The execution fee charged per matched order. */ + executionFee: ExecutionFee | undefined; +} + +export interface Lease { + /** The outpoint of the channel created. */ + channelPoint: OutPoint | undefined; + /** The amount, in satoshis, of the channel created. */ + channelAmtSat: string; + /** The intended duration, in blocks, of the channel created. */ + channelDurationBlocks: number; + /** The absolute height that this channel lease expires. */ + channelLeaseExpiry: number; + /** The premium, in satoshis, either paid or received for the offered liquidity. */ + premiumSat: string; + /** + * The execution fee, in satoshis, charged by the auctioneer for the channel + * created. + */ + executionFeeSat: string; + /** + * The fee, in satoshis, charged by the auctioneer for the batch execution + * transaction that created this lease. + */ + chainFeeSat: string; + /** + * The actual fixed rate expressed in parts per billionth this lease was + * bought/sold at. + */ + clearingRatePrice: string; + /** + * The actual fixed rate of the bid/ask, this should always be 'better' than + * the clearing_rate_price. + */ + orderFixedRate: string; + /** The order executed that resulted in the channel created. */ + orderNonce: Uint8Array | string; + /** + * The unique identifier for the order that was matched with that resulted + * in the channel created. + */ + matchedOrderNonce: Uint8Array | string; + /** Whether this channel was purchased from another trader or not. */ + purchased: boolean; + /** The pubkey of the node that this channel was bought/sold from. */ + channelRemoteNodeKey: Uint8Array | string; + /** The tier of the node that this channel was bought/sold from. */ + channelNodeTier: NodeTier; + /** The self channel balance that was pushed to the recipient. */ + selfChanBalance: string; + /** Whether the channel was leased as a sidecar channel (bid orders only). */ + sidecarChannel: boolean; +} + +export interface LeasesRequest { + /** + * An optional list of batches to retrieve the leases of. If empty, leases + * throughout all batches are returned. + */ + batchIds: Uint8Array | string[]; + /** + * An optional list of accounts to retrieve the leases of. If empty, leases + * for all accounts are returned. + */ + accounts: Uint8Array | string[]; +} + +export interface LeasesResponse { + /** The relevant list of leases purchased or sold within the auction. */ + leases: Lease[]; + /** The total amount of satoshis earned from the leases returned. */ + totalAmtEarnedSat: string; + /** The total amount of satoshis paid for the leases returned. */ + totalAmtPaidSat: string; +} + +export interface TokensRequest {} + +export interface TokensResponse { + /** List of all tokens the daemon knows of, including old/expired tokens. */ + tokens: LsatToken[]; +} + +export interface LsatToken { + /** The base macaroon that was baked by the auth server. */ + baseMacaroon: Uint8Array | string; + /** The payment hash of the payment that was paid to obtain the token. */ + paymentHash: Uint8Array | string; + /** + * The preimage of the payment hash, knowledge of this is proof that the + * payment has been paid. If the preimage is set to all zeros, this means the + * payment is still pending and the token is not yet fully valid. + */ + paymentPreimage: Uint8Array | string; + /** The amount of millisatoshis that was paid to get the token. */ + amountPaidMsat: string; + /** The amount of millisatoshis paid in routing fee to pay for the token. */ + routingFeePaidMsat: string; + /** The creation time of the token as UNIX timestamp in seconds. */ + timeCreated: string; + /** Indicates whether the token is expired or still valid. */ + expired: boolean; + /** + * Identifying attribute of this token in the store. Currently represents the + * file name of the token where it's stored on the file system. + */ + storageName: string; +} + +export interface LeaseDurationRequest {} + +export interface LeaseDurationResponse { + /** + * Deprecated, use lease_duration_buckets. + * + * @deprecated + */ + leaseDurations: { [key: number]: boolean }; + /** + * The set of lease durations the market is currently accepting and the state + * the duration buckets currently are in. + */ + leaseDurationBuckets: { [key: number]: DurationBucketState }; +} + +export interface LeaseDurationResponse_LeaseDurationsEntry { + key: number; + value: boolean; +} + +export interface LeaseDurationResponse_LeaseDurationBucketsEntry { + key: number; + value: DurationBucketState; +} + +export interface NextBatchInfoRequest {} + +export interface NextBatchInfoResponse { + /** + * The confirmation target the auctioneer will use for fee estimation of the + * next batch. + */ + confTarget: number; + /** + * The fee rate, in satoshis per kiloweight, estimated by the auctioneer to use + * for the next batch. + */ + feeRateSatPerKw: string; + /** + * The absolute unix timestamp in seconds at which the auctioneer will attempt + * to clear the next batch. + */ + clearTimestamp: string; + /** + * The value used by the auctioneer to determine if an account expiry height + * needs to be extended after participating in a batch and for how long. + */ + autoRenewExtensionBlocks: number; +} + +export interface NodeRatingRequest { + /** The target node to obtain ratings information for. */ + nodePubkeys: Uint8Array | string[]; +} + +export interface NodeRatingResponse { + /** A series of node ratings for each of the queried nodes. */ + nodeRatings: NodeRating[]; +} + +export interface GetInfoRequest {} + +export interface GetInfoResponse { + /** The version of the Pool daemon that is running. */ + version: string; + /** The total number of accounts in the local database. */ + accountsTotal: number; + /** + * The total number of accounts that are in an active, non-archived state, + * including expired accounts. + */ + accountsActive: number; + /** The total number of accounts that are active but have expired. */ + accountsActiveExpired: number; + /** The total number of accounts that are in an archived/closed state. */ + accountsArchived: number; + /** The total number of orders in the local database. */ + ordersTotal: number; + /** + * The total number of active/pending orders that are still waiting for + * execution. + */ + ordersActive: number; + /** The total number of orders that have been archived. */ + ordersArchived: number; + /** The current block height as seen by the connected lnd node. */ + currentBlockHeight: number; + /** The number of batches an account of this node was ever involved in. */ + batchesInvolved: number; + /** Our lnd node's rating as judged by the auctioneer server. */ + nodeRating: NodeRating | undefined; + /** The number of available LSAT tokens. */ + lsatTokens: number; + /** + * Indicates whether there is an active subscription connection to the + * auctioneer. This will never be true if there is no active account. If there + * are active accounts, this value represents the network connection status to + * the auctioneer server. + */ + subscribedToAuctioneer: boolean; + /** + * Indicates whether the global `--newnodesonly` command line flag or + * `newnodesonly=true` configuration parameter was set on the Pool trader + * daemon. + */ + newNodesOnly: boolean; + /** + * A map of all markets identified by their lease duration and the current + * set of statistics such as number of open orders and total units of open + * interest. + */ + marketInfo: { [key: number]: MarketInfo }; +} + +export interface GetInfoResponse_MarketInfoEntry { + key: number; + value: MarketInfo | undefined; +} + +export interface StopDaemonRequest {} + +export interface StopDaemonResponse {} + +export interface OfferSidecarRequest { + /** + * If false, then only the trader_key, unit, self_chan_balance, and + * lease_duration_blocks need to be set in the bid below. Otherwise, the + * fields as they're set when submitting a bid need to be filled in. + */ + autoNegotiate: boolean; + /** + * The bid template that will be used to populate the initial sidecar ticket + * as well as auto negotiate the remainig steps of the sidecar channel if + * needed. + */ + bid: Bid | undefined; +} + +export interface SidecarTicket { + /** + * The complete sidecar ticket in its string encoded form which is base58 + * encoded, has a human readable prefix ('sidecar...') and a checksum built in. + * The string encoded version will only be used on the trader side of the API. + * All requests to the auctioneer expect the ticket to be in its raw, tlv + * encoded byte form. + */ + ticket: string; +} + +export interface DecodedSidecarTicket { + /** The unique, pseudorandom identifier of the ticket. */ + id: Uint8Array | string; + /** The version of the ticket encoding format. */ + version: number; + /** The state of the ticket. */ + state: string; + /** The offered channel capacity in satoshis. */ + offerCapacity: string; + /** The offered push amount in satoshis. */ + offerPushAmount: string; + /** The offered lease duration in blocks. */ + offerLeaseDurationBlocks: number; + /** The public key the offer was signed with. */ + offerSignPubkey: Uint8Array | string; + /** The signature over the offer's digest. */ + offerSignature: Uint8Array | string; + /** Whether the offer was created with the automatic order creation flag. */ + offerAuto: boolean; + /** The recipient node's public identity key. */ + recipientNodePubkey: Uint8Array | string; + /** + * The recipient node's channel multisig public key to be used for the sidecar + * channel. + */ + recipientMultisigPubkey: Uint8Array | string; + /** The index used when deriving the above multisig pubkey. */ + recipientMultisigPubkeyIndex: number; + /** The nonce of the bid order created for this sidecar ticket. */ + orderBidNonce: Uint8Array | string; + /** + * The signature over the order's digest, signed with the private key that + * corresponds to the offer_sign_pubkey. + */ + orderSignature: Uint8Array | string; + /** The pending channel ID of the sidecar channel during the execution phase. */ + executionPendingChannelId: Uint8Array | string; + /** The original, base58 encoded ticket. */ + encodedTicket: string; +} + +export interface RegisterSidecarRequest { + /** + * The sidecar ticket to register and add the node and channel funding + * information to. The ticket must be in the state "offered". + */ + ticket: string; + /** + * If this value is True, then the daemon will attempt to finish negotiating + * the details of the sidecar channel automatically in the background. The + * progress of the ticket can be monitored using the SidecarState RPC. In + * addition, if this flag is set, then this method will _block_ until the + * sidecar negotiation either finishes or breaks down. + */ + autoNegotiate: boolean; +} + +export interface ExpectSidecarChannelRequest { + /** + * The sidecar ticket to expect an incoming channel for. The ticket must be in + * the state "ordered". + */ + ticket: string; +} + +export interface ExpectSidecarChannelResponse {} + +export interface ListSidecarsRequest { + /** + * The optional sidecar ID to filter for. If set, the result should either be + * a single ticket or no ticket in most cases. But because the ID is just 8 + * bytes and is randomly generated, there could be collisions, especially since + * tickets can also be crafted by a malicious party and given to any node. + * That's why the offer's public key is also used as an identifying element + * since that cannot easily be forged without also producing a valid signature. + * So an attacker cannot overwrite a ticket a node offered by themselves + * offering a ticket with the same ID and tricking the victim into registering + * that. Long story sort, there could be multiple tickets with the same ID but + * different offer public keys, which is why those keys should be checked as + * well. + */ + sidecarId: Uint8Array | string; +} + +export interface ListSidecarsResponse { + tickets: DecodedSidecarTicket[]; +} + +export interface CancelSidecarRequest { + sidecarId: Uint8Array | string; +} + +export interface CancelSidecarResponse {} + +export interface Trader { + /** + * pool: `getinfo` + * GetInfo returns general information about the state of the Pool trader + * daemon. + */ + getInfo(request?: DeepPartial): Promise; + /** + * pool: `stop` + * Stop gracefully shuts down the Pool trader daemon. + */ + stopDaemon( + request?: DeepPartial + ): Promise; + /** + * QuoteAccount gets a fee quote to fund an account of the given size with the + * given confirmation target. If the connected lnd wallet doesn't have enough + * balance to fund an account of the requested size, an error is returned. + */ + quoteAccount( + request?: DeepPartial + ): Promise; + /** + * pool: `accounts new` + * InitAccount creates a new account with the requested size and expiration, + * funding it from the wallet of the connected lnd node. + */ + initAccount(request?: DeepPartial): Promise; + /** + * pool: `accounts list` + * ListAccounts returns a list of all accounts known to the trader daemon and + * their current state. + */ + listAccounts( + request?: DeepPartial + ): Promise; + /** + * pool: `accounts close` + * CloseAccount closes an account and returns the funds locked in that account + * to the connected lnd node's wallet. + */ + closeAccount( + request?: DeepPartial + ): Promise; + /** + * pool: `accounts withdraw` + * WithdrawAccount splits off parts of the account balance into the specified + * outputs while recreating the account with a reduced balance. + */ + withdrawAccount( + request?: DeepPartial + ): Promise; + /** + * pool: `accounts deposit` + * DepositAccount adds more funds from the connected lnd node's wallet to an + * account. + */ + depositAccount( + request?: DeepPartial + ): Promise; + /** + * pool: `accounts renew` + * RenewAccount renews the expiration of an account. + */ + renewAccount( + request?: DeepPartial + ): Promise; + /** + * pool: `accounts bumpfee` + * BumpAccountFee attempts to bump the fee of an account's transaction through + * child-pays-for-parent (CPFP). Since the CPFP is performed through the + * backing lnd node, the account transaction must contain an output under its + * control for a successful bump. If a CPFP has already been performed for an + * account, and this RPC is invoked again, then a replacing transaction (RBF) + * of the child will be broadcast. + */ + bumpAccountFee( + request?: DeepPartial + ): Promise; + /** + * pool: `accounts recover` + * RecoverAccounts queries the auction server for this trader daemon's accounts + * in case we lost our local account database. + */ + recoverAccounts( + request?: DeepPartial + ): Promise; + /** + * pool: `orders submit` + * SubmitOrder creates a new ask or bid order and submits for the given account + * and submits it to the auction server for matching. + */ + submitOrder( + request?: DeepPartial + ): Promise; + /** + * pool: `orders list` + * ListOrders returns a list of all active and archived orders that are + * currently known to the trader daemon. + */ + listOrders( + request?: DeepPartial + ): Promise; + /** + * pool: `orders cancel` + * CancelOrder cancels an active order with the auction server to remove it + * from future matching. + */ + cancelOrder( + request?: DeepPartial + ): Promise; + /** + * QuoteOrder calculates the premium, execution fees and max batch fee rate for + * an order based on the given order parameters. + */ + quoteOrder( + request?: DeepPartial + ): Promise; + /** + * pool: `auction fee` + * AuctionFee returns the current auction order execution fee specified by the + * auction server. + */ + auctionFee( + request?: DeepPartial + ): Promise; + /** + * pool: `auction leasedurations` + * LeaseDurations returns the current set of valid lease duration in the + * market as is, and also information w.r.t if the market is currently active. + */ + leaseDurations( + request?: DeepPartial + ): Promise; + /** + * pool: `auction nextbatchinfo` + * NextBatchInfo returns information about the next batch the auctioneer will + * perform. + */ + nextBatchInfo( + request?: DeepPartial + ): Promise; + /** + * pool: `auction snapshot` + * BatchSnapshot returns the snapshot of a past batch identified by its ID. + * If no ID is provided, the snapshot of the last finalized batch is returned. + * Deprecated, use BatchSnapshots instead. + */ + batchSnapshot( + request?: DeepPartial + ): Promise; + /** + * pool: `listauth` + * GetLsatTokens returns all LSAT tokens the daemon ever paid for. + */ + getLsatTokens( + request?: DeepPartial + ): Promise; + /** + * pool: `auction leases` + * Leases returns the list of channels that were either purchased or sold by + * the trader within the auction. + */ + leases(request?: DeepPartial): Promise; + /** + * pool: `auction ratings` + * Returns the Node Tier information for this target Lightning node, and other + * related ranking information. + */ + nodeRatings( + request?: DeepPartial + ): Promise; + /** + * pool: `auction snapshot` + * BatchSnapshots returns a list of batch snapshots starting at the start batch + * ID and going back through the history of batches, returning at most the + * number of specified batches. A maximum of 100 snapshots can be queried in + * one call. If no start batch ID is provided, the most recent finalized batch + * is used as the starting point to go back from. + */ + batchSnapshots( + request?: DeepPartial + ): Promise; + /** + * pool: `sidecar offer` + * OfferSidecar is step 1/4 of the sidecar negotiation between the provider + * (the trader submitting the bid order) and the recipient (the trader + * receiving the sidecar channel). + * This step must be run by the provider. The result is a sidecar ticket with + * an offer to lease a sidecar channel for the recipient. The offer will be + * signed with the provider's lnd node public key. The ticket returned by this + * call will have the state "offered". + */ + offerSidecar( + request?: DeepPartial + ): Promise; + /** + * pool: `sidecar register` + * RegisterSidecarRequest is step 2/4 of the sidecar negotiation between the + * provider (the trader submitting the bid order) and the recipient (the trader + * receiving the sidecar channel). + * This step must be run by the recipient. The result is a sidecar ticket with + * the recipient's node information and channel funding multisig pubkey filled + * in. The ticket returned by this call will have the state "registered". + */ + registerSidecar( + request?: DeepPartial + ): Promise; + /** + * pool: `sidecar expectchannel` + * ExpectSidecarChannel is step 4/4 of the sidecar negotiation between the + * provider (the trader submitting the bid order) and the recipient (the trader + * receiving the sidecar channel). + * This step must be run by the recipient once the provider has submitted the + * bid order for the sidecar channel. From this point onwards the Pool trader + * daemon of both the provider as well as the recipient need to be online to + * receive and react to match making events from the server. + */ + expectSidecarChannel( + request?: DeepPartial + ): Promise; + /** + * pool: `sidecar printticket` + * Decodes the base58 encoded sidecar ticket into its individual data fields + * for a more human-readable representation. + */ + decodeSidecarTicket( + request?: DeepPartial + ): Promise; + /** + * pool: `sidecar list` + * ListSidecars lists all sidecar tickets currently in the local database. This + * includes tickets offered by our node as well as tickets that our node is the + * recipient of. Optionally a ticket ID can be provided to filter the tickets. + */ + listSidecars( + request?: DeepPartial + ): Promise; + /** + * pool: `sidecar cancel` + * CancelSidecar cancels the execution of a specific sidecar ticket. Depending + * on the state of the sidecar ticket its associated bid order might be + * canceled as well (if this ticket was offered by our node). + */ + cancelSidecar( + request?: DeepPartial + ): Promise; +} + +type Builtin = + | Date + | Function + | Uint8Array + | string + | number + | boolean + | undefined; + +type DeepPartial = T extends Builtin + ? T + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in keyof T]?: DeepPartial } + : Partial; diff --git a/lib/types/proto/poolrpc.ts b/lib/types/proto/poolrpc.ts new file mode 100644 index 0000000..6f39027 --- /dev/null +++ b/lib/types/proto/poolrpc.ts @@ -0,0 +1,3 @@ +export * from './pool/auctioneerrpc/auctioneer'; +export * from './pool/auctioneerrpc/hashmail'; +export * from './pool/trader'; diff --git a/lib/types/proto/routerrpc.ts b/lib/types/proto/routerrpc.ts new file mode 100644 index 0000000..678129a --- /dev/null +++ b/lib/types/proto/routerrpc.ts @@ -0,0 +1 @@ +export * from './lnd/routerrpc/router'; diff --git a/lib/types/proto/schema.ts b/lib/types/proto/schema.ts new file mode 100644 index 0000000..10eef8c --- /dev/null +++ b/lib/types/proto/schema.ts @@ -0,0 +1,62 @@ +// This file is auto-generated by the 'process_types.ts' script + +// Collection of service names to avoid having to use magic strings for +// the RPC services. If anything gets renamed in the protos, it'll +// produce a compiler error +export const serviceNames = { + frdrpc: { FaradayServer: 'frdrpc.FaradayServer' }, + autopilotrpc: { Autopilot: 'autopilotrpc.Autopilot' }, + chainrpc: { ChainNotifier: 'chainrpc.ChainNotifier' }, + invoicesrpc: { Invoices: 'invoicesrpc.Invoices' }, + lnrpc: { + Lightning: 'lnrpc.Lightning', + WalletUnlocker: 'lnrpc.WalletUnlocker' + }, + routerrpc: { Router: 'routerrpc.Router' }, + signrpc: { Signer: 'signrpc.Signer' }, + walletrpc: { WalletKit: 'walletrpc.WalletKit' }, + watchtowerrpc: { Watchtower: 'watchtowerrpc.Watchtower' }, + wtclientrpc: { WatchtowerClient: 'wtclientrpc.WatchtowerClient' }, + looprpc: { SwapClient: 'looprpc.SwapClient', Debug: 'looprpc.Debug' }, + poolrpc: { + ChannelAuctioneer: 'poolrpc.ChannelAuctioneer', + HashMail: 'poolrpc.HashMail', + Trader: 'poolrpc.Trader' + } +}; + +// This array contains the list of methods that are server streaming. It is +// used to determine if the Proxy should call 'request' or 'subscribe'. The +// only other solution would be to either hard-code the subscription methods, +// which increases the maintenance burden on updates, or to have protoc generate JS code +// which increases the bundle size. This build-time approach which only +// includes a small additional file appears to be worthy trade-off +export const subscriptionMethods = [ + 'chainrpc.ChainNotifier.RegisterConfirmationsNtfn', + 'chainrpc.ChainNotifier.RegisterSpendNtfn', + 'chainrpc.ChainNotifier.RegisterBlockEpochNtfn', + 'invoicesrpc.Invoices.SubscribeSingleInvoice', + 'lnrpc.Lightning.SubscribeTransactions', + 'lnrpc.Lightning.SubscribePeerEvents', + 'lnrpc.Lightning.SubscribeChannelEvents', + 'lnrpc.Lightning.OpenChannel', + 'lnrpc.Lightning.ChannelAcceptor', + 'lnrpc.Lightning.CloseChannel', + 'lnrpc.Lightning.SendPayment', + 'lnrpc.Lightning.SendToRoute', + 'lnrpc.Lightning.SubscribeInvoices', + 'lnrpc.Lightning.SubscribeChannelGraph', + 'lnrpc.Lightning.SubscribeChannelBackups', + 'lnrpc.Lightning.RegisterRPCMiddleware', + 'lnrpc.Lightning.SubscribeCustomMessages', + 'routerrpc.Router.SendPaymentV2', + 'routerrpc.Router.TrackPaymentV2', + 'routerrpc.Router.SubscribeHtlcEvents', + 'routerrpc.Router.SendPayment', + 'routerrpc.Router.TrackPayment', + 'routerrpc.Router.HtlcInterceptor', + 'looprpc.SwapClient.Monitor', + 'poolrpc.ChannelAuctioneer.SubscribeBatchAuction', + 'poolrpc.ChannelAuctioneer.SubscribeSidecar', + 'poolrpc.HashMail.RecvStream' +]; diff --git a/lib/types/proto/signrpc.ts b/lib/types/proto/signrpc.ts new file mode 100644 index 0000000..5de001a --- /dev/null +++ b/lib/types/proto/signrpc.ts @@ -0,0 +1 @@ +export * from './lnd/signrpc/signer'; diff --git a/lib/types/proto/walletrpc.ts b/lib/types/proto/walletrpc.ts new file mode 100644 index 0000000..e4e989b --- /dev/null +++ b/lib/types/proto/walletrpc.ts @@ -0,0 +1 @@ +export * from './lnd/walletrpc/walletkit'; diff --git a/lib/types/proto/watchtowerrpc.ts b/lib/types/proto/watchtowerrpc.ts new file mode 100644 index 0000000..557bd3d --- /dev/null +++ b/lib/types/proto/watchtowerrpc.ts @@ -0,0 +1 @@ +export * from './lnd/watchtowerrpc/watchtower'; diff --git a/lib/types/proto/wtclientrpc.ts b/lib/types/proto/wtclientrpc.ts new file mode 100644 index 0000000..8942f72 --- /dev/null +++ b/lib/types/proto/wtclientrpc.ts @@ -0,0 +1 @@ +export * from './lnd/wtclientrpc/wtclient'; diff --git a/lib/types/state.ts b/lib/types/state.ts deleted file mode 100644 index 620b2e1..0000000 --- a/lib/types/state.ts +++ /dev/null @@ -1,147 +0,0 @@ -import Big from 'big.js'; - -export enum SwapDirection { - IN = 'Loop In', - OUT = 'Loop Out' -} - -export interface Quote { - swapFee: Big; - minerFee: Big; - prepayAmount: Big; -} - -export interface SwapTerms { - in: { - min: Big; - max: Big; - }; - out: { - min: Big; - max: Big; - minCltv?: number; - maxCltv?: number; - }; -} - -export enum BuildSwapSteps { - Closed = 0, - SelectDirection = 1, - ChooseAmount = 2, - ReviewQuote = 3, - Processing = 4 -} - -export enum SidecarRegisterSteps { - Closed = 0, - EnterTicket = 1, - ConfirmTicket = 2, - Processing = 3, - Complete = 4 -} - -export interface Alert { - id: number; - type: 'info' | 'success' | 'warning' | 'error' | 'default'; - title?: string; - message: string; - /** the number of milliseconds before the toast closes automatically */ - ms?: number; -} - -export interface SortParams { - field?: keyof T; - descending: boolean; -} - -export enum ChannelStatus { - UNKNOWN = 'Unknown', - OPEN = 'Open', - OPENING = 'Opening', - CLOSING = 'Closing', - FORCE_CLOSING = 'Force Closing', - WAITING_TO_CLOSE = 'Waiting To Close' -} - -/** - * A type to signify that a number actually represents a lease duration. - * This just makes the code more readable since it will be clear that a - * duration is not just a random number. - */ -export type LeaseDuration = number; - -/** - * A type to signify that a string represents a node pubkey - */ -export type PubKey = string; - -export interface CommonInsightsData { - alias: string; - totalCapacity: number; - agedCapacity: number; - centrality: number; - centralityNormalized: number; - maxChannelAge: number; - totalPeers: number; - addresses: string[]; -} - -export interface UnstableNodeData extends CommonInsightsData { - failMinChanCount?: boolean; - failMinMedianCapacity?: boolean; - failMaxDisableRatio?: boolean; - failUptimeRatio?: boolean; -} - -export interface StableNodeData extends CommonInsightsData { - stableInboundPeers: PubKey[]; - stableOutboundPeers: PubKey[]; - goodInboundPeers: PubKey[]; - goodOutboundPeers: PubKey[]; -} - -export interface ScoredNodeData extends StableNodeData { - score: number; -} - -export interface NodeInsightsData { - lastUpdated: string; - maxScore: number; - maxGoodOutboundPeers: number; - numScored: number; - numStable: number; - numUnstable: number; - numNonConnectable: number; - heuristics: { - maximumDisableRatio: number; - minimumActiveChannelCount: number; - minimumStableOutboundPeers: number; - minimumChannelAgeBlocksCount: number; - minimumMedianCapacity: number; - minimumRoutableTokens: number; - uptimePercentage: number; - }; - scored: Record; - stable: Record; - unstable: Record; - unconnectable: PubKey[]; -} - -export enum NodeHealth { - Unconnectable, - Online, - PlentyOfChannels, - GoodRoutingCapacity, - HealthyChannels, - Stable, - Scored -} - -export interface HealthCheck { - minNodeHealth: number; - description: string; - guide: { - title: string; - url: string; - }; -} diff --git a/lib/util/BaseEmitter.ts b/lib/util/BaseEmitter.ts deleted file mode 100644 index be06b17..0000000 --- a/lib/util/BaseEmitter.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { Emitter, EventKey, EventMap, EventReceiver } from '../types/emitter'; -import { EventEmitter } from 'events'; - -/** - * A shared base class containing logic for storing the API credentials - */ -export default class BaseEmitter implements Emitter { - /** an internal event emitter used to track event subscriptions */ - private _emitter = new EventEmitter(); - - /** - * Subscribe to have a handler function called when an event is emitted - * @param eventName the name of the event - * @param handler the function to call when the event is emitted - */ - on>(eventName: K, handler: EventReceiver) { - this._emitter.on(eventName, handler); - } - - /** - * Unsubscribes the handler for the provided event - * @param eventName the name of the event - * @param handler the function that was used to subscribe to the event - */ - off>(eventName: K, handler: EventReceiver) { - this._emitter.off(eventName, handler); - } - - /** - * Call all of the subscribed handlers for an event with the supplied argument - * @param eventName the name of the event - * @param params the argument to pass to the handlers that are subscribed - * to this event - */ - emit>(eventName: K, params: T[K]) { - this._emitter.emit(eventName, params); - } -} diff --git a/lib/util/credentialStore.ts b/lib/util/credentialStore.ts index d8281dd..8576eec 100644 --- a/lib/util/credentialStore.ts +++ b/lib/util/credentialStore.ts @@ -1,10 +1,10 @@ import { CredentialStore } from '../types/lnc'; import { - createTestCipher, - decrypt, - encrypt, - generateSalt, - verifyTestCipher, + createTestCipher, + decrypt, + encrypt, + generateSalt, + verifyTestCipher } from './encryption'; const STORAGE_KEY = 'lnc-web'; @@ -42,11 +42,11 @@ export default class LncCredentialStore implements CredentialStore { * Constructs a new `LncCredentialStore` instance */ constructor(namespace?: string, password?: string) { - // load data stored in localStorage - this._load(); - if (namespace) this.namespace = namespace; if (password) this.password = password; + + // load data stored in localStorage + this._load(); } // diff --git a/lib/util/errors.ts b/lib/util/errors.ts deleted file mode 100644 index a1722f7..0000000 --- a/lib/util/errors.ts +++ /dev/null @@ -1,4 +0,0 @@ -/** - * A custom error to throw when the API returns an unauthenticated response code - */ -export class AuthenticationError extends Error {} diff --git a/lib/util/strings.ts b/lib/util/strings.ts deleted file mode 100644 index cf0990f..0000000 --- a/lib/util/strings.ts +++ /dev/null @@ -1,23 +0,0 @@ -export const capitalize = (s: string) => s && s[0].toUpperCase() + s.slice(1); - -/** - * converts a hex string into base64 format - */ -export const b64 = (value: string, reverse = false): string => { - let converted = Buffer.from(value, 'hex'); - if (reverse) converted = converted.reverse(); - return converted.toString('base64'); -}; - -/** - * Converts a mapping of class names -> bool to a string containing each key where the - * value is truthy - */ -export const cn = (classNames: Record): string => { - return Object.keys(classNames) - .reduce( - (names, key) => (classNames[key] ? [...names, key] : names), - [] - ) - .join(' '); -}; diff --git a/lib/util/tests/sampleData.ts b/lib/util/tests/sampleData.ts deleted file mode 100644 index caca39e..0000000 --- a/lib/util/tests/sampleData.ts +++ /dev/null @@ -1,929 +0,0 @@ -import * as AUCT from '../../types/generated/auctioneerrpc/auctioneer_pb'; -import * as LND from '../../types/generated/lightning_pb'; -import * as LOOP from '../../types/generated/client_pb'; -import * as POOL from '../../types/generated/trader_pb'; -import { b64 } from '../strings'; - -// -// LND API Responses -// - -export const lndGetInfo: LND.GetInfoResponse.AsObject = { - version: '0.11.0-beta commit=lightning-terminal-v0.1.0-alpha', - commitHash: '9d5c264e7f0fd6751aeb41da497923512ac8fbea', - identityPubkey: - '038b3fc29cfc195c9b190d86ad2d40ce7550a5c6f13941f53c7d7ac5b25c912a6c', - alias: 'alice', - color: '#cccccc', - numPendingChannels: 0, - numActiveChannels: 1, - numInactiveChannels: 0, - numPeers: 1, - blockHeight: 185, - blockHash: - '547d3dcfb7d56532bed2efdeea0d400f11167b34d493bcd45fedb21f2ef7ed43', - bestHeaderTimestamp: 1586548672, - syncedToChain: false, - syncedToGraph: true, - testnet: false, - chains: [{ chain: 'bitcoin', network: 'regtest' }], - uris: [ - '038b3fc29cfc195c9b190d86ad2d40ce7550a5c6f13941f53c7d7ac5b25c912a6c@172.18.0.7:9735' - ], - features: [ - [0, { name: 'data-loss-protect', isRequired: true, isKnown: true }], - [13, { name: 'static-remote-key', isRequired: false, isKnown: true }], - [15, { name: 'payment-addr', isRequired: false, isKnown: true }], - [17, { name: 'multi-path-payments', isRequired: false, isKnown: true }], - [ - 5, - { - name: 'upfront-shutdown-script', - isRequired: false, - isKnown: true - } - ], - [7, { name: 'gossip-queries', isRequired: false, isKnown: true }], - [9, { name: 'tlv-onion', isRequired: false, isKnown: true }] - ] -}; - -export const lndGetNodeInfo: Required = { - channels: [], - node: { - addresses: [ - { - addr: '172.28.0.8:9735', - network: 'tcp' - } - ], - alias: 'alice', - color: '#cccccc', - features: [ - [0, { name: 'data-loss-protect', isRequired: true, isKnown: true }], - [ - 13, - { name: 'static-remote-key', isRequired: false, isKnown: true } - ], - [15, { name: 'payment-addr', isRequired: false, isKnown: true }], - [ - 17, - { - name: 'multi-path-payments', - isRequired: false, - isKnown: true - } - ], - [ - 5, - { - name: 'upfront-shutdown-script', - isRequired: false, - isKnown: true - } - ], - [7, { name: 'gossip-queries', isRequired: false, isKnown: true }], - [9, { name: 'tlv-onion', isRequired: false, isKnown: true }] - ], - lastUpdate: 1591393224, - pubKey: '037136742c67e24681f36542f7c8916aa6f6fdf665c1dca2a107425503cff94501' - }, - numChannels: 3, - totalCapacity: 47000000 -}; - -export const lndChannelBalance: LND.ChannelBalanceResponse.AsObject = { - balance: 9990950, - pendingOpenBalance: 0 -}; - -export const lndWalletBalance: LND.WalletBalanceResponse.AsObject = { - totalBalance: 84992363, - confirmedBalance: 84992363, - unconfirmedBalance: 0, - accountBalance: [], - lockedBalance: 30323021 -}; - -const txId = '6ee4e45870ac6191e25173f29804851e9f4bcf10f65f8b63100f488989e1e7a8'; -const outIndex = 0; -export const lndChannel: LND.Channel.AsObject = { - active: true, - remotePubkey: - '037136742c67e24681f36542f7c8916aa6f6fdf665c1dca2a107425503cff94501', - channelPoint: `${txId}:${outIndex}`, - chanId: '124244814004224', - capacity: 15000000, - localBalance: 9988660, - remoteBalance: 4501409, - commitFee: 11201, - commitWeight: 896, - feePerKw: 12500, - unsettledBalance: 498730, - totalSatoshisSent: 1338, - totalSatoshisReceived: 499929, - numUpdates: 6, - pendingHtlcs: [ - { - incoming: false, - amount: 498730, - hashLock: 'pl8fmsyoSqEQFQCw6Zu9e1aIlFnMz5H+hW2mmh3kRlI=', - expirationHeight: 285, - htlcIndex: 0, - forwardingChannel: 124244814004224, - forwardingHtlcIndex: 0 - } - ], - csvDelay: 1802, - pb_private: false, - initiator: true, - chanStatusFlags: 'ChanStatusDefault', - localChanReserveSat: 150000, - remoteChanReserveSat: 150000, - staticRemoteKey: true, - commitmentType: LND.CommitmentType.STATIC_REMOTE_KEY, - lifetime: 21802, - uptime: 21802, - closeAddress: '', - pushAmountSat: 5000000, - thawHeight: 0 -}; - -export const lndListChannelsMany: LND.ListChannelsResponse.AsObject = { - channels: [...Array(500)].map((_, i) => { - const c = lndChannel; - // pick a random capacity between 0.5 and 1 BTC - const cap = Math.floor(Math.random() * 50000000) + 50000000; - // pick a local balance that is at least 100K sats - const local = Math.max( - 100000, - Math.floor(Math.random() * cap - 100000) - ); - return { - ...c, - chanId: `${i || ''}${c.chanId}`, - channelPoint: `${c.channelPoint.substring( - 0, - c.channelPoint.length - 2 - )}:${i}`, - remotePubkey: `${i || ''}${c.remotePubkey}`, - localBalance: local, - remoteBalance: cap - local, - capacity: cap, - uptime: - Math.floor(Math.random() * (+c.lifetime / 2)) + +c.lifetime / 2 - }; - }) -}; - -export const lndListChannels: LND.ListChannelsResponse.AsObject = { - channels: lndListChannelsMany.channels.slice(0, 10) -}; - -export const lndPendingChannel: LND.PendingChannelsResponse.PendingChannel.AsObject = - { - capacity: 500000, - channelPoint: - '987da7ae4e56a30ee841edc5a4ccf61112e98bce7d4acfdf8e71a670296d16a7:0', - commitmentType: 1, - initiator: 2, - localBalance: 0, - localChanReserveSat: 5000, - remoteBalance: 490950, - remoteChanReserveSat: 5000, - remoteNodePub: - '03bb934930cdcd25576aa61d08cc95214e0036f1219c435c06976e561558703290', - numForwardingPackages: 10, - chanStatusFlags: 'Test' - }; - -export const lndPendingChannels: LND.PendingChannelsResponse.AsObject = { - totalLimboBalance: 0, - pendingOpenChannels: [ - { - channel: { - ...lndPendingChannel, - channelPoint: lndListChannels.channels[0].channelPoint - }, - commitFee: 9050, - commitWeight: 552, - confirmationHeight: 0, - feePerKw: 12500 - } - ], - pendingClosingChannels: [ - { - channel: { - ...lndPendingChannel, - channelPoint: lndListChannels.channels[1].channelPoint - }, - closingTxid: - 'fe65f668a1efe1c088b0e7d44abb707cb0171ebbbe43e8f6bb985a98643f1672' - } - ], - waitingCloseChannels: [ - { - channel: { - ...lndPendingChannel, - channelPoint: lndListChannels.channels[2].channelPoint - }, - commitments: { - localCommitFeeSat: 9050, - localTxid: - 'fe65f668a1efe1c088b0e7d44abb707cb0171ebbbe43e8f6bb985a98643f1672', - remoteCommitFeeSat: 9050, - remotePendingCommitFeeSat: 0, - remotePendingTxid: '', - remoteTxid: - '9850a4b1cfcfbf972f8541b26b8061ed3091ee8cbed5875167080be4be9524e7' - }, - limboBalance: 0, - closingTxid: - '9850a4b1cfcfbf972f8541b26b8061ed3091ee8cbed5875167080be4be9524e7' - } - ], - pendingForceClosingChannels: [ - { - channel: { - ...lndPendingChannel, - channelPoint: lndListChannels.channels[3].channelPoint - }, - anchor: 0, - blocksTilMaturity: 142, - closingTxid: - '6c151252215b73547a5415051c82dd25c725c4309b93fed4f38c4c5b610c3fb0', - limboBalance: 990950, - maturityHeight: 440, - pendingHtlcs: [], - recoveredBalance: 0 - } - ] -}; - -const txIdBytes = b64(txId, true); -export const lndChannelEvent: Required = { - type: LND.ChannelEventUpdate.UpdateType.OPEN_CHANNEL, - fullyResolvedChannel: { - fundingTxidBytes: txIdBytes, - fundingTxidStr: '', - outputIndex: outIndex - }, - openChannel: lndChannel, - closedChannel: { - capacity: 15000000, - chainHash: - '0f9188f13cb7b2c71f2a335e3a4fc328bf5beb436012afca590b1a11466e2206', - chanId: lndChannel.chanId, - channelPoint: lndChannel.channelPoint, - closeHeight: 191, - closeType: 0, - closingTxHash: - '1f765f45f2a6d33837a203e3fc911915c891e9b86f9c9d91a1931b92efdedf5b', - remotePubkey: - '030e98fdacf2464bdfb027b866a018d6cdc5108514208988873abea7eff59afd91', - settledBalance: 12990950, - timeLockedBalance: 0, - openInitiator: 1, - closeInitiator: 1, - resolutions: [] - }, - activeChannel: { - fundingTxidBytes: txIdBytes, - fundingTxidStr: '', - outputIndex: outIndex - }, - inactiveChannel: { - fundingTxidBytes: txIdBytes, - fundingTxidStr: '', - outputIndex: outIndex - }, - pendingOpenChannel: { - txid: '1f765f45f2a6d33837a203e3fc911915c891e9b86f9c9d91a1931b92efdedf5b', - outputIndex: 0 - } -}; - -export const lndTransaction: LND.Transaction.AsObject = { - amount: 12990950, - blockHash: '', - blockHeight: 0, - destAddresses: [ - 'bcrt1qgrvqm263gra5t02cvvkxmp9520rkann0cedzz8', - 'bcrt1qkggx6pzd768hn6psc5tmwuvv4c2nzvpd3ax9a9' - ], - numConfirmations: 0, - rawTxHex: - '02000000000101a8e7e18989480f10638b5ff610cf4b9f1e850498f27351e29161ac7058e4e46e0000000000ffffffff0280841e000000000016001440d80dab5140fb45bd58632c6d84b453c76ece6fe639c60000000000160014b2106d044df68f79e830c517b7718cae1531302d040047304402207e17f9938f04a2379300a5c0f37305c902855fa000726bb7f0ad78d084acfcee02206d3da5edd73624d6ecfa27ae61e994e75bd0ad8cca6c9b7dda087bcf34b2bbbc0148304502210086d0b7e77b1d81f210d55bc13f9eef975774ac1509a22ff649bd2baac85b3fd702203bb272d6372450159b89ca41d97efbf6bdac076bc271696a1bd556efc31b5cda01475221028d084ada5554c83421bfac35bc78332f3c1f6ae980dea1e0eb3220411b7b83972103c60b39c8558f280fe2f0dfa7cb6a04f016470c4670e631458b400774a667610052ae00000000', - timeStamp: 1591226124, - totalFees: 0, - txHash: '1f765f45f2a6d33837a203e3fc911915c891e9b86f9c9d91a1931b92efdedf5b', - label: '' -}; - -export const lndGetChanInfo: Required = { - channelId: lndChannel.chanId, - chanPoint: lndChannel.channelPoint, - lastUpdate: 1591622793, - node1Pub: lndGetInfo.identityPubkey, - node2Pub: - '021626ad63f6876f2baa6000739312690b027ec289b9d1bf9184f3194e8c923dad', - capacity: 1800000, - node1Policy: { - timeLockDelta: 3000, - minHtlc: 1000, - feeBaseMsat: 3000, - feeRateMilliMsat: 300, - disabled: false, - maxHtlcMsat: 1782000000, - lastUpdate: 1591622793 - }, - node2Policy: { - timeLockDelta: 40, - minHtlc: 1000, - feeBaseMsat: 1000, - feeRateMilliMsat: 1, - disabled: false, - maxHtlcMsat: 1782000000, - lastUpdate: 1591622772 - } -}; - -// -// Loop API Responses -// - -export const loopListSwaps: LOOP.ListSwapsResponse.AsObject = { - swaps: [...Array(7)].map((x, i) => ({ - amt: Number(`${500000 + i * 5000}`), - id: `f4eb118383c2b09d8c7289ce21c25900cfb4545d46c47ed23a31ad2aa57ce83${i}`, - idBytes: '9OsRg4PCsJ2MconOIcJZAM+0VF1GxH7SOjGtKqV86DU=', - type: (i % 3) as LOOP.SwapStatus.AsObject['type'], - state: i % 2 ? LOOP.SwapState.SUCCESS : LOOP.SwapState.FAILED, - failureReason: (i % 2 === 0 - ? 0 - : i % 7) as LOOP.SwapStatus.AsObject['failureReason'], - initiationTime: Number(`${1586390353623905000 + i * 100000000000000}`), - lastUpdateTime: Number(`${1586398369729857000 + i * 200000000000000}`), - htlcAddress: - 'bcrt1qzu4077erkr78k52yuf2rwkk6ayr6m3wtazdfz2qqmd7taa5vvy9s5d75gd', - htlcAddressP2wsh: - 'bcrt1qzu4077erkr78k52yuf2rwkk6ayr6m3wtazdfz2qqmd7taa5vvy9s5d75gd', - htlcAddressNp2wsh: '', - costServer: 66, - costOnchain: 6812, - costOffchain: 2, - label: `Sample Swap #${i + 1}`, - lastHop: '0a1', - outgoingChanSet: [] - })) -}; - -export const loopOutTerms: LOOP.OutTermsResponse.AsObject = { - minSwapAmount: 250000, - maxSwapAmount: 1000000, - minCltvDelta: 20, - maxCltvDelta: 60 -}; - -export const loopInTerms: LOOP.InTermsResponse.AsObject = { - minSwapAmount: 250000, - maxSwapAmount: 1000000 -}; - -export const loopOutQuote: LOOP.OutQuoteResponse.AsObject = { - cltvDelta: 50, - htlcSweepFeeSat: 7387, - prepayAmtSat: 1337, - swapFeeSat: 83, - swapPaymentDest: 'Au1a9/hEsbxHUOwFC1QwxZq6EnnKYtpAdc74OZK8/syU', - confTarget: 6 -}; - -export const loopInQuote: LOOP.InQuoteResponse.AsObject = { - cltvDelta: 50, - htlcPublishFeeSat: 7387, - swapFeeSat: 83, - confTarget: 6 -}; - -export const loopSwapResponse: LOOP.SwapResponse.AsObject = { - htlcAddress: - 'bcrt1qkjct8aqxfwyla50mfxdnzlmuphg3zwuz2zmuy99c9sw67xj7tn2sfkflhw', - htlcAddressNp2wsh: '', - htlcAddressP2wsh: - 'bcrt1qkjct8aqxfwyla50mfxdnzlmuphg3zwuz2zmuy99c9sw67xj7tn2sfkflhw', - id: '18e17a2f44efc7f344ef6330281765e569315f93d3eaf9b0f959b404836e3480', - idBytes: 'GOF6L0Tvx/NE72MwKBdl5WkxX5PT6vmw+Vm0BINuNIA=', - serverMessage: 'Loop, there it is!' -}; - -// -// Pool API Responses -// - -export const poolInitAccount: POOL.Account.AsObject = { - availableBalance: 10000000, - latestTxid: 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=', - expirationHeight: 4334, - outpoint: { - outputIndex: 0, - txid: 'fY/L3gq49iu3bykuK32Ar95ewk3a2wUkFSOGfmGFncc=' - }, - state: POOL.AccountState.OPEN, - traderKey: 'Ap+9XjK2X8EOrmAJvcvWS1B9jt3xLYka0S7aMru0Bude', - value: 30000000 -}; - -export const poolQuoteAccount: POOL.QuoteAccountResponse.AsObject = { - minerFeeRateSatPerKw: 12500, - minerFeeTotal: 7650 -}; - -export const poolCloseAccount: POOL.CloseAccountResponse.AsObject = { - closeTxid: '+BQm/hnM0SleT2NxS7bdw0JNDuvIMhL4qxLUkdbCJdo=' -}; - -export const poolRenewAccount: POOL.RenewAccountResponse.AsObject = { - renewalTxid: '+BQm/hnM0SleT2NxS7bdw0JNDuvIMhL4qxLUkdbCJdo=', - account: poolInitAccount -}; - -export const poolListAccounts: POOL.ListAccountsResponse.AsObject = { - accounts: [ - poolInitAccount, - { - availableBalance: 15000000, - latestTxid: 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=', - expirationHeight: 4331, - outpoint: { - outputIndex: 0, - txid: 'AEf0nMpgbBL4ugP59b6MAV0eSZ+OQsHpae1j9gWPcQ0=' - }, - state: POOL.AccountState.OPEN, - traderKey: 'A1XCKczWrUUjZg4rmtYoQnji2mGEyLxM8FvIPZ9ZnRCk', - value: 15000000 - }, - { - availableBalance: 7773185, - latestTxid: 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=', - expirationHeight: 4328, - outpoint: { - outputIndex: 0, - txid: 'r+q2xqhXJ4PoyOffB73PdFMtiiszxuot05zJ3UTnI1M=' - }, - state: POOL.AccountState.OPEN, - traderKey: 'A9Mua6d2a+1NZZ8knxJ/XtE3VENxQO4erD9Y3igCmH9q', - value: 10000000 - } - ] -}; - -export const poolDepositAccount: Required = - { - depositTxid: '+BQm/hnM0SleT2NxS7bdw0JNDuvIMhL4qxLUkdbCJdo=', - account: { - ...poolInitAccount, - state: POOL.AccountState.PENDING_UPDATE, - value: poolInitAccount.value + 1 - } - }; - -export const poolWithdrawAccount: Required = - { - withdrawTxid: '+BQm/hnM0SleT2NxS7bdw0JNDuvIMhL4qxLUkdbCJdo=', - account: { - ...poolInitAccount, - state: POOL.AccountState.PENDING_UPDATE, - value: Number(`${+poolInitAccount.value - 1}`) - } - }; - -export const poolListOrders: POOL.ListOrdersResponse.AsObject = { - asks: [ - { - details: { - traderKey: poolInitAccount.traderKey, - rateFixed: 4960, - amt: 3000000, - maxBatchFeeRateSatPerKw: 25000, - orderNonce: 'Iw842N6B77EGuZCy5oiBDRAvJrQoIrlsjPosuKevT9g=', - state: AUCT.OrderState.ORDER_EXECUTED, - units: 30, - unitsUnfulfilled: 0, - reservedValueSat: 0, - creationTimestampNs: 1605370663652010000, - events: [], - minUnitsMatch: 1, - channelType: 0 - }, - leaseDurationBlocks: 2016, - version: 1 - } - ], - bids: [ - { - details: { - traderKey: poolInitAccount.traderKey, - rateFixed: 4960, - amt: 2000000, - maxBatchFeeRateSatPerKw: 25000, - orderNonce: 'NWKpd8HC5zIWr4f2CRbLEVv+g9s5LeArnK9xREAZ2mY=', - state: AUCT.OrderState.ORDER_EXECUTED, - units: 20, - unitsUnfulfilled: 0, - reservedValueSat: 0, - creationTimestampNs: 1605371586127059200, - events: [], - minUnitsMatch: 1, - channelType: 0 - }, - leaseDurationBlocks: 2016, - version: 1, - minNodeTier: 1, - selfChanBalance: 0, - sidecarTicket: '' - }, - { - details: { - traderKey: poolInitAccount.traderKey, - rateFixed: 2480, - amt: 2000000, - maxBatchFeeRateSatPerKw: 25000, - orderNonce: 'nRXHe7gMTmox7AXMW6yVYg9Lp4ZMNps6KRGQXH4PXu8=', - state: AUCT.OrderState.ORDER_PARTIALLY_FILLED, - units: 20, - unitsUnfulfilled: 10, - reservedValueSat: 169250, - creationTimestampNs: 1605372478047663000, - events: [], - minUnitsMatch: 1, - channelType: 0 - }, - leaseDurationBlocks: 2016, - version: 1, - minNodeTier: 1, - selfChanBalance: 0, - sidecarTicket: '' - }, - { - details: { - traderKey: poolInitAccount.traderKey, - rateFixed: 826, - amt: 3000000, - maxBatchFeeRateSatPerKw: 25000, - orderNonce: 'ZVQRWJ8pTkV5ln/ekUlFICajxLH4M7/B1rdCR8z+eqw=', - state: AUCT.OrderState.ORDER_CANCELED, - units: 30, - unitsUnfulfilled: 30, - reservedValueSat: 0, - creationTimestampNs: 1605372382040897300, - events: [], - minUnitsMatch: 1, - channelType: 0 - }, - leaseDurationBlocks: 2016, - version: 1, - minNodeTier: 1, - selfChanBalance: 0, - sidecarTicket: '' - }, - { - details: { - traderKey: poolInitAccount.traderKey, - rateFixed: 1240, - amt: 2000000, - maxBatchFeeRateSatPerKw: 25000, - orderNonce: 'BAgKGEv94LUG6lizcf0LxT3CJiqMTpvq27XRqr/IG00=', - state: AUCT.OrderState.ORDER_SUBMITTED, - units: 20, - unitsUnfulfilled: 20, - reservedValueSat: 333500, - creationTimestampNs: 1605372096883950800, - events: [], - minUnitsMatch: 1, - channelType: 0 - }, - leaseDurationBlocks: 2016, - version: 1, - minNodeTier: 1, - selfChanBalance: 0, - sidecarTicket: '' - } - ] -}; - -export const poolQuoteOrder: POOL.QuoteOrderResponse.AsObject = { - ratePerBlock: 0.00000248, - ratePercent: 0.000248, - totalExecutionFeeSat: 5001, - totalPremiumSat: 24998, - worstCaseChainFeeSat: 40810 -}; - -export const poolSubmitOrder: POOL.SubmitOrderResponse.AsObject = { - acceptedOrderNonce: 'W4XLkXhEKMcKfzV+Ex+jXQJeaVXoCoKQzptMRi6g+ZA=', - updatedSidecarTicket: 'aaa' -}; - -export const poolInvalidOrder: AUCT.InvalidOrder.AsObject = { - orderNonce: 'W4XLkXhEKMcKfzV+Ex+jXQJeaVXoCoKQzptMRi6g+ZA=', - failReason: AUCT.InvalidOrder.FailReason.INVALID_AMT, - failString: 'Invalid Amount' -}; - -export const poolCancelOrder: POOL.CancelOrderResponse.AsObject = {}; - -export const poolBatchSnapshot: AUCT.BatchSnapshotResponse.AsObject = { - version: 0, - batchId: 'A64GSAcrLtlDCUmKXLAv2bxngryfrSxrK9W8s+cl7Vb4', - prevBatchId: 'Ag/jvmtyBec1qrOj1FuswaZozPADVTguxmLjCa+E4wYS', - clearingPriceRate: 19841, - creationTimestampNs: 1610763907325185500, - matchedOrders: [], - matchedMarkets: [ - [ - 2016, - { - clearingPriceRate: 19841, - matchedOrders: [ - { - ask: { - version: 0, - leaseDurationBlocks: 8640, - rateFixed: 347, - chanType: 0 - }, - bid: { - version: 0, - leaseDurationBlocks: 1008, - rateFixed: 19841, - chanType: 0 - }, - matchingRate: 19841, - totalSatsCleared: 7700000, - unitsMatched: 77 - }, - { - ask: { - version: 0, - leaseDurationBlocks: 8640, - rateFixed: 347, - chanType: 0 - }, - bid: { - version: 0, - leaseDurationBlocks: 1008, - rateFixed: 19841, - chanType: 0 - }, - matchingRate: 19841, - totalSatsCleared: 30000000, - unitsMatched: 300 - } - ] - } - ], - [ - 4032, - { - clearingPriceRate: 8640, - matchedOrders: [ - { - ask: { - version: 0, - leaseDurationBlocks: 8640, - rateFixed: 347, - chanType: 0 - }, - bid: { - version: 0, - leaseDurationBlocks: 1008, - rateFixed: 19841, - chanType: 0 - }, - matchingRate: 19841, - totalSatsCleared: 7700000, - unitsMatched: 77 - }, - { - ask: { - version: 0, - leaseDurationBlocks: 8640, - rateFixed: 347, - chanType: 0 - }, - bid: { - version: 0, - leaseDurationBlocks: 1008, - rateFixed: 19841, - chanType: 0 - }, - matchingRate: 19841, - totalSatsCleared: 20000000, - unitsMatched: 300 - } - ] - } - ] - ], - batchTxId: - '6f29af3cb54480fec52d3a48ba94a5327aa31ed2c3b85ee8f0fd0da2f5ea8620', - batchTx: - '02000000000103f1a75ac5d0fdd52393410f71ead0bd9ab8d0af3974d47e86dde91c76cab46bb9010000000000000000f1a75ac5d0fdd52393410f71ead0bd9ab8d0af3974d47e86dde91c76cab46bb90300000000000000004324d5c4a412675ee5262aaa5afcca95ecdeb94764145823b93a41c53a7d07ef0600000000000000000523751100000000002200200dd535051271e7718bedb65e6861b31815a644b91d3a5107a74fa8ee16c823ed207e750000000000220020a70ab73d7d1c2efaeb280e26b98df9761d8e37cb3160cafc29381e8086254f7180c3c9010000000022002050dba23ca20d53adf5f94695040839c0be1ef609b70e19713c1d88d7d0db04f5c008fe0200000000220020bb8bc3b7c011060ff4002ab1c995a4eddcd1b4ef41aee5dca690a2903ede53ea24819e0300000000220020a3e3dfb76e7a4e72634bb5ee3006491fffbaecafe8882554d9a6b434f0b841aa02473044022066fe9cc1b0ecc84367839cdbaad606888260e6349d6c21f22186660f78dbe38202206fa0066fd0a4385348c615777b3e751db5f5d8306771522445a873dc7bed56a101232103d7c453a1aefcbbc6043372036db9d76816f830865392f97a262c447b59eb332eac03483045022100db6895c68e4cbd5fb83af7c37164dbf3da0c1222fb55177c4c367f05e9bed55902206b4775bb1c978380f95a9c444f392a53803b8b6d5508d41d0982a540d0c9062601483045022100ecc4ccaf440eae13e2afb8461f1c28d66af87f7e5d880732ae2fe72f85d5572302204656d5dbc963166c7bd92a93631fe49e20e4b1121914ca76e7cb87c3d983ee5a014e2103c736dec8b8f45cecd32fcedfcb8c0be92a2a3b40bffa8b1ce64640972a19fc49ad2102c642aaf70c56aa156db9546fc6e76c484b6a091b645fb848fd51916bd1e931caac736403cc531cb16803483045022100ed30c4f090dbe19d4f1dcb28f2701cf8a0bbf671a360d217384332248502de6c022025dac44cd380eda709bda3cbe6dbbe7a916549994bd72e48470a322a89fbbfba01473044022070c7e4909786fe5d482f35e1301d5cd2b5932c91b23d16bf699fe6bf455165220220015a3241a84620a27c110f307906f7047262947694c29b4752891d8b00153054014e2103305a3323068e66461ac3b247a2bfdc339959c3975da0ac4677e4d027462aaa14ad2102e2ec3f93e098e073490ad19fda9c11a92e2ed02ed3eecc5527972dba99b6d4e1ac736403a4f51bb16800000000', - batchTxFeeRateSatPerKw: 12574 -}; - -export const poolBatchSnapshots: AUCT.BatchSnapshotsResponse.AsObject = { - batches: [...Array(20)].map((_, i) => ({ - ...poolBatchSnapshot, - batchId: `${i}-${poolBatchSnapshot.batchId}`, - prevBatchId: `${i + 1}-${poolBatchSnapshot.prevBatchId}` - })) -}; - -export const poolLeaseDurations: POOL.LeaseDurationResponse.AsObject = { - leaseDurations: [ - [2016, true], - [4032, false], - [6048, true], - [8064, true] - ], - leaseDurationBuckets: [ - [2016, AUCT.DurationBucketState.MARKET_OPEN], - [4032, AUCT.DurationBucketState.MARKET_OPEN], - [6048, AUCT.DurationBucketState.ACCEPTING_ORDERS], - [8064, AUCT.DurationBucketState.MARKET_CLOSED] - ] -}; - -export const poolNextBatchInfo: POOL.NextBatchInfoResponse.AsObject = { - clearTimestamp: 1605936138, - confTarget: 6, - feeRateSatPerKw: 12500, - autoRenewExtensionBlocks: 24 -}; - -export const poolNodeRatings: POOL.NodeRatingResponse.AsObject = { - nodeRatings: [ - { - nodePubkey: b64(lndGetInfo.identityPubkey), - nodeTier: AUCT.NodeTier.TIER_1 - } - ] -}; - -const stringToChannelPoint = (cp: string) => ({ - txid: b64(cp.split(':')[0], true), - outputIndex: parseInt(cp.split(':')[1], 10) -}); -export const poolLeases: POOL.LeasesResponse.AsObject = { - leases: [ - { - channelPoint: stringToChannelPoint( - lndListChannels.channels[5].channelPoint - ), - channelAmtSat: 1000000, - channelDurationBlocks: 2016, - channelLeaseExpiry: 2304, - premiumSat: 9999, - executionFeeSat: 1001, - chainFeeSat: 4606, - clearingRatePrice: 4960, - orderFixedRate: 4960, - orderNonce: 'Iw842N6B77EGuZCy5oiBDRAvJrQoIrlsjPosuKevT9g=', - purchased: false, - channelRemoteNodeKey: - 'ArW+q/+aS+teUy/E6TgVgVZ2sQ9wX/YJBbwH6if4SuLA', - channelNodeTier: 1, - selfChanBalance: 0, - sidecarChannel: false, - matchedOrderNonce: 'string' - }, - { - channelPoint: stringToChannelPoint( - lndListChannels.channels[6].channelPoint - ), - channelAmtSat: 2000000, - channelDurationBlocks: 2016, - channelLeaseExpiry: 2304, - premiumSat: 19998, - executionFeeSat: 2001, - chainFeeSat: 4606, - clearingRatePrice: 4960, - orderFixedRate: 4960, - orderNonce: 'Iw842N6B77EGuZCy5oiBDRAvJrQoIrlsjPosuKevT9g=', - purchased: false, - channelRemoteNodeKey: - 'A9L6+xEwFa2vULND3YYfdoCQwHqlzE5UyLvvQ+gfapg+', - channelNodeTier: 1, - selfChanBalance: 0, - sidecarChannel: false, - matchedOrderNonce: 'string' - }, - { - channelPoint: stringToChannelPoint( - lndListChannels.channels[7].channelPoint - ), - channelAmtSat: 1000000, - channelDurationBlocks: 2016, - channelLeaseExpiry: 2317, - premiumSat: 9999, - executionFeeSat: 1001, - chainFeeSat: 4606, - clearingRatePrice: 4960, - orderFixedRate: 4960, - orderNonce: 'NWKpd8HC5zIWr4f2CRbLEVv+g9s5LeArnK9xREAZ2mY=', - purchased: true, - channelRemoteNodeKey: - 'A9L6+xEwFa2vULND3YYfdoCQwHqlzE5UyLvvQ+gfapg+', - channelNodeTier: 1, - selfChanBalance: 0, - sidecarChannel: false, - matchedOrderNonce: 'string' - }, - { - channelPoint: stringToChannelPoint( - lndListChannels.channels[8].channelPoint - ), - channelAmtSat: 1000000, - channelDurationBlocks: 2016, - channelLeaseExpiry: 2317, - premiumSat: 9999, - executionFeeSat: 1001, - chainFeeSat: 4606, - clearingRatePrice: 4960, - orderFixedRate: 4960, - orderNonce: 'NWKpd8HC5zIWr4f2CRbLEVv+g9s5LeArnK9xREAZ2mY=', - purchased: true, - channelRemoteNodeKey: - 'ArW+q/+aS+teUy/E6TgVgVZ2sQ9wX/YJBbwH6if4SuLA', - channelNodeTier: 1, - selfChanBalance: 0, - sidecarChannel: false, - matchedOrderNonce: 'string' - }, - { - channelPoint: stringToChannelPoint( - lndListChannels.channels[9].channelPoint - ), - channelAmtSat: 1000000, - channelDurationBlocks: 2016, - channelLeaseExpiry: 2320, - premiumSat: 4999, - executionFeeSat: 1001, - chainFeeSat: 8162, - clearingRatePrice: 2480, - orderFixedRate: 2480, - orderNonce: 'nRXHe7gMTmox7AXMW6yVYg9Lp4ZMNps6KRGQXH4PXu8=', - purchased: true, - channelRemoteNodeKey: - 'A9L6+xEwFa2vULND3YYfdoCQwHqlzE5UyLvvQ+gfapg+', - channelNodeTier: 1, - selfChanBalance: 0, - sidecarChannel: false, - matchedOrderNonce: 'string' - } - ], - totalAmtEarnedSat: 29997, - totalAmtPaidSat: 57588 -}; - -export const poolRegisterSidecar: POOL.SidecarTicket.AsObject = { - ticket: 'sidecar15o9CCm2VAFa14vyskEhpqxmDjiknDgJaKHL6nZdMHv5f9jSpnTM9jSZecJjDzvqgqbeBRLBupcvtL9cPefg3q2iUfcFYMgFCgfxuicf4ZSpZ9ndwYXJ8F7yrw55TSuxMyZMEFyoMh4rWJX95m5iBWeezDXHSXqFzSVmuFCTtp5KXombXZr64waygqNweCUBnvjTDqsz12EnxE1tsmSoHiFYc1t15J8rHNYAucb9yQWRQTRu146QuBbbLtMEPL62Y' -}; - -// collection of sample API responses -export const sampleApiResponses: Record = { - 'lnrpc.Lightning.GetInfo': lndGetInfo, - 'lnrpc.Lightning.GetNodeInfo': lndGetNodeInfo, - 'lnrpc.Lightning.GetChanInfo': lndGetChanInfo, - 'lnrpc.Lightning.ChannelBalance': lndChannelBalance, - 'lnrpc.Lightning.WalletBalance': lndWalletBalance, - 'lnrpc.Lightning.ListChannels': lndListChannels, - 'lnrpc.Lightning.PendingChannels': lndPendingChannels, - 'looprpc.SwapClient.ListSwaps': loopListSwaps, - 'looprpc.SwapClient.LoopOutTerms': loopOutTerms, - 'looprpc.SwapClient.GetLoopInTerms': loopInTerms, - 'looprpc.SwapClient.LoopOutQuote': loopOutQuote, - 'looprpc.SwapClient.GetLoopInQuote': loopInQuote, - 'looprpc.SwapClient.LoopIn': loopSwapResponse, - 'looprpc.SwapClient.LoopOut': loopSwapResponse, - 'poolrpc.Trader.ListAccounts': poolListAccounts, - 'poolrpc.Trader.QuoteAccount': poolQuoteAccount, - 'poolrpc.Trader.InitAccount': poolInitAccount, - 'poolrpc.Trader.CloseAccount': poolCloseAccount, - 'poolrpc.Trader.RenewAccount': poolRenewAccount, - 'poolrpc.Trader.DepositAccount': poolDepositAccount, - 'poolrpc.Trader.WithdrawAccount': poolWithdrawAccount, - 'poolrpc.Trader.ListOrders': poolListOrders, - 'poolrpc.Trader.QuoteOrder': poolQuoteOrder, - 'poolrpc.Trader.SubmitOrder': poolSubmitOrder, - 'poolrpc.Trader.CancelOrder': poolCancelOrder, - 'poolrpc.Trader.BatchSnapshot': poolBatchSnapshot, - 'poolrpc.Trader.BatchSnapshots': poolBatchSnapshots, - 'poolrpc.Trader.LeaseDurations': poolLeaseDurations, - 'poolrpc.Trader.NextBatchInfo': poolNextBatchInfo, - 'poolrpc.Trader.NodeRatings': poolNodeRatings, - 'poolrpc.Trader.Leases': poolLeases, - 'poolrpc.Trader.RegisterSidecar': poolRegisterSidecar -}; diff --git a/package-lock.json b/package-lock.json index 6e55452..52fbf73 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,28 +1,20 @@ { "name": "@lightninglabs/lnc-web", - "version": "0.0.1-alpha.rc1", + "version": "0.0.1-alpha.rc2", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@lightninglabs/lnc-web", - "version": "0.0.1-alpha.rc1", + "version": "0.0.1-alpha.rc2", "license": "MIT", "dependencies": { - "@improbable-eng/grpc-web": "0.15.0", - "@types/big.js": "6.1.2", - "@types/google-protobuf": "3.15.5", - "big.js": "6.1.1", "crypto-js": "4.1.1", - "google-protobuf": "3.19.4", - "lodash": "4.17.21", - "node-polyfill-webpack-plugin": "1.1.4", - "ts-protoc-gen": "0.15.0" + "node-polyfill-webpack-plugin": "1.1.4" }, "devDependencies": { "@types/crypto-js": "4.1.1", "@types/debug": "4.1.7", - "@types/lodash": "4.14.178", "@types/node": "17.0.16", "chai": "4.3.6", "clean-webpack-plugin": "4.0.0", @@ -30,6 +22,7 @@ "prettier": "2.6.0", "ts-loader": "9.2.6", "ts-node": "10.7.0", + "ts-proto": "1.115.4", "tslint": "6.1.3", "tslint-config-prettier": "1.18.0", "typescript": "4.5.5", @@ -173,17 +166,70 @@ "node": ">=10.0.0" } }, - "node_modules/@improbable-eng/grpc-web": { - "version": "0.15.0", - "resolved": "https://registry.npmjs.org/@improbable-eng/grpc-web/-/grpc-web-0.15.0.tgz", - "integrity": "sha512-ERft9/0/8CmYalqOVnJnpdDry28q+j+nAlFFARdjyxXDJ+Mhgv9+F600QC8BR9ygOfrXRlAk6CvST2j+JCpQPg==", + "node_modules/@protobufjs/aspromise": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@protobufjs/aspromise/-/aspromise-1.1.2.tgz", + "integrity": "sha512-j+gKExEuLmKwvz3OgROXtrJ2UG2x8Ch2YZUxahh+s1F2HZ+wAceUNLkvy6zKCPVRkU++ZWQrdxsUeQXmcg4uoQ==", + "dev": true + }, + "node_modules/@protobufjs/base64": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@protobufjs/base64/-/base64-1.1.2.tgz", + "integrity": "sha512-AZkcAA5vnN/v4PDqKyMR5lx7hZttPDgClv83E//FMNhR2TMcLUhfRUBHCmSl0oi9zMgDDqRUJkSxO3wm85+XLg==", + "dev": true + }, + "node_modules/@protobufjs/codegen": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@protobufjs/codegen/-/codegen-2.0.4.tgz", + "integrity": "sha512-YyFaikqM5sH0ziFZCN3xDC7zeGaB/d0IUb9CATugHWbd1FRFwWwt4ld4OYMPWu5a3Xe01mGAULCdqhMlPl29Jg==", + "dev": true + }, + "node_modules/@protobufjs/eventemitter": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/eventemitter/-/eventemitter-1.1.0.tgz", + "integrity": "sha512-j9ednRT81vYJ9OfVuXG6ERSTdEL1xVsNgqpkxMsbIabzSo3goCjDIveeGv5d03om39ML71RdmrGNjG5SReBP/Q==", + "dev": true + }, + "node_modules/@protobufjs/fetch": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/fetch/-/fetch-1.1.0.tgz", + "integrity": "sha512-lljVXpqXebpsijW71PZaCYeIcE5on1w5DlQy5WH6GLbFryLUrBD4932W/E2BSpfRJWseIL4v/KPgBFxDOIdKpQ==", + "dev": true, "dependencies": { - "browser-headers": "^0.4.1" - }, - "peerDependencies": { - "google-protobuf": "^3.14.0" + "@protobufjs/aspromise": "^1.1.1", + "@protobufjs/inquire": "^1.1.0" } }, + "node_modules/@protobufjs/float": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@protobufjs/float/-/float-1.0.2.tgz", + "integrity": "sha512-Ddb+kVXlXst9d+R9PfTIxh1EdNkgoRe5tOX6t01f1lYWOvJnSPDBlG241QLzcyPdoNTsblLUdujGSE4RzrTZGQ==", + "dev": true + }, + "node_modules/@protobufjs/inquire": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/inquire/-/inquire-1.1.0.tgz", + "integrity": "sha512-kdSefcPdruJiFMVSbn801t4vFK7KB/5gd2fYvrxhuJYg8ILrmn9SKSX2tZdV6V+ksulWqS7aXjBcRXl3wHoD9Q==", + "dev": true + }, + "node_modules/@protobufjs/path": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@protobufjs/path/-/path-1.1.2.tgz", + "integrity": "sha512-6JOcJ5Tm08dOHAbdR3GrvP+yUUfkjG5ePsHYczMFLq3ZmMkAD98cDgcT2iA1lJ9NVwFd4tH/iSSoe44YWkltEA==", + "dev": true + }, + "node_modules/@protobufjs/pool": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/pool/-/pool-1.1.0.tgz", + "integrity": "sha512-0kELaGSIDBKvcgS4zkjz1PeddatrjYcmMWOlAuAPwAeccUrPHdUqo/J6LiymHHEiJT5NrF1UVwxY14f+fy4WQw==", + "dev": true + }, + "node_modules/@protobufjs/utf8": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/utf8/-/utf8-1.1.0.tgz", + "integrity": "sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw==", + "dev": true + }, "node_modules/@tsconfig/node10": { "version": "1.0.8", "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.8.tgz", @@ -208,11 +254,6 @@ "integrity": "sha512-eZxlbI8GZscaGS7kkc/trHTT5xgrjH3/1n2JDwusC9iahPKWMRvRjJSAN5mCXviuTGQ/lHnhvv8Q1YTpnfz9gA==", "dev": true }, - "node_modules/@types/big.js": { - "version": "6.1.2", - "resolved": "https://registry.npmjs.org/@types/big.js/-/big.js-6.1.2.tgz", - "integrity": "sha512-h24JIZ52rvSvi2jkpYDk2yLH99VzZoCJiSfDWwjst7TwJVuXN61XVCUlPCzRl7mxKEMsGf8z42Q+J4TZwU3z2w==" - }, "node_modules/@types/crypto-js": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/@types/crypto-js/-/crypto-js-4.1.1.tgz", @@ -261,20 +302,15 @@ "@types/node": "*" } }, - "node_modules/@types/google-protobuf": { - "version": "3.15.5", - "resolved": "https://registry.npmjs.org/@types/google-protobuf/-/google-protobuf-3.15.5.tgz", - "integrity": "sha512-6bgv24B+A2bo9AfzReeg5StdiijKzwwnRflA8RLd1V4Yv995LeTmo0z69/MPbBDFSiZWdZHQygLo/ccXhMEDgw==" - }, "node_modules/@types/json-schema": { "version": "7.0.10", "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.10.tgz", "integrity": "sha512-BLO9bBq59vW3fxCpD4o0N4U+DXsvwvIcl+jofw0frQo/GrBFC+/jRZj1E7kgp6dvTyNmA4y6JCV5Id/r3mNP5A==" }, - "node_modules/@types/lodash": { - "version": "4.14.178", - "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.178.tgz", - "integrity": "sha512-0d5Wd09ItQWH1qFbEyQ7oTQ3GZrMfth5JkbN3EvTKLXcHLRDSXeLnlvlOn0wvxVIwK5o2M8JzP/OWz7T3NRsbw==", + "node_modules/@types/long": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/@types/long/-/long-4.0.2.tgz", + "integrity": "sha512-MqTGEo5bj5t157U6fA/BiDynNkn0YknVdh48CMPkTSpFTVmvao5UQmm7uEF6xBEo7qIMAlY/JSleYaE6VOdpaA==", "dev": true }, "node_modules/@types/minimatch": { @@ -294,6 +330,12 @@ "resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.16.tgz", "integrity": "sha512-ydLaGVfQOQ6hI1xK2A5nVh8bl0OGoIfYMxPWHqqYe9bTkWCfqiVvZoh2I/QF2sNSkZzZyROBoTefIEI+PB6iIA==" }, + "node_modules/@types/object-hash": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/@types/object-hash/-/object-hash-1.3.4.tgz", + "integrity": "sha512-xFdpkAkikBgqBdG9vIlsqffDV8GpvnPEzs0IUtr1v3BEB97ijsFQ4RXVbUZwjFThhB4MDSTUfvmxUD5PGx0wXA==", + "dev": true + }, "node_modules/@ungap/promise-all-settled": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/@ungap/promise-all-settled/-/promise-all-settled-1.1.2.tgz", @@ -643,17 +685,6 @@ } ] }, - "node_modules/big.js": { - "version": "6.1.1", - "license": "MIT", - "engines": { - "node": "*" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/bigjs" - } - }, "node_modules/binary-extensions": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", @@ -695,11 +726,6 @@ "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=" }, - "node_modules/browser-headers": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/browser-headers/-/browser-headers-0.4.1.tgz", - "integrity": "sha512-CA9hsySZVo9371qEHjHZtYxV2cFtVj5Wj/ZHi8ooEsrtm4vOnl9Y9HmyYWk9q+05d7K3rdoAE0j3MVEFVvtQtg==" - }, "node_modules/browser-stdout": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", @@ -1160,6 +1186,12 @@ "resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-4.1.1.tgz", "integrity": "sha512-o2JlM7ydqd3Qk9CA0L4NL6mTzU2sdx96a+oOfPu8Mkl/PK51vSyoi8/rQ8NknZtk44vq15lmhAj9CIAGwgeWKw==" }, + "node_modules/dataloader": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/dataloader/-/dataloader-1.4.0.tgz", + "integrity": "sha512-68s5jYdlvasItOJnCuI2Q9s4q98g0pCyL3HrcKJu8KNugUl8ahgmZYg38ysLTgQjjXX3H8CJLkAvWrclWfcalw==", + "dev": true + }, "node_modules/debug": { "version": "4.3.3", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz", @@ -1716,11 +1748,6 @@ "node": ">=0.10.0" } }, - "node_modules/google-protobuf": { - "version": "3.19.4", - "resolved": "https://registry.npmjs.org/google-protobuf/-/google-protobuf-3.19.4.tgz", - "integrity": "sha512-OIPNCxsG2lkIvf+P5FNfJ/Km95CsXOBecS9ZcAU6m2Rq3svc0Apl9nB3GMDNKfQ9asNv4KjyAqGwPQFrVle3Yg==" - }, "node_modules/graceful-fs": { "version": "4.2.9", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.9.tgz", @@ -2349,7 +2376,8 @@ "node_modules/lodash": { "version": "4.17.21", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", + "dev": true }, "node_modules/log-symbols": { "version": "4.1.0", @@ -2367,6 +2395,12 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/long": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/long/-/long-4.0.0.tgz", + "integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA==", + "dev": true + }, "node_modules/loupe": { "version": "2.3.4", "resolved": "https://registry.npmjs.org/loupe/-/loupe-2.3.4.tgz", @@ -2657,6 +2691,15 @@ "node": ">=0.10.0" } }, + "node_modules/object-hash": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/object-hash/-/object-hash-1.3.1.tgz", + "integrity": "sha512-OSuu/pU4ENM9kmREg0BdNrUDIl1heYa4mBZacJc+vVWz4GtAwu7jO8s4AIt2aGRUTqxykpWzI3Oqnsm13tTMDA==", + "dev": true, + "engines": { + "node": ">= 0.10.0" + } + }, "node_modules/object-inspect": { "version": "1.12.0", "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.0.tgz", @@ -3001,6 +3044,32 @@ "node": ">= 0.6.0" } }, + "node_modules/protobufjs": { + "version": "6.11.3", + "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-6.11.3.tgz", + "integrity": "sha512-xL96WDdCZYdU7Slin569tFX712BxsxslWwAfAhCYjQKGTq7dAU91Lomy6nLLhh/dyGhk/YH4TwTSRxTzhuHyZg==", + "dev": true, + "hasInstallScript": true, + "dependencies": { + "@protobufjs/aspromise": "^1.1.2", + "@protobufjs/base64": "^1.1.2", + "@protobufjs/codegen": "^2.0.4", + "@protobufjs/eventemitter": "^1.1.0", + "@protobufjs/fetch": "^1.1.0", + "@protobufjs/float": "^1.0.2", + "@protobufjs/inquire": "^1.1.0", + "@protobufjs/path": "^1.1.2", + "@protobufjs/pool": "^1.1.0", + "@protobufjs/utf8": "^1.1.0", + "@types/long": "^4.0.1", + "@types/node": ">=13.7.0", + "long": "^4.0.0" + }, + "bin": { + "pbjs": "bin/pbjs", + "pbts": "bin/pbts" + } + }, "node_modules/public-encrypt": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.3.tgz", @@ -3579,15 +3648,41 @@ "node": ">=0.3.1" } }, - "node_modules/ts-protoc-gen": { - "version": "0.15.0", - "resolved": "https://registry.npmjs.org/ts-protoc-gen/-/ts-protoc-gen-0.15.0.tgz", - "integrity": "sha512-TycnzEyrdVDlATJ3bWFTtra3SCiEP0W0vySXReAuEygXCUr1j2uaVyL0DhzjwuUdQoW5oXPwk6oZWeA0955V+g==", + "node_modules/ts-poet": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/ts-poet/-/ts-poet-4.12.0.tgz", + "integrity": "sha512-faSedZm8S0ophkGm9VenV3P2e7IoUwReMLzLaBb4JBPsHTk/nuwWj4iQcs3D9bI5bdnTmCq0xnAgj2MU5y4BBQ==", + "dev": true, + "dependencies": { + "lodash": "^4.17.15", + "prettier": "^2.5.1" + } + }, + "node_modules/ts-proto": { + "version": "1.115.4", + "resolved": "https://registry.npmjs.org/ts-proto/-/ts-proto-1.115.4.tgz", + "integrity": "sha512-q2FfWVpTNJRBMXglZH0wHMEbLOEuxkDuRtyk0j5POGm7oA1Btd9sHw6GzGs6DkfYfre/BCtLmMi4uOueJpBvCQ==", + "dev": true, "dependencies": { - "google-protobuf": "^3.15.5" + "@types/object-hash": "^1.3.0", + "dataloader": "^1.4.0", + "object-hash": "^1.3.1", + "protobufjs": "^6.11.3", + "ts-poet": "^4.11.0", + "ts-proto-descriptors": "1.6.0" }, "bin": { - "protoc-gen-ts": "bin/protoc-gen-ts" + "protoc-gen-ts_proto": "protoc-gen-ts_proto" + } + }, + "node_modules/ts-proto-descriptors": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/ts-proto-descriptors/-/ts-proto-descriptors-1.6.0.tgz", + "integrity": "sha512-Vrhue2Ti99us/o76mGy28nF3W/Uanl1/8detyJw2yyRwiBC5yxy+hEZqQ/ZX2PbZ1vyCpJ51A9L4PnCCnkBMTQ==", + "dev": true, + "dependencies": { + "long": "^4.0.0", + "protobufjs": "^6.8.8" } }, "node_modules/tslib": { @@ -4328,14 +4423,70 @@ "integrity": "sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw==", "dev": true }, - "@improbable-eng/grpc-web": { - "version": "0.15.0", - "resolved": "https://registry.npmjs.org/@improbable-eng/grpc-web/-/grpc-web-0.15.0.tgz", - "integrity": "sha512-ERft9/0/8CmYalqOVnJnpdDry28q+j+nAlFFARdjyxXDJ+Mhgv9+F600QC8BR9ygOfrXRlAk6CvST2j+JCpQPg==", + "@protobufjs/aspromise": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@protobufjs/aspromise/-/aspromise-1.1.2.tgz", + "integrity": "sha512-j+gKExEuLmKwvz3OgROXtrJ2UG2x8Ch2YZUxahh+s1F2HZ+wAceUNLkvy6zKCPVRkU++ZWQrdxsUeQXmcg4uoQ==", + "dev": true + }, + "@protobufjs/base64": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@protobufjs/base64/-/base64-1.1.2.tgz", + "integrity": "sha512-AZkcAA5vnN/v4PDqKyMR5lx7hZttPDgClv83E//FMNhR2TMcLUhfRUBHCmSl0oi9zMgDDqRUJkSxO3wm85+XLg==", + "dev": true + }, + "@protobufjs/codegen": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@protobufjs/codegen/-/codegen-2.0.4.tgz", + "integrity": "sha512-YyFaikqM5sH0ziFZCN3xDC7zeGaB/d0IUb9CATugHWbd1FRFwWwt4ld4OYMPWu5a3Xe01mGAULCdqhMlPl29Jg==", + "dev": true + }, + "@protobufjs/eventemitter": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/eventemitter/-/eventemitter-1.1.0.tgz", + "integrity": "sha512-j9ednRT81vYJ9OfVuXG6ERSTdEL1xVsNgqpkxMsbIabzSo3goCjDIveeGv5d03om39ML71RdmrGNjG5SReBP/Q==", + "dev": true + }, + "@protobufjs/fetch": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/fetch/-/fetch-1.1.0.tgz", + "integrity": "sha512-lljVXpqXebpsijW71PZaCYeIcE5on1w5DlQy5WH6GLbFryLUrBD4932W/E2BSpfRJWseIL4v/KPgBFxDOIdKpQ==", + "dev": true, "requires": { - "browser-headers": "^0.4.1" + "@protobufjs/aspromise": "^1.1.1", + "@protobufjs/inquire": "^1.1.0" } }, + "@protobufjs/float": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@protobufjs/float/-/float-1.0.2.tgz", + "integrity": "sha512-Ddb+kVXlXst9d+R9PfTIxh1EdNkgoRe5tOX6t01f1lYWOvJnSPDBlG241QLzcyPdoNTsblLUdujGSE4RzrTZGQ==", + "dev": true + }, + "@protobufjs/inquire": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/inquire/-/inquire-1.1.0.tgz", + "integrity": "sha512-kdSefcPdruJiFMVSbn801t4vFK7KB/5gd2fYvrxhuJYg8ILrmn9SKSX2tZdV6V+ksulWqS7aXjBcRXl3wHoD9Q==", + "dev": true + }, + "@protobufjs/path": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@protobufjs/path/-/path-1.1.2.tgz", + "integrity": "sha512-6JOcJ5Tm08dOHAbdR3GrvP+yUUfkjG5ePsHYczMFLq3ZmMkAD98cDgcT2iA1lJ9NVwFd4tH/iSSoe44YWkltEA==", + "dev": true + }, + "@protobufjs/pool": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/pool/-/pool-1.1.0.tgz", + "integrity": "sha512-0kELaGSIDBKvcgS4zkjz1PeddatrjYcmMWOlAuAPwAeccUrPHdUqo/J6LiymHHEiJT5NrF1UVwxY14f+fy4WQw==", + "dev": true + }, + "@protobufjs/utf8": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/utf8/-/utf8-1.1.0.tgz", + "integrity": "sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw==", + "dev": true + }, "@tsconfig/node10": { "version": "1.0.8", "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.8.tgz", @@ -4360,11 +4511,6 @@ "integrity": "sha512-eZxlbI8GZscaGS7kkc/trHTT5xgrjH3/1n2JDwusC9iahPKWMRvRjJSAN5mCXviuTGQ/lHnhvv8Q1YTpnfz9gA==", "dev": true }, - "@types/big.js": { - "version": "6.1.2", - "resolved": "https://registry.npmjs.org/@types/big.js/-/big.js-6.1.2.tgz", - "integrity": "sha512-h24JIZ52rvSvi2jkpYDk2yLH99VzZoCJiSfDWwjst7TwJVuXN61XVCUlPCzRl7mxKEMsGf8z42Q+J4TZwU3z2w==" - }, "@types/crypto-js": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/@types/crypto-js/-/crypto-js-4.1.1.tgz", @@ -4413,20 +4559,15 @@ "@types/node": "*" } }, - "@types/google-protobuf": { - "version": "3.15.5", - "resolved": "https://registry.npmjs.org/@types/google-protobuf/-/google-protobuf-3.15.5.tgz", - "integrity": "sha512-6bgv24B+A2bo9AfzReeg5StdiijKzwwnRflA8RLd1V4Yv995LeTmo0z69/MPbBDFSiZWdZHQygLo/ccXhMEDgw==" - }, "@types/json-schema": { "version": "7.0.10", "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.10.tgz", "integrity": "sha512-BLO9bBq59vW3fxCpD4o0N4U+DXsvwvIcl+jofw0frQo/GrBFC+/jRZj1E7kgp6dvTyNmA4y6JCV5Id/r3mNP5A==" }, - "@types/lodash": { - "version": "4.14.178", - "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.178.tgz", - "integrity": "sha512-0d5Wd09ItQWH1qFbEyQ7oTQ3GZrMfth5JkbN3EvTKLXcHLRDSXeLnlvlOn0wvxVIwK5o2M8JzP/OWz7T3NRsbw==", + "@types/long": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/@types/long/-/long-4.0.2.tgz", + "integrity": "sha512-MqTGEo5bj5t157U6fA/BiDynNkn0YknVdh48CMPkTSpFTVmvao5UQmm7uEF6xBEo7qIMAlY/JSleYaE6VOdpaA==", "dev": true }, "@types/minimatch": { @@ -4446,6 +4587,12 @@ "resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.16.tgz", "integrity": "sha512-ydLaGVfQOQ6hI1xK2A5nVh8bl0OGoIfYMxPWHqqYe9bTkWCfqiVvZoh2I/QF2sNSkZzZyROBoTefIEI+PB6iIA==" }, + "@types/object-hash": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/@types/object-hash/-/object-hash-1.3.4.tgz", + "integrity": "sha512-xFdpkAkikBgqBdG9vIlsqffDV8GpvnPEzs0IUtr1v3BEB97ijsFQ4RXVbUZwjFThhB4MDSTUfvmxUD5PGx0wXA==", + "dev": true + }, "@ungap/promise-all-settled": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/@ungap/promise-all-settled/-/promise-all-settled-1.1.2.tgz", @@ -4736,9 +4883,6 @@ "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==" }, - "big.js": { - "version": "6.1.1" - }, "binary-extensions": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", @@ -4774,11 +4918,6 @@ "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=" }, - "browser-headers": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/browser-headers/-/browser-headers-0.4.1.tgz", - "integrity": "sha512-CA9hsySZVo9371qEHjHZtYxV2cFtVj5Wj/ZHi8ooEsrtm4vOnl9Y9HmyYWk9q+05d7K3rdoAE0j3MVEFVvtQtg==" - }, "browser-stdout": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", @@ -5141,6 +5280,12 @@ "resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-4.1.1.tgz", "integrity": "sha512-o2JlM7ydqd3Qk9CA0L4NL6mTzU2sdx96a+oOfPu8Mkl/PK51vSyoi8/rQ8NknZtk44vq15lmhAj9CIAGwgeWKw==" }, + "dataloader": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/dataloader/-/dataloader-1.4.0.tgz", + "integrity": "sha512-68s5jYdlvasItOJnCuI2Q9s4q98g0pCyL3HrcKJu8KNugUl8ahgmZYg38ysLTgQjjXX3H8CJLkAvWrclWfcalw==", + "dev": true + }, "debug": { "version": "4.3.3", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz", @@ -5559,11 +5704,6 @@ } } }, - "google-protobuf": { - "version": "3.19.4", - "resolved": "https://registry.npmjs.org/google-protobuf/-/google-protobuf-3.19.4.tgz", - "integrity": "sha512-OIPNCxsG2lkIvf+P5FNfJ/Km95CsXOBecS9ZcAU6m2Rq3svc0Apl9nB3GMDNKfQ9asNv4KjyAqGwPQFrVle3Yg==" - }, "graceful-fs": { "version": "4.2.9", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.9.tgz", @@ -5983,7 +6123,8 @@ "lodash": { "version": "4.17.21", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", + "dev": true }, "log-symbols": { "version": "4.1.0", @@ -5995,6 +6136,12 @@ "is-unicode-supported": "^0.1.0" } }, + "long": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/long/-/long-4.0.0.tgz", + "integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA==", + "dev": true + }, "loupe": { "version": "2.3.4", "resolved": "https://registry.npmjs.org/loupe/-/loupe-2.3.4.tgz", @@ -6230,6 +6377,12 @@ "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", "dev": true }, + "object-hash": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/object-hash/-/object-hash-1.3.1.tgz", + "integrity": "sha512-OSuu/pU4ENM9kmREg0BdNrUDIl1heYa4mBZacJc+vVWz4GtAwu7jO8s4AIt2aGRUTqxykpWzI3Oqnsm13tTMDA==", + "dev": true + }, "object-inspect": { "version": "1.12.0", "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.0.tgz", @@ -6474,6 +6627,27 @@ "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", "integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI=" }, + "protobufjs": { + "version": "6.11.3", + "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-6.11.3.tgz", + "integrity": "sha512-xL96WDdCZYdU7Slin569tFX712BxsxslWwAfAhCYjQKGTq7dAU91Lomy6nLLhh/dyGhk/YH4TwTSRxTzhuHyZg==", + "dev": true, + "requires": { + "@protobufjs/aspromise": "^1.1.2", + "@protobufjs/base64": "^1.1.2", + "@protobufjs/codegen": "^2.0.4", + "@protobufjs/eventemitter": "^1.1.0", + "@protobufjs/fetch": "^1.1.0", + "@protobufjs/float": "^1.0.2", + "@protobufjs/inquire": "^1.1.0", + "@protobufjs/path": "^1.1.2", + "@protobufjs/pool": "^1.1.0", + "@protobufjs/utf8": "^1.1.0", + "@types/long": "^4.0.1", + "@types/node": ">=13.7.0", + "long": "^4.0.0" + } + }, "public-encrypt": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.3.tgz", @@ -6893,12 +7067,38 @@ } } }, - "ts-protoc-gen": { - "version": "0.15.0", - "resolved": "https://registry.npmjs.org/ts-protoc-gen/-/ts-protoc-gen-0.15.0.tgz", - "integrity": "sha512-TycnzEyrdVDlATJ3bWFTtra3SCiEP0W0vySXReAuEygXCUr1j2uaVyL0DhzjwuUdQoW5oXPwk6oZWeA0955V+g==", + "ts-poet": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/ts-poet/-/ts-poet-4.12.0.tgz", + "integrity": "sha512-faSedZm8S0ophkGm9VenV3P2e7IoUwReMLzLaBb4JBPsHTk/nuwWj4iQcs3D9bI5bdnTmCq0xnAgj2MU5y4BBQ==", + "dev": true, + "requires": { + "lodash": "^4.17.15", + "prettier": "^2.5.1" + } + }, + "ts-proto": { + "version": "1.115.4", + "resolved": "https://registry.npmjs.org/ts-proto/-/ts-proto-1.115.4.tgz", + "integrity": "sha512-q2FfWVpTNJRBMXglZH0wHMEbLOEuxkDuRtyk0j5POGm7oA1Btd9sHw6GzGs6DkfYfre/BCtLmMi4uOueJpBvCQ==", + "dev": true, + "requires": { + "@types/object-hash": "^1.3.0", + "dataloader": "^1.4.0", + "object-hash": "^1.3.1", + "protobufjs": "^6.11.3", + "ts-poet": "^4.11.0", + "ts-proto-descriptors": "1.6.0" + } + }, + "ts-proto-descriptors": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/ts-proto-descriptors/-/ts-proto-descriptors-1.6.0.tgz", + "integrity": "sha512-Vrhue2Ti99us/o76mGy28nF3W/Uanl1/8detyJw2yyRwiBC5yxy+hEZqQ/ZX2PbZ1vyCpJ51A9L4PnCCnkBMTQ==", + "dev": true, "requires": { - "google-protobuf": "^3.15.5" + "long": "^4.0.0", + "protobufjs": "^6.8.8" } }, "tslib": { diff --git a/package.json b/package.json index 8edfffe..2b9603e 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,9 @@ { "name": "@lightninglabs/lnc-web", - "version": "0.0.1-alpha.rc1", + "version": "0.0.1-alpha.rc2", "description": "Lightning Node Connect npm module for web", - "main": "./dist/", + "main": "./dist/index.js", + "types": "./dist/index.d.ts", "config": { "lnd_release_tag": "v0.14.3-beta", "loop_release_tag": "v0.19.1-beta", @@ -42,7 +43,6 @@ "devDependencies": { "@types/crypto-js": "4.1.1", "@types/debug": "4.1.7", - "@types/lodash": "4.14.178", "@types/node": "17.0.16", "chai": "4.3.6", "clean-webpack-plugin": "4.0.0", @@ -50,6 +50,7 @@ "prettier": "2.6.0", "ts-loader": "9.2.6", "ts-node": "10.7.0", + "ts-proto": "1.115.4", "tslint": "6.1.3", "tslint-config-prettier": "1.18.0", "typescript": "4.5.5", @@ -57,15 +58,8 @@ "webpack-cli": "4.9.2" }, "dependencies": { - "@improbable-eng/grpc-web": "0.15.0", - "@types/big.js": "6.1.2", - "@types/google-protobuf": "3.15.5", - "big.js": "6.1.1", "crypto-js": "4.1.1", - "google-protobuf": "3.19.4", - "lodash": "4.17.21", - "node-polyfill-webpack-plugin": "1.1.4", - "ts-protoc-gen": "0.15.0" + "node-polyfill-webpack-plugin": "1.1.4" }, "browser": { "fs": false, diff --git a/scripts/clean-repeated.ts b/scripts/clean-repeated.ts deleted file mode 100644 index 2339dea..0000000 --- a/scripts/clean-repeated.ts +++ /dev/null @@ -1,41 +0,0 @@ -import fs from 'fs'; -import glob from 'glob'; -import os from 'os'; -import readline from 'readline'; - -/** - * Read the generated rpc types and remove - * 'List' from all Array type names. - * More info: - * https://github.com/improbable-eng/ts-protoc-gen/issues/86 - * https://github.com/protocolbuffers/protobuf/issues/4518 - */ - -const files = glob.sync('lib/types/generated/**/*.ts'); -files.forEach((file, i) => { - const tempFile = `lib/types/generated/temp-${i}.d.ts`; - - const reader = readline.createInterface({ - input: fs.createReadStream(file) - }); - const writer = fs.createWriteStream(tempFile, { - flags: 'a' - }); - - reader.on('line', (line) => { - if (/List.*Array<.*>,/.test(line)) { - writer.write(line.replace('List', '')); - } else if (/Map.*Array<.*>,/.test(line)) { - writer.write(line.replace('Map', '')); - } else { - writer.write(line); - } - writer.write(os.EOL); - }); - - reader.on('close', () => { - writer.end(); - - fs.renameSync(tempFile, file); - }); -}); diff --git a/scripts/generate_types.sh b/scripts/generate_types.sh index afba40f..97dc092 100644 --- a/scripts/generate_types.sh +++ b/scripts/generate_types.sh @@ -15,9 +15,7 @@ echo "Pool release tag:" $POOL_RELEASE_TAG echo "Faraday release tag:" $FARADAY_RELEASE_TAG echo "Protoc version:" $PROTOC_VERSION -rm -f *.proto - -GENERATED_TYPES_DIR=lib/types/generated +GENERATED_TYPES_DIR=lib/types/proto if [ -d "$GENERATED_TYPES_DIR" ] then rm -rf "$GENERATED_TYPES_DIR" @@ -46,13 +44,23 @@ curl -L ${PROTOC_URL} -o "protoc-${PROTOC_VERSION}.zip" unzip "protoc-${PROTOC_VERSION}.zip" -d protoc rm "protoc-${PROTOC_VERSION}.zip" +TS_PROTO_OPTIONS="\ + --ts_proto_opt=esModuleInterop=true \ + --ts_proto_opt=onlyTypes=true \ + --ts_proto_opt=stringEnums=true \ + --ts_proto_opt=forceLong=string \ + --ts_proto_opt=lowerCaseServiceMethods=true \ + --ts_proto_opt=exportCommonSymbols=false \ +" + # Run protoc echo "LND: running protoc..." +mkdir -p "$GENERATED_TYPES_DIR/lnd" protoc/bin/protoc \ --proto_path=protos/lnd/${LND_RELEASE_TAG} \ - --plugin=protoc-gen-ts=node_modules/.bin/protoc-gen-ts \ - --ts_out=service=grpc-web:$GENERATED_TYPES_DIR \ - --js_out=import_style=commonjs,binary:$GENERATED_TYPES_DIR \ + --plugin=./node_modules/.bin/protoc-gen-ts_proto \ + --ts_proto_out=$GENERATED_TYPES_DIR/lnd \ + $TS_PROTO_OPTIONS \ lightning.proto \ walletunlocker.proto \ autopilotrpc/autopilot.proto \ @@ -64,36 +72,114 @@ protoc/bin/protoc \ watchtowerrpc/watchtower.proto \ wtclientrpc/wtclient.proto + echo "LOOP: running protoc..." +mkdir -p "$GENERATED_TYPES_DIR/loop" protoc/bin/protoc \ --proto_path=protos/loop/${LOOP_RELEASE_TAG} \ - --plugin=protoc-gen-ts=node_modules/.bin/protoc-gen-ts \ - --ts_out=service=grpc-web:$GENERATED_TYPES_DIR \ - --js_out=import_style=commonjs,binary:$GENERATED_TYPES_DIR \ + --plugin=./node_modules/.bin/protoc-gen-ts_proto \ + --ts_proto_out=$GENERATED_TYPES_DIR/loop \ + $TS_PROTO_OPTIONS \ client.proto \ debug.proto \ swapserverrpc/common.proto echo "POOL: running protoc..." +mkdir -p "$GENERATED_TYPES_DIR/pool" protoc/bin/protoc \ --proto_path=protos/pool/${POOL_RELEASE_TAG} \ - --plugin=protoc-gen-ts=node_modules/.bin/protoc-gen-ts \ - --ts_out=service=grpc-web:$GENERATED_TYPES_DIR \ - --js_out=import_style=commonjs,binary:$GENERATED_TYPES_DIR \ + --plugin=./node_modules/.bin/protoc-gen-ts_proto \ + --ts_proto_out=$GENERATED_TYPES_DIR/pool \ + $TS_PROTO_OPTIONS \ trader.proto \ auctioneerrpc/auctioneer.proto \ auctioneerrpc/hashmail.proto echo "FARADY: running protoc..." +mkdir -p "$GENERATED_TYPES_DIR/faraday" +protoc/bin/protoc \ + --proto_path=protos/faraday/${FARADAY_RELEASE_TAG} \ + --plugin=./node_modules/.bin/protoc-gen-ts_proto \ + --ts_proto_out=$GENERATED_TYPES_DIR/faraday \ + $TS_PROTO_OPTIONS \ + faraday.proto + +# Temporarily generate schema files in order to provide metadata +# about the services and subscription methods to the api classes +SCHEMA_DIR=lib/types/schema +if [ -d "$SCHEMA_DIR" ] +then + rm -rf "$SCHEMA_DIR" +fi +mkdir -p "$SCHEMA_DIR" + +SCHEMA_PROTO_OPTIONS="\ + --ts_proto_opt=esModuleInterop=true \ + --ts_proto_opt=outputEncodeMethods=false \ + --ts_proto_opt=outputClientImpl=false \ + --ts_proto_opt=outputServices=generic-definitions \ +" + +echo "LND: generating schema..." +mkdir -p "$SCHEMA_DIR/lnd" +protoc/bin/protoc \ + --proto_path=protos/lnd/${LND_RELEASE_TAG} \ + --plugin=./node_modules/.bin/protoc-gen-ts_proto \ + --ts_proto_out=$SCHEMA_DIR/lnd \ + $SCHEMA_PROTO_OPTIONS \ + lightning.proto \ + walletunlocker.proto \ + autopilotrpc/autopilot.proto \ + chainrpc/chainnotifier.proto \ + invoicesrpc/invoices.proto \ + routerrpc/router.proto \ + signrpc/signer.proto \ + walletrpc/walletkit.proto \ + watchtowerrpc/watchtower.proto \ + wtclientrpc/wtclient.proto + +echo "LOOP: generating schema..." +mkdir -p "$SCHEMA_DIR/loop" +protoc/bin/protoc \ + --proto_path=protos/loop/${LOOP_RELEASE_TAG} \ + --plugin=./node_modules/.bin/protoc-gen-ts_proto \ + --ts_proto_out=$SCHEMA_DIR/loop \ + $SCHEMA_PROTO_OPTIONS \ + client.proto \ + debug.proto \ + swapserverrpc/common.proto + +echo "POOL: generating schema..." +mkdir -p "$SCHEMA_DIR/pool" +protoc/bin/protoc \ + --proto_path=protos/pool/${POOL_RELEASE_TAG} \ + --plugin=./node_modules/.bin/protoc-gen-ts_proto \ + --ts_proto_out=$SCHEMA_DIR/pool \ + $SCHEMA_PROTO_OPTIONS \ + trader.proto \ + auctioneerrpc/auctioneer.proto \ + auctioneerrpc/hashmail.proto + +echo "FARADY: generating schema..." +mkdir -p "$SCHEMA_DIR/faraday" protoc/bin/protoc \ --proto_path=protos/faraday/${FARADAY_RELEASE_TAG} \ - --plugin=protoc-gen-ts=node_modules/.bin/protoc-gen-ts \ - --ts_out=service=grpc-web:$GENERATED_TYPES_DIR \ - --js_out=import_style=commonjs,binary:$GENERATED_TYPES_DIR \ + --plugin=./node_modules/.bin/protoc-gen-ts_proto \ + --ts_proto_out=$SCHEMA_DIR/faraday \ + $SCHEMA_PROTO_OPTIONS \ faraday.proto # Cleanup proto directory/files rm -rf *.proto protoc -# Remove 'List' from all generated Array type names -ts-node scripts/clean-repeated.ts +# Perform a bit of post-processing on the generated code +echo "Perform post-processing on the generated code..." +ts-node scripts/process_types.ts + +# Format the generated files with prettier +echo "Formatting generated code with prettier..." +prettier --check --write --loglevel=error 'lib/types/proto/**' + +# Cleanup schema directory/files +echo "Deleting schema files..." +rm -rf "$SCHEMA_DIR" diff --git a/scripts/process_types.ts b/scripts/process_types.ts new file mode 100644 index 0000000..b7d7076 --- /dev/null +++ b/scripts/process_types.ts @@ -0,0 +1,183 @@ +import fs from 'fs'; +import glob from 'glob'; +import os from 'os'; +import path from 'path'; +import readline from 'readline'; + +const deepPartialCode = ` +type Builtin = + | Date + | Function + | Uint8Array + | string + | number + | boolean + | undefined; + +type DeepPartial = T extends Builtin + ? T + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in keyof T]?: DeepPartial } + : Partial; + `; + +/** + * This function performs some necessary modifications to the + * generated TS files to make them compatible with the + * actual JS request & response objects of the WASM client + */ + +const typesDir = 'lib/types/proto'; +const files = glob.sync(`${typesDir}/**/*.ts`); +files.forEach((file, i) => { + const tempFile = `${typesDir}/temp-${i}.d.ts`; + + const reader = readline.createInterface({ + input: fs.createReadStream(file) + }); + const writer = fs.createWriteStream(tempFile, { + flags: 'a' + }); + + reader.on('line', (line) => { + // remove this import since its usage is replaced below + if (line === "import { Observable } from 'rxjs';") return; + + let newLine = line; + + // replace Observable return value with onMessage & onError callbacks + // before: monitor(request: MonitorRequest): Observable; + // after: monitor(request: MonitorRequest, onMessage: (res: SwapStatus) => void, onError: (e: Error) => void): void; + let match = newLine.match(/\): Observable<(.*)>/); + if (match) { + const replaceWith = `, onMessage?: (msg: ${match[1]}) => void, onError?: (err: Error) => void): void`; + newLine = newLine.replace(match[0], replaceWith); + } + + // remove Observable around request values since JS doesn't support client streaming + // before: sendToRoute(request: Observable) + // after: sendToRoute(request: SendToRouteRequest) + match = newLine.match(/request: Observable<(\w*)>/); + if (match) { + const replaceWith = `request: ${match[1]}`; + newLine = newLine.replace(match[0], replaceWith); + } + + // wrap all request types with DeepPartial<> so that all fields are optional + // before: request: GetInfoRequest + // after: request: DeepPartial + match = newLine.match(/request: (\w+)(\)|,|$)/); + if (match) { + const replaceWith = `request?: DeepPartial<${match[1]}>${match[2]}`; + newLine = newLine.replace(match[0], replaceWith); + } + + // replace "Uint8Array" type with "Uint8Array | string" because the WASM doesn't properly + // parse the Uint8Array objects when converted to JSON + match = newLine.match(/: Uint8Array/); + if (match) { + const replaceWith = `: Uint8Array | string`; + newLine = newLine.replace(match[0], replaceWith); + } + + writer.write(newLine); + writer.write(os.EOL); + }); + + reader.on('close', () => { + // inject the DeepPartial type manually because we would need to include + // a bunch of JS code in order to have it injected by the ts-proto plugin + writer.write(deepPartialCode); + writer.end(); + + fs.renameSync(tempFile, file); + }); +}); + +/** + * Reads the schema files in order to extract which methods are server streaming. + * We do this in order to generate the streaming.ts file which is used to determine + * if the Proxy should call 'request' or 'subscribe'. The only other solution + * would be to either hard-code the subscription methods, which increases the + * maintenance burden on updates, or to generate JS code which increases the + * bundle size. This build-time approach which only includes a small additional + * file felt like a worthy trade-off. + */ +const services: Record> = {}; +const subscriptionMethods: string[] = []; +const pkgFiles: Record = {}; + +const schemaDir = 'lib/types/schema'; +const schemaFiles = glob.sync(`${schemaDir}/**/*.ts`); +schemaFiles.forEach((file) => { + // get all of the exports from the generated file + const imports = require(`../${file}`); + // find the service definition export name (ex: SwapClientDefinition) + const definitionName = Object.keys(imports).find((i) => + i.endsWith('Definition') + ); + if (!definitionName) return; + // get a reference to the actual definition object + const serviceDef = imports[definitionName]; + + // add the package name to the services object + const pkgName = imports.protobufPackage; + if (!services[pkgName]) services[pkgName] = {}; + services[pkgName][serviceDef.name] = serviceDef.fullName; + + // add the package file to the pkgFiles object + if (!pkgFiles[pkgName]) pkgFiles[pkgName] = []; + pkgFiles[pkgName].push(file.replace(schemaDir, '')); + + // extract subscription methods into the array + Object.values(serviceDef.methods).forEach((m: any) => { + if (m.responseStream) { + subscriptionMethods.push(`${serviceDef.fullName}.${m.name}`); + } + }); +}); + +// create the schema.ts file +const schemaContent = ` + // This file is auto-generated by the 'process_types.ts' script + + // Collection of service names to avoid having to use magic strings for + // the RPC services. If anything gets renamed in the protos, it'll + // produce a compiler error + export const serviceNames = ${JSON.stringify(services)}; + + // This array contains the list of methods that are server streaming. It is + // used to determine if the Proxy should call 'request' or 'subscribe'. The + // only other solution would be to either hard-code the subscription methods, + // which increases the maintenance burden on updates, or to have protoc generate JS code + // which increases the bundle size. This build-time approach which only + // includes a small additional file appears to be worthy trade-off + export const subscriptionMethods = ${JSON.stringify(subscriptionMethods)}; +`; +fs.writeFileSync(path.join(typesDir, 'schema.ts'), schemaContent); + +const indexExports: string[] = []; +// create a file for each protobuf package (ex: looprpc.ts) which exports all the types +// from each of the generated files in that package +Object.entries(pkgFiles).forEach(([pkgName, paths]) => { + const exportStmts = paths + .map((f) => { + const relPath = f.replace(path.extname(f), ''); + return `export * from '.${relPath}';`; + }) + .join(os.EOL); + const destPath = path.join(typesDir, `${pkgName}.ts`); + fs.writeFileSync(destPath, exportStmts); + + // add a named import for this package to the array + indexExports.push(`import * as ${pkgName} from './${pkgName}';`); +}); + +// create an index.ts file which re-exports all the types from the package files +const pkgNames = Object.keys(pkgFiles); +indexExports.push(`export { ${pkgNames.join(', ')} };`); +fs.writeFileSync(path.join(typesDir, 'index.ts'), indexExports.join(os.EOL)); diff --git a/tsconfig.json b/tsconfig.json index 7b2b551..65c9c4f 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -3,6 +3,7 @@ "target": "es5", "module": "commonjs", "declaration": true, + "declarationMap": true, "outDir": "./dist", "strict": true, "lib": ["es2017", "dom"], diff --git a/webpack.config.js b/webpack.config.js index 44ec664..b9cd0e0 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -3,7 +3,7 @@ const NodePolyfillPlugin = require('node-polyfill-webpack-plugin'); const { CleanWebpackPlugin } = require('clean-webpack-plugin'); module.exports = { - mode: "production", + mode: process.env.NODE_ENV === 'production' ? 'production' : 'development', entry: path.resolve(__dirname, './lib/index.ts'), module: { rules: [ @@ -16,25 +16,17 @@ module.exports = { ], }, plugins: [ - new NodePolyfillPlugin(), + new NodePolyfillPlugin(), new CleanWebpackPlugin() - ], + ], resolve: { extensions: ['.tsx', '.ts', '.js'], - // fallback: { - // crypto: require.resolve('crypto-browserify'), - // // os: require.resolve('os-browserify/browser'), - // // stream: require.resolve('stream-browserify'), - // // util: require.resolve('util/') - // }, }, - // node: { fs: 'empty' }, output: { filename: 'index.js', library: { - name: "LNC", + name: '@lightninglabs/lnc-web', type: "umd", // see https://webpack.js.org/configuration/output/#outputlibrarytype - export: "default", // see https://github.com/webpack/webpack/issues/8480 }, path: path.resolve(__dirname, 'dist'), },