@solana/client 1.2.2 → 1.4.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.
- package/dist/index.browser.mjs +2 -2
- package/dist/index.native.mjs +2 -2
- package/dist/index.node.mjs +424 -61
- package/dist/types/client/actions.d.ts +3 -1
- package/dist/types/client/actions.d.ts.map +1 -1
- package/dist/types/client/createClient.d.ts.map +1 -1
- package/dist/types/client/createClientHelpers.d.ts +2 -1
- package/dist/types/client/createClientHelpers.d.ts.map +1 -1
- package/dist/types/client/defaultClient.d.ts +2 -1
- package/dist/types/client/defaultClient.d.ts.map +1 -1
- package/dist/types/client/watchers.d.ts +2 -1
- package/dist/types/client/watchers.d.ts.map +1 -1
- package/dist/types/controllers/wsolController.d.ts +30 -0
- package/dist/types/controllers/wsolController.d.ts.map +1 -0
- package/dist/types/features/sol.d.ts +2 -1
- package/dist/types/features/sol.d.ts.map +1 -1
- package/dist/types/features/spl.d.ts +2 -1
- package/dist/types/features/spl.d.ts.map +1 -1
- package/dist/types/features/stake.d.ts +2 -1
- package/dist/types/features/stake.d.ts.map +1 -1
- package/dist/types/features/transactions.d.ts +2 -1
- package/dist/types/features/transactions.d.ts.map +1 -1
- package/dist/types/features/wsol.d.ts +86 -0
- package/dist/types/features/wsol.d.ts.map +1 -0
- package/dist/types/index.d.ts +5 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/rpc/types.d.ts +8 -0
- package/dist/types/rpc/types.d.ts.map +1 -0
- package/dist/types/signers/walletTransactionSigner.d.ts +1 -1
- package/dist/types/signers/walletTransactionSigner.d.ts.map +1 -1
- package/dist/types/types.d.ts +8 -64
- package/dist/types/types.d.ts.map +1 -1
- package/dist/types/wallet/connectors.d.ts +1 -1
- package/dist/types/wallet/connectors.d.ts.map +1 -1
- package/dist/types/wallet/registry.d.ts +1 -1
- package/dist/types/wallet/registry.d.ts.map +1 -1
- package/dist/types/wallet/standard.d.ts +1 -1
- package/dist/types/wallet/standard.d.ts.map +1 -1
- package/dist/types/wallet/types.d.ts +60 -0
- package/dist/types/wallet/types.d.ts.map +1 -0
- package/package.json +4 -3
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { IdentifierString, Wallet } from '@wallet-standard/base';
|
|
2
|
-
import type { WalletConnector } from '
|
|
2
|
+
import type { WalletConnector } from './types';
|
|
3
3
|
export type WalletStandardConnectorMetadata = Readonly<{
|
|
4
4
|
canAutoConnect?: boolean;
|
|
5
5
|
defaultChain?: IdentifierString;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"standard.d.ts","sourceRoot":"","sources":["../../../src/wallet/standard.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,EAA0C,MAAM,uBAAuB,CAAC;AAQ9G,OAAO,KAAK,EAAiB,eAAe,EAA0C,MAAM,
|
|
1
|
+
{"version":3,"file":"standard.d.ts","sourceRoot":"","sources":["../../../src/wallet/standard.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,EAA0C,MAAM,uBAAuB,CAAC;AAQ9G,OAAO,KAAK,EAAiB,eAAe,EAA0C,MAAM,SAAS,CAAC;AAEtG,MAAM,MAAM,+BAA+B,GAAG,QAAQ,CAAC;IACtD,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,YAAY,CAAC,EAAE,gBAAgB,CAAC;IAChC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;CACd,CAAC,CAAC;AAsFH;;;;;;GAMG;AACH,wBAAgB,6BAA6B,CAC5C,MAAM,EAAE,MAAM,EACd,OAAO,GAAE,+BAAoC,GAC3C,eAAe,CAyMjB;AAgBD,MAAM,MAAM,8BAA8B,GAAG,QAAQ,CAAC;IACrD,SAAS,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,+BAA+B,GAAG,SAAS,CAAC;CAC5E,CAAC,CAAC;AAEH;;;;;GAKG;AACH,wBAAgB,2BAA2B,CAAC,OAAO,GAAE,8BAAmC,GAAG,SAAS,eAAe,EAAE,CAapH;AAED;;;;;;GAMG;AACH,wBAAgB,6BAA6B,CAC5C,QAAQ,EAAE,CAAC,UAAU,EAAE,SAAS,eAAe,EAAE,KAAK,IAAI,EAC1D,OAAO,GAAE,8BAAmC,GAC1C,MAAM,IAAI,CAwBZ"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import type { Address, Commitment, SendableTransaction, Signature, Transaction } from '@solana/kit';
|
|
2
|
+
export type WalletConnectorMetadata = Readonly<{
|
|
3
|
+
canAutoConnect?: boolean;
|
|
4
|
+
icon?: string;
|
|
5
|
+
id: string;
|
|
6
|
+
kind?: string;
|
|
7
|
+
name: string;
|
|
8
|
+
ready?: boolean;
|
|
9
|
+
}>;
|
|
10
|
+
export type WalletAccount = Readonly<{
|
|
11
|
+
address: Address;
|
|
12
|
+
label?: string;
|
|
13
|
+
publicKey: Uint8Array;
|
|
14
|
+
}>;
|
|
15
|
+
export type WalletSession = Readonly<{
|
|
16
|
+
account: WalletAccount;
|
|
17
|
+
connector: WalletConnectorMetadata;
|
|
18
|
+
disconnect(): Promise<void>;
|
|
19
|
+
onAccountsChanged?: (listener: (accounts: WalletAccount[]) => void) => () => void;
|
|
20
|
+
sendTransaction?(transaction: SendableTransaction & Transaction, config?: Readonly<{
|
|
21
|
+
commitment?: Commitment;
|
|
22
|
+
}>): Promise<Signature>;
|
|
23
|
+
signMessage?(message: Uint8Array): Promise<Uint8Array>;
|
|
24
|
+
signTransaction?(transaction: SendableTransaction & Transaction): Promise<SendableTransaction & Transaction>;
|
|
25
|
+
}>;
|
|
26
|
+
export type WalletConnector = WalletConnectorMetadata & {
|
|
27
|
+
connect(opts?: Readonly<{
|
|
28
|
+
autoConnect?: boolean;
|
|
29
|
+
allowInteractiveFallback?: boolean;
|
|
30
|
+
}>): Promise<WalletSession>;
|
|
31
|
+
disconnect(): Promise<void>;
|
|
32
|
+
isSupported(): boolean;
|
|
33
|
+
};
|
|
34
|
+
type WalletStatusConnected = Readonly<{
|
|
35
|
+
autoConnect?: boolean;
|
|
36
|
+
connectorId: string;
|
|
37
|
+
session: WalletSession;
|
|
38
|
+
status: 'connected';
|
|
39
|
+
}>;
|
|
40
|
+
type WalletStatusConnecting = Readonly<{
|
|
41
|
+
autoConnect?: boolean;
|
|
42
|
+
connectorId: string;
|
|
43
|
+
status: 'connecting';
|
|
44
|
+
}>;
|
|
45
|
+
type WalletStatusDisconnected = Readonly<{
|
|
46
|
+
status: 'disconnected';
|
|
47
|
+
}>;
|
|
48
|
+
type WalletStatusError = Readonly<{
|
|
49
|
+
autoConnect?: boolean;
|
|
50
|
+
connectorId?: string;
|
|
51
|
+
error: unknown;
|
|
52
|
+
status: 'error';
|
|
53
|
+
}>;
|
|
54
|
+
export type WalletStatus = WalletStatusConnected | WalletStatusConnecting | WalletStatusDisconnected | WalletStatusError;
|
|
55
|
+
export type WalletRegistry = Readonly<{
|
|
56
|
+
all: readonly WalletConnector[];
|
|
57
|
+
get(id: string): WalletConnector | undefined;
|
|
58
|
+
}>;
|
|
59
|
+
export {};
|
|
60
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/wallet/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,mBAAmB,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAEpG,MAAM,MAAM,uBAAuB,GAAG,QAAQ,CAAC;IAC9C,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,EAAE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W,CAAC,EAAE,OAAO,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,aAAa,CAAC;IACvB,MAAM,EAAE,WAAW,CAAC;CACpB,CAAC,CAAC;AAEH,KAAK,sBAAsB,GAAG,QAAQ,CAAC;IACtC,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,YAAY,CAAC;CACrB,CAAC,CAAC;AAEH,KAAK,wBAAwB,GAAG,QAAQ,CAAC;IACxC,MAAM,EAAE,cAAc,CAAC;CACvB,CAAC,CAAC;AAEH,KAAK,iBAAiB,GAAG,QAAQ,CAAC;IACjC,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,EAAE,OAAO,CAAC;IACf,MAAM,EAAE,OAAO,CAAC;CAChB,CAAC,CAAC;AAEH,MAAM,MAAM,YAAY,GACrB,qBAAqB,GACrB,sBAAsB,GACtB,wBAAwB,GACxB,iBAAiB,CAAC;AAErB,MAAM,MAAM,cAAc,GAAG,QAAQ,CAAC;IACrC,GAAG,EAAE,SAAS,eAAe,EAAE,CAAC;IAChC,GAAG,CAAC,EAAE,EAAE,MAAM,GAAG,eAAe,GAAG,SAAS,CAAC;CAC7C,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@solana/client",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.0",
|
|
4
4
|
"description": "Framework-agnostic Solana client orchestration layer powering higher-level experiences",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
@@ -82,8 +82,9 @@
|
|
|
82
82
|
"compile:typedefs": "tsc -p ./tsconfig.declarations.json",
|
|
83
83
|
"format": "biome check --write src",
|
|
84
84
|
"lint": "biome check src",
|
|
85
|
-
"test:typecheck": "tsc --noEmit",
|
|
85
|
+
"test:typecheck": "tsc --noEmit -p tsconfig.test.json",
|
|
86
86
|
"test": "vitest run --config ./vitest.config.ts",
|
|
87
|
-
"typecheck": "
|
|
87
|
+
"typecheck": "tsc --noEmit",
|
|
88
|
+
"check:circular-deps": "madge --circular $(find ./src -name '*.ts' -o -name '*.tsx')"
|
|
88
89
|
}
|
|
89
90
|
}
|