@leather-wallet/types
Advanced tools
Sorry, the diff of this file is not supported yet
| {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,yBAAyB,CAAC;AACnE,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,EAAE,wBAAwB,EAAE,MAAM,yBAAyB,CAAC;AACnE,OAAO,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AACjE,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,EAAE,0BAA0B,EAAE,MAAM,4BAA4B,CAAC;AACxE,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAElC,cAAc,OAAO,CAAC;AACtB,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AACxC,cAAc,SAAS,CAAC;AAExB,MAAM,MAAM,SAAS,GAAG,mBAAmB,GACzC,wBAAwB,GACxB,oBAAoB,GACpB,uBAAuB,GACvB,wBAAwB,GACxB,0BAA0B,CAAC;AAE7B,MAAM,MAAM,WAAW,GAAG,OAAO,CAAC,SAAS,CAAC,CAAC,SAAS,CAAC,CAAC;AAExD,MAAM,MAAM,YAAY,GAAG,OAAO,CAAC,SAAS,CAAC,CAAC,UAAU,CAAC,CAAC;AAE1D,MAAM,MAAM,WAAW,GAAG,MAAM,SAAS,CAAC;AAE1C,MAAM,WAAW,SAAS;IACxB,CAAC,CAAC,SAAS,WAAW,EAAE,GAAG,EAAE,CAAC,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC;CAChG;AAED,MAAM,WAAW,QAAQ;IACvB,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC;CACpD;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,MAAM;QACd,eAAe,CAAC,EAAE;YAKhB,OAAO,EAAE,SAAS,CAAC;YAKnB,MAAM,EAAE,QAAQ,CAAC;SAClB,CAAC;KACH;CACF"} |
| {"version":3,"file":"get-addresses.d.ts","sourceRoot":"","sources":["../../../src/methods/get-addresses.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AAClE,OAAO,EAAE,yBAAyB,EAAE,MAAM,UAAU,CAAC;AAErD,MAAM,MAAM,YAAY,GAAG,OAAO,GAAG,MAAM,GAAG,aAAa,GAAG,QAAQ,GAAG,MAAM,CAAC;AAEhF,MAAM,WAAW,UAAW,SAAQ,yBAAyB;IAC3D,IAAI,EAAE,YAAY,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,mBAAoB,SAAQ,yBAAyB;IACpE,SAAS,EAAE,UAAU,EAAE,CAAC;CACzB;AAED,MAAM,WAAW,MAAO,SAAQ,yBAAyB;IACvD,KAAK,EAAE,YAAY,EAAE,CAAC;CACvB;AAED,MAAM,MAAM,mBAAmB,GAAG,UAAU,CAAC,cAAc,CAAC,CAAC;AAE7D,MAAM,MAAM,oBAAoB,GAAG,WAAW,CAAC,mBAAmB,CAAC,CAAC;AAEpE,MAAM,MAAM,wBAAwB,GAAG,eAAe,CAAC,mBAAmB,EAAE,oBAAoB,CAAC,CAAC"} |
| {"version":3,"file":"get-info.d.ts","sourceRoot":"","sources":["../../../src/methods/get-info.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AAElE,UAAU,mBAAmB;IAC3B,OAAO,EAAE,MAAM,CAAC;IAChB,gBAAgB,CAAC,EAAE,MAAM,EAAE,CAAC;CAC7B;AAED,MAAM,MAAM,cAAc,GAAG,UAAU,CAAC,SAAS,CAAC,CAAC;AAEnD,MAAM,MAAM,eAAe,GAAG,WAAW,CAAC,mBAAmB,CAAC,CAAC;AAE/D,MAAM,MAAM,mBAAmB,GAAG,eAAe,CAAC,cAAc,EAAE,eAAe,CAAC,CAAC"} |
| {"version":3,"file":"send-transfer.d.ts","sourceRoot":"","sources":["../../../src/methods/send-transfer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AAElE,MAAM,WAAW,yBAAyB;IACxC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,wBAAwB;IACvC,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,MAAM,mBAAmB,GAAG,UAAU,CAAC,cAAc,EAAE,yBAAyB,CAAC,CAAC;AAExF,MAAM,MAAM,oBAAoB,GAAG,WAAW,CAAC,wBAAwB,CAAC,CAAC;AAEzE,MAAM,MAAM,wBAAwB,GAAG,eAAe,CAAC,mBAAmB,EAAE,oBAAoB,CAAC,CAAC"} |
| {"version":3,"file":"sign-message.d.ts","sourceRoot":"","sources":["../../../src/methods/sign-message.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AAClE,OAAO,EAAE,yBAAyB,EAAE,MAAM,UAAU,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAI/C,MAAM,MAAM,kBAAkB,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAErD,MAAM,WAAW,wBAAyB,SAAQ,yBAAyB;IACzE,IAAI,CAAC,EAAE,kBAAkB,CAAC;IAC1B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,YAAY,CAAC;CAC3B;AAED,MAAM,WAAW,uBAAwB,SAAQ,yBAAyB;IAIxE,SAAS,EAAE,MAAM,CAAC;IAKlB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,MAAM,kBAAkB,GAAG,UAAU,CAAC,aAAa,EAAE,wBAAwB,CAAC,CAAC;AAErF,MAAM,MAAM,mBAAmB,GAAG,WAAW,CAAC,uBAAuB,CAAC,CAAC;AAEvE,MAAM,MAAM,uBAAuB,GAAG,eAAe,CAAC,kBAAkB,EAAE,mBAAmB,CAAC,CAAC"} |
| {"version":3,"file":"sign-psbt.d.ts","sourceRoot":"","sources":["../../../src/methods/sign-psbt.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AAUlE,oBAAY,aAAa;IACvB,GAAG,IAAO;IACV,IAAI,IAAO;IACX,MAAM,IAAO;IACb,gBAAgB,MAAO;IACvB,iBAAiB,MAAO;IACxB,mBAAmB,MAAO;CAC3B;AAED,MAAM,WAAW,qBAAqB;IACpC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,cAAc,CAAC,EAAE,aAAa,EAAE,CAAC;IACjC,GAAG,EAAE,MAAM,CAAC;IACZ,WAAW,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;CACjC;AAED,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,MAAM,eAAe,GAAG,UAAU,CAAC,UAAU,EAAE,qBAAqB,CAAC,CAAC;AAE5E,MAAM,MAAM,gBAAgB,GAAG,WAAW,CAAC,oBAAoB,CAAC,CAAC;AAEjE,MAAM,MAAM,oBAAoB,GAAG,eAAe,CAAC,eAAe,EAAE,gBAAgB,CAAC,CAAC"} |
| import { DefineRpcMethod, RpcRequest, RpcResponse } from '../rpc'; | ||
| export type StxSignMessageTypes = 'utf8' | 'structured'; | ||
| export interface StxSignMessageRequestParamsBase { | ||
| type: StxSignMessageTypes; | ||
| network?: 'mainnet' | 'testnet' | 'devnet' | 'mocknet'; | ||
| } | ||
| export interface StxSignMessageRequestParamsUtf8 extends StxSignMessageRequestParamsBase { | ||
| type: 'utf8'; | ||
| message: string; | ||
| } | ||
| export interface StxSignMessageRequestParamsStructured extends StxSignMessageRequestParamsBase { | ||
| type: 'structured'; | ||
| domain: string; | ||
| message: string; | ||
| } | ||
| export type StxSignMessageRequestParams = StxSignMessageRequestParamsUtf8 | StxSignMessageRequestParamsStructured; | ||
| export interface StxSignMessageResponseBody { | ||
| signature: string; | ||
| } | ||
| export type StxSignMessageRequest = RpcRequest<'StxSignMessage', StxSignMessageRequestParams>; | ||
| export type StxSignMessageResponse = RpcResponse<StxSignMessageResponseBody>; | ||
| export type DefineStxSignMessageMethod = DefineRpcMethod<StxSignMessageRequest, StxSignMessageResponse>; | ||
| //# sourceMappingURL=stx-sign-message.d.ts.map |
| {"version":3,"file":"stx-sign-message.d.ts","sourceRoot":"","sources":["../../../src/methods/stx-sign-message.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AAElE,MAAM,MAAM,mBAAmB,GAAG,MAAM,GAAG,YAAY,CAAC;AAExD,MAAM,WAAW,+BAA+B;IAC9C,IAAI,EAAE,mBAAmB,CAAC;IAC1B,OAAO,CAAC,EAAE,SAAS,GAAG,SAAS,GAAG,QAAQ,GAAG,SAAS,CAAC;CACxD;AAED,MAAM,WAAW,+BAAgC,SAAQ,+BAA+B;IACtF,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,qCAAsC,SAAQ,+BAA+B;IAC5F,IAAI,EAAE,YAAY,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,MAAM,2BAA2B,GACnC,+BAA+B,GAC/B,qCAAqC,CAAC;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K,CAAC,CAAC,CAAC;AAEtC,MAAM,MAAM,OAAO,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;CAAE,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC"} |
+21
| MIT License | ||
| Copyright (c) 2023 Leather Wallet LLC [a subsidiary of Nassau Machines] | ||
| Permission is hereby granted, free of charge, to any person obtaining a copy | ||
| of this software and associated documentation files (the "Software"), to deal | ||
| in the Software without restriction, including without limitation the rights | ||
| to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
| copies of the Software, and to permit persons to whom the Software is | ||
| furnished to do so, subject to the following conditions: | ||
| The above copyright notice and this permission notice shall be included in all | ||
| copies or substantial portions of the Software. | ||
| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
| IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
| FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
| AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
| LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
| OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
| SOFTWARE. |
@@ -6,2 +6,3 @@ import { DefineGetAddressesMethod } from './methods/get-addresses'; | ||
| import { DefineSignPsbtMethod } from './methods/sign-psbt'; | ||
| import { DefineStxSignMessageMethod } from './methods/stx-sign-message'; | ||
| import { ValueOf } from './utils'; | ||
@@ -13,3 +14,4 @@ export * from './rpc'; | ||
| export * from './methods/send-transfer'; | ||
| export type MethodMap = DefineGetInfoMethod & DefineGetAddressesMethod & DefineSignPsbtMethod & DefineSignMessageMethod & DefineSendTransferMethod; | ||
| export * from './utils'; | ||
| export type MethodMap = DefineGetInfoMethod & DefineGetAddressesMethod & DefineSignPsbtMethod & DefineSignMessageMethod & DefineSendTransferMethod & DefineStxSignMessageMethod; | ||
| export type RpcRequests = ValueOf<MethodMap>['request']; | ||
@@ -32,1 +34,2 @@ export type RpcResponses = ValueOf<MethodMap>['response']; | ||
| } | ||
| //# sourceMappingURL=index.d.ts.map |
@@ -17,1 +17,2 @@ import { DefineRpcMethod, RpcRequest, RpcResponse } from '../rpc'; | ||
| export type DefineGetAddressesMethod = DefineRpcMethod<GetAddressesRequest, GetAddressesResponse>; | ||
| //# sourceMappingURL=get-addresses.d.ts.map |
@@ -10,1 +10,2 @@ import { DefineRpcMethod, RpcRequest, RpcResponse } from '../rpc'; | ||
| export {}; | ||
| //# sourceMappingURL=get-info.d.ts.map |
@@ -13,1 +13,2 @@ import { DefineRpcMethod, RpcRequest, RpcResponse } from '../rpc'; | ||
| export type DefineSendTransferMethod = DefineRpcMethod<SendTransferRequest, SendTransferResponse>; | ||
| //# sourceMappingURL=send-transfer.d.ts.map |
@@ -18,1 +18,2 @@ import { DefineRpcMethod, RpcRequest, RpcResponse } from '../rpc'; | ||
| export type DefineSignMessageMethod = DefineRpcMethod<SignMessageRequest, SignMessageResponse>; | ||
| //# sourceMappingURL=sign-message.d.ts.map |
@@ -22,1 +22,2 @@ import { DefineRpcMethod, RpcRequest, RpcResponse } from '../rpc'; | ||
| export type DefineSignPsbtMethod = DefineRpcMethod<SignPsbtRequest, SignPsbtResponse>; | ||
| //# sourceMappingURL=sign-psbt.d.ts.map |
@@ -40,1 +40,2 @@ export type RpcParameterByPosition = string[]; | ||
| }>; | ||
| //# sourceMappingURL=index.d.ts.map |
@@ -5,1 +5,8 @@ export type ValueOf<T> = T[keyof T]; | ||
| } | ||
| type Primitive = null | undefined | string | number | boolean | symbol | bigint; | ||
| export type LiteralUnion<LiteralType, BaseType extends Primitive> = LiteralType | (BaseType & Record<never, never>); | ||
| export type Entries<T> = { | ||
| [K in keyof T]: [K, T[K]]; | ||
| }[keyof T][]; | ||
| export {}; | ||
| //# sourceMappingURL=utils.d.ts.map |
+20
-16
| { | ||
| "name": "@leather-wallet/types", | ||
| "version": "0.0.20", | ||
| "description": "Types package for Leather", | ||
| "scripts": { | ||
| "build": "tsup src/index.ts && npm run types", | ||
| "test": "echo \"Error: no test specified\" && exit 1", | ||
| "types": "tsc --declaration --emitDeclarationOnly", | ||
| "prepublish": "yarn build" | ||
| "version": "0.1.0", | ||
| "license": "MIT", | ||
| "author": "leather-wallet", | ||
| "devDependencies": { | ||
| "tsup": "8.0.1" | ||
| }, | ||
| "author": "leather-wallet", | ||
| "license": "MIT", | ||
| "exports": { | ||
| ".": { | ||
| "types": "./dist/types/index.d.ts", | ||
| "import": "./dist/types/index.js", | ||
| "require": "./dist/types/index.js" | ||
| } | ||
| }, | ||
| "files": [ | ||
| "dist" | ||
| ], | ||
| "typings": "dist/types/index.d.ts", | ||
| "main": "dist/index.js", | ||
| "module": "dist/index.mjs", | ||
| "umd:main": "dist/index.global.js", | ||
| "unpkg": "dist/index.global.js", | ||
| "publishConfig": { | ||
| "access": "public" | ||
| }, | ||
| "dependencies": { | ||
| "tsup": "^8.0.1" | ||
| "scripts": { | ||
| "prepublish": "pnpm ts:build", | ||
| "test": "echo \"Error: no test specified\" && exit 1", | ||
| "ts:build": "tsup src/index.ts && npm run types", | ||
| "ts:build:watch": "tsc --build --watch --preserveWatchOutput", | ||
| "typecheck": "tsc --noEmit -p ./tsconfig.json", | ||
| "types": "tsc --declaration --emitDeclarationOnly" | ||
| } | ||
| } | ||
| } |
| {"version":3,"sources":["../src/rpc/index.ts","../src/methods/sign-psbt.ts"],"names":["RpcErrorCode","SignatureHash"],"mappings":"AAmCO,IAAKA,OAEVA,IAAA,YAAc,QAAd,cACAA,IAAA,gBAAkB,QAAlB,kBACAA,IAAA,iBAAmB,QAAnB,mBACAA,IAAA,eAAiB,QAAjB,iBACAA,IAAA,eAAiB,QAAjB,iBACAA,IAAA,aAAe,OAAf,eAEAA,IAAA,eAAiB,MAAjB,iBACAA,IAAA,qBAAuB,MAAvB,uBAVUA,OAAA,ICzBL,IAAKC,OACVA,IAAA,IAAM,GAAN,MACAA,IAAA,KAAO,GAAP,OACAA,IAAA,OAAS,GAAT,SACAA,IAAA,iBAAmB,KAAnB,mBACAA,IAAA,kBAAoB,KAApB,oBACAA,IAAA,oBAAsB,KAAtB,sBANUA,OAAA","sourcesContent":["// See JSON RPC specification\n// https://www.jsonrpc.org/specification\n\nexport type RpcParameterByPosition = string[];\nexport type RpcParameterByName = Record<string, string>;\n\nexport type RpcParameter = RpcParameterByPosition | RpcParameterByName;\nexport interface RpcBaseProps {\n jsonrpc: '2.0';\n id: string;\n}\n\nexport interface RpcRequest<TMethod, TParam = RpcParameter> extends RpcBaseProps {\n method: TMethod;\n params?: TParam;\n}\n\nexport interface RpcError<TErrorData = RpcParameter> {\n code: number | RpcErrorCode;\n message: string;\n data?: TErrorData;\n}\n\nexport interface RpcSuccessResponse<TResult extends object> extends RpcBaseProps {\n result: TResult;\n}\n\nexport interface RpcErrorResponse<TError extends RpcError = RpcError> extends RpcBaseProps {\n error: TError;\n}\n\nexport type RpcResponse<TResult extends object, TError extends RpcError = RpcError> =\n | RpcSuccessResponse<TResult>\n | RpcErrorResponse<TError>;\n\nexport enum RpcErrorCode {\n // Spec defined server errors\n PARSE_ERROR = -32700,\n INVALID_REQUEST = -32600,\n METHOD_NOT_FOUND = -32601,\n INVALID_PARAMS = -32602,\n INTERNAL_ERROR = -32603,\n SERVER_ERROR = -32000,\n // Client defined errors\n USER_REJECTION = 4001,\n METHOD_NOT_SUPPORTED = 4002,\n}\n\nexport type ExtractSuccessResponse<T> = Extract<T, RpcSuccessResponse<any>>;\n\nexport type ExtractErrorResponse<T> = Extract<T, RpcErrorResponse<any>>;\n\nexport type DefineRpcMethod<\n TRequest extends RpcRequest<string, unknown>,\n TResponse extends RpcResponse<object>,\n> = Record<\n TRequest['method'],\n {\n request: TRequest;\n response: TResponse;\n }\n>;\n","import { DefineRpcMethod, RpcRequest, RpcResponse } from '../rpc';\n\n/**\n * ALL -- all inputs, all outputs\n * NONE -- all inputs, no outputs\n * SINGLE -- all inputs, one output of the same index\n * ALL + ANYONE -- one input, all outputs\n * NONE + ANYONE -- one input, no outputs\n * SINGLE -- one inputs, one output of the same index\n */\nexport enum SignatureHash {\n ALL = 0x01,\n NONE = 0x02,\n SINGLE = 0x03,\n ALL_ANYONECANPAY = 0x81,\n NONE_ANYONECANPAY = 0x82,\n SINGLE_ANYONECANPAY = 0x83,\n}\n\nexport interface SignPsbtRequestParams {\n account?: number;\n allowedSighash?: SignatureHash[];\n hex: string;\n signAtIndex?: number | number[];\n}\n\nexport interface SignPsbtResponseBody {\n txid: string;\n}\n\nexport type SignPsbtRequest = RpcRequest<'signPsbt', SignPsbtRequestParams>;\n\nexport type SignPsbtResponse = RpcResponse<SignPsbtResponseBody>;\n\nexport type DefineSignPsbtMethod = DefineRpcMethod<SignPsbtRequest, SignPsbtResponse>;\n"]} |
| var s=(e=>(e[e.PARSE_ERROR=-32700]="PARSE_ERROR",e[e.INVALID_REQUEST=-32600]="INVALID_REQUEST",e[e.METHOD_NOT_FOUND=-32601]="METHOD_NOT_FOUND",e[e.INVALID_PARAMS=-32602]="INVALID_PARAMS",e[e.INTERNAL_ERROR=-32603]="INTERNAL_ERROR",e[e.SERVER_ERROR=-32e3]="SERVER_ERROR",e[e.USER_REJECTION=4001]="USER_REJECTION",e[e.METHOD_NOT_SUPPORTED=4002]="METHOD_NOT_SUPPORTED",e))(s||{});var o=(t=>(t[t.ALL=1]="ALL",t[t.NONE=2]="NONE",t[t.SINGLE=3]="SINGLE",t[t.ALL_ANYONECANPAY=129]="ALL_ANYONECANPAY",t[t.NONE_ANYONECANPAY=130]="NONE_ANYONECANPAY",t[t.SINGLE_ANYONECANPAY=131]="SINGLE_ANYONECANPAY",t))(o||{}); | ||
| export { s as RpcErrorCode, o as SignatureHash }; | ||
| //# sourceMappingURL=out.js.map | ||
| //# sourceMappingURL=index.mjs.map |
| {"version":3,"sources":["../src/rpc/index.ts","../src/methods/sign-psbt.ts"],"names":["RpcErrorCode","SignatureHash"],"mappings":"AAmCO,IAAKA,OAEVA,IAAA,YAAc,QAAd,cACAA,IAAA,gBAAkB,QAAlB,kBACAA,IAAA,iBAAmB,QAAnB,mBACAA,IAAA,eAAiB,QAAjB,iBACAA,IAAA,eAAiB,QAAjB,iBACAA,IAAA,aAAe,OAAf,eAEAA,IAAA,eAAiB,MAAjB,iBACAA,IAAA,qBAAuB,MAAvB,uBAVUA,OAAA,ICzBL,IAAKC,OACVA,IAAA,IAAM,GAAN,MACAA,IAAA,KAAO,GAAP,OACAA,IAAA,OAAS,GAAT,SACAA,IAAA,iBAAmB,KAAnB,mBACAA,IAAA,kBAAoB,KAApB,oBACAA,IAAA,oBAAsB,KAAtB,sBANUA,OAAA","sourcesContent":["// See JSON RPC specification\n// https://www.jsonrpc.org/specification\n\nexport type RpcParameterByPosition = string[];\nexport type RpcParameterByName = Record<string, string>;\n\nexport type RpcParameter = RpcParameterByPosition | RpcParameterByName;\nexport interface RpcBaseProps {\n jsonrpc: '2.0';\n id: string;\n}\n\nexport interface RpcRequest<TMethod, TParam = RpcParameter> extends RpcBaseProps {\n method: TMethod;\n params?: TParam;\n}\n\nexport interface RpcError<TErrorData = RpcParameter> {\n code: number | RpcErrorCode;\n message: string;\n data?: TErrorData;\n}\n\nexport interface RpcSuccessResponse<TResult extends object> extends RpcBaseProps {\n result: TResult;\n}\n\nexport interface RpcErrorResponse<TError extends RpcError = RpcError> extends RpcBaseProps {\n error: TError;\n}\n\nexport type RpcResponse<TResult extends object, TError extends RpcError = RpcError> =\n | RpcSuccessResponse<TResult>\n | RpcErrorResponse<TError>;\n\nexport enum RpcErrorCode {\n // Spec defined server errors\n PARSE_ERROR = -32700,\n INVALID_REQUEST = -32600,\n METHOD_NOT_FOUND = -32601,\n INVALID_PARAMS = -32602,\n INTERNAL_ERROR = -32603,\n SERVER_ERROR = -32000,\n // Client defined errors\n USER_REJECTION = 4001,\n METHOD_NOT_SUPPORTED = 4002,\n}\n\nexport type ExtractSuccessResponse<T> = Extract<T, RpcSuccessResponse<any>>;\n\nexport type ExtractErrorResponse<T> = Extract<T, RpcErrorResponse<any>>;\n\nexport type DefineRpcMethod<\n TRequest extends RpcRequest<string, unknown>,\n TResponse extends RpcResponse<object>,\n> = Record<\n TRequest['method'],\n {\n request: TRequest;\n response: TResponse;\n }\n>;\n","import { DefineRpcMethod, RpcRequest, RpcResponse } from '../rpc';\n\n/**\n * ALL -- all inputs, all outputs\n * NONE -- all inputs, no outputs\n * SINGLE -- all inputs, one output of the same index\n * ALL + ANYONE -- one input, all outputs\n * NONE + ANYONE -- one input, no outputs\n * SINGLE -- one inputs, one output of the same index\n */\nexport enum SignatureHash {\n ALL = 0x01,\n NONE = 0x02,\n SINGLE = 0x03,\n ALL_ANYONECANPAY = 0x81,\n NONE_ANYONECANPAY = 0x82,\n SINGLE_ANYONECANPAY = 0x83,\n}\n\nexport interface SignPsbtRequestParams {\n account?: number;\n allowedSighash?: SignatureHash[];\n hex: string;\n signAtIndex?: number | number[];\n}\n\nexport interface SignPsbtResponseBody {\n txid: string;\n}\n\nexport type SignPsbtRequest = RpcRequest<'signPsbt', SignPsbtRequestParams>;\n\nexport type SignPsbtResponse = RpcResponse<SignPsbtResponseBody>;\n\nexport type DefineSignPsbtMethod = DefineRpcMethod<SignPsbtRequest, SignPsbtResponse>;\n"]} |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
34643
113.21%0
-100%23
64.29%229
12.25%3
-25%0
-100%1
Infinity%- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed