@rhinestone/sdk 0.0.0-dev-20260917215313 → 0.0.0-dev-20260921130703

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.
Files changed (68) hide show
  1. package/README.md +2 -20
  2. package/dist/src/actions/runtime.d.ts.map +1 -1
  3. package/dist/src/api/account.d.ts +62 -91
  4. package/dist/src/api/account.d.ts.map +1 -1
  5. package/dist/src/api/account.js +28 -697
  6. package/dist/src/api/accounts.d.ts +1 -1
  7. package/dist/src/api/accounts.d.ts.map +1 -1
  8. package/dist/src/api/accounts.js +3 -121
  9. package/dist/src/api/compose-types.d.ts +0 -9
  10. package/dist/src/api/compose-types.d.ts.map +1 -1
  11. package/dist/src/api/compose.d.ts.map +1 -1
  12. package/dist/src/api/compose.js +5 -50
  13. package/dist/src/api/sdk.d.ts +2 -2
  14. package/dist/src/api/sdk.d.ts.map +1 -1
  15. package/dist/src/api/sdk.js +1 -1
  16. package/dist/src/chains/caip2.d.ts.map +1 -1
  17. package/dist/src/chains/caip2.js +0 -5
  18. package/dist/src/chains/non-evm.d.ts +12 -132
  19. package/dist/src/chains/non-evm.d.ts.map +1 -1
  20. package/dist/src/chains/non-evm.js +1 -30
  21. package/dist/src/clients/orchestrator/client.js +1 -1
  22. package/dist/src/clients/orchestrator/errors.d.ts +2 -22
  23. package/dist/src/clients/orchestrator/errors.d.ts.map +1 -1
  24. package/dist/src/clients/orchestrator/errors.js +6 -61
  25. package/dist/src/clients/orchestrator/mappers.d.ts +0 -2
  26. package/dist/src/clients/orchestrator/mappers.d.ts.map +1 -1
  27. package/dist/src/clients/orchestrator/mappers.js +2 -87
  28. package/dist/src/clients/orchestrator/public.d.ts +7 -49
  29. package/dist/src/clients/orchestrator/public.d.ts.map +1 -1
  30. package/dist/src/clients/orchestrator/types.d.ts +4 -17
  31. package/dist/src/clients/orchestrator/types.d.ts.map +1 -1
  32. package/dist/src/clients/orchestrator/wire.d.ts +19 -1
  33. package/dist/src/clients/orchestrator/wire.d.ts.map +1 -1
  34. package/dist/src/config/account.d.ts +11 -185
  35. package/dist/src/config/account.d.ts.map +1 -1
  36. package/dist/src/errors/execution.d.ts +1 -11
  37. package/dist/src/errors/execution.d.ts.map +1 -1
  38. package/dist/src/errors/execution.js +1 -27
  39. package/dist/src/errors/index.d.ts +3 -4
  40. package/dist/src/errors/index.d.ts.map +1 -1
  41. package/dist/src/errors/index.js +4 -7
  42. package/dist/src/hypercore/market.d.ts +1 -1
  43. package/dist/src/hypercore/market.js +1 -1
  44. package/dist/src/index.d.ts +7 -7
  45. package/dist/src/index.d.ts.map +1 -1
  46. package/dist/src/index.js +2 -2
  47. package/dist/src/transactions/intents/normalize.d.ts.map +1 -1
  48. package/dist/src/transactions/intents/normalize.js +2 -9
  49. package/dist/src/transactions/intents/prepare.d.ts.map +1 -1
  50. package/dist/src/transactions/intents/prepare.js +1 -10
  51. package/dist/src/transactions/intents/types.d.ts +3 -61
  52. package/dist/src/transactions/intents/types.d.ts.map +1 -1
  53. package/dist/src/utils/index.d.ts +9 -9
  54. package/dist/src/utils/index.d.ts.map +1 -1
  55. package/dist/src/utils/index.js +6 -6
  56. package/package.json +1 -5
  57. package/dist/src/accounts/solana/address.d.ts +0 -28
  58. package/dist/src/accounts/solana/address.d.ts.map +0 -1
  59. package/dist/src/accounts/solana/address.js +0 -105
  60. package/dist/src/errors/capability.d.ts +0 -23
  61. package/dist/src/errors/capability.d.ts.map +0 -1
  62. package/dist/src/errors/capability.js +0 -41
  63. package/dist/src/transactions/intents/solana-instructions.d.ts +0 -14
  64. package/dist/src/transactions/intents/solana-instructions.d.ts.map +0 -1
  65. package/dist/src/transactions/intents/solana-instructions.js +0 -114
  66. package/dist/src/transactions/intents/solana.d.ts +0 -88
  67. package/dist/src/transactions/intents/solana.d.ts.map +0 -1
  68. package/dist/src/transactions/intents/solana.js +0 -302
@@ -5,19 +5,12 @@ export function normalizeIntentTypedData(typedData) {
5
5
  message: normalizeTypedDataMessage(types, typedData.primaryType, typedData.message),
6
6
  };
7
7
  }
8
- function normalizeOriginSignData(value) {
9
- return value.kind === 'personalSign'
10
- ? { ...value }
11
- : { ...normalizeIntentTypedData(value), kind: 'eip712' };
12
- }
13
8
  export function normalizeIntentQuote(quote) {
14
9
  return {
15
10
  ...quote,
16
11
  signData: {
17
- origin: quote.signData.origin.map(normalizeOriginSignData),
18
- ...(quote.signData.destination
19
- ? { destination: normalizeIntentTypedData(quote.signData.destination) }
20
- : {}),
12
+ origin: quote.signData.origin.map(normalizeIntentTypedData),
13
+ destination: normalizeIntentTypedData(quote.signData.destination),
21
14
  ...(quote.signData.targetExecution
22
15
  ? {
23
16
  targetExecution: normalizeIntentTypedData(quote.signData.targetExecution),
@@ -1 +1 @@
1
- {"version":3,"file":"prepare.d.ts","sourceRoot":"","sources":["../../../../transactions/intents/prepare.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAA;AAQ5D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAA;AAM3D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAA;AAQ1E,OAAO,KAAK,EACV,WAAW,EACX,qBAAqB,EACrB,cAAc,EACf,MAAM,SAAS,CAAA;AAEhB,wBAAsB,aAAa,CAAC,mBAAmB,EACrD,OAAO,EAAE,qBAAqB,CAAC,mBAAmB,CAAC,EACnD,KAAK,EAAE,WAAW,CAAC,mBAAmB,CAAC,GACtC,OAAO,CAAC,cAAc,CAAC,mBAAmB,CAAC,CAAC,CA2D9C;AAiHD,wBAAgB,uBAAuB,CACrC,OAAO,EAAE,cAAc,EACvB,KAAK,EAAE,cAAc,CAAC,OAAO,CAAC,EAC9B,QAAQ,CAAC,EAAE,cAAc,CAAC,kBAAkB,CAAC,EAC7C,WAAW,CAAC,EAAE,iBAAiB,EAC/B,cAAc,CAAC,EAAE,OAAO,gCAAgC,EAAE,2BAA2B,EACrF,iBAAiB,CAAC,EAAE,SAAS,MAAM,EAAE,GACpC,kBAAkB,CA8IpB"}
1
+ {"version":3,"file":"prepare.d.ts","sourceRoot":"","sources":["../../../../transactions/intents/prepare.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAA;AAQ5D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAA;AAI3D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAA;AAQ1E,OAAO,KAAK,EACV,WAAW,EACX,qBAAqB,EACrB,cAAc,EACf,MAAM,SAAS,CAAA;AAEhB,wBAAsB,aAAa,CAAC,mBAAmB,EACrD,OAAO,EAAE,qBAAqB,CAAC,mBAAmB,CAAC,EACnD,KAAK,EAAE,WAAW,CAAC,mBAAmB,CAAC,GACtC,OAAO,CAAC,cAAc,CAAC,mBAAmB,CAAC,CAAC,CA2D9C;AA8FD,wBAAgB,uBAAuB,CACrC,OAAO,EAAE,cAAc,EACvB,KAAK,EAAE,cAAc,CAAC,OAAO,CAAC,EAC9B,QAAQ,CAAC,EAAE,cAAc,CAAC,kBAAkB,CAAC,EAC7C,WAAW,CAAC,EAAE,iBAAiB,EAC/B,cAAc,CAAC,EAAE,OAAO,gCAAgC,EAAE,2BAA2B,EACrF,iBAAiB,CAAC,EAAE,SAAS,MAAM,EAAE,GACpC,kBAAkB,CA2IpB"}
@@ -122,14 +122,7 @@ async function resolveSourceCalls(context, input, runtime) {
122
122
  }
123
123
  return { calls, providedFunds };
124
124
  }
125
- function assertEvmQuoteSigningData(quote) {
126
- if (!quote.signData.destination ||
127
- quote.signData.origin.some(({ kind }) => kind !== 'eip712')) {
128
- throw new Error('EVM intent signing requires EIP-712 origin and destination payloads');
129
- }
130
- }
131
125
  export function buildIntentSigningInput(runtime, quote, sessions, destination, ownerValidator, selectedSignerIds) {
132
- assertEvmQuoteSigningData(quote);
133
126
  const sessionTopology = sessions
134
127
  ? signingTopology(defineValidator(requireSession(sessions).session.owners, 'smart-session-validator'))
135
128
  : undefined;
@@ -152,9 +145,7 @@ export function buildIntentSigningInput(runtime, quote, sessions, destination, o
152
145
  threshold: 1,
153
146
  },
154
147
  };
155
- const originTypedData = quote.signData
156
- .origin;
157
- const origins = originTypedData.map((typedData, index) => ({
148
+ const origins = quote.signData.origin.map((typedData, index) => ({
158
149
  id: hashTypedData(typedData),
159
150
  chain: toEvmChainReference(originChainId(typedData)),
160
151
  role: 'origin',
@@ -1,7 +1,6 @@
1
1
  import type { Address, Hex, SignedAuthorization } from 'viem';
2
2
  import type { AccountRuntimePort } from '../../accounts/adapter.js';
3
3
  import type { UnresolvedCall } from '../../calls/types.js';
4
- import type { SolanaAddress } from '../../chains/non-evm.js';
5
4
  import type { ChainReference, EvmChainReference } from '../../chains/types.js';
6
5
  import type { IntentQuotePort, IntentStatusPort, IntentSubmissionPort } from '../../clients/orchestrator/port.js';
7
6
  import type { IntentOpStatus, OriginSignature, Quote, SerializedIntentInput } from '../../clients/orchestrator/public.js';
@@ -60,7 +59,7 @@ export interface PreparedIntent<CompatibilityConfig = unknown> {
60
59
  export interface SignedIntent<CompatibilityConfig = unknown> {
61
60
  readonly prepared: PreparedIntent<CompatibilityConfig>;
62
61
  readonly originSignatures: readonly OrchestratorOriginSignature[];
63
- readonly destinationSignature?: Hex;
62
+ readonly destinationSignature: Hex;
64
63
  readonly targetSignature?: Hex;
65
64
  readonly transcript: SigningTranscript;
66
65
  readonly authorizations?: readonly SignedAuthorization[];
@@ -117,65 +116,8 @@ export interface PreparedQuotes {
117
116
  best: Quote;
118
117
  all: Quote[];
119
118
  }
120
- /** Binds a prepared same-chain Solana transfer to the account that prepared it. */
121
- export interface SolanaExecutionMetadata {
122
- kind: 'solana';
123
- namespace: 'dev-v1';
124
- endpoint: string;
125
- chain: number;
126
- caip2: string;
127
- accountAddress: Address;
128
- accountType: 'GENERIC' | 'ERC7579' | 'EOA';
129
- authority: Address;
130
- swigAddress: SolanaAddress;
131
- walletAddress: SolanaAddress;
132
- recipient: SolanaAddress;
133
- mint: SolanaAddress;
134
- }
135
- /**
136
- * Binds a prepared Solana-origin cross-chain delivery to the account that
137
- * prepared it, including the EVM chain, token and recipient it delivers to.
138
- */
139
- export interface SolanaCrossChainExecutionMetadata {
140
- kind: 'solana-cross-chain';
141
- namespace: 'dev-v1';
142
- endpoint: string;
143
- chain: number;
144
- caip2: string;
145
- accountAddress: Address;
146
- accountType: 'GENERIC' | 'ERC7579' | 'EOA';
147
- authority: Address;
148
- swigAddress: SolanaAddress;
149
- walletAddress: SolanaAddress;
150
- mint: SolanaAddress;
151
- destinationChain: number;
152
- destinationToken: Address;
153
- recipient: Address;
154
- }
155
- /**
156
- * Binds a prepared same-chain Solana instruction execution to the account that
157
- * prepared it. The instructions themselves are covered by the canonical
158
- * serialized intent input, not repeated here.
159
- */
160
- export interface SolanaInstructionsExecutionMetadata {
161
- kind: 'solana-instructions';
162
- namespace: 'dev-v1';
163
- endpoint: string;
164
- chain: number;
165
- caip2: string;
166
- accountAddress: Address;
167
- accountType: 'GENERIC' | 'ERC7579' | 'EOA';
168
- authority: Address;
169
- swigAddress: SolanaAddress;
170
- walletAddress: SolanaAddress;
171
- }
172
119
  export interface PreparedTransactionData {
173
120
  quotes: PreparedQuotes;
174
- /**
175
- * Present for a managed Solana origin and used to validate persisted data.
176
- * Narrow on `kind` to read the direction-specific fields.
177
- */
178
- execution?: SolanaExecutionMetadata | SolanaCrossChainExecutionMetadata | SolanaInstructionsExecutionMetadata;
179
121
  /** Canonical serialized intent input; the shape a sponsorship digest covers. */
180
122
  intentInput: SerializedIntentInput;
181
123
  transaction: Transaction;
@@ -186,8 +128,8 @@ export interface QuoteSelection {
186
128
  export interface SignedTransactionData extends PreparedTransactionData {
187
129
  quote: Quote;
188
130
  originSignatures: OriginSignature[];
189
- destinationSignature?: Hex;
190
- targetExecutionSignature?: Hex;
131
+ destinationSignature: Hex;
132
+ targetExecutionSignature: Hex | undefined;
191
133
  }
192
134
  export interface TransactionStatus {
193
135
  /** OpenTelemetry trace ID for correlating the status response. */
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../transactions/intents/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,GAAG,EAAE,mBAAmB,EAAE,MAAM,MAAM,CAAA;AAC7D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAA;AAChE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AACvD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAA;AACzD,OAAO,KAAK,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAA;AAC3E,OAAO,KAAK,EACV,eAAe,EACf,gBAAgB,EAChB,oBAAoB,EACrB,MAAM,iCAAiC,CAAA;AACxC,OAAO,KAAK,EACV,cAAc,EACd,eAAe,EACf,KAAK,EACL,qBAAqB,EACtB,MAAM,mCAAmC,CAAA;AAC1C,OAAO,KAAK,EACV,mBAAmB,EACnB,6BAA6B,EAC7B,yBAAyB,EACzB,yBAAyB,EACzB,2BAA2B,EAC3B,iBAAiB,EAClB,MAAM,kCAAkC,CAAA;AACzC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAA;AACvD,OAAO,KAAK,EACV,wBAAwB,EACxB,OAAO,EACP,iBAAiB,EAClB,MAAM,+CAA+C,CAAA;AACtD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAA;AAC1E,OAAO,KAAK,EACV,oBAAoB,EACpB,oBAAoB,EACpB,qBAAqB,EACrB,iBAAiB,EAClB,MAAM,qBAAqB,CAAA;AAE5B,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAAA;IAChC,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAA;CACzB;AAED,MAAM,WAAW,gBAAgB,C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C,oBAAoB,CAAC,EAAE,GAAG,CAAA;IAC1B,wBAAwB,CAAC,EAAE,GAAG,CAAA;CAC/B;AAED,MAAM,WAAW,iBAAiB;IAChC,kEAAkE;IAClE,OAAO,EAAE,cAAc,CAAC,SAAS,CAAC,CAAA;IAClC,gCAAgC;IAChC,MAAM,EAAE,cAAc,CAAC,QAAQ,CAAC,CAAA;IAChC,iDAAiD;IACjD,cAAc,EAAE,OAAO,CAAA;IACvB,uDAAuD;IACvD,UAAU,EAAE,cAAc,CAAC,YAAY,CAAC,CAAA;IACxC;;;OAGG;IACH,OAAO,CAAC,EAAE,cAAc,CAAC,SAAS,CAAC,CAAA;IACnC;;;;OAIG;IACH,SAAS,CAAC,EAAE,cAAc,CAAC,WAAW,CAAC,CAAA;CACxC"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../transactions/intents/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,GAAG,EAAE,mBAAmB,EAAE,MAAM,MAAM,CAAA;AAC7D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAA;AAChE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AACvD,OAAO,KAAK,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAA;AAC3E,OAAO,KAAK,EACV,eAAe,EACf,gBAAgB,EAChB,oBAAoB,EACrB,MAAM,iCAAiC,CAAA;AACxC,OAAO,KAAK,EACV,cAAc,EACd,eAAe,EACf,KAAK,EACL,qBAAqB,EACtB,MAAM,mCAAmC,CAAA;AAC1C,OAAO,KAAK,EACV,mBAAmB,EACnB,6BAA6B,EAC7B,yBAAyB,EACzB,yBAAyB,EACzB,2BAA2B,EAC3B,iBAAiB,EAClB,MAAM,kCAAkC,CAAA;AACzC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAA;AACvD,OAAO,KAAK,EACV,wBAAwB,EACxB,OA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AW,EAAE,WAAW,CAAA;CACzB;AAED,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,MAAM,CAAA;CACjB;AAED,MAAM,WAAW,qBAAsB,SAAQ,uBAAuB;IACpE,KAAK,EAAE,KAAK,CAAA;IACZ,gBAAgB,EAAE,eAAe,EAAE,CAAA;IACnC,oBAAoB,EAAE,GAAG,CAAA;IACzB,wBAAwB,EAAE,GAAG,GAAG,SAAS,CAAA;CAC1C;AAED,MAAM,WAAW,iBAAiB;IAChC,kEAAkE;IAClE,OAAO,EAAE,cAAc,CAAC,SAAS,CAAC,CAAA;IAClC,gCAAgC;IAChC,MAAM,EAAE,cAAc,CAAC,QAAQ,CAAC,CAAA;IAChC,iDAAiD;IACjD,cAAc,EAAE,OAAO,CAAA;IACvB,uDAAuD;IACvD,UAAU,EAAE,cAAc,CAAC,YAAY,CAAC,CAAA;IACxC;;;OAGG;IACH,OAAO,CAAC,EAAE,cAAc,CAAC,SAAS,CAAC,CAAA;IACnC;;;;OAIG;IACH,SAAS,CAAC,EAAE,cAAc,CAAC,WAAW,CAAC,CAAA;CACxC"}
@@ -1,5 +1,5 @@
1
1
  import type { Account, Address, Hex } from 'viem';
2
- import type { EvmAccountConfig, RhinestoneConfig } from '../config/account.js';
2
+ import type { RhinestoneAccountConfig, RhinestoneConfig } from '../config/account.js';
3
3
  import { walletClientToAccount, wrapParaAccount } from '../signing/signers/compatibility.js';
4
4
  /**
5
5
  * Compute the v0 (legacy) initialization data for an account configuration.
@@ -16,13 +16,13 @@ import { walletClientToAccount, wrapParaAccount } from '../signing/signers/compa
16
16
  * owners: { type: 'ecdsa', accounts: [owner] },
17
17
  * })
18
18
  *
19
- * const account = await sdk.createAccount({ evm: {
19
+ * const account = await sdk.createAccount({
20
20
  * owners: { type: 'ecdsa', accounts: [owner] },
21
21
  * initData,
22
- * }})
22
+ * })
23
23
  * ```
24
24
  */
25
- declare function experimental_getV0InitData(config: EvmAccountConfig): {
25
+ declare function experimental_getV0InitData(config: RhinestoneAccountConfig): {
26
26
  address: Address;
27
27
  factory: Address;
28
28
  factoryData: Hex;
@@ -44,13 +44,13 @@ declare function experimental_getV0InitData(config: EvmAccountConfig): {
44
44
  * owners: { type: 'ecdsa', accounts: [owner] },
45
45
  * })
46
46
  *
47
- * const account = await sdk.createAccount({ evm: {
47
+ * const account = await sdk.createAccount({
48
48
  * owners: { type: 'ecdsa', accounts: [owner] },
49
49
  * initData,
50
- * }})
50
+ * })
51
51
  * ```
52
52
  */
53
- declare function experimental_getRhinestoneInitData(config: EvmAccountConfig): {
53
+ declare function experimental_getRhinestoneInitData(config: RhinestoneAccountConfig): {
54
54
  address: Address;
55
55
  factory: Address;
56
56
  factoryData: Hex;
@@ -69,9 +69,9 @@ declare function experimental_getRhinestoneInitData(config: EvmAccountConfig): {
69
69
  * ```ts
70
70
  * import { toViewOnlyAccount } from '@rhinestone/sdk/utils'
71
71
  *
72
- * const account = await sdk.createAccount({ evm: {
72
+ * const account = await sdk.createAccount({
73
73
  * owners: { type: 'ecdsa', accounts: [toViewOnlyAccount(userAddress)] },
74
- * }})
74
+ * })
75
75
  * ```
76
76
  */
77
77
  declare function toViewOnlyAccount(address: Address): Account;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,MAAM,CAAA;AAIjD,OAAO,KAAK,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAA;AAI3E,OAAO,EACL,qBAAqB,EACrB,eAAe,EAChB,MAAM,kCAAkC,CAAA;AAsCzC;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,iBAAS,0BAA0B,CAAC,MAAM,EAAE,gBAAgB,GAAG;IAC7D,OAAO,EAAE,OAAO,CAAA;IAChB,OAAO,EAAE,OAAO,CAAA;IAChB,WAAW,EAAE,GAAG,CAAA;IAChB,uBAAuB,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AA;IAChB,WAAW,EAAE,GAAG,CAAA;IAChB,uBAAuB,EAAE,OAAO,CAAA;CACjC,GACD;IACE,OAAO,EAAE,OAAO,CAAA;CACjB,CAWJ;AAED;;;;;;;;;;;;;;;GAeG;AACH,iBAAS,iBAAiB,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAEpD;AAED;;;;GAIG;AACH,iBAAS,QAAQ,CAAC,MAAM,EAAE,gBAAgB,gDAEzC;AAED,OAAO,EACL,0BAA0B,EAC1B,QAAQ,IAAI,2BAA2B,EACvC,kCAAkC,EAClC,iBAAiB,EACjB,qBAAqB,EACrB,eAAe,GAChB,CAAA"}
@@ -49,10 +49,10 @@ function standaloneConstruction(config, profile) {
49
49
  * owners: { type: 'ecdsa', accounts: [owner] },
50
50
  * })
51
51
  *
52
- * const account = await sdk.createAccount({ evm: {
52
+ * const account = await sdk.createAccount({
53
53
  * owners: { type: 'ecdsa', accounts: [owner] },
54
54
  * initData,
55
- * }})
55
+ * })
56
56
  * ```
57
57
  */
58
58
  function experimental_getV0InitData(config) {
@@ -74,10 +74,10 @@ function experimental_getV0InitData(config) {
74
74
  * owners: { type: 'ecdsa', accounts: [owner] },
75
75
  * })
76
76
  *
77
- * const account = await sdk.createAccount({ evm: {
77
+ * const account = await sdk.createAccount({
78
78
  * owners: { type: 'ecdsa', accounts: [owner] },
79
79
  * initData,
80
- * }})
80
+ * })
81
81
  * ```
82
82
  */
83
83
  function experimental_getRhinestoneInitData(config) {
@@ -101,9 +101,9 @@ function experimental_getRhinestoneInitData(config) {
101
101
  * ```ts
102
102
  * import { toViewOnlyAccount } from '@rhinestone/sdk/utils'
103
103
  *
104
- * const account = await sdk.createAccount({ evm: {
104
+ * const account = await sdk.createAccount({
105
105
  * owners: { type: 'ecdsa', accounts: [toViewOnlyAccount(userAddress)] },
106
- * }})
106
+ * })
107
107
  * ```
108
108
  */
109
109
  function toViewOnlyAccount(address) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rhinestone/sdk",
3
- "version": "0.0.0-dev-20260917215313",
3
+ "version": "0.0.0-dev-20260921130703",
4
4
  "description": "End-to-end chain abstraction and modularity toolkit",
5
5
  "author": {
6
6
  "name": "Rhinestone",
@@ -86,10 +86,6 @@
86
86
  "publishConfig": {
87
87
  "access": "public"
88
88
  },
89
- "dependencies": {
90
- "@noble/curves": "^1.9.1",
91
- "@scure/base": "^1.2.6"
92
- },
93
89
  "peerDependencies": {
94
90
  "viem": "^2.55.0",
95
91
  "jose": ">=5.0.0",
@@ -1,28 +0,0 @@
1
- import { type Address } from 'viem';
2
- import { type SolanaAddress } from '../../chains/non-evm.js';
3
- /** Program used by classic Swig accounts on Solana. */
4
- declare const SWIG_PROGRAM_ADDRESS: SolanaAddress;
5
- declare const swigNamespaceBrand: unique symbol;
6
- type SwigNamespace = string & {
7
- readonly [swigNamespaceBrand]: true;
8
- };
9
- type ProgramAddress = {
10
- readonly address: SolanaAddress;
11
- readonly bump: number;
12
- };
13
- type SwigLocation = {
14
- readonly namespace: SwigNamespace;
15
- readonly evmAccount: Address;
16
- readonly id: Uint8Array;
17
- readonly swig: SolanaAddress;
18
- readonly swigBump: number;
19
- readonly wallet: SolanaAddress;
20
- readonly walletBump: number;
21
- };
22
- declare function createProgramAddress(seeds: readonly Uint8Array[], programAddress: SolanaAddress): SolanaAddress;
23
- declare function findProgramAddress(seeds: readonly Uint8Array[], programAddress: SolanaAddress): ProgramAddress;
24
- declare function asSwigNamespace(value: string): SwigNamespace;
25
- declare function locateSwig(namespace: SwigNamespace, evmAccount: Address): SwigLocation;
26
- export type { ProgramAddress, SwigLocation, SwigNamespace };
27
- export { SWIG_PROGRAM_ADDRESS, asSwigNamespace, createProgramAddress, findProgramAddress, locateSwig, };
28
- //# sourceMappingURL=address.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"address.d.ts","sourceRoot":"","sources":["../../../../accounts/solana/address.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,OAA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oBAAoB,EACpB,kBAAkB,EAClB,UAAU,GACX,CAAA"}
@@ -1,105 +0,0 @@
1
- import { ed25519 } from '@noble/curves/ed25519';
2
- import { base58 } from '@scure/base';
3
- import { isAddress, sha256 } from 'viem';
4
- import { solanaAddress } from '../../chains/non-evm.js';
5
- const textEncoder = new TextEncoder();
6
- const PROGRAM_DERIVED_ADDRESS_MARKER = textEncoder.encode('ProgramDerivedAddress');
7
- const SWIG_SEED = textEncoder.encode('swig');
8
- const SWIG_WALLET_SEED = textEncoder.encode('swig-wallet-address');
9
- const MAX_SEEDS = 16;
10
- const MAX_SEED_LENGTH = 32;
11
- /** Program used by classic Swig accounts on Solana. */
12
- const SWIG_PROGRAM_ADDRESS = solanaAddress('swigypWHEksbC64pWKwah1WTeh9JXwx8H1rJHLdbQMB');
13
- class OnCurveAddressError extends Error {
14
- }
15
- function concatBytes(values) {
16
- const result = new Uint8Array(values.reduce((length, value) => length + value.length, 0));
17
- let offset = 0;
18
- for (const value of values) {
19
- result.set(value, offset);
20
- offset += value.length;
21
- }
22
- return result;
23
- }
24
- function decodeAddress(value) {
25
- const bytes = base58.decode(value);
26
- if (bytes.length !== 32) {
27
- throw new TypeError('Invalid Solana address: expected 32 bytes');
28
- }
29
- return bytes;
30
- }
31
- function isOnCurve(bytes) {
32
- try {
33
- ed25519.ExtendedPoint.fromHex(bytes);
34
- return true;
35
- }
36
- catch {
37
- return false;
38
- }
39
- }
40
- function createProgramAddress(seeds, programAddress) {
41
- if (seeds.length > MAX_SEEDS) {
42
- throw new TypeError(`Too many PDA seeds: expected at most ${MAX_SEEDS}`);
43
- }
44
- for (const seed of seeds) {
45
- if (seed.length > MAX_SEED_LENGTH) {
46
- throw new TypeError(`Invalid PDA seed: expected at most ${MAX_SEED_LENGTH} bytes`);
47
- }
48
- }
49
- const bytes = sha256(concatBytes([
50
- ...seeds,
51
- decodeAddress(programAddress),
52
- PROGRAM_DERIVED_ADDRESS_MARKER,
53
- ]), 'bytes');
54
- if (isOnCurve(bytes)) {
55
- throw new OnCurveAddressError('Invalid PDA seeds: address must fall off the curve');
56
- }
57
- return solanaAddress(base58.encode(bytes));
58
- }
59
- function findProgramAddress(seeds, programAddress) {
60
- if (seeds.length >= MAX_SEEDS) {
61
- throw new TypeError(`Too many PDA seeds: expected at most ${MAX_SEEDS - 1} before the bump`);
62
- }
63
- for (let bump = 255; bump >= 0; bump--) {
64
- try {
65
- return {
66
- address: createProgramAddress([...seeds, Uint8Array.of(bump)], programAddress),
67
- bump,
68
- };
69
- }
70
- catch (error) {
71
- if (!(error instanceof OnCurveAddressError))
72
- throw error;
73
- }
74
- }
75
- /* v8 ignore next -- exhausting every SHA-256 bump is not constructible */
76
- throw new Error('Unable to find a viable program address bump');
77
- }
78
- function asSwigNamespace(value) {
79
- if (!/^[a-z0-9-]{1,32}$/.test(value)) {
80
- throw new TypeError(`Invalid Swig namespace "${value}": expected 1-32 chars of [a-z0-9-]`);
81
- }
82
- return value;
83
- }
84
- function swigId(namespace, evmAccount) {
85
- if (!isAddress(evmAccount, { strict: false })) {
86
- throw new TypeError(`Invalid EVM account address: ${evmAccount}`);
87
- }
88
- return sha256(textEncoder.encode(`rhinestone:swig:v1:${namespace}:${evmAccount.toLowerCase()}`), 'bytes');
89
- }
90
- function locateSwig(namespace, evmAccount) {
91
- const normalizedAccount = evmAccount.toLowerCase();
92
- const id = swigId(namespace, normalizedAccount);
93
- const swig = findProgramAddress([SWIG_SEED, id], SWIG_PROGRAM_ADDRESS);
94
- const wallet = findProgramAddress([SWIG_WALLET_SEED, decodeAddress(swig.address)], SWIG_PROGRAM_ADDRESS);
95
- return {
96
- namespace,
97
- evmAccount: normalizedAccount,
98
- id,
99
- swig: swig.address,
100
- swigBump: swig.bump,
101
- wallet: wallet.address,
102
- walletBump: wallet.bump,
103
- };
104
- }
105
- export { SWIG_PROGRAM_ADDRESS, asSwigNamespace, createProgramAddress, findProgramAddress, locateSwig, };
@@ -1,23 +0,0 @@
1
- declare class AccountCapabilityError extends Error {
2
- readonly context: Readonly<Record<string, unknown>>;
3
- constructor(message: string, context?: Readonly<Record<string, unknown>>);
4
- }
5
- /** Thrown when a composite account configuration is malformed. */
6
- declare class InvalidAccountConfigError extends AccountCapabilityError {
7
- constructor(message: string);
8
- }
9
- /** Thrown when managed Solana capability is requested outside development. */
10
- declare class ManagedSolanaAccountNotSupportedError extends AccountCapabilityError {
11
- constructor(message?: string);
12
- }
13
- /** Thrown when an address is requested for a VM absent from the account. */
14
- declare class AccountVmNotConfiguredError extends AccountCapabilityError {
15
- constructor(vm: string);
16
- }
17
- /** Thrown when a transaction requests an unsupported account capability. */
18
- declare class UnsupportedAccountCapabilityError extends AccountCapabilityError {
19
- constructor(message: string, context?: Readonly<Record<string, unknown>>);
20
- }
21
- declare function isAccountCapabilityError(error: unknown): error is AccountCapabilityError;
22
- export { AccountCapabilityError, AccountVmNotConfiguredError, InvalidAccountConfigError, ManagedSolanaAccountNotSupportedError, UnsupportedAccountCapabilityError, isAccountCapabilityError, };
23
- //# sourceMappingURL=capability.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"capability.d.ts","sourceRoot":"","sources":["../../../errors/capability.ts"],"names":[],"mappings":"AAAA,cAAM,sBAAuB,SAAQ,KAAK;IACxC,QAAQ,CAAC,OAAO,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAA;gBAGjD,OAAO,EAAE,MAAM,EACf,OAAO,GAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAM;CAMlD;AAED,kEAAkE;AAClE,cAAM,yBAA0B,SAAQ,sBAAsB;gBAChD,OAAO,EAAE,MAAM;CAI5B;AAED,8EAA8E;AAC9E,cAAM,qCAAsC,SAAQ,sBAAsB;gBAC5D,OAAO,CAAC,EAAE,MAAM;CAQ7B;AAED,4EAA4E;AAC5E,cAAM,2BAA4B,SAAQ,sBAAsB;gBAClD,EAAE,EAAE,MAAM;CAIvB;AAED,4EAA4E;AAC5E,cAAM,iCAAkC,SAAQ,sBAAsB;gBACxD,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAIzE;AAED,iBAAS,wBAAwB,CAC/B,KAAK,EAAE,OAAO,GACb,KAAK,IAAI,sBAAsB,CAEjC;AAED,OAAO,EACL,sBAAsB,EACtB,2BAA2B,EAC3B,yBAAyB,EACzB,qCAAqC,EACrC,iCAAiC,EACjC,wBAAwB,GACzB,CAAA"}
@@ -1,41 +0,0 @@
1
- class AccountCapabilityError extends Error {
2
- context;
3
- constructor(message, context = {}) {
4
- super(message);
5
- this.name = 'AccountCapabilityError';
6
- this.context = context;
7
- }
8
- }
9
- /** Thrown when a composite account configuration is malformed. */
10
- class InvalidAccountConfigError extends AccountCapabilityError {
11
- constructor(message) {
12
- super(`Invalid account configuration: ${message}`);
13
- this.name = 'InvalidAccountConfigError';
14
- }
15
- }
16
- /** Thrown when managed Solana capability is requested outside development. */
17
- class ManagedSolanaAccountNotSupportedError extends AccountCapabilityError {
18
- constructor(message) {
19
- super(message ??
20
- 'Managed Solana accounts are available only when `useDevContracts: true`. Production has no enabled Swig namespace; use an address-only Solana receiver instead.', { vm: 'solana' });
21
- this.name = 'ManagedSolanaAccountNotSupportedError';
22
- }
23
- }
24
- /** Thrown when an address is requested for a VM absent from the account. */
25
- class AccountVmNotConfiguredError extends AccountCapabilityError {
26
- constructor(vm) {
27
- super(`The ${vm} VM is not configured on this account.`, { vm });
28
- this.name = 'AccountVmNotConfiguredError';
29
- }
30
- }
31
- /** Thrown when a transaction requests an unsupported account capability. */
32
- class UnsupportedAccountCapabilityError extends AccountCapabilityError {
33
- constructor(message, context) {
34
- super(message, context);
35
- this.name = 'UnsupportedAccountCapabilityError';
36
- }
37
- }
38
- function isAccountCapabilityError(error) {
39
- return error instanceof AccountCapabilityError;
40
- }
41
- export { AccountCapabilityError, AccountVmNotConfiguredError, InvalidAccountConfigError, ManagedSolanaAccountNotSupportedError, UnsupportedAccountCapabilityError, isAccountCapabilityError, };
@@ -1,14 +0,0 @@
1
- import type { SolanaInstruction, SolanaInstructionInput } from '../../chains/non-evm.js';
2
- /**
3
- * Normalizes caller-supplied instructions to the orchestrator's wire shape.
4
- * The result is JSON-round-trippable, so a prepared transaction can be
5
- * persisted and restored without a Solana runtime.
6
- */
7
- export declare function normalizeSolanaInstructions(input: readonly SolanaInstructionInput[]): readonly SolanaInstruction[];
8
- /**
9
- * Normalizes the address lookup tables the instructions resolve accounts
10
- * through. Returns `undefined` when there are none, so the wire field is
11
- * omitted rather than sent empty.
12
- */
13
- export declare function normalizeSolanaAddressLookupTables(input: readonly string[] | undefined): readonly string[] | undefined;
14
- //# sourceMappingURL=solana-instructions.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"solana-instructions.d.ts","sourceRoot":"","sources":["../../../../transactions/intents/solana-instructions.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAEV,iBAAiB,EACjB,sBAAsB,EACvB,MAAM,sBAAsB,CAAA;AA6F7B;;;;GAIG;AACH,wBAAgB,2BAA2B,CACzC,KAAK,EAAE,SAAS,sBAAsB,EAAE,GACvC,SAAS,iBAAiB,EAAE,CAoB9B;AAED;;;;GAIG;AACH,wBAAgB,kCAAkC,CAChD,KAAK,EAAE,SAAS,MAAM,EAAE,GAAG,SAAS,GACnC,SAAS,MAAM,EAAE,GAAG,SAAS,CAc/B"}
@@ -1,114 +0,0 @@
1
- import { base64 } from '@scure/base';
2
- import { solanaAddress } from '../../chains/non-evm.js';
3
- import { InvalidSolanaTransactionArtifactError } from '../../errors/execution.js';
4
- // Mirrors the limits the orchestrator publishes on the quote request, so an
5
- // oversized instruction set fails before a round trip.
6
- const MAX_INSTRUCTIONS = 32;
7
- const MAX_ACCOUNTS_PER_INSTRUCTION = 64;
8
- const MAX_INSTRUCTION_DATA_BYTES = 1232;
9
- const MAX_ADDRESS_LOOKUP_TABLES = 8;
10
- const BASE64 = /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/;
11
- const ACCEPTED_SHAPES = 'an instruction must be either `{ programId, accounts, data }` with base58 addresses and base64 data, or a `@solana/web3.js` instruction with `programId`, `keys` and `data`';
12
- function fail(message) {
13
- throw new InvalidSolanaTransactionArtifactError(message);
14
- }
15
- function base58(value, label) {
16
- if (typeof value === 'object' && value !== null) {
17
- const encode = value.toBase58;
18
- if (typeof encode === 'function') {
19
- return base58(encode.call(value), label);
20
- }
21
- }
22
- if (typeof value !== 'string')
23
- fail(`${label} must be a base58 address`);
24
- try {
25
- return solanaAddress(value);
26
- }
27
- catch {
28
- return fail(`${label} must be a base58 address`);
29
- }
30
- }
31
- function accountMeta(value, label) {
32
- if (!value || typeof value !== 'object' || Array.isArray(value)) {
33
- fail(`${label} must be an object`);
34
- }
35
- const entry = value;
36
- if (typeof entry.isSigner !== 'boolean' ||
37
- typeof entry.isWritable !== 'boolean') {
38
- fail(`${label}.isSigner and ${label}.isWritable must be booleans`);
39
- }
40
- return Object.freeze({
41
- pubkey: base58(entry.pubkey, `${label}.pubkey`),
42
- isSigner: entry.isSigner,
43
- isWritable: entry.isWritable,
44
- });
45
- }
46
- function instructionData(value, label) {
47
- if (value instanceof Uint8Array)
48
- return base64.encode(value);
49
- if (typeof value !== 'string' || !BASE64.test(value)) {
50
- fail(`${label} must be base64-encoded instruction data`);
51
- }
52
- return value;
53
- }
54
- function dataByteLength(value) {
55
- if (value.length === 0)
56
- return 0;
57
- const padding = value.endsWith('==') ? 2 : value.endsWith('=') ? 1 : 0;
58
- return (value.length / 4) * 3 - padding;
59
- }
60
- function instruction(value, label) {
61
- if (!value || typeof value !== 'object' || Array.isArray(value)) {
62
- fail(`${label} must be an object; ${ACCEPTED_SHAPES}`);
63
- }
64
- const entry = value;
65
- const accounts = 'keys' in entry ? entry.keys : entry.accounts;
66
- if (!Array.isArray(accounts)) {
67
- fail(`${label} is not a recognized Solana instruction; ${ACCEPTED_SHAPES}`);
68
- }
69
- if (accounts.length > MAX_ACCOUNTS_PER_INSTRUCTION) {
70
- fail(`${label} references more than ${MAX_ACCOUNTS_PER_INSTRUCTION} accounts`);
71
- }
72
- return Object.freeze({
73
- programId: base58(entry.programId, `${label}.programId`),
74
- accounts: Object.freeze(accounts.map((account, index) => accountMeta(account, `${label}.accounts[${index}]`))),
75
- data: instructionData(entry.data, `${label}.data`),
76
- });
77
- }
78
- /**
79
- * Normalizes caller-supplied instructions to the orchestrator's wire shape.
80
- * The result is JSON-round-trippable, so a prepared transaction can be
81
- * persisted and restored without a Solana runtime.
82
- */
83
- export function normalizeSolanaInstructions(input) {
84
- if (!Array.isArray(input) || input.length === 0) {
85
- fail('a Solana instruction execution requires at least one instruction');
86
- }
87
- if (input.length > MAX_INSTRUCTIONS) {
88
- fail(`a Solana intent carries at most ${MAX_INSTRUCTIONS} instructions`);
89
- }
90
- const instructions = input.map((entry, index) => instruction(entry, `instructions[${index}]`));
91
- const bytes = instructions.reduce((total, entry) => total + dataByteLength(entry.data), 0);
92
- if (bytes > MAX_INSTRUCTION_DATA_BYTES) {
93
- fail(`Solana instruction data must total at most ${MAX_INSTRUCTION_DATA_BYTES} bytes`);
94
- }
95
- return Object.freeze(instructions);
96
- }
97
- /**
98
- * Normalizes the address lookup tables the instructions resolve accounts
99
- * through. Returns `undefined` when there are none, so the wire field is
100
- * omitted rather than sent empty.
101
- */
102
- export function normalizeSolanaAddressLookupTables(input) {
103
- if (input === undefined)
104
- return undefined;
105
- if (!Array.isArray(input)) {
106
- fail('addressLookupTables must be an array of base58 addresses');
107
- }
108
- if (input.length === 0)
109
- return undefined;
110
- if (input.length > MAX_ADDRESS_LOOKUP_TABLES) {
111
- fail(`a Solana intent carries at most ${MAX_ADDRESS_LOOKUP_TABLES} address lookup tables`);
112
- }
113
- return Object.freeze(input.map((table, index) => base58(table, `addressLookupTables[${index}]`)));
114
- }