Skip to content

Commit

Permalink
feat: upgrade rafiki to alpha 16 (#1498)
Browse files Browse the repository at this point in the history
  • Loading branch information
dragosp1011 authored Aug 27, 2024
1 parent e9407a0 commit d6b6769
Show file tree
Hide file tree
Showing 5 changed files with 106 additions and 29 deletions.
6 changes: 3 additions & 3 deletions docker/dev/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ services:
# Rafiki
rafiki-auth:
container_name: rafiki-auth
image: ghcr.io/interledger/rafiki-auth:v1.0.0-alpha.15
image: ghcr.io/interledger/rafiki-auth:v1.0.0-alpha.16
restart: always
networks:
- testnet
Expand All @@ -116,7 +116,7 @@ services:

rafiki-backend:
container_name: rafiki-backend
image: ghcr.io/interledger/rafiki-backend:v1.0.0-alpha.15
image: ghcr.io/interledger/rafiki-backend:v1.0.0-alpha.16
restart: always
privileged: true
volumes:
Expand Down Expand Up @@ -164,7 +164,7 @@ services:

rafiki-frontend:
container_name: rafiki-frontend
image: ghcr.io/interledger/rafiki-frontend:v1.0.0-alpha.15
image: ghcr.io/interledger/rafiki-frontend:v1.0.0-alpha.16
depends_on:
- rafiki-backend
restart: always
Expand Down
6 changes: 3 additions & 3 deletions docker/prod/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ services:
<<: *logging

rafiki-auth:
image: ghcr.io/interledger/rafiki-auth:v1.0.0-alpha.15
image: ghcr.io/interledger/rafiki-auth:v1.0.0-alpha.16
container_name: rafiki-auth
environment:
NODE_ENV: ${NODE_ENV}
Expand All @@ -145,7 +145,7 @@ services:
<<: *logging

rafiki-backend:
image: ghcr.io/interledger/rafiki-backend:v1.0.0-alpha.15
image: ghcr.io/interledger/rafiki-backend:v1.0.0-alpha.16
container_name: rafiki-backend
depends_on:
- postgres
Expand Down Expand Up @@ -215,7 +215,7 @@ services:
<<: *logging

rafiki-frontend:
image: ghcr.io/interledger/rafiki-frontend:v1.0.0-alpha.15
image: ghcr.io/interledger/rafiki-frontend:v1.0.0-alpha.16
container_name: rafiki-frontend
depends_on:
- rafiki-backend
Expand Down
111 changes: 100 additions & 11 deletions packages/wallet/backend/src/rafiki/backend/generated/graphql.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,30 @@ export type Scalars = {
UInt8: { input: number; output: number; }
};

export type AccountingTransfer = Model & {
__typename?: 'AccountingTransfer';
/** Amount sent (fixed send) */
amount: Scalars['BigInt']['output'];
/** Date-time of creation */
createdAt: Scalars['String']['output'];
/** Credit account id */
creditAccountId: Scalars['ID']['output'];
/** Debit account id */
debitAccountId: Scalars['ID']['output'];
/** Payment id */
id: Scalars['ID']['output'];
/** Identifier that partitions the sets of accounts that can transact with each other. */
ledger: Scalars['UInt8']['output'];
/** Type of accounting transfer */
transferType: TransferType;
};

export type AccountingTransferConnection = {
__typename?: 'AccountingTransferConnection';
credits: Array<AccountingTransfer>;
debits: Array<AccountingTransfer>;
};

export type AdditionalProperty = {
__typename?: 'AdditionalProperty';
key: Scalars['String']['output'];
Expand Down Expand Up @@ -51,6 +75,16 @@ export type AmountInput = {
value: Scalars['BigInt']['input'];
};

export type ApproveIncomingPaymentInput = {
/** Unique identifier of the incoming payment to be approved. Note: Incoming Payment must be PENDING. */
id: Scalars['ID']['input'];
};

export type ApproveIncomingPaymentResponse = {
__typename?: 'ApproveIncomingPaymentResponse';
payment?: Maybe<IncomingPayment>;
};

export type Asset = Model & {
__typename?: 'Asset';
/** [ISO 4217 currency code](https://en.wikipedia.org/wiki/ISO_4217), e.g. `USD` */
Expand Down Expand Up @@ -109,6 +143,16 @@ export type BasePayment = {
walletAddressId: Scalars['ID']['output'];
};

export type CancelIncomingPaymentInput = {
/** Unique identifier of the incoming payment to be cancelled. Note: Incoming Payment must be PENDING. */
id: Scalars['ID']['input'];
};

export type CancelIncomingPaymentResponse = {
__typename?: 'CancelIncomingPaymentResponse';
payment?: Maybe<IncomingPayment>;
};

export type CancelOutgoingPaymentInput = {
/** Outgoing payment id */
id: Scalars['ID']['input'];
Expand Down Expand Up @@ -581,6 +625,10 @@ export type Model = {

export type Mutation = {
__typename?: 'Mutation';
/** Approves the incoming payment if the incoming payment is in the PENDING state */
approveIncomingPayment: ApproveIncomingPaymentResponse;
/** Cancel the incoming payment if the incoming payment is in the PENDING state */
cancelIncomingPayment: CancelIncomingPaymentResponse;
/** Cancel Outgoing Payment */
cancelOutgoingPayment: OutgoingPaymentResponse;
/** Create an asset */
Expand Down Expand Up @@ -652,6 +700,16 @@ export type Mutation = {
};


export type MutationApproveIncomingPaymentArgs = {
input: ApproveIncomingPaymentInput;
};


export type MutationCancelIncomingPaymentArgs = {
input: CancelIncomingPaymentInput;
};


export type MutationCancelOutgoingPaymentArgs = {
input: CancelOutgoingPaymentInput;
};
Expand Down Expand Up @@ -815,6 +873,8 @@ export type OutgoingPayment = BasePayment & Model & {
/** Amount to send (fixed send) */
debitAmount: Amount;
error?: Maybe<Scalars['String']['output']>;
/** Id of the Grant under which this outgoing payment was created */
grantId?: Maybe<Scalars['String']['output']>;
/** Outgoing payment id */
id: Scalars['ID']['output'];
/** Available liquidity */
Expand Down Expand Up @@ -848,6 +908,12 @@ export type OutgoingPaymentEdge = {
node: OutgoingPayment;
};

export type OutgoingPaymentFilter = {
receiver?: InputMaybe<FilterString>;
state?: InputMaybe<FilterString>;
walletAddressId?: InputMaybe<FilterString>;
};

export type OutgoingPaymentResponse = {
__typename?: 'OutgoingPaymentResponse';
payment?: Maybe<OutgoingPayment>;
Expand Down Expand Up @@ -963,6 +1029,8 @@ export type PostLiquidityWithdrawalInput = {

export type Query = {
__typename?: 'Query';
/** Fetch a page of accounting transfers */
accountingTransfers: AccountingTransferConnection;
/** Fetch an asset */
asset?: Maybe<Asset>;
/** Fetch a page of assets. */
Expand All @@ -971,6 +1039,8 @@ export type Query = {
incomingPayment?: Maybe<IncomingPayment>;
/** Fetch an Open Payments outgoing payment */
outgoingPayment?: Maybe<OutgoingPayment>;
/** Fetch a page of outgoing payments by receiver */
outgoingPayments: OutgoingPaymentConnection;
/** Fetch a page of combined payments */
payments: PaymentConnection;
/** Fetch a peer */
Expand All @@ -990,6 +1060,12 @@ export type Query = {
};


export type QueryAccountingTransfersArgs = {
id: Scalars['String']['input'];
limit?: InputMaybe<Scalars['Int']['input']>;
};


export type QueryAssetArgs = {
id: Scalars['String']['input'];
};
Expand All @@ -1014,6 +1090,16 @@ export type QueryOutgoingPaymentArgs = {
};


export type QueryOutgoingPaymentsArgs = {
after?: InputMaybe<Scalars['String']['input']>;
before?: InputMaybe<Scalars['String']['input']>;
filter?: InputMaybe<OutgoingPaymentFilter>;
first?: InputMaybe<Scalars['Int']['input']>;
last?: InputMaybe<Scalars['Int']['input']>;
sortOrder?: InputMaybe<SortOrder>;
};


export type QueryPaymentsArgs = {
after?: InputMaybe<Scalars['String']['input']>;
before?: InputMaybe<Scalars['String']['input']>;
Expand Down Expand Up @@ -1077,18 +1163,12 @@ export type Quote = {
createdAt: Scalars['String']['output'];
/** Amount to send (fixed send) */
debitAmount: Amount;
/** Estimated exchange rate */
estimatedExchangeRate?: Maybe<Scalars['Float']['output']>;
/** Date-time of expiration */
expiresAt: Scalars['String']['output'];
/** Upper bound of probed exchange rate */
highEstimatedExchangeRate: Scalars['Float']['output'];
/** Quote id */
id: Scalars['ID']['output'];
/** Lower bound of probed exchange rate */
lowEstimatedExchangeRate: Scalars['Float']['output'];
/** Maximum value per packet allowed on the possible routes */
maxPacketAmount: Scalars['BigInt']['output'];
/** Aggregate exchange rate the payment is guaranteed to meet */
minExchangeRate: Scalars['Float']['output'];
/** Amount to receive (fixed receive) */
receiveAmount: Amount;
/** Wallet address URL of the receiver */
Expand Down Expand Up @@ -1171,6 +1251,15 @@ export enum SortOrder {
Desc = 'DESC'
}

export enum TransferType {
/** Deposit transfer type. */
Deposit = 'DEPOSIT',
/** Transfer type. */
Transfer = 'TRANSFER',
/** Withdrawal transfer type. */
Withdrawal = 'WITHDRAWAL'
}

export type TriggerWalletAddressEventsInput = {
/** Unique key to ensure duplicate or retried requests are processed only once. See [idempotence](https://en.wikipedia.org/wiki/Idempotence) */
idempotencyKey?: InputMaybe<Scalars['String']['input']>;
Expand Down Expand Up @@ -1453,21 +1542,21 @@ export type CreateOutgoingPaymentMutationVariables = Exact<{
}>;


export type CreateOutgoingPaymentMutation = { __typename?: 'Mutation', createOutgoingPayment: { __typename?: 'OutgoingPaymentResponse', payment?: { __typename?: 'OutgoingPayment', createdAt: string, metadata?: any | null, error?: string | null, id: string, walletAddressId: string, receiver: string, state: OutgoingPaymentState, stateAttempts: number, quote?: { __typename?: 'Quote', createdAt: string, expiresAt: string, highEstimatedExchangeRate: number, id: string, lowEstimatedExchangeRate: number, maxPacketAmount: bigint, minExchangeRate: number, walletAddressId: string, receiver: string, receiveAmount: { __typename?: 'Amount', assetCode: string, assetScale: number, value: bigint }, debitAmount: { __typename?: 'Amount', assetCode: string, assetScale: number, value: bigint } } | null, receiveAmount: { __typename?: 'Amount', assetCode: string, assetScale: number, value: bigint }, debitAmount: { __typename?: 'Amount', assetCode: string, assetScale: number, value: bigint }, sentAmount: { __typename?: 'Amount', assetCode: string, assetScale: number, value: bigint } } | null } };
export type CreateOutgoingPaymentMutation = { __typename?: 'Mutation', createOutgoingPayment: { __typename?: 'OutgoingPaymentResponse', payment?: { __typename?: 'OutgoingPayment', createdAt: string, metadata?: any | null, error?: string | null, id: string, walletAddressId: string, receiver: string, state: OutgoingPaymentState, stateAttempts: number, quote?: { __typename?: 'Quote', createdAt: string, expiresAt: string, id: string, walletAddressId: string, receiver: string, receiveAmount: { __typename?: 'Amount', assetCode: string, assetScale: number, value: bigint }, debitAmount: { __typename?: 'Amount', assetCode: string, assetScale: number, value: bigint } } | null, receiveAmount: { __typename?: 'Amount', assetCode: string, assetScale: number, value: bigint }, debitAmount: { __typename?: 'Amount', assetCode: string, assetScale: number, value: bigint }, sentAmount: { __typename?: 'Amount', assetCode: string, assetScale: number, value: bigint } } | null } };

export type CreateQuoteMutationVariables = Exact<{
input: CreateQuoteInput;
}>;


export type CreateQuoteMutation = { __typename?: 'Mutation', createQuote: { __typename?: 'QuoteResponse', quote?: { __typename?: 'Quote', createdAt: string, expiresAt: string, highEstimatedExchangeRate: number, id: string, lowEstimatedExchangeRate: number, maxPacketAmount: bigint, minExchangeRate: number, walletAddressId: string, receiver: string, receiveAmount: { __typename?: 'Amount', assetCode: string, assetScale: number, value: bigint }, debitAmount: { __typename?: 'Amount', assetCode: string, assetScale: number, value: bigint } } | null } };
export type CreateQuoteMutation = { __typename?: 'Mutation', createQuote: { __typename?: 'QuoteResponse', quote?: { __typename?: 'Quote', createdAt: string, expiresAt: string, id: string, walletAddressId: string, receiver: string, receiveAmount: { __typename?: 'Amount', assetCode: string, assetScale: number, value: bigint }, debitAmount: { __typename?: 'Amount', assetCode: string, assetScale: number, value: bigint } } | null } };

export type GetQuoteQueryVariables = Exact<{
quoteId: Scalars['String']['input'];
}>;


export type GetQuoteQuery = { __typename?: 'Query', quote?: { __typename?: 'Quote', id: string, walletAddressId: string, receiver: string, maxPacketAmount: bigint, minExchangeRate: number, lowEstimatedExchangeRate: number, highEstimatedExchangeRate: number, createdAt: string, expiresAt: string, debitAmount: { __typename?: 'Amount', value: bigint, assetCode: string, assetScale: number }, receiveAmount: { __typename?: 'Amount', value: bigint, assetCode: string, assetScale: number } } | null };
export type GetQuoteQuery = { __typename?: 'Query', quote?: { __typename?: 'Quote', id: string, walletAddressId: string, receiver: string, createdAt: string, expiresAt: string, debitAmount: { __typename?: 'Amount', value: bigint, assetCode: string, assetScale: number }, receiveAmount: { __typename?: 'Amount', value: bigint, assetCode: string, assetScale: number } } | null };

export type CreateReceiverMutationVariables = Exact<{
input: CreateReceiverInput;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,7 @@ export const createOutgoingPaymentMutation = gql`
quote {
createdAt
expiresAt
highEstimatedExchangeRate
id
lowEstimatedExchangeRate
maxPacketAmount
minExchangeRate
walletAddressId
receiveAmount {
assetCode
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,7 @@ export const createQuoteMutation = gql`
quote {
createdAt
expiresAt
highEstimatedExchangeRate
id
lowEstimatedExchangeRate
maxPacketAmount
minExchangeRate
walletAddressId
receiveAmount {
assetCode
Expand Down Expand Up @@ -44,10 +40,6 @@ export const getQuoteQuery = gql`
assetCode
assetScale
}
maxPacketAmount
minExchangeRate
lowEstimatedExchangeRate
highEstimatedExchangeRate
createdAt
expiresAt
}
Expand Down

0 comments on commit d6b6769

Please sign in to comment.