Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions examples/peer-to-peer/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -179,9 +179,8 @@ import express from 'express'
)
console.log(outgoingPaymentGrant.interact.redirect)

const interactRef = await getInteractRefFromTempCallbackServer(
callbackServerPort
)
const interactRef =
await getInteractRefFromTempCallbackServer(callbackServerPort)

await readline
.createInterface({ input: process.stdin, output: process.stdout })
Expand Down
2 changes: 1 addition & 1 deletion examples/peer-to-peer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"license": "ISC",
"dependencies": {
"@interledger/open-payments": "workspace:^",
"express": "^5.1.0",
"express": "^5.2.1",
"readline": "^1.3.0"
}
}
30 changes: 15 additions & 15 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
"license": "Apache-2.0",
"repository": "https://github.com/interledger/open-payments",
"engines": {
"pnpm": "^8.15.6",
"pnpm": "^11.22",
"node": "24"
},
"packageManager": "pnpm@8.15.6",
"packageManager": "pnpm@11.22.0",
"scripts": {
"preinstall": "npx only-allow pnpm",
"lint": "eslint --max-warnings=0 --fix .",
Expand All @@ -20,20 +20,20 @@
"clean": "find . -name 'node_modules' -type d -prune -exec rm -rf '{}' +"
},
"devDependencies": {
"@changesets/cli": "^2.26.1",
"@commitlint/cli": "^17.4.4",
"@commitlint/config-conventional": "^17.4.4",
"@swc/core": "^1.5.0",
"@swc/jest": "^0.2.36",
"@types/jest": "^29.5.12",
"@typescript-eslint/eslint-plugin": "^5.55.0",
"@typescript-eslint/parser": "^5.55.0",
"eslint": "^8.36.0",
"eslint-config-prettier": "^8.7.0",
"jest": "^29.7.0",
"prettier": "^2.8.4",
"@changesets/cli": "^2.31.1",
"@commitlint/cli": "^17.8.1",
"@commitlint/config-conventional": "^17.8.1",
"@swc/core": "^1.16.0",
"@swc/jest": "^0.2.39",
"@types/jest": "^30.0.0",
"@typescript-eslint/eslint-plugin": "^5.62.0",
"@typescript-eslint/parser": "^5.62.0",
"eslint": "^8.57.1",
"eslint-config-prettier": "^10.1.8",
"jest": "^30.4.2",
"prettier": "^3.9.6",
"ts-node-dev": "^2.0.0",
"typescript": "^5.8.2"
"typescript": "^5.9.3"
},
"prettier": {
"semi": false,
Expand Down
10 changes: 5 additions & 5 deletions packages/http-signature-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@
"prepack": "pnpm build"
},
"dependencies": {
"http-message-signatures": "^1.0.4",
"http-message-signatures": "^1.0.6",
"httpbis-digest-headers": "^1.0.0",
"jose": "^4.13.1",
"uuid": "^9.0.0"
"jose": "^4.15.9",
"uuid": "^9.0.1"
},
"devDependencies": {
"@types/node": "^20.12.7",
"@types/uuid": "^9.0.0"
"@types/node": "^26.2.0",
"@types/uuid": "^9.0.8"
}
}
14 changes: 7 additions & 7 deletions packages/open-payments/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,18 @@
"test": "jest --passWithNoTests"
},
"devDependencies": {
"@types/node": "^20.12.7",
"@types/uuid": "^9.0.0",
"nock": "14.0.0-beta.5",
"openapi-typescript": "^7.6.1"
"@types/node": "^26.2.0",
"@types/uuid": "^9.0.8",
"nock": "14.0.17",
"openapi-typescript": "^7.13.0"
},
"dependencies": {
"@interledger/http-signature-utils": "workspace:2.0.3",
"@interledger/openapi": "workspace:2.0.4",
"base64url": "^3.0.1",
"http-message-signatures": "^0.1.2",
"ky": "^1.2.3",
"pino": "^8.11.0",
"uuid": "^9.0.0"
"ky": "^1.14.3",
"pino": "^8.21.0",
"uuid": "^9.0.1"
}
}
17 changes: 8 additions & 9 deletions packages/open-payments/src/client/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,16 +76,13 @@ interface AuthenticatedRequestArgs {
}

export interface GrantOrTokenRequestArgs
extends UnauthenticatedResourceRequestArgs,
AuthenticatedRequestArgs {}
extends UnauthenticatedResourceRequestArgs, AuthenticatedRequestArgs {}

export interface ResourceRequestArgs
extends UnauthenticatedResourceRequestArgs,
AuthenticatedRequestArgs {}
extends UnauthenticatedResourceRequestArgs, AuthenticatedRequestArgs {}

export interface CollectionRequestArgs
extends UnauthenticatedResourceRequestArgs,
AuthenticatedRequestArgs {
extends UnauthenticatedResourceRequestArgs, AuthenticatedRequestArgs {
/**
* The wallet address URL of the requested collection.
*
Expand All @@ -112,7 +109,7 @@ const parseKey = (deps: { logger: Logger }, privateKey: KeyLike): KeyObject => {
}
}

const keyFilePath = path.resolve(process.cwd(), privateKey)
const keyFilePath = path.resolve(process.cwd(), privateKey as string)

if (fs.existsSync(keyFilePath)) {
deps.logger.debug(`Loading key from file path: ${keyFilePath}`)
Expand Down Expand Up @@ -306,8 +303,10 @@ export type CreateAuthenticatedClientArgs = BaseAuthenticatedClientArgs &
export type CreateAuthenticatedClientWithReqInterceptorArgs =
BaseAuthenticatedClientArgs & InterceptorConfig

export interface AuthenticatedClient
extends Omit<UnauthenticatedClient, 'incomingPayment'> {
export interface AuthenticatedClient extends Omit<
UnauthenticatedClient,
'incomingPayment'
> {
incomingPayment: IncomingPaymentRoutes
outgoingPayment: OutgoingPaymentRoutes
grant: GrantRoutes
Expand Down
4 changes: 2 additions & 2 deletions packages/open-payments/src/client/outgoing-payment.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ describe('outgoing-payment', (): void => {
},
openApiValidators.failedValidator
)
).rejects.toThrowError(OpenPaymentsClientError)
).rejects.toBeInstanceOf(OpenPaymentsClientError)
scope.done()
})
})
Expand Down Expand Up @@ -406,7 +406,7 @@ describe('outgoing-payment', (): void => {
walletAddress
}
)
).rejects.toThrow(OpenPaymentsClientError)
).rejects.toBeInstanceOf(OpenPaymentsClientError)
scope.done()
})
})
Expand Down
4 changes: 2 additions & 2 deletions packages/open-payments/src/client/quote.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ describe('quote', (): void => {
},
openApiValidators.failedValidator
)
).rejects.toThrowError()
).rejects.toBeTruthy()
scope.done()
})
})
Expand Down Expand Up @@ -94,7 +94,7 @@ describe('quote', (): void => {
openApiValidators.failedValidator,
{ receiver: quote.receiver, method: 'ilp', walletAddress }
)
).rejects.toThrowError()
).rejects.toBeTruthy()
scope.done()
})
})
Expand Down
4 changes: 2 additions & 2 deletions packages/open-payments/src/client/token.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ describe('token', (): void => {
},
openApiValidators.failedValidator
)
).rejects.toThrowError()
).rejects.toBeTruthy()
scope.done()
})
})
Expand Down Expand Up @@ -109,7 +109,7 @@ describe('token', (): void => {
},
openApiValidators.failedValidator
)
).rejects.toThrowError()
).rejects.toBeTruthy()
scope.done()
})
})
Expand Down
20 changes: 18 additions & 2 deletions packages/open-payments/src/openapi/generated/auth-server-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,9 @@ export interface components {
* Receiver
* Format: uri
* @description The URL of the incoming payment that is being paid.
* @example https://ilp.interledger-test.dev/incoming-payments/08394f02-7b7b-45e2-b645-51d04e7c330c
* @example http://ilp.interledger-test.dev/incoming-payments/08394f02-7b7b-45e2-b645-51d04e7c330c
* @example https://ilp.interledger-test.dev/incoming-payments/1
*/
receiver: string;
/** @description A description of the rights associated with this access token. */
Expand Down Expand Up @@ -245,6 +248,9 @@ export interface components {
/**
* Interval
* @description [ISO8601 repeating interval](https://en.wikipedia.org/wiki/ISO_8601#Repeating_intervals)
* @example R11/2022-08-24T14:15:22Z/P1M
* @example R/2017-03-01T13:00:00Z/2018-05-11T15:30:00Z
* @example R-1/P1Y2M10DT2H30M/2022-05-11T15:30:00Z
*/
interval: string;
/**
Expand Down Expand Up @@ -326,6 +332,14 @@ export interface components {
/**
* Ed25519 Public Key
* @description A JWK representation of an Ed25519 Public Key
* @example {
* "kid": "key-1",
* "alg": "EdDSA",
* "use": "sig",
* "kty": "OKP",
* "crv": "Ed25519",
* "x": "11qYAYKxCrfVS_7TyWQHOg7hcvPapiMlrwIaaPcHURo"
* }
*/
"json-web-key": {
kid: string;
Expand Down Expand Up @@ -438,8 +452,10 @@ export interface operations {
requestBody?: {
content: {
"application/json": {
/** @description The interaction reference generated for this
* interaction by the AS. */
/**
* @description The interaction reference generated for this
* interaction by the AS.
*/
interact_ref?: string;
};
};
Expand Down
Loading
Loading