@otim/sdk-core 0.0.2 → 0.0.4-alpha.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.
Files changed (80) hide show
  1. package/dist/.tsbuildinfo +1 -1
  2. package/dist/abi-DW6AS0eM.d.mts +339 -0
  3. package/dist/abi-DW6AS0eM.d.mts.map +1 -0
  4. package/dist/abi-OUq-mx1W.d.cts +339 -0
  5. package/dist/abi-OUq-mx1W.d.cts.map +1 -0
  6. package/dist/account/index.cjs +1 -1
  7. package/dist/account/index.d.cts +5 -3
  8. package/dist/account/index.d.mts +5 -3
  9. package/dist/account/index.mjs +1 -1
  10. package/dist/{account-Bwm5PTcc.cjs → account-CRvC_dXT.cjs} +8 -3
  11. package/dist/account-CRvC_dXT.cjs.map +1 -0
  12. package/dist/{account-p4sxzIt3.mjs → account-D1NVta26.mjs} +8 -3
  13. package/dist/account-D1NVta26.mjs.map +1 -0
  14. package/dist/authorization-6anhDdQX.d.cts +210 -0
  15. package/dist/authorization-6anhDdQX.d.cts.map +1 -0
  16. package/dist/authorization-DnNpWjxB.d.mts +210 -0
  17. package/dist/authorization-DnNpWjxB.d.mts.map +1 -0
  18. package/dist/clients/index.cjs +3 -2
  19. package/dist/clients/index.d.cts +3 -3
  20. package/dist/clients/index.d.mts +3 -3
  21. package/dist/clients/index.mjs +2 -2
  22. package/dist/{clients-DBRhkU4y.cjs → clients-BCyzdTLc.cjs} +90 -127
  23. package/dist/clients-BCyzdTLc.cjs.map +1 -0
  24. package/dist/{clients-DMKeLhcJ.mjs → clients-Bn4BUElo.mjs} +83 -126
  25. package/dist/clients-Bn4BUElo.mjs.map +1 -0
  26. package/dist/config/index.d.cts +2 -2
  27. package/dist/config/index.d.mts +2 -2
  28. package/dist/context/index.d.cts +4 -1
  29. package/dist/context/index.d.mts +4 -1
  30. package/dist/{index-DW_zBRKz.d.mts → index-BQMXYh9N.d.cts} +2 -13
  31. package/dist/index-BQMXYh9N.d.cts.map +1 -0
  32. package/dist/{index-B4fkcFy5.d.mts → index-C5c51xs0.d.mts} +5 -8
  33. package/dist/index-C5c51xs0.d.mts.map +1 -0
  34. package/dist/{index-DK-40z4V.d.cts → index-C8H-BPGH.d.cts} +5 -8
  35. package/dist/index-C8H-BPGH.d.cts.map +1 -0
  36. package/dist/{index-De8OZ-Be.d.cts → index-Ce_qYSJj.d.cts} +30 -36
  37. package/dist/index-Ce_qYSJj.d.cts.map +1 -0
  38. package/dist/{index-e5BLgzcW.d.mts → index-CiyyA-wd.d.mts} +30 -36
  39. package/dist/index-CiyyA-wd.d.mts.map +1 -0
  40. package/dist/{index-BnP8vpJJ.d.cts → index-CnjY7cyS.d.mts} +2 -13
  41. package/dist/index-CnjY7cyS.d.mts.map +1 -0
  42. package/dist/{index-CcCMIBgF.d.mts → index-DWE1xfOE.d.mts} +4 -1
  43. package/dist/index-DWE1xfOE.d.mts.map +1 -0
  44. package/dist/{index-UnaahQgb.d.cts → index-D_7CTJDl.d.mts} +2 -2
  45. package/dist/{index-C4N2Xixk.d.mts.map → index-D_7CTJDl.d.mts.map} +1 -1
  46. package/dist/{index-C1HSAemv.d.cts → index-GSspyLr3.d.cts} +4 -1
  47. package/dist/index-GSspyLr3.d.cts.map +1 -0
  48. package/dist/{index-C4N2Xixk.d.mts → index-lW-Oor1B.d.cts} +2 -2
  49. package/dist/{index-UnaahQgb.d.cts.map → index-lW-Oor1B.d.cts.map} +1 -1
  50. package/dist/index.cjs +5 -4
  51. package/dist/index.d.cts +9 -8
  52. package/dist/index.d.mts +9 -8
  53. package/dist/index.mjs +3 -3
  54. package/dist/rpc-BDoNl1Sp.d.cts +6885 -0
  55. package/dist/rpc-BDoNl1Sp.d.cts.map +1 -0
  56. package/dist/rpc-CygBD_f7.d.mts +6885 -0
  57. package/dist/rpc-CygBD_f7.d.mts.map +1 -0
  58. package/dist/utils/index.d.cts +3 -3
  59. package/dist/utils/index.d.mts +3 -3
  60. package/package.json +5 -5
  61. package/dist/abi-Bd3X6gV9.d.mts +0 -154
  62. package/dist/abi-Bd3X6gV9.d.mts.map +0 -1
  63. package/dist/abi-CQuxrNCU.d.cts +0 -154
  64. package/dist/abi-CQuxrNCU.d.cts.map +0 -1
  65. package/dist/account-Bwm5PTcc.cjs.map +0 -1
  66. package/dist/account-p4sxzIt3.mjs.map +0 -1
  67. package/dist/clients-DBRhkU4y.cjs.map +0 -1
  68. package/dist/clients-DMKeLhcJ.mjs.map +0 -1
  69. package/dist/index-B4fkcFy5.d.mts.map +0 -1
  70. package/dist/index-BnP8vpJJ.d.cts.map +0 -1
  71. package/dist/index-C1HSAemv.d.cts.map +0 -1
  72. package/dist/index-CcCMIBgF.d.mts.map +0 -1
  73. package/dist/index-DK-40z4V.d.cts.map +0 -1
  74. package/dist/index-DW_zBRKz.d.mts.map +0 -1
  75. package/dist/index-De8OZ-Be.d.cts.map +0 -1
  76. package/dist/index-e5BLgzcW.d.mts.map +0 -1
  77. package/dist/misc-CX4pLJaA.d.mts +0 -42
  78. package/dist/misc-CX4pLJaA.d.mts.map +0 -1
  79. package/dist/misc-CpZxSPCP.d.cts +0 -42
  80. package/dist/misc-CpZxSPCP.d.cts.map +0 -1
@@ -1,17 +1,6 @@
1
- import { t as Address$1 } from "./abi-Bd3X6gV9.mjs";
2
- import { n as Signature, r as ExactPartial } from "./misc-CX4pLJaA.mjs";
1
+ import { t as Authorization } from "./authorization-6anhDdQX.cjs";
3
2
  import { EIP2098Signature, VRS } from "@otim/utils/schemas";
4
3
 
5
- //#region ../../node_modules/.pnpm/viem@2.39.3_bufferutil@4.0.9_typescript@5.9.3_utf-8-validate@5.0.10_zod@4.1.12/node_modules/viem/_types/types/authorization.d.ts
6
- type Authorization<uint32 = number, signed extends boolean = false> = {
7
- /** Address of the contract to delegate to. */
8
- address: Address$1;
9
- /** Chain ID. */
10
- chainId: uint32;
11
- /** Nonce of the EOA to delegate to. */
12
- nonce: uint32;
13
- } & (signed extends true ? Signature<uint32> : ExactPartial<Signature<uint32>>);
14
- //#endregion
15
4
  //#region src/utils/rlp.d.ts
16
5
  declare const normalizeYParityValue: (value: number | bigint | string | undefined | null) => 0 | 1;
17
6
  declare function createRlpEncodedAuthorization(authorization: Authorization): `0x${string}`;
@@ -22,4 +11,4 @@ declare const createEIP2098Signature: (vrs: VRS) => EIP2098Signature;
22
11
  declare const parseSignatureToVRS: (signature: string) => VRS;
23
12
  //#endregion
24
13
  export { normalizeYParityValue as i, parseSignatureToVRS as n, createRlpEncodedAuthorization as r, createEIP2098Signature as t };
25
- //# sourceMappingURL=index-DW_zBRKz.d.mts.map
14
+ //# sourceMappingURL=index-BQMXYh9N.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-BQMXYh9N.d.cts","names":[],"sources":["../src/utils/rlp.ts","../src/utils/vrs.ts"],"sourcesContent":[],"mappings":";;;;cAuBa;iBAkCG,6BAAA,gBACC;iBAED,6BAAA;;;cCrBH,8BAA+B,QAAM;cAkBrC,4CAA2C"}
@@ -1,4 +1,5 @@
1
- import { t as Hex } from "./misc-CX4pLJaA.mjs";
1
+ import { t as Chain } from "./rpc-CygBD_f7.mjs";
2
+ import { c as Hex } from "./authorization-DnNpWjxB.mjs";
2
3
  import { Environment } from "@otim/sdk-core/config";
3
4
  import { OtimServerClientContext } from "@otim/sdk-core/context";
4
5
 
@@ -13,9 +14,6 @@ declare const AccountType: {
13
14
  readonly Api: "api";
14
15
  };
15
16
  type AccountType = (typeof AccountType)[keyof typeof AccountType];
16
- /**
17
- * Otim Account
18
- */
19
17
  type OtimAccountSignMessageArgs = {
20
18
  message: string | {
21
19
  raw: Hex | Uint8Array;
@@ -25,11 +23,10 @@ interface OtimAccount {
25
23
  initialize(): Promise<void>;
26
24
  signMessage(args: OtimAccountSignMessageArgs): Promise<Hex>;
27
25
  }
28
- /**
29
- * Account Config
30
- */
31
26
  interface BaseAccountConfig {
32
27
  environment?: Environment;
28
+ chains: Chain[];
29
+ defaultChain?: Chain;
33
30
  }
34
31
  interface ApiAccountConfig extends BaseAccountConfig {
35
32
  type: typeof ServerAccountType.Api;
@@ -51,4 +48,4 @@ declare function isPrivateKeyAccountConfig(config: ServerAccountConfig): config
51
48
  declare function createClientContext(config: ServerAccountConfig): OtimServerClientContext;
52
49
  //#endregion
53
50
  export { AccountType as a, OtimAccountSignMessageArgs as c, ServerAccountType as d, AccountConfig as i, PrivateKeyAccountConfig as l, isApiAccountConfig as n, ApiAccountConfig as o, isPrivateKeyAccountConfig as r, OtimAccount as s, createClientContext as t, ServerAccountConfig as u };
54
- //# sourceMappingURL=index-B4fkcFy5.d.mts.map
51
+ //# sourceMappingURL=index-C5c51xs0.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-C5c51xs0.d.mts","names":[],"sources":["../src/account/types.ts","../src/account/helpers.ts"],"sourcesContent":[],"mappings":";;;;;;cAGa;;;;AAAA,KAID,iBAAA,GADF,CAAA,OAEA,iBAFA,CAAA,CAAA,MAAA,OAEgC,iBAFhC,CAAA;AACE,cAGC,WAHgB,EAAA;EAGhB,SAAA,UAEH,EAAA,YAAA;EACE,SAAA,GAAA,EAAW,KAAA;AAEvB,CAAA;AAIiB,KANL,WAAA,GAMgB,CAAA,OANM,WAMN,CAAA,CAAA,MAAA,OANgC,WAMhC,CAAA;AACZ,KALJ,0BAAA,GAKI;EACI,OAAA,EAAA,MAAA,GAAA;IAAqC,GAAA,EAL9B,GAK8B,GALxB,UAKwB;EAAR,CAAA;CAAO;AAG9C,UALO,WAAA,CAKU;EACX,UAAA,EAAA,EALA,OAKA,CAAA,IAAA,CAAA;EACN,WAAA,CAAA,IAAA,EALU,0BAKV,CAAA,EALuC,OAKvC,CAL+C,GAK/C,CAAA;;UAFA,iBAAA,CAGY;EAGL,WAAA,CAAA,EALD,WAKkB;EAQjB,MAAA,EAZP,KAYO,EAAA;EAKL,YAAA,CAAA,EAhBK,KAgBL;AAEZ;UAfiB,gBAAA,SAAyB;eAC3B,iBAAA,CAAkB;;ECtBjB,UAAA,EAAA,MAAA;EAMA,SAAA,EAAA,MAAA;EAMA,MAAA,CAAA,EAAA,MAAA;;UDiBC,uBAAA,SAAgC;eAClC,iBAAA,CAAkB;;;KAIrB,mBAAA,GAAsB,mBAAmB;KAEzC,aAAA,GAAgB;;;iBCpCZ,kBAAA,SACN,gCACG;iBAIG,yBAAA,SACN,gCACG;iBAIG,mBAAA,SACN,sBACP"}
@@ -1,4 +1,5 @@
1
- import { t as Hex } from "./misc-CpZxSPCP.cjs";
1
+ import { t as Chain } from "./rpc-BDoNl1Sp.cjs";
2
+ import { c as Hex } from "./authorization-6anhDdQX.cjs";
2
3
  import { Environment } from "@otim/sdk-core/config";
3
4
  import { OtimServerClientContext } from "@otim/sdk-core/context";
4
5
 
@@ -13,9 +14,6 @@ declare const AccountType: {
13
14
  readonly Api: "api";
14
15
  };
15
16
  type AccountType = (typeof AccountType)[keyof typeof AccountType];
16
- /**
17
- * Otim Account
18
- */
19
17
  type OtimAccountSignMessageArgs = {
20
18
  message: string | {
21
19
  raw: Hex | Uint8Array;
@@ -25,11 +23,10 @@ interface OtimAccount {
25
23
  initialize(): Promise<void>;
26
24
  signMessage(args: OtimAccountSignMessageArgs): Promise<Hex>;
27
25
  }
28
- /**
29
- * Account Config
30
- */
31
26
  interface BaseAccountConfig {
32
27
  environment?: Environment;
28
+ chains: Chain[];
29
+ defaultChain?: Chain;
33
30
  }
34
31
  interface ApiAccountConfig extends BaseAccountConfig {
35
32
  type: typeof ServerAccountType.Api;
@@ -51,4 +48,4 @@ declare function isPrivateKeyAccountConfig(config: ServerAccountConfig): config
51
48
  declare function createClientContext(config: ServerAccountConfig): OtimServerClientContext;
52
49
  //#endregion
53
50
  export { AccountType as a, OtimAccountSignMessageArgs as c, ServerAccountType as d, AccountConfig as i, PrivateKeyAccountConfig as l, isApiAccountConfig as n, ApiAccountConfig as o, isPrivateKeyAccountConfig as r, OtimAccount as s, createClientContext as t, ServerAccountConfig as u };
54
- //# sourceMappingURL=index-DK-40z4V.d.cts.map
51
+ //# sourceMappingURL=index-C8H-BPGH.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-C8H-BPGH.d.cts","names":[],"sources":["../src/account/types.ts","../src/account/helpers.ts"],"sourcesContent":[],"mappings":";;;;;;cAGa;;;;AAAA,KAID,iBAAA,GADF,CAAA,OAEA,iBAFA,CAAA,CAAA,MAAA,OAEgC,iBAFhC,CAAA;AACE,cAGC,WAHgB,EAAA;EAGhB,SAAA,UAEH,EAAA,YAAA;EACE,SAAA,GAAA,EAAW,KAAA;AAEvB,CAAA;AAIiB,KANL,WAAA,GAMgB,CAAA,OANM,WAMN,CAAA,CAAA,MAAA,OANgC,WAMhC,CAAA;AACZ,KALJ,0BAAA,GAKI;EACI,OAAA,EAAA,MAAA,GAAA;IAAqC,GAAA,EAL9B,GAK8B,GALxB,UAKwB;EAAR,CAAA;CAAO;AAG9C,UALO,WAAA,CAKU;EACX,UAAA,EAAA,EALA,OAKA,CAAA,IAAA,CAAA;EACN,WAAA,CAAA,IAAA,EALU,0BAKV,CAAA,EALuC,OAKvC,CAL+C,GAK/C,CAAA;;UAFA,iBAAA,CAGY;EAGL,WAAA,CAAA,EALD,WAKkB;EAQjB,MAAA,EAZP,KAYO,EAAA;EAKL,YAAA,CAAA,EAhBK,KAgBL;AAEZ;UAfiB,gBAAA,SAAyB;eAC3B,iBAAA,CAAkB;;ECtBjB,UAAA,EAAA,MAAA;EAMA,SAAA,EAAA,MAAA;EAMA,MAAA,CAAA,EAAA,MAAA;;UDiBC,uBAAA,SAAgC;eAClC,iBAAA,CAAkB;;;KAIrB,mBAAA,GAAsB,mBAAmB;KAEzC,aAAA,GAAgB;;;iBCpCZ,kBAAA,SACN,gCACG;iBAIG,yBAAA,SACN,gCACG;iBAIG,mBAAA,SACN,sBACP"}
@@ -1,12 +1,19 @@
1
- import { t as Address$1 } from "./abi-CQuxrNCU.cjs";
2
- import { OtimClientContext } from "@otim/sdk-core/context";
1
+ import { c as Address$1 } from "./abi-OUq-mx1W.cjs";
2
+ import { OtimClientContext, OtimServerClientContext } from "@otim/sdk-core/context";
3
+ import { APIClient, AuthLoginResponse, DelegationCreateRequest, DelegationStatusRequest, DelegationStatusResponse, GetDelegateAddressRequest, GetDelegateAddressResponse, GetInstructionActivityRequest, GetInstructionActivityResponse, GetMaxPriorityFeePerGasEstimateRequest, GetMaxPriorityFeePerGasEstimateResponse, GetPaymentRequestsRequest, GetPaymentRequestsResponse, MeResponse, PaginatedServiceResponse, PaymentRequestBuildRequest, PaymentRequestDetailsRequest, PaymentRequestDetailsResponse, ServiceResponse } from "@otim/utils/api";
3
4
  import { OtimAccount } from "@otim/sdk-core/account";
4
- import { APIClient, AuthLoginResponse, DelegationCreateRequest, DelegationStatusRequest, DelegationStatusResponse, GetDelegateAddressRequest, GetDelegateAddressResponse, GetMaxPriorityFeePerGasEstimateRequest, GetMaxPriorityFeePerGasEstimateResponse, GetPaymentRequestsRequest, GetPaymentRequestsResponse, MeResponse, PaginatedServiceResponse, PaymentRequestDetailsRequest, PaymentRequestDetailsResponse, PaymentsListRequest, ServiceResponse } from "@otim/utils/api";
5
+ import { Address } from "@otim/utils/schemas";
5
6
  import { SupportedChainId } from "@otim/utils/chains";
6
7
  import { Nullable } from "@otim/utils/helpers";
7
- import { PaymentRequestMetadata, PaymentResponseWithActionNames } from "@otim/utils/payments";
8
- import { Address, Payments } from "@otim/utils/schemas";
8
+ import { PaymentRequestMetadata } from "@otim/utils/payments";
9
9
 
10
+ //#region src/clients/activity.d.ts
11
+ declare class ActivityClient {
12
+ private readonly apiClient;
13
+ constructor(apiClient: APIClient);
14
+ getInstructionActivity(request: GetInstructionActivityRequest): Promise<GetInstructionActivityResponse>;
15
+ }
16
+ //#endregion
10
17
  //#region src/clients/auth.d.ts
11
18
  interface LoginOptions {
12
19
  address: Address$1;
@@ -42,55 +49,42 @@ declare class DelegationClient {
42
49
  createDelegation(delegationRequest: DelegationCreateRequest): Promise<void>;
43
50
  }
44
51
  //#endregion
45
- //#region src/clients/payment-requests.d.ts
46
- interface CreatePaymentRequestParameters {
52
+ //#region src/clients/helpers/prepare-payment-request.d.ts
53
+ interface PreparePaymentRequestParams {
47
54
  amount: number;
48
55
  chainId: SupportedChainId;
49
56
  recipient: Address;
50
57
  token?: "USDC" | "USDT";
51
58
  payer?: Nullable<Address>;
52
- /**
53
- * ISO 8601 date format (e.g., "2024-12-31T23:59:59.000Z")
54
- */
55
59
  dueDate?: string;
56
60
  metadata?: PaymentRequestMetadata;
57
61
  note?: string;
62
+ maxRuns?: number;
63
+ }
64
+ interface PreparedPaymentRequest {
65
+ payload: PaymentRequestBuildRequest;
66
+ chainId: number;
58
67
  }
68
+ declare function preparePaymentRequest(params: PreparePaymentRequestParams): PreparedPaymentRequest;
69
+ //#endregion
70
+ //#region src/clients/orchestration.d.ts
59
71
  interface CreatePaymentRequestResponse {
60
72
  requestId: string;
61
73
  ephemeralWalletAddress: Address;
62
74
  }
63
- interface ActivatePaymentRequestParams {
64
- buildResponse: PaymentResponseWithActionNames;
65
- settlementChainId: number;
66
- }
67
- declare class PaymentRequestsClient {
75
+ declare class OrchestrationClient {
68
76
  private readonly apiClient;
69
77
  private readonly account;
70
78
  private readonly context;
71
- constructor(apiClient: APIClient, account: OtimAccount, context: OtimClientContext);
72
- create(params: CreatePaymentRequestParameters): Promise<CreatePaymentRequestResponse>;
73
- activate(params: ActivatePaymentRequestParams): Promise<void>;
74
- private validateAndGetTokenAddress;
75
- private buildMetadata;
76
- private createPayload;
79
+ constructor(apiClient: APIClient, account: OtimAccount, context: OtimServerClientContext);
80
+ create(preparedRequest: PreparedPaymentRequest): Promise<CreatePaymentRequestResponse>;
81
+ getDetails(request: PaymentRequestDetailsRequest): Promise<ServiceResponse<PaymentRequestDetailsResponse>>;
82
+ list(request: GetPaymentRequestsRequest): Promise<PaginatedServiceResponse<GetPaymentRequestsResponse>>;
83
+ private activate;
77
84
  private buildAndEnhancePaymentRequest;
78
85
  private createPublicClient;
79
86
  private fetchDelegateAddresses;
80
- getDetails(request: PaymentRequestDetailsRequest): Promise<ServiceResponse<PaymentRequestDetailsResponse>>;
81
- listOutgoingPaymentRequests(request: PaymentsListRequest): Promise<PaginatedServiceResponse<Payments>>;
82
- listIncomingPaymentRequests(request: PaymentsListRequest): Promise<PaginatedServiceResponse<Payments>>;
83
- list(request: GetPaymentRequestsRequest): Promise<PaginatedServiceResponse<GetPaymentRequestsResponse>>;
84
- }
85
- //#endregion
86
- //#region src/clients/orchestration.d.ts
87
- declare class OrchestrationClient {
88
- private readonly apiClient;
89
- private readonly account;
90
- private readonly context;
91
- readonly paymentRequests: PaymentRequestsClient;
92
- constructor(apiClient: APIClient, account: OtimAccount, context: OtimClientContext);
93
87
  }
94
88
  //#endregion
95
- export { PaymentRequestsClient as a, AuthClient as c, CreatePaymentRequestResponse as i, LoginOptions as l, ActivatePaymentRequestParams as n, DelegationClient as o, CreatePaymentRequestParameters as r, ConfigClient as s, OrchestrationClient as t };
96
- //# sourceMappingURL=index-De8OZ-Be.d.cts.map
89
+ export { preparePaymentRequest as a, AuthClient as c, PreparedPaymentRequest as i, LoginOptions as l, OrchestrationClient as n, DelegationClient as o, PreparePaymentRequestParams as r, ConfigClient as s, CreatePaymentRequestResponse as t, ActivityClient as u };
90
+ //# sourceMappingURL=index-Ce_qYSJj.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-Ce_qYSJj.d.cts","names":[],"sources":["../src/clients/activity.ts","../src/clients/auth.ts","../src/clients/config.ts","../src/clients/delegation.ts","../src/clients/helpers/prepare-payment-request.ts","../src/clients/orchestration.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;cAMa,cAAA;;yBAC6B;kCAG7B,gCACR,QAAQ;;;;UCDI,YAAA;WACN;;cAGE,UAAA;;;EDRA,iBAAc,OAAA;EACe,WAAA,CAAA,SAAA,ECSV,SDTU,EAAA,OAAA,ECUZ,WDVY,EAAA,OAAA,ECWZ,iBDXY;EAG7B,KAAA,CAAA;IAAA;EAAA,CAAA,ECWc,YDXd,CAAA,ECW6B,ODX7B,CCWqC,iBDXrC,CAAA;EACA,cAAA,CAAA,CAAA,ECyBa,ODzBb,CCyBqB,UDzBrB,CAAA;;;;cELA,YAAA;;yBAC6B;;;KAIrC,yCAAyC,QAAQ;;;;cCFzC,gBAAA;;yBAC6B;;;KAIrC,4BAA4B,QAAQ;+BAS5B,0BACR,QAAQ;sCAUU,0BAClB;;;;UCfY,2BAAA;;WAEN;aACE;;EJjBA,KAAA,CAAA,EImBH,QJnBG,CImBM,OJnBQ,CAAA;EACe,OAAA,CAAA,EAAA,MAAA;EAG7B,QAAA,CAAA,EIiBA,sBJjBA;EACA,IAAA,CAAA,EAAA,MAAA;EAAR,OAAA,CAAA,EAAA,MAAA;;UIqBY,sBAAA;WACN;;AHvBX;AAIa,iBGiGG,qBAAA,CHjGO,MAAA,EGkGb,2BHlGa,CAAA,EGmGpB,sBHnGoB;;;UIiBN,4BAAA;;0BAES;;AL3Bb,cKiCA,mBAAA,CLjCc;EACe,iBAAA,SAAA;EAG7B,iBAAA,OAAA;EACA,iBAAA,OAAA;EAAR,WAAA,CAAA,SAAA,EK8B2B,SL9B3B,EAAA,OAAA,EK+ByB,WL/BzB,EAAA,OAAA,EKgCyB,uBLhCzB;EAAO,MAAA,CAAA,eAAA,EKoCS,sBLpCT,CAAA,EKqCP,OLrCO,CKqCC,4BLrCD,CAAA;sBKoDC,+BACR,QAAQ,gBAAgB;gBAKhB,4BACR,QAAQ,yBAAyB;;EJ5DrB,QAAA,6BACC;EAGL,QAAA,kBAAU;EAES,QAAA,sBAAA"}
@@ -1,12 +1,19 @@
1
- import { t as Address$1 } from "./abi-Bd3X6gV9.mjs";
1
+ import { c as Address$1 } from "./abi-DW6AS0eM.mjs";
2
2
  import { Nullable } from "@otim/utils/helpers";
3
- import { OtimClientContext } from "@otim/sdk-core/context";
3
+ import { OtimClientContext, OtimServerClientContext } from "@otim/sdk-core/context";
4
4
  import { SupportedChainId } from "@otim/utils/chains";
5
- import { PaymentRequestMetadata, PaymentResponseWithActionNames } from "@otim/utils/payments";
6
- import { Address, Payments } from "@otim/utils/schemas";
5
+ import { PaymentRequestMetadata } from "@otim/utils/payments";
6
+ import { Address } from "@otim/utils/schemas";
7
7
  import { OtimAccount } from "@otim/sdk-core/account";
8
- import { APIClient, AuthLoginResponse, DelegationCreateRequest, DelegationStatusRequest, DelegationStatusResponse, GetDelegateAddressRequest, GetDelegateAddressResponse, GetMaxPriorityFeePerGasEstimateRequest, GetMaxPriorityFeePerGasEstimateResponse, GetPaymentRequestsRequest, GetPaymentRequestsResponse, MeResponse, PaginatedServiceResponse, PaymentRequestDetailsRequest, PaymentRequestDetailsResponse, PaymentsListRequest, ServiceResponse } from "@otim/utils/api";
8
+ import { APIClient, AuthLoginResponse, DelegationCreateRequest, DelegationStatusRequest, DelegationStatusResponse, GetDelegateAddressRequest, GetDelegateAddressResponse, GetInstructionActivityRequest, GetInstructionActivityResponse, GetMaxPriorityFeePerGasEstimateRequest, GetMaxPriorityFeePerGasEstimateResponse, GetPaymentRequestsRequest, GetPaymentRequestsResponse, MeResponse, PaginatedServiceResponse, PaymentRequestBuildRequest, PaymentRequestDetailsRequest, PaymentRequestDetailsResponse, ServiceResponse } from "@otim/utils/api";
9
9
 
10
+ //#region src/clients/activity.d.ts
11
+ declare class ActivityClient {
12
+ private readonly apiClient;
13
+ constructor(apiClient: APIClient);
14
+ getInstructionActivity(request: GetInstructionActivityRequest): Promise<GetInstructionActivityResponse>;
15
+ }
16
+ //#endregion
10
17
  //#region src/clients/auth.d.ts
11
18
  interface LoginOptions {
12
19
  address: Address$1;
@@ -42,55 +49,42 @@ declare class DelegationClient {
42
49
  createDelegation(delegationRequest: DelegationCreateRequest): Promise<void>;
43
50
  }
44
51
  //#endregion
45
- //#region src/clients/payment-requests.d.ts
46
- interface CreatePaymentRequestParameters {
52
+ //#region src/clients/helpers/prepare-payment-request.d.ts
53
+ interface PreparePaymentRequestParams {
47
54
  amount: number;
48
55
  chainId: SupportedChainId;
49
56
  recipient: Address;
50
57
  token?: "USDC" | "USDT";
51
58
  payer?: Nullable<Address>;
52
- /**
53
- * ISO 8601 date format (e.g., "2024-12-31T23:59:59.000Z")
54
- */
55
59
  dueDate?: string;
56
60
  metadata?: PaymentRequestMetadata;
57
61
  note?: string;
62
+ maxRuns?: number;
63
+ }
64
+ interface PreparedPaymentRequest {
65
+ payload: PaymentRequestBuildRequest;
66
+ chainId: number;
58
67
  }
68
+ declare function preparePaymentRequest(params: PreparePaymentRequestParams): PreparedPaymentRequest;
69
+ //#endregion
70
+ //#region src/clients/orchestration.d.ts
59
71
  interface CreatePaymentRequestResponse {
60
72
  requestId: string;
61
73
  ephemeralWalletAddress: Address;
62
74
  }
63
- interface ActivatePaymentRequestParams {
64
- buildResponse: PaymentResponseWithActionNames;
65
- settlementChainId: number;
66
- }
67
- declare class PaymentRequestsClient {
75
+ declare class OrchestrationClient {
68
76
  private readonly apiClient;
69
77
  private readonly account;
70
78
  private readonly context;
71
- constructor(apiClient: APIClient, account: OtimAccount, context: OtimClientContext);
72
- create(params: CreatePaymentRequestParameters): Promise<CreatePaymentRequestResponse>;
73
- activate(params: ActivatePaymentRequestParams): Promise<void>;
74
- private validateAndGetTokenAddress;
75
- private buildMetadata;
76
- private createPayload;
79
+ constructor(apiClient: APIClient, account: OtimAccount, context: OtimServerClientContext);
80
+ create(preparedRequest: PreparedPaymentRequest): Promise<CreatePaymentRequestResponse>;
81
+ getDetails(request: PaymentRequestDetailsRequest): Promise<ServiceResponse<PaymentRequestDetailsResponse>>;
82
+ list(request: GetPaymentRequestsRequest): Promise<PaginatedServiceResponse<GetPaymentRequestsResponse>>;
83
+ private activate;
77
84
  private buildAndEnhancePaymentRequest;
78
85
  private createPublicClient;
79
86
  private fetchDelegateAddresses;
80
- getDetails(request: PaymentRequestDetailsRequest): Promise<ServiceResponse<PaymentRequestDetailsResponse>>;
81
- listOutgoingPaymentRequests(request: PaymentsListRequest): Promise<PaginatedServiceResponse<Payments>>;
82
- listIncomingPaymentRequests(request: PaymentsListRequest): Promise<PaginatedServiceResponse<Payments>>;
83
- list(request: GetPaymentRequestsRequest): Promise<PaginatedServiceResponse<GetPaymentRequestsResponse>>;
84
- }
85
- //#endregion
86
- //#region src/clients/orchestration.d.ts
87
- declare class OrchestrationClient {
88
- private readonly apiClient;
89
- private readonly account;
90
- private readonly context;
91
- readonly paymentRequests: PaymentRequestsClient;
92
- constructor(apiClient: APIClient, account: OtimAccount, context: OtimClientContext);
93
87
  }
94
88
  //#endregion
95
- export { PaymentRequestsClient as a, AuthClient as c, CreatePaymentRequestResponse as i, LoginOptions as l, ActivatePaymentRequestParams as n, DelegationClient as o, CreatePaymentRequestParameters as r, ConfigClient as s, OrchestrationClient as t };
96
- //# sourceMappingURL=index-e5BLgzcW.d.mts.map
89
+ export { preparePaymentRequest as a, AuthClient as c, PreparedPaymentRequest as i, LoginOptions as l, OrchestrationClient as n, DelegationClient as o, PreparePaymentRequestParams as r, ConfigClient as s, CreatePaymentRequestResponse as t, ActivityClient as u };
90
+ //# sourceMappingURL=index-CiyyA-wd.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-CiyyA-wd.d.mts","names":[],"sources":["../src/clients/activity.ts","../src/clients/auth.ts","../src/clients/config.ts","../src/clients/delegation.ts","../src/clients/helpers/prepare-payment-request.ts","../src/clients/orchestration.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;cAMa,cAAA;;yBAC6B;kCAG7B,gCACR,QAAQ;;;;UCDI,YAAA;WACN;;cAGE,UAAA;;;EDRA,iBAAc,OAAA;EACe,WAAA,CAAA,SAAA,ECSV,SDTU,EAAA,OAAA,ECUZ,WDVY,EAAA,OAAA,ECWZ,iBDXY;EAG7B,KAAA,CAAA;IAAA;EAAA,CAAA,ECWc,YDXd,CAAA,ECW6B,ODX7B,CCWqC,iBDXrC,CAAA;EACA,cAAA,CAAA,CAAA,ECyBa,ODzBb,CCyBqB,UDzBrB,CAAA;;;;cELA,YAAA;;yBAC6B;;;KAIrC,yCAAyC,QAAQ;;;;cCFzC,gBAAA;;yBAC6B;;;KAIrC,4BAA4B,QAAQ;+BAS5B,0BACR,QAAQ;sCAUU,0BAClB;;;;UCfY,2BAAA;;WAEN;aACE;;EJjBA,KAAA,CAAA,EImBH,QJnBG,CImBM,OJnBQ,CAAA;EACe,OAAA,CAAA,EAAA,MAAA;EAG7B,QAAA,CAAA,EIiBA,sBJjBA;EACA,IAAA,CAAA,EAAA,MAAA;EAAR,OAAA,CAAA,EAAA,MAAA;;UIqBY,sBAAA;WACN;;AHvBX;AAIa,iBGiGG,qBAAA,CHjGO,MAAA,EGkGb,2BHlGa,CAAA,EGmGpB,sBHnGoB;;;UIiBN,4BAAA;;0BAES;;AL3Bb,cKiCA,mBAAA,CLjCc;EACe,iBAAA,SAAA;EAG7B,iBAAA,OAAA;EACA,iBAAA,OAAA;EAAR,WAAA,CAAA,SAAA,EK8B2B,SL9B3B,EAAA,OAAA,EK+ByB,WL/BzB,EAAA,OAAA,EKgCyB,uBLhCzB;EAAO,MAAA,CAAA,eAAA,EKoCS,sBLpCT,CAAA,EKqCP,OLrCO,CKqCC,4BLrCD,CAAA;sBKoDC,+BACR,QAAQ,gBAAgB;gBAKhB,4BACR,QAAQ,yBAAyB;;EJ5DrB,QAAA,6BACC;EAGL,QAAA,kBAAU;EAES,QAAA,sBAAA"}
@@ -1,17 +1,6 @@
1
- import { t as Address$1 } from "./abi-CQuxrNCU.cjs";
2
- import { n as Signature, r as ExactPartial } from "./misc-CpZxSPCP.cjs";
1
+ import { t as Authorization } from "./authorization-DnNpWjxB.mjs";
3
2
  import { EIP2098Signature, VRS } from "@otim/utils/schemas";
4
3
 
5
- //#region ../../node_modules/.pnpm/viem@2.39.3_bufferutil@4.0.9_typescript@5.9.3_utf-8-validate@5.0.10_zod@4.1.12/node_modules/viem/_types/types/authorization.d.ts
6
- type Authorization<uint32 = number, signed extends boolean = false> = {
7
- /** Address of the contract to delegate to. */
8
- address: Address$1;
9
- /** Chain ID. */
10
- chainId: uint32;
11
- /** Nonce of the EOA to delegate to. */
12
- nonce: uint32;
13
- } & (signed extends true ? Signature<uint32> : ExactPartial<Signature<uint32>>);
14
- //#endregion
15
4
  //#region src/utils/rlp.d.ts
16
5
  declare const normalizeYParityValue: (value: number | bigint | string | undefined | null) => 0 | 1;
17
6
  declare function createRlpEncodedAuthorization(authorization: Authorization): `0x${string}`;
@@ -22,4 +11,4 @@ declare const createEIP2098Signature: (vrs: VRS) => EIP2098Signature;
22
11
  declare const parseSignatureToVRS: (signature: string) => VRS;
23
12
  //#endregion
24
13
  export { normalizeYParityValue as i, parseSignatureToVRS as n, createRlpEncodedAuthorization as r, createEIP2098Signature as t };
25
- //# sourceMappingURL=index-BnP8vpJJ.d.cts.map
14
+ //# sourceMappingURL=index-CnjY7cyS.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-CnjY7cyS.d.mts","names":[],"sources":["../src/utils/rlp.ts","../src/utils/vrs.ts"],"sourcesContent":[],"mappings":";;;;cAuBa;iBAkCG,6BAAA,gBACC;iBAED,6BAAA;;;cCrBH,8BAA+B,QAAM;cAkBrC,4CAA2C"}
@@ -1,3 +1,4 @@
1
+ import { t as Chain } from "./rpc-CygBD_f7.mjs";
1
2
  import { ServerAccountConfig, ServerAccountType } from "@otim/sdk-core/account";
2
3
 
3
4
  //#region src/context/types.d.ts
@@ -5,6 +6,8 @@ interface OtimServerClientContext {
5
6
  readonly usesApiKeyAuth: boolean;
6
7
  readonly config: ServerAccountConfig;
7
8
  readonly accountType: ServerAccountType;
9
+ readonly chains: Chain[];
10
+ readonly defaultChain: Chain;
8
11
  }
9
12
  interface OtimReactClientContext {}
10
13
  type OtimClientContext = OtimServerClientContext | OtimReactClientContext;
@@ -17,4 +20,4 @@ declare function assertServerContext(context: OtimClientContext): asserts contex
17
20
  declare const isServerContext: (context: OtimClientContext) => context is OtimServerClientContext;
18
21
  //#endregion
19
22
  export { OtimReactClientContext as a, OtimClientContext as i, assertRequiresAuth as n, OtimServerClientContext as o, assertServerContext as r, isServerContext as t };
20
- //# sourceMappingURL=index-CcCMIBgF.d.mts.map
23
+ //# sourceMappingURL=index-DWE1xfOE.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-DWE1xfOE.d.mts","names":[],"sources":["../src/context/types.ts","../src/context/asserts.ts","../src/context/helpers.ts"],"sourcesContent":[],"mappings":";;;;UAMiB,uBAAA;;EAAA,SAAA,MAAA,EAEE,mBAFqB;EAErB,SAAA,WAAA,EACK,iBADL;EACK,SAAA,MAAA,EACL,KADK,EAAA;EACL,SAAA,YAAA,EACM,KADN;;AACW,UAGb,sBAAA,CAHa,CAG9B;AAEY,KAAA,iBAAA,GACR,uBAAA,GACA,sBAAA;;;iBCVY,kBAAA,UAA4B;iBAQ5B,mBAAA,UACL,uCACW;;;cChBT,2BACF,iCACG"}
@@ -1,4 +1,4 @@
1
- import { t as Address } from "./abi-CQuxrNCU.cjs";
1
+ import { c as Address } from "./abi-DW6AS0eM.mjs";
2
2
 
3
3
  //#region src/config/env.d.ts
4
4
  declare const Environment: {
@@ -24,4 +24,4 @@ declare const SIWE_VERSION = "1";
24
24
  declare const createLoginSiweMessage: (address: Address, nonce: string) => string;
25
25
  //#endregion
26
26
  export { env as a, isEnvironment as c, Environment as i, SIWE_VERSION as n, getApiUrl as o, createLoginSiweMessage as r, getTurnkeyApiUrl as s, SIWE_CHAIN_ID as t };
27
- //# sourceMappingURL=index-UnaahQgb.d.cts.map
27
+ //# sourceMappingURL=index-D_7CTJDl.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index-C4N2Xixk.d.mts","names":[],"sources":["../src/config/env.ts","../src/config/app.ts"],"sourcesContent":[],"mappings":";;;cAGa;;;AAAb,CAAA;AAIY,KAAA,WAAA,GAAW,CAAA,OAAW,WAA0B,CAAA,CAAA,MAAA,OAAA,WAAW,CAAA;AAE1D,cAAA,aAA0C,EAAA,CAAA,KAAA,EACI,MAAA,EAAA,GAAA,KAAA,IADJ,WACI;cAiB9C,yBAA0B;cAI1B,gCAAiC;cAIjC,KAAG;EC5BH,WAAA,EAAA,SAAa,GAAA,YAAA;EACb,UAAA,EAAA,OAAY;EAEZ,EAAA,EAAA,OAAA;;;;;;ADPb;AAIY,cCAC,aAAA,GDAqB,CAAA;AAErB,cCDA,YAAA,GDC0C,GAAA;AAkB1C,cCjBA,sBDiBqC,EAAA,CAAA,OAAA,EChBvC,ODgBuC,EAAA,KAAA,EAAA,MAAA,EAAA,GAAA,MAAA"}
1
+ {"version":3,"file":"index-D_7CTJDl.d.mts","names":[],"sources":["../src/config/env.ts","../src/config/app.ts"],"sourcesContent":[],"mappings":";;;cAGa;;;AAAb,CAAA;AAIY,KAAA,WAAA,GAAW,CAAA,OAAW,WAA0B,CAAA,CAAA,MAAA,OAAA,WAAW,CAAA;AAE1D,cAAA,aAA0C,EAAA,CAAA,KAAA,EACI,MAAA,EAAA,GAAA,KAAA,IADJ,WACI;cAiB9C,yBAA0B;cAI1B,gCAAiC;cAIjC,KAAG;EC5BH,WAAA,EAAA,SAAa,GAAA,YAAA;EACb,UAAA,EAAA,OAAY;EAEZ,EAAA,EAAA,OAAA;;;;;;ADPb;AAIY,cCAC,aAAA,GDAqB,CAAA;AAErB,cCDA,YAAA,GDC0C,GAAA;AAkB1C,cCjBA,sBDiBqC,EAAA,CAAA,OAAA,EChBvC,ODgBuC,EAAA,KAAA,EAAA,MAAA,EAAA,GAAA,MAAA"}
@@ -1,3 +1,4 @@
1
+ import { t as Chain } from "./rpc-BDoNl1Sp.cjs";
1
2
  import { ServerAccountConfig, ServerAccountType } from "@otim/sdk-core/account";
2
3
 
3
4
  //#region src/context/types.d.ts
@@ -5,6 +6,8 @@ interface OtimServerClientContext {
5
6
  readonly usesApiKeyAuth: boolean;
6
7
  readonly config: ServerAccountConfig;
7
8
  readonly accountType: ServerAccountType;
9
+ readonly chains: Chain[];
10
+ readonly defaultChain: Chain;
8
11
  }
9
12
  interface OtimReactClientContext {}
10
13
  type OtimClientContext = OtimServerClientContext | OtimReactClientContext;
@@ -17,4 +20,4 @@ declare function assertServerContext(context: OtimClientContext): asserts contex
17
20
  declare const isServerContext: (context: OtimClientContext) => context is OtimServerClientContext;
18
21
  //#endregion
19
22
  export { OtimReactClientContext as a, OtimClientContext as i, assertRequiresAuth as n, OtimServerClientContext as o, assertServerContext as r, isServerContext as t };
20
- //# sourceMappingURL=index-C1HSAemv.d.cts.map
23
+ //# sourceMappingURL=index-GSspyLr3.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-GSspyLr3.d.cts","names":[],"sources":["../src/context/types.ts","../src/context/asserts.ts","../src/context/helpers.ts"],"sourcesContent":[],"mappings":";;;;UAMiB,uBAAA;;EAAA,SAAA,MAAA,EAEE,mBAFqB;EAErB,SAAA,WAAA,EACK,iBADL;EACK,SAAA,MAAA,EACL,KADK,EAAA;EACL,SAAA,YAAA,EACM,KADN;;AACW,UAGb,sBAAA,CAHa,CAG9B;AAEY,KAAA,iBAAA,GACR,uBAAA,GACA,sBAAA;;;iBCVY,kBAAA,UAA4B;iBAQ5B,mBAAA,UACL,uCACW;;;cChBT,2BACF,iCACG"}
@@ -1,4 +1,4 @@
1
- import { t as Address } from "./abi-Bd3X6gV9.mjs";
1
+ import { c as Address } from "./abi-OUq-mx1W.cjs";
2
2
 
3
3
  //#region src/config/env.d.ts
4
4
  declare const Environment: {
@@ -24,4 +24,4 @@ declare const SIWE_VERSION = "1";
24
24
  declare const createLoginSiweMessage: (address: Address, nonce: string) => string;
25
25
  //#endregion
26
26
  export { env as a, isEnvironment as c, Environment as i, SIWE_VERSION as n, getApiUrl as o, createLoginSiweMessage as r, getTurnkeyApiUrl as s, SIWE_CHAIN_ID as t };
27
- //# sourceMappingURL=index-C4N2Xixk.d.mts.map
27
+ //# sourceMappingURL=index-lW-Oor1B.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index-UnaahQgb.d.cts","names":[],"sources":["../src/config/env.ts","../src/config/app.ts"],"sourcesContent":[],"mappings":";;;cAGa;;;AAAb,CAAA;AAIY,KAAA,WAAA,GAAW,CAAA,OAAW,WAA0B,CAAA,CAAA,MAAA,OAAA,WAAW,CAAA;AAE1D,cAAA,aAA0C,EAAA,CAAA,KAAA,EACI,MAAA,EAAA,GAAA,KAAA,IADJ,WACI;cAiB9C,yBAA0B;cAI1B,gCAAiC;cAIjC,KAAG;EC5BH,WAAA,EAAA,SAAa,GAAA,YAAA;EACb,UAAA,EAAA,OAAY;EAEZ,EAAA,EAAA,OAAA;;;;;;ADPb;AAIY,cCAC,aAAA,GDAqB,CAAA;AAErB,cCDA,YAAA,GDC0C,GAAA;AAkB1C,cCjBA,sBDiBqC,EAAA,CAAA,OAAA,EChBvC,ODgBuC,EAAA,KAAA,EAAA,MAAA,EAAA,GAAA,MAAA"}
1
+ {"version":3,"file":"index-lW-Oor1B.d.cts","names":[],"sources":["../src/config/env.ts","../src/config/app.ts"],"sourcesContent":[],"mappings":";;;cAGa;;;AAAb,CAAA;AAIY,KAAA,WAAA,GAAW,CAAA,OAAW,WAA0B,CAAA,CAAA,MAAA,OAAA,WAAW,CAAA;AAE1D,cAAA,aAA0C,EAAA,CAAA,KAAA,EACI,MAAA,EAAA,GAAA,KAAA,IADJ,WACI;cAiB9C,yBAA0B;cAI1B,gCAAiC;cAIjC,KAAG;EC5BH,WAAA,EAAA,SAAa,GAAA,YAAA;EACb,UAAA,EAAA,OAAY;EAEZ,EAAA,EAAA,OAAA;;;;;;ADPb;AAIY,cCAC,aAAA,GDAqB,CAAA;AAErB,cCDA,YAAA,GDC0C,GAAA;AAkB1C,cCjBA,sBDiBqC,EAAA,CAAA,OAAA,EChBvC,ODgBuC,EAAA,KAAA,EAAA,MAAA,EAAA,GAAA,MAAA"}
package/dist/index.cjs CHANGED
@@ -1,16 +1,16 @@
1
- const require_account = require('./account-Bwm5PTcc.cjs');
2
- const require_clients = require('./clients-DBRhkU4y.cjs');
1
+ const require_account = require('./account-CRvC_dXT.cjs');
2
+ const require_clients = require('./clients-BCyzdTLc.cjs');
3
3
  const require_config = require('./config-CjGpscVk.cjs');
4
4
  const require_context = require('./context-B-Wcmhb3.cjs');
5
5
  const require_utils = require('./utils-CVQFvsfl.cjs');
6
6
 
7
7
  exports.AccountType = require_account.AccountType;
8
+ exports.ActivityClient = require_clients.ActivityClient;
8
9
  exports.AuthClient = require_clients.AuthClient;
9
10
  exports.ConfigClient = require_clients.ConfigClient;
10
11
  exports.DelegationClient = require_clients.DelegationClient;
11
12
  exports.Environment = require_config.Environment;
12
13
  exports.OrchestrationClient = require_clients.OrchestrationClient;
13
- exports.PaymentRequestsClient = require_clients.PaymentRequestsClient;
14
14
  exports.SIWE_CHAIN_ID = require_config.SIWE_CHAIN_ID;
15
15
  exports.SIWE_VERSION = require_config.SIWE_VERSION;
16
16
  exports.ServerAccountType = require_account.ServerAccountType;
@@ -28,4 +28,5 @@ exports.isEnvironment = require_config.isEnvironment;
28
28
  exports.isPrivateKeyAccountConfig = require_account.isPrivateKeyAccountConfig;
29
29
  exports.isServerContext = require_context.isServerContext;
30
30
  exports.normalizeYParityValue = require_utils.normalizeYParityValue;
31
- exports.parseSignatureToVRS = require_utils.parseSignatureToVRS;
31
+ exports.parseSignatureToVRS = require_utils.parseSignatureToVRS;
32
+ exports.preparePaymentRequest = require_clients.preparePaymentRequest;
package/dist/index.d.cts CHANGED
@@ -1,8 +1,9 @@
1
- import "./abi-CQuxrNCU.cjs";
2
- import "./misc-CpZxSPCP.cjs";
3
- import { i as normalizeYParityValue, n as parseSignatureToVRS, r as createRlpEncodedAuthorization, t as createEIP2098Signature } from "./index-BnP8vpJJ.cjs";
4
- import { a as AccountType, c as OtimAccountSignMessageArgs, d as ServerAccountType, i as AccountConfig, l as PrivateKeyAccountConfig, n as isApiAccountConfig, o as ApiAccountConfig, r as isPrivateKeyAccountConfig, s as OtimAccount, t as createClientContext, u as ServerAccountConfig } from "./index-DK-40z4V.cjs";
5
- import { a as PaymentRequestsClient, c as AuthClient, i as CreatePaymentRequestResponse, l as LoginOptions, n as ActivatePaymentRequestParams, o as DelegationClient, r as CreatePaymentRequestParameters, s as ConfigClient, t as OrchestrationClient } from "./index-De8OZ-Be.cjs";
6
- import { a as env, c as isEnvironment, i as Environment, n as SIWE_VERSION, o as getApiUrl, r as createLoginSiweMessage, s as getTurnkeyApiUrl, t as SIWE_CHAIN_ID } from "./index-UnaahQgb.cjs";
7
- import { a as OtimReactClientContext, i as OtimClientContext, n as assertRequiresAuth, o as OtimServerClientContext, r as assertServerContext, t as isServerContext } from "./index-C1HSAemv.cjs";
8
- export { AccountConfig, AccountType, ActivatePaymentRequestParams, ApiAccountConfig, AuthClient, ConfigClient, CreatePaymentRequestParameters, CreatePaymentRequestResponse, DelegationClient, Environment, Environment as EnvironmentType, LoginOptions, OrchestrationClient, OtimAccount, OtimAccountSignMessageArgs, OtimClientContext, OtimReactClientContext, OtimServerClientContext, PaymentRequestsClient, PrivateKeyAccountConfig, SIWE_CHAIN_ID, SIWE_VERSION, ServerAccountConfig, ServerAccountType, assertRequiresAuth, assertServerContext, createClientContext, createEIP2098Signature, createLoginSiweMessage, createRlpEncodedAuthorization, env, getApiUrl, getTurnkeyApiUrl, isApiAccountConfig, isEnvironment, isPrivateKeyAccountConfig, isServerContext, normalizeYParityValue, parseSignatureToVRS };
1
+ import "./abi-OUq-mx1W.cjs";
2
+ import { t as Chain } from "./rpc-BDoNl1Sp.cjs";
3
+ import "./authorization-6anhDdQX.cjs";
4
+ import { a as AccountType, c as OtimAccountSignMessageArgs, d as ServerAccountType, i as AccountConfig, l as PrivateKeyAccountConfig, n as isApiAccountConfig, o as ApiAccountConfig, r as isPrivateKeyAccountConfig, s as OtimAccount, t as createClientContext, u as ServerAccountConfig } from "./index-C8H-BPGH.cjs";
5
+ import { a as preparePaymentRequest, c as AuthClient, i as PreparedPaymentRequest, l as LoginOptions, n as OrchestrationClient, o as DelegationClient, r as PreparePaymentRequestParams, s as ConfigClient, t as CreatePaymentRequestResponse, u as ActivityClient } from "./index-Ce_qYSJj.cjs";
6
+ import { a as env, c as isEnvironment, i as Environment, n as SIWE_VERSION, o as getApiUrl, r as createLoginSiweMessage, s as getTurnkeyApiUrl, t as SIWE_CHAIN_ID } from "./index-lW-Oor1B.cjs";
7
+ import { a as OtimReactClientContext, i as OtimClientContext, n as assertRequiresAuth, o as OtimServerClientContext, r as assertServerContext, t as isServerContext } from "./index-GSspyLr3.cjs";
8
+ import { i as normalizeYParityValue, n as parseSignatureToVRS, r as createRlpEncodedAuthorization, t as createEIP2098Signature } from "./index-BQMXYh9N.cjs";
9
+ export { AccountConfig, AccountType, ActivityClient, ApiAccountConfig, AuthClient, Chain, ConfigClient, CreatePaymentRequestResponse, DelegationClient, Environment, Environment as EnvironmentType, LoginOptions, OrchestrationClient, OtimAccount, OtimAccountSignMessageArgs, OtimClientContext, OtimReactClientContext, OtimServerClientContext, PreparePaymentRequestParams, PreparedPaymentRequest, PrivateKeyAccountConfig, SIWE_CHAIN_ID, SIWE_VERSION, ServerAccountConfig, ServerAccountType, assertRequiresAuth, assertServerContext, createClientContext, createEIP2098Signature, createLoginSiweMessage, createRlpEncodedAuthorization, env, getApiUrl, getTurnkeyApiUrl, isApiAccountConfig, isEnvironment, isPrivateKeyAccountConfig, isServerContext, normalizeYParityValue, parseSignatureToVRS, preparePaymentRequest };
package/dist/index.d.mts CHANGED
@@ -1,8 +1,9 @@
1
- import "./abi-Bd3X6gV9.mjs";
2
- import "./misc-CX4pLJaA.mjs";
3
- import { i as normalizeYParityValue, n as parseSignatureToVRS, r as createRlpEncodedAuthorization, t as createEIP2098Signature } from "./index-DW_zBRKz.mjs";
4
- import { a as AccountType, c as OtimAccountSignMessageArgs, d as ServerAccountType, i as AccountConfig, l as PrivateKeyAccountConfig, n as isApiAccountConfig, o as ApiAccountConfig, r as isPrivateKeyAccountConfig, s as OtimAccount, t as createClientContext, u as ServerAccountConfig } from "./index-B4fkcFy5.mjs";
5
- import { a as PaymentRequestsClient, c as AuthClient, i as CreatePaymentRequestResponse, l as LoginOptions, n as ActivatePaymentRequestParams, o as DelegationClient, r as CreatePaymentRequestParameters, s as ConfigClient, t as OrchestrationClient } from "./index-e5BLgzcW.mjs";
6
- import { a as env, c as isEnvironment, i as Environment, n as SIWE_VERSION, o as getApiUrl, r as createLoginSiweMessage, s as getTurnkeyApiUrl, t as SIWE_CHAIN_ID } from "./index-C4N2Xixk.mjs";
7
- import { a as OtimReactClientContext, i as OtimClientContext, n as assertRequiresAuth, o as OtimServerClientContext, r as assertServerContext, t as isServerContext } from "./index-CcCMIBgF.mjs";
8
- export { AccountConfig, AccountType, ActivatePaymentRequestParams, ApiAccountConfig, AuthClient, ConfigClient, CreatePaymentRequestParameters, CreatePaymentRequestResponse, DelegationClient, Environment, Environment as EnvironmentType, LoginOptions, OrchestrationClient, OtimAccount, OtimAccountSignMessageArgs, OtimClientContext, OtimReactClientContext, OtimServerClientContext, PaymentRequestsClient, PrivateKeyAccountConfig, SIWE_CHAIN_ID, SIWE_VERSION, ServerAccountConfig, ServerAccountType, assertRequiresAuth, assertServerContext, createClientContext, createEIP2098Signature, createLoginSiweMessage, createRlpEncodedAuthorization, env, getApiUrl, getTurnkeyApiUrl, isApiAccountConfig, isEnvironment, isPrivateKeyAccountConfig, isServerContext, normalizeYParityValue, parseSignatureToVRS };
1
+ import "./abi-DW6AS0eM.mjs";
2
+ import { t as Chain } from "./rpc-CygBD_f7.mjs";
3
+ import "./authorization-DnNpWjxB.mjs";
4
+ import { a as AccountType, c as OtimAccountSignMessageArgs, d as ServerAccountType, i as AccountConfig, l as PrivateKeyAccountConfig, n as isApiAccountConfig, o as ApiAccountConfig, r as isPrivateKeyAccountConfig, s as OtimAccount, t as createClientContext, u as ServerAccountConfig } from "./index-C5c51xs0.mjs";
5
+ import { a as preparePaymentRequest, c as AuthClient, i as PreparedPaymentRequest, l as LoginOptions, n as OrchestrationClient, o as DelegationClient, r as PreparePaymentRequestParams, s as ConfigClient, t as CreatePaymentRequestResponse, u as ActivityClient } from "./index-CiyyA-wd.mjs";
6
+ import { a as env, c as isEnvironment, i as Environment, n as SIWE_VERSION, o as getApiUrl, r as createLoginSiweMessage, s as getTurnkeyApiUrl, t as SIWE_CHAIN_ID } from "./index-D_7CTJDl.mjs";
7
+ import { a as OtimReactClientContext, i as OtimClientContext, n as assertRequiresAuth, o as OtimServerClientContext, r as assertServerContext, t as isServerContext } from "./index-DWE1xfOE.mjs";
8
+ import { i as normalizeYParityValue, n as parseSignatureToVRS, r as createRlpEncodedAuthorization, t as createEIP2098Signature } from "./index-CnjY7cyS.mjs";
9
+ export { AccountConfig, AccountType, ActivityClient, ApiAccountConfig, AuthClient, Chain, ConfigClient, CreatePaymentRequestResponse, DelegationClient, Environment, Environment as EnvironmentType, LoginOptions, OrchestrationClient, OtimAccount, OtimAccountSignMessageArgs, OtimClientContext, OtimReactClientContext, OtimServerClientContext, PreparePaymentRequestParams, PreparedPaymentRequest, PrivateKeyAccountConfig, SIWE_CHAIN_ID, SIWE_VERSION, ServerAccountConfig, ServerAccountType, assertRequiresAuth, assertServerContext, createClientContext, createEIP2098Signature, createLoginSiweMessage, createRlpEncodedAuthorization, env, getApiUrl, getTurnkeyApiUrl, isApiAccountConfig, isEnvironment, isPrivateKeyAccountConfig, isServerContext, normalizeYParityValue, parseSignatureToVRS, preparePaymentRequest };
package/dist/index.mjs CHANGED
@@ -1,7 +1,7 @@
1
- import { a as ServerAccountType, i as AccountType, n as isApiAccountConfig, r as isPrivateKeyAccountConfig, t as createClientContext } from "./account-p4sxzIt3.mjs";
2
- import { a as AuthClient, i as ConfigClient, n as PaymentRequestsClient, r as DelegationClient, t as OrchestrationClient } from "./clients-DMKeLhcJ.mjs";
1
+ import { a as ServerAccountType, i as AccountType, n as isApiAccountConfig, r as isPrivateKeyAccountConfig, t as createClientContext } from "./account-D1NVta26.mjs";
2
+ import { a as AuthClient, i as ConfigClient, n as OrchestrationClient, o as ActivityClient, r as DelegationClient, t as preparePaymentRequest } from "./clients-Bn4BUElo.mjs";
3
3
  import { a as env, c as isEnvironment, i as Environment, n as SIWE_VERSION, o as getApiUrl, r as createLoginSiweMessage, s as getTurnkeyApiUrl, t as SIWE_CHAIN_ID } from "./config-C_nc1DXn.mjs";
4
4
  import { n as assertRequiresAuth, r as assertServerContext, t as isServerContext } from "./context-uTye69B0.mjs";
5
5
  import { i as normalizeYParityValue, n as parseSignatureToVRS, r as createRlpEncodedAuthorization, t as createEIP2098Signature } from "./utils-DziAHBiz.mjs";
6
6
 
7
- export { AccountType, AuthClient, ConfigClient, DelegationClient, Environment, OrchestrationClient, PaymentRequestsClient, SIWE_CHAIN_ID, SIWE_VERSION, ServerAccountType, assertRequiresAuth, assertServerContext, createClientContext, createEIP2098Signature, createLoginSiweMessage, createRlpEncodedAuthorization, env, getApiUrl, getTurnkeyApiUrl, isApiAccountConfig, isEnvironment, isPrivateKeyAccountConfig, isServerContext, normalizeYParityValue, parseSignatureToVRS };
7
+ export { AccountType, ActivityClient, AuthClient, ConfigClient, DelegationClient, Environment, OrchestrationClient, SIWE_CHAIN_ID, SIWE_VERSION, ServerAccountType, assertRequiresAuth, assertServerContext, createClientContext, createEIP2098Signature, createLoginSiweMessage, createRlpEncodedAuthorization, env, getApiUrl, getTurnkeyApiUrl, isApiAccountConfig, isEnvironment, isPrivateKeyAccountConfig, isServerContext, normalizeYParityValue, parseSignatureToVRS, preparePaymentRequest };