@getpara/rest-sdk 2.32.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,12 @@
1
+ import type { Address } from '@solana/addresses';
2
+ import type { MessageModifyingSigner, MessagePartialSigner, TransactionModifyingSigner, TransactionPartialSigner } from '@solana/signers';
3
+ import type { ParaRestCallOptions, SignRawRequest, SignRawResponse } from '../index.js';
4
+ export type ParaRestSolanaSigner = TransactionPartialSigner & TransactionModifyingSigner & MessagePartialSigner & MessageModifyingSigner;
5
+ export interface ParaRestSolanaSignerOptions {
6
+ client: {
7
+ signRaw(walletId: string, body: SignRawRequest, options?: ParaRestCallOptions): Promise<SignRawResponse>;
8
+ };
9
+ walletId: string;
10
+ address: Address | string;
11
+ }
12
+ export declare function createParaRestSolanaSigner(options: ParaRestSolanaSignerOptions): ParaRestSolanaSigner;
@@ -0,0 +1,11 @@
1
+ import type { Address, Hex, LocalAccount } from 'viem';
2
+ import type { ParaRestClient } from '../index.js';
3
+ type ParaRestViemClient = Pick<ParaRestClient, 'signRaw' | 'signMessage' | 'signTypedData' | 'signTransaction' | 'signAuthorization'>;
4
+ export interface CreateParaRestViemAccountOptions {
5
+ client: ParaRestViemClient;
6
+ walletId: string;
7
+ address: Address;
8
+ publicKey?: Hex;
9
+ }
10
+ export declare function createParaRestViemAccount(options: CreateParaRestViemAccountOptions): LocalAccount;
11
+ export {};
package/package.json ADDED
@@ -0,0 +1,114 @@
1
+ {
2
+ "name": "@getpara/rest-sdk",
3
+ "version": "2.32.0",
4
+ "description": "Typed server-side SDK for Para REST wallet management and signing",
5
+ "author": "Para Team <hello@getpara.com> (https://getpara.com)",
6
+ "homepage": "https://docs.getpara.com/v2/rest/sdk",
7
+ "keywords": [
8
+ "para",
9
+ "rest",
10
+ "sdk",
11
+ "wallet",
12
+ "signing",
13
+ "server"
14
+ ],
15
+ "engines": {
16
+ "node": ">=18"
17
+ },
18
+ "devDependencies": {
19
+ "@solana/addresses": "^2.2.1",
20
+ "@solana/keys": "^2.2.1",
21
+ "@solana/signers": "^2.2.1",
22
+ "@solana/transactions": "^2.2.1",
23
+ "ethers": "^6.13.4",
24
+ "tsx": "^4.20.3",
25
+ "typescript": "^5.8.3",
26
+ "viem": "^2.39.0",
27
+ "vitest": "^3.2.4"
28
+ },
29
+ "dependencies": {
30
+ "@getpara/shared": "^1.17.0"
31
+ },
32
+ "exports": {
33
+ ".": {
34
+ "types": "./dist/types/index.d.ts",
35
+ "import": "./dist/esm/index.js",
36
+ "require": "./dist/cjs/index.js"
37
+ },
38
+ "./ethers": {
39
+ "types": "./dist/types/ethers/index.d.ts",
40
+ "import": "./dist/esm/ethers/index.js",
41
+ "require": "./dist/cjs/ethers/index.js"
42
+ },
43
+ "./viem": {
44
+ "types": "./dist/types/viem/index.d.ts",
45
+ "import": "./dist/esm/viem/index.js",
46
+ "require": "./dist/cjs/viem/index.js"
47
+ },
48
+ "./solana": {
49
+ "types": "./dist/types/solana/index.d.ts",
50
+ "import": "./dist/esm/solana/index.js",
51
+ "require": "./dist/cjs/solana/index.js"
52
+ }
53
+ },
54
+ "files": [
55
+ "dist",
56
+ "package.json",
57
+ "README.md"
58
+ ],
59
+ "main": "dist/cjs/index.js",
60
+ "module": "dist/esm/index.js",
61
+ "peerDependencies": {
62
+ "@solana/addresses": "^2.2.1",
63
+ "@solana/keys": "^2.2.1",
64
+ "@solana/signers": "^2.2.1",
65
+ "@solana/transactions": "^2.2.1",
66
+ "ethers": "^6.13.4",
67
+ "viem": "^2.39.0"
68
+ },
69
+ "peerDependenciesMeta": {
70
+ "@solana/addresses": {
71
+ "optional": true
72
+ },
73
+ "@solana/keys": {
74
+ "optional": true
75
+ },
76
+ "@solana/signers": {
77
+ "optional": true
78
+ },
79
+ "@solana/transactions": {
80
+ "optional": true
81
+ },
82
+ "ethers": {
83
+ "optional": true
84
+ },
85
+ "viem": {
86
+ "optional": true
87
+ }
88
+ },
89
+ "scripts": {
90
+ "build": "rm -rf dist && node ./scripts/build.mjs && yarn build:types",
91
+ "build:types": "rm -rf dist/types && tsc --module es6 --declarationDir dist/types --emitDeclarationOnly --declaration",
92
+ "test": "vitest run"
93
+ },
94
+ "publishConfig": {
95
+ "access": "public"
96
+ },
97
+ "sideEffects": false,
98
+ "types": "dist/types/index.d.ts",
99
+ "typesVersions": {
100
+ "*": {
101
+ "ethers": [
102
+ "dist/types/ethers/index.d.ts"
103
+ ],
104
+ "solana": [
105
+ "dist/types/solana/index.d.ts"
106
+ ],
107
+ "viem": [
108
+ "dist/types/viem/index.d.ts"
109
+ ]
110
+ }
111
+ },
112
+ "typings": "dist/types/index.d.ts",
113
+ "gitHead": "35634005629d40f7c4423127799c63d3f73b825c"
114
+ }